Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 29,551 through 29,575 (of 32,499 total)
  • Author
    Search Results
  • #52655
    ganzua
    Member

    “or there is a large demand.”

    well, I’m not large but I do demand :)

    “It’s very easy to apply filters to the signature just like the post text, smiles, auto-close tags and a whole bunch of other tweaks and security could be easily added.”

    and all these too

    #59485
    skipdaddyo
    Member

    You’re spot on – the flag approach it must be…

    Topic Count (and probably Post Count) is driven by a hard coded sql value that is incremented each time a topic is added a decremented when one is deleted…

    #59484
    _ck_
    Participant

    See that’s the thing, you won’t be able to pre-guess everywhere it will show up. Any future plugins will not know to obey your time logic.

    However most code should know to check for topic_status==0

    If you set it higher and then set it back when the time is right, then you should be able to get around all functions. Just don’t use 1 or 2 as a marker.

    Then every few minutes do a mysql check for any topics that have that unique number set in topic_status and if their time has past, set topic_status to zero.

    That reminds me, bbpress will need a pseudo-cron that can be hooked with a real cron job if so desired.

    #59480
    skipdaddyo
    Member

    Thanks _ck_

    After a day of hacking around (my php handicap is 27 afterall), it has been done :o)

    To cut a long story short…

    I added time and date fields to the post form (visible to moderators only)

    Told functions php to carry on as usual unless it sees a year value – otherwise it uses the value it’s given.

    The sql query that spits out the posts now only returns a row if the topic_start_time is lower than the time the request was made.

    I can supply (very fugly) code if anyone wants to do the same thing.

    The reason I wanted this is so I could start a topic or topics – and walk away. As you can with future posts in WP.

    #59242
    _ck_
    Participant

    >For a lark I pointed the plugin to the WordPress Plugin SVN. It got about 1/4 of the way through retrieving the list of plugins and died (script timeout).

    With many people accessing it, yeah it will necessary to pre-compile a default list of a full revision weekly.

    Or to be sneaky for now you can set a flag in options after each curl fetch and restart bbpress if you calculate approaching 30 seconds.

    Both ways sound like headaches.

    I wonder if the trac cache is faster/more efficent?

    ie.

    https://plugins-svn.bbpress.org/plugin-browser-for-bbpress/trunk/plugin-browser.php

    vs.

    https://plugins-dev.bbpress.org/browser/plugin-browser-for-bbpress/trunk/plugin-browser.php?format=raw

    I wonder if trac can be tricked to pre-gzip it all to download beforehand as a bundled revision? It’s got to compress wonderfully as it’s entirely plain text and repeating php functions.

    ps. be sure to take advantage of gzip support in curl / fsockopen – I have some code I wrote somewhere to do this if you need ideas

    #59325
    berniesteak
    Member

    Did you get anywhere with this either oledole? I can’t figure it, and it doesn’t look like we’re going to get any help! :(

    #51563
    outchy
    Member

    i hear what you’re saying but believe me, i tried my damndest to figure it out myself before i posted (as i do before all my questions). the problem is i don’t really understand the syntax of php code just yet so i don’t know how to use the get_user_profile_link(); function in this particular example (getting the profile link of the last poster from the entire messageboard onto the front page, it’s a little confusing). if you can give me some help on this one, i’d appreciate it.

    #51562
    fel64
    Member

    I don’t know off the top of my head. What I’d do in this case, as for pretty much every question that’s asked, is open my copy of bbPress and look around in the files. So that sort of thing sounds like a template tag, so I’d look at bb-includes/template-functions.php, then search for “profile_link” or a couple other similar terms if I couldn’t find it.

    This time I tested it and searching for “profile_link” will pretty quickly get you the function you want. But finding out what you need is something you can pretty easily do yourself most of the time. :)

    (Not that there’s a problem with you asking anything, this is just teach-a-man-to-fish thinkin’.)

    #59456
    mazdakam
    Member

    No! it is not nessecary to merge all files into one file!

    just we need to name the mo files into our main mo file for example fa_IR

    and put each mo file into plugin or template folder and it will be work :)

    #59455
    mazdakam
    Member

    oh :( this is bad news for me but i will try it

    i think it was much better that each plugin and template had separate and independent language like joomla components

    #59448
    _ck_
    Participant

    Actually, forget that way.

    I just checked the source and it’s right there for us:

    <? if (bb_is_user_logged_in()) { echo '<a href="'.get_profile_tab_link(bb_get_current_user_info( 'id' ), 'favorites' ).'">favorites</a>'; } ?>

    much better

    #59446
    _ck_
    Participant

    one quick & dirty way:

    <? if (bb_is_user_logged_in()) { ?><a href="<? echo $bb->uri.'profile.php?id='.bb_get_current_user_info( 'id' ); ?>&tab=favorites">favorites</a><? } ?>

    #2174
    mazdakam
    Member

    every one knows that tags are important but we know that writing tags for users are not easy sometimes so we need auto complete tags features

    to show and suggest tags when user type letters it would be 4 advantages

    1) fast taginig

    2) user friendly gui

    3) saving user time

    4) waiting for number 4.. no more finished :P

    #54081
    mazdakam
    Member

    wow! it worked! really thanks :)

    so it would be excellent add to fav automatically if each user reply the post

    and also give an option to user to add/remove this setting as default each time he or she wants

    is it posible for you?

    other forums has this function by deafult

    #2172
    mazdakam
    Member

    i translate some plugins and have mo files but i don’t know how to define them to work?!

    i translate 22 bbpress plugins :)

    should i insert them in to the include/language folder?

    with which name or i must create one file and merge whole of them to he one file

    #59335

    In reply to: super beginner :)

    warmechoco
    Member

    and euhm.. “not even tried” .. That ‘s not true at all.. see my subject ;)

    , but ok thanks anyway :)

    #51051
    jackhsieh
    Member

    Here below is the workable method for the purpose of trying bbpress. To hide the mail() function code and then add a echo() to show the password on-screen. Like below…

    (registration-functions.php)

    echo (‘Your Password:’ . “$pass”);

    /*

    mail( bb_get_user_email( $user->ID ), bb_get_option(‘name’) . ‘: ‘ . __(‘Password’),

    sprintf( $message, “$user->user_login”, “$pass”, bb_get_option(‘uri’) ),

    ‘From: ‘ . bb_get_option(‘admin_email’)

    */

    #2170
    LMD
    Participant

    There appears to be a problem with the SVN for plugins.

    I’ve had a user who downloaded the latest version of Avatar Upload, only to find the contents of sub-folders to be empty — even though the files are present in the repository when I browsed source in Trac (in both the Trunk AND latest Tag). Somehow they are missing in the automated ZIP download.

    The file structure is:

    trunk/ (and also 'tags/0.7/')
    additional-files/
    avatars/ (contents missing in the ZIP)
    my-templates/ (ditto)
    .

    Is this a one-off blip or is it a bug? Either way, can it be fixed?

    #59239
    Sam Bauers
    Participant

    Gah! In 0.1.9 I changed all the version numbers but didn’t actually change the code!

    0.1.10 is now committed, and *it* will fix your problem.

    #54080
    _ck_
    Participant

    Automatically adding a user’s new topic to their own favorites is as simple as this plugin. I’ve unhooked the notification plugin so users don’t get emailed for their own new topics starting.

    <?php
    /*
    * Plugin Name: User Topics To Favorites
    * Plugin Description: automatically adds new topics created by a user to their favorites
    * Author: _ck_
    * Author URI: http://CKon.wordpress.com
    * Plugin URI: http://CKon.wordpress.com
    * Version: 0.1
    */

    function user_topics_to_favorites($topic_id) {
    remove_action('bb_new_post', 'notification_new_post'); // don't email users about their new topic
    $topic = get_topic( get_topic_id( $topic_id ) ); // fetch topic poster's id
    bb_add_user_favorite( $topic->topic_poster, $topic_id );
    }
    add_action('bb_new_topic', 'user_topics_to_favorites');

    ?>

    #59406

    In reply to: forum.wp-persian.com

    mazdakam
    Member

    I noticed the “support forum” plugin was outputting english strings in your forum. I have just updated the plugin to use gettext on all the strings that weren’t using it. So if you want full translation it is now available (you will need to modify your language files to add the strings).

    yes you are right. i was busy for configuring the plugins now i am free for translating plugins languages

    so i have my bbpress full translating where can i upload it?

    i eamil it to the mailing list but i got no reply :)

    #59405

    In reply to: forum.wp-persian.com

    mazdakam
    Member

    Will it have bbPress support as well

    not yet for bbpress we use bbpress for support wp persian.

    but i am thinking to lunch support forum for bbpress :D i need to consult with my friends in wp persian team

    #49631

    In reply to: Emoticons For bbPress?

    mazdakam
    Member

    Please stop pasting huge chunks of code on the forums. Use something like http://pastebin.ca/.

    ok i will do

    listen i want to tell you somthing important :) i downloaded bbEmoticons-0.72 and unpacked it and then send it to my plugin then i go to my admin and try to active it but it show fattal error my bbpress is .8.2.1

    so i tried to download 6th and every time it didnt active!

    now i come and copy the code form here and open new file in php and save it then try to upload it and active it :O

    it get active and work! what is wrong?

    do you test bbEmoticons-0.72 from the original download address i think there is somthing wrong in the original file

    please try it once for me :)

    #49630

    In reply to: Emoticons For bbPress?

    fel64
    Member

    Please stop pasting huge chunks of code on the forums. Use something like http://pastebin.ca/.

    That code runs fine for me. What problem are you having?

    It might be simplest to start off with the original plugin and fix that because you might have done quite a lot to it.

    #49628

    In reply to: Emoticons For bbPress?

    mazdakam
    Member

    <?php

    /*

    Plugin Name: bbEmoticons

    Plugin URI:

    Description: A Clickable Smilies hack for bbPress. Thanks to kohaku and aka. Original WP Grins by Alex King.

    Author: hiromasa

    Author URI: http://hiromasa.zone.ne.jp/blog/

    Version: 0.72

    */

    /******************************************************************************

    * bbEmoticons version 0.72

    *

    * A Clickable Smilies hack for bbPress.

    *

    * @Author hiromasa (http://hiromasa.zone.ne.jp/blog/)

    * @Thanks kohaku (http://www.orioa.com/)

    * aka (http://plasticdreams.org/)

    * @Original WP Grins By Alex King

    * (http://www.alexking.org/software/wordpress/)

    * WordPress convert_smilies function and images

    * (https://wordpress.org/)

    *****************************************************************************/

    /* Copyright 2006 hiromasa (email : webmaster@hiromasa.zone.ne.jp)

    This program is free software; you can redistribute it and/or modify

    it under the terms of the GNU General Public License as published by

    the Free Software Foundation; either version 2 of the License, or

    (at your option) any later version.

    This program is distributed in the hope that it will be useful,

    but WITHOUT ANY WARRANTY; without even the implied warranty of

    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the

    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License

    along with this program; if not, write to the Free Software

    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

    */

    /******************************************************************************

    * bbEmoticons

    *

    * @author hiromasa

    * @version 0.72

    *

    *****************************************************************************/

    class bbEmoticons {

    var $bb_grins;

    var $bb_smiliessearch = array();

    var $bb_smiliesreplace = array();

    /**

    * The Constructor

    *

    * @param none

    * @return none

    */

    function bbEmoticons() {

    if (isset($_GET)) {

    switch ($_GET) {

    case “javascript”:

    $this->outputGringJS();

    }

    exit(0);

    }

    $bb_smiliestrans = array(

    :)‘ => ‘icon_smile.gif’,

    :D‘ => ‘icon_biggrin.gif’,

    :-D‘ => ‘icon_biggrin.gif’,

    ‘:grin:’ => ‘icon_biggrin.gif’,

    :)‘ => ‘icon_smile.gif’,

    :-)‘ => ‘icon_smile.gif’,

    ‘:smile:’ => ‘icon_smile.gif’,

    :(‘ => ‘icon_sad.gif’,

    :-(‘ => ‘icon_sad.gif’,

    ‘:sad:’ => ‘icon_sad.gif’,

    ‘ :o’ => ‘icon_surprised.gif’,

    ‘ :-o’ => ‘icon_surprised.gif’,

    ‘:eek:’ => ‘icon_surprised.gif’,

    ‘ 8O’ => ‘icon_eek.gif’,

    ‘ 8-O’ => ‘icon_eek.gif’,

    ‘:shock:’ => ‘icon_eek.gif’,

    :?‘ => ‘icon_confused.gif’,

    :-?‘ => ‘icon_confused.gif’,

    :???:’ => ‘icon_confused.gif’,

    8)‘ => ‘icon_cool.gif’,

    8-)‘ => ‘icon_cool.gif’,

    ‘:cool:’ => ‘icon_cool.gif’,

    ‘:lol:’ => ‘icon_lol.gif’,

    ‘ :x’ => ‘icon_mad.gif’,

    ‘ :-x’ => ‘icon_mad.gif’,

    ‘:mad:’ => ‘icon_mad.gif’,

    :P‘ => ‘icon_razz.gif’,

    :-P‘ => ‘icon_razz.gif’,

    ‘:razz:’ => ‘icon_razz.gif’,

    ‘:oops:’ => ‘icon_redface.gif’,

    ‘:cry:’ => ‘icon_cry.gif’,

    ‘:evil:’ => ‘icon_evil.gif’,

    ‘:twisted:’ => ‘icon_twisted.gif’,

    ‘:roll:’ => ‘icon_rolleyes.gif’,

    ‘:wink:’ => ‘icon_wink.gif’,

    ;)‘ => ‘icon_wink.gif’,

    ;-)‘ => ‘icon_wink.gif’,

    ‘:!:’ => ‘icon_exclaim.gif’,

    :?:’ => ‘icon_question.gif’,

    ‘:idea:’ => ‘icon_idea.gif’,

    ‘:arrow:’ => ‘icon_arrow.gif’,

    :|‘ => ‘icon_neutral.gif’,

    :-|‘ => ‘icon_neutral.gif’,

    ‘:neutral:’ => ‘icon_neutral.gif’,

    ‘:mrgreen:’ => ‘icon_mrgreen.gif’,

    );

    foreach($bb_smiliestrans as $smiley => $img) {

    $this->bb_smiliessearch[] = $smiley;

    $smiley_masked = htmlspecialchars(trim($smiley), ENT_QUOTES);

    $this->bb_smiliesreplace[] =

    ” <img src='” . bb_get_option(‘uri’) .

    “bb-images/smilies/$img’ alt=’$smiley_masked’ class=’wp-smiley’ /> “;

    }

    $this->grins = ”;

    $smiled = array();

    foreach ($bb_smiliestrans as $tag => $grin) {

    if (!in_array($grin, $smiled)) {

    $smiled[] = $grin;

    $tag = str_replace(‘ ‘, ”, $tag);

    $this->grins .=

    ‘<img src=”‘. bb_get_option(‘uri’) .

    ‘bb-images/smilies/’.$grin.'” alt=”‘ .$tag .

    ‘” onclick=”grin(‘ ‘.$tag.”);”/> ‘;

    }

    }

    }

    /**

    * post_text filter

    *

    * @param $text

    * @return $output

    */

    function convert_smilies($text) {

    $output = ”;

    $textarr = preg_split(“/(<.*>)/U”, $text, -1, PREG_SPLIT_DELIM_CAPTURE);

    $stop = count($textarr);

    for($i=0; $i<$stop; $i++) {

    $content = $textarr[$i];

    if((strlen($content) > 0) && (‘<‘ != $content{0})) {

    $content = str_replace(

    $this->bb_smiliessearch,

    $this->bb_smiliesreplace,

    $content);

    }

    $output .= $content;

    }

    return $output;

    }

    /**

    * bb_grins action

    *

    * @param none

    * @return none

    */

    function bb_grins() {

    echo ‘<div id=”bb_grins”>’ . $this->grins . ‘</div>’;

    }

    /**

    * bb_head action

    *

    * @param none

    * @return none

    */

    function bb_grins_head() {

    echo

    ‘<script type=”text/javascript” src=”‘. bb_get_option(‘uri’) .

    ‘my-plugins/bb-emoticons.php?bb_grins_output=javascript”></script>’ .

    “n”;

    }

    /**

    * Output Grins JavaScript

    *

    * @param none

    * @return none

    */

    function outputGringJS() {

    ?>

    function grin(tag) {

    var myField;

    if (document.getElementById(‘post_content’) && document.getElementById(‘post_content’).type == ‘textarea’) {

    myField = document.getElementById(‘post_content’);

    }

    else if (document.getElementById(‘comment’) && document.getElementById(‘comment’).type == ‘textarea’) {

    myField = document.getElementById(‘comment’);

    }

    else {

    return false;

    }

    if (document.selection) {

    myField.focus();

    sel = document.selection.createRange();

    sel.text = tag;

    myField.focus();

    }

    else if (myField.selectionStart || myField.selectionStart == ‘0’) {

    var startPos = myField.selectionStart;

    var endPos = myField.selectionEnd;

    var cursorPos = endPos;

    myField.value = myField.value.substring(0, startPos)

    + tag

    + myField.value.substring(endPos, myField.value.length);

    cursorPos += tag.length;

    myField.focus();

    myField.selectionStart = cursorPos;

    myField.selectionEnd = cursorPos;

    }

    else {

    myField.value += tag;

    myField.focus();

    }

    }

    <?php

    }

    }

    /******************************************************************************

    * – Define for bbPress interface

    *****************************************************************************/

    $bbemoticons = & new bbEmoticons();

    bb_add_filter(‘post_text’, array(&$bbemoticons, ‘convert_smilies’));

    //bb_head is not called always. :-)

    //bb_add_action(‘bb_head’, array(&$bbemoticons, ‘bb_grins_head’));

    bb_add_action(‘bb_feed_head’, array(&$bbemoticons, ‘bb_grins_head’));

    bb_add_action(‘bb_grins’, array(&$bbemoticons, ‘bb_grins’));

    ?>

Viewing 25 results - 29,551 through 29,575 (of 32,499 total)
Skip to toolbar