Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for '"wordpress'

Viewing 25 results - 25,301 through 25,325 (of 26,844 total)
  • Author
    Search Results
  • #59244
    _ck_
    Participant

    Web compression is on an “offered/accepted” handshake of sorts.

    It would not affect clients that do not support gzip.

    Everytime IE or Firefox (etc.) requests a webpage, it tells the server “I support gzip” in the headers and then if the server supports it, it sends it that way.

    Technically compression can be forced through the server – if trac is under the same litespeed server as wordpress/bbpress then it’s just a matter of making sure it’s enabled.

    A quick test shows both the svn+trac are using apache, so depending on which version it’s either a matter of building with mod_gzip (for apache 1.3.x) or if apache 2.0 they need to just add a couple of easy httpd.conf directives.

    Really though, Matt knows how good litespeed is over apache, both the trac+svn should on litespeed. I bet it could even work with the free 150 connection version instead of buying a license.

    #2184
    clairecc
    Member

    I tried implimenting the user sync with wordpress but then realised I needed the two systems to use the same database. So I went through exporting the data from the bb database to put in the wp database. But it wont import because it says wp_usermeta and wp_users already exists in the wordpress database.

    Correct me if I am wrong, because what I know about databases and sql you could put on the back of a postage stamp, but I think these two fields? have come from me trying to integrate the databases so is it ok to delete wp_usermeta and wp_users from the bbpress database before copying to the wordpress database?

    #59475
    Sam Bauers
    Participant

    This is fixed in the latest trunk. I believe, the WordPress tag closing function has been moved across to bbPress.

    #59518

    In reply to: subforums and markup

    _ck_
    Participant

    Sooner or later you may want these other tweaks too:

    http://ckon.wordpress.com/2007/07/12/bbpress-plugin-bb-tweaks/

    1. Get rid of the ?replies=# ugliness in topic links

    2. add nofollow to post links

    3. add target=_blank to post links

    4. auto-close tags – bbPress’s auto-close tags is broken by default

    5. get rid of [closed] on subjects – useful if you have a narrow template

    #59504
    fel64
    Member

    If Login failed, then you’re not giving the right details to log in.

    If the name automatically changes to spyparkreborn, then that’s your browser.

    Are bb and wp sharing a database? Is the database info in bbpress’ config.php the same as that in wp’s wp-config.php?

    hi all …

    i use plugin synchronize bbPress registrations with WordPress but it doesn’t work. I create new user bbPress but in WordPress that user doesn’t have any role. Someone tell me what i miss ???

    and when i login to bbPress use user registered in wordpress (spypark.reborn), i got report Log In Failed and user name automatically change to spyparkreborn. Another word bbPress integration not work well or i miss something.. i don’t know ????

    #52657
    _ck_
    Participant

    Okay I have a working prototype.

    Who wants to beta test?

    http://ckon.wordpress.com/2007/07/28/new-plugin-bbpress-signatures/

    Okee well just let me know.

    Not responsible for any melted servers or sudden calls from the voyager probe.

    #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

    #59479
    _ck_
    Participant

    In theory it should be possible to use the topic_status field to set a future topics flag ie. “4” and check the database everytime bbpress runs for that flag, then change it to 0 when the time has passed.

    I don’t see this as a big need for forums (wordpress is another matter) but it’s a simple enough plugin so maybe I’ll try later this weekend.

    #59441
    _ck_
    Participant

    There are many other things you will need to do to get it working properly with wordpress.

    1. cookies paths need to be fixed in both programs

    2. the integration plugin should be installed

    3. the allow spaces in usernames plugin should be installed

    4. force all registrations/logins through wordpress from the several places they are buried on the forum (the WP interfaces are far more developed)

    5. add the ” set default role when registering new user though forum” plugin tweak

    There are probably a few others I’ve forgotten by now.

    #59241
    Sam Bauers
    Participant

    > it works, yay!

    Great!

    > idea: “power user toggle” that will turn the revision number into a hotlink to the svn directory

    Good idea, I’ll ad it to my “to do” list.

    > maybe show the filesize since curl/fopen has to pull the entire file down anyway so it knows the size

    It only completely pulls down the .php files from the trunk of each plugin to interrogate then and create the list, so I could only accurately report on the size of those. Otherwise I would have to traverse through all the subdirectories and add up the totals. Which would be a bit onerous.

    > a tally at the bottom of how many plugins shown would be interesting to see too

    A bit superfluous, but I’ll add it.

    > will it paginate if one day there are over a hundred plugins?

    That wouldn’t be too hard. But there aren’t that many plugins right now.

    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). Ultimately if this plugin is going to remain in use I’ll have to either compile the plugin list on a server somewhere and serve it as a single file to all plugins, or build a “specs” file format for plugins to use if they want to be in the browser. But that is what the WordPress plugin I mentioned earlier is attempting to do, so I’m more likely to assist in porting that plugin over to bbPress than extending this one to do it.

    #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');

    ?>

    #2167
    izzypop
    Member

    I have a WP install with BBPress installed on the same database in a subdirectory of WP. Install went well, looked in the database and my new forum topic was written in the database but all links on the BBPress forum lead to “No input file specified”. I’m suspecting that it has something to do with the config file. Let me know if you see something wrong here:

    // Change the prefix if you want to have multiple forums in a single database.

    $bb_table_prefix = ‘bb_’; // Only letters, numbers and underscores please!

    // The full URL of your bbPress install

    $bb->uri = ‘http://theasianman.com/wordpress/bbpress&#8217;;

    // What are you going to call me?

    $bb->name = ‘The Asian Man Forum’;

    // Set to true if you want pretty permalinks, set to ‘slugs’ if you want to use slug based pretty permalinks.

    $bb->mod_rewrite = false;

    // Your Akismet Key. You do not need a key to run bbPress, but if you want to take advantage

    // of Akismet’s powerful spam blocking, you’ll need one. You can get an Akismet key at

    // http://wordpress.com/api-keys/

    $bb->akismet_key = ”; // Example: ‘0123456789ab’

    // The rest is only useful if you are integrating bbPress with WordPress.

    // If you’re not, just leave it as it is.

    $bb->wp_table_prefix = ‘wp_’; // WordPress table prefix. Example: ‘wp_’;

    $bb->wp_home = ‘http://theasianman.com/wordpress&#8217;; // WordPress – Options->General: Blog address (URL) // Example: ‘http://example.com&#8217;

    $bb->wp_siteurl = ‘http://theasianman.com/wordpress&#8217;; // WordPress – Options->General: WordPress address (URL) // Example: ‘http://example.com&#8217;

    I’ve turned permalinks off because it seems people are having trouble with them in conjunction with GoDaddy (my clients host : ( ).

    I’ve created a .htaccess file with:

    Options +MultiViews

    Not sure what’s up. The default forum content is not even showing up.

    Cheer all and thanks in advance

    #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’));

    ?>

    #49625

    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();

    }

    }

    }

    }

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

    * – 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’));

    ?>

    #59404

    In reply to: forum.wp-persian.com

    _ck_
    Participant

    That’s actually pretty impressive to see.

    I think I’ve seen wordpress/bbpress on some Israeli sites too but in Hebrew.

    #59417
    _ck_
    Participant

    And a report post plugin is born – tested working!

    Needs a few features but gets the job done for now:

    <?php
    /*
    Plugin Name: report post
    Description: allows members to report a post to admin/moderators
    Plugin URI: http://CKon.wordpress.com
    Author: _ck_
    Author URI: http://CKon.wordpress.com
    Version: 0.1
    */

    /*
    instructions: install, activate and put <? report_post_link(); ?> in your post.php template where you want the link to be seen
    optional in stylesheet: a.report_post {color:red;}

    todo:
    1. don't let them report more than once on a post - or more than too many times per minute/hour
    2. auto-delete post if more than x reports from different members
    3. auto-post report into a specified moderator's forum #
    4. maybe ajax xmlhttp call instead of real form post so there's no page movement
    5. it's technically possible to alert a browing mod with a popup directing to the reported post, no email needed
    */

    function report_post_link($post_id=0) {
    if (bb_current_user_can('participate') ) :
    $post_id= get_post_id( $post_id );
    if (get_post_author_id($post_id) != bb_get_current_user_info( 'id' )) {
    echo '<a class=report_post title="report post to moderator" href="#post-'.$post_id.'" onClick="report_post('.$post_id.');return false;">Report</a>';
    }
    endif;
    }

    function report_post_form() {
    if (bb_current_user_can('participate')) :
    if (isset($_POST['report_post_id']) && isset($_POST['report_post_reason'])) {
    echo '<scr'.'ipt type="text/javascript">alert("Thank you for the report. A moderator has been notified.");</scr'.'ipt>';
    $post_id=intval($_POST['report_post_id']);
    // todo: custom response if invalid id, problem sending email - maybe flush output buffer so member gets alert faster
    $to = bb_get_option('admin_email');
    $subject = " reported post by member for moderation";
    $headers = "From: ".bb_get_option('admin_email');
    $message ="report by: ".bb_get_current_user_info( 'name' )." (".bb_get_current_user_info( 'id' ).") email: ".bb_get_current_user_info( 'email' )."rnrn";
    $message.="report: ".wordwrap(strip_tags(substr($_POST['report_post_reason'],0,255)),70)."rnrn".get_post_link($post_id)."rn";
    $message.="post by: ". get_post_author($post_id)."rn"; // add "member since", total posts, blah blah
    $message.="rnrnReport Trace:rn";
    $message.="IP: ".$_SERVER['REMOTE_ADDR']."rn";
    $message.="Host: ".gethostbyaddr($_SERVER['REMOTE_ADDR'])."rn"; // useful but can add a few seconds
    $message.="Agent: ".$_SERVER['HTTP_USER_AGENT']."rn";
    $message.="Refer: ". $_REQUEST['refer']."rn";
    $message.="URL: http://".$_SERVER['HTTP_HOST'].$GLOBALS["HTTP_SERVER_VARS"]["REQUEST_URI"]."rn";
    mail( $to, $subject, $message,$headers);
    }
    echo '<form method="POST" name="report_post_form" id="report_post_form" style="display:none;visibility:hidden"><input type=hidden name="report_post_id"><input type=hidden name="report_post_reason"></form>';
    echo '<scr'.'ipt type="text/javascript">
    function report_post(post_id) {
    var report_post_reason = prompt("Please enter a short but descriptive reason why a moderator needs to review this post:", "");
    if (report_post_reason && report_post_reason.length>9) {
    document.report_post_form.report_post_id.value=post_id;
    document.report_post_form.action="#post-"+post_id;
    document.report_post_form.report_post_reason.value=report_post_reason;
    document.report_post_form.submit();
    } else {alert("report cancelled, incomplete description"); }
    }
    </scr'.'ipt>';
    endif;
    }
    add_action('bb_foot', 'report_post_form');

    ?>

    #59398
    _ck_
    Participant

    I’ve created couple of enhancements to the view count plugin which I’ve attached to the plugin’s page.

    It’s very easy to edit the templates.

    (Oh and xml-rpc is the first thing I disable in any blog configuration – it’s a spammer & evil hacker’s dream)

    The WordPress (and bbpress) community is very dis-organized, which is probably to be expected given the nature of blogging itself, everyone just does their own thing and hopes someone else shows up and comes along for the ride.

    #2160
    mousehunter
    Member

    I would like to display the “tag” field in the widget, however, I’m not sure how to do it. I know where to put the code to make it display, but how do I actually get the value from the DB (which table/field). I thought $bbTopic might contain it, but i was wrong. Any help would be appreciated. Thanks.

    #2158

    Topic: forum.wp-persian.com

    in forum Showcase
    mazdakam
    Member

    Official support place for Persian WordPress just lunch

    Detective
    Member

    I think it should not be hard to code such a plugin. It would have to create a new database table, like bb_read, with the following fields:

    – bb_user

    – bb_post

    – bb_last_comment_read

    This way you could modify the posts query, left joining it with this table. If the join is NULL (please correct me if i’m wrong, i haven’t done these things in a lot of time), then the user has never read the post. If bb_last_comment_read is less than the actual number of comments or replies, then he hasn’t read the last post.

    Another interesting alternative is what the folks at wordpress.org are doing … for non-visited links they have a font with a font-weight: bold style. So you can see which topics are new.

    #59321
    oledole
    Member

    Odd it is. I’ve posted this over att the WP forum as well, https://wordpress.org/support/topic/127302?replies=3. Nothing there that has worked for me, so far. There are a lot of htaccess-issues regarding password protection problems, but nothing I’ve found so far has fixed this.

    #58101

    In reply to: bbSync

    crowspeaker
    Member

    fel,

    Using a forum name instead of a number in the Write Post screen while the default is left blank also results in no post to the forum.

    Anything I put in bbsync ~ forum box in the Write Post screen is overridden by what is in the default screen.

    So a summary; no posts if default is empty on config screen; posts only if the default screen is filled in and then posts only to that forum, overriding anything in the Write screen.

    BTW, I have two additional integration plugins running: in BBPress, I have WordPress Integration 0.7 by Michael D Adams; in WP I have bbPress Integration 0.74 also by Michael D Adams.

    #59318
    berniesteak
    Member

    Having the very same issue here. Main wordpress site is at / bbpress at /forum/ and although all appears fine the headers returned are 404 not found.

    If anyone can shed any light on this weirdness that would be much appreciated.

    I attempted moving the htaccess content into a vhost file on my server and put them in <Directory> sections, to see if that made any difference. No surprise really it didn’t.

    I’m not an htaccess ot http expert and this seems just weird to me.

    #57454
    vlp
    Member

    Thanks for this tutorials guys, it really helps.

    One more thing is not straightforward to me, how to integrate the forum Titles. I tried it like it was written here but it didn’t work out.

    You can see my integration on http://www.tasty.sk/forum

Viewing 25 results - 25,301 through 25,325 (of 26,844 total)
Skip to toolbar