Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for '"wordpress'

Viewing 25 results - 25,151 through 25,175 (of 26,681 total)
  • Author
    Search Results
  • #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

    #2151
    Trent Adams
    Member

    I came across this post in the wp.org forums and it seems to work from what I hear.

    Trent

    #58905
    M
    Member

    @_ck_ – “Hack” core files = baaad. Try localization… it works for bbPress and WordPress. Easy to do as well.

    I want to change bbPress’ default text

    If you don’t like the “favorites” text, you can change it without losing the changes on an update. Not updating because of some little changes you made is bad news indeed. Might as well wear a sign that says “hack me.”

    #58683
    M
    Member

    Funny you mention this… I’m doing some work for a client at the moment using WordPress and I wanted to change some of the admin backend text without modifying core files. Localization using an en.mo file turned out to be the way to go.

    I believe bbPress supports localization as well. It’s probably going to be the route you’ll want to take. (edit: it does, BBLANG in config.php, drop the .mo file in /bb-includes/languages/ I would assume)

    The file you’ll need to edit is a compiled binary, so you’ll have to get the bbpress.pot file, probably from the bbPress site somewhere. (edit: http://svn.automattic.com/bbpress-i18n/pot/tags/)

    Once you’ve got the file, check out poEdit (http://sourceforge.net/projects/poedit/). It’s an open-source cross-platform mo/po/pot editor. Create a New catalog from .pot file, make sure the option to compile to .mo is checked in the preferences, and you should be good to go.

    The top-left box contains the text to be translated, the bottom-left contains the “translation.” Ctrl-F, find the string, and you’re good from there.

    Note: I haven’t tried this with bbPress but it works great with WordPress. Hope it helps.

    #52444

    In reply to: blockquote?

    I just installed bbpress yetserday on a new domain and have integrated it with wordpress using the plugin, etc. I also have found that the default template has no blockquote support. Even by including the blockquote definition given above by Trent verbatim in my bb-admin/style.css file does no good, here is a view source excerpt of the source file:

    <blockquote><p>[Shakir 5:57] O you who believe! do not take for guardians those who take your religion for a mockery and a joke...</p></blockquote>

    as a test…

    testing blockquote here in bbpress support

    nope. above line doesnt render in blockquoted indent either.

    i think the problem is the insertion of <p></p> tags around every paragraph. Since blockquote is an inline style, the p tags override it. we could get around this by using a div class=blockquote kind of construction instead but wouldt it be nicer if blockquote just worked out of the box?

    #2149
    bobbyh
    Member

    A lot of bbPress forums have taken advantage of easy user integration with WordPress. The next step to integrating a WordPress blog and bbPress Forum is to create a bbPress Theme to match your WordPress Theme. bbPress doesn’t ship with built-in support for a sidebar, although I found it trivial to add this with a small plugin. What I really missed was a lightweight way to access WordPress’ wp_list_bookmarks Template Tag function, which lets you display your WordPress Blogroll links.

    To add this functionality, I wrote this bbPress List Bookmarks plugin. To install this plugin, download the zip and unzip it to your bbPress server under your /my-plugins folder. The zip should extract to a folder named “list_bookmarks”, so the location of these files should be /my-plugins/list_bookmarks. Then, in your bbPress theme, add a wp_list_bookmarks Template Tag with whatever parameters you want (just like you would when editing a WordPress Theme). You shouldn’t need to hack any of the plugin files to get this to work, although of course you’ll have to edit your bbPress Theme to take advantage of this plugin.

    This plugin should work whether or not these WordPress tables are located in the same database as your bbPress tables, as long as your WordPress tables are located in the same database as your integrated user tables.

    I’ve tested this plugin on my site, which currently uses bbPress v0.8.2.1 and WordPress v2.2.1. If you use WordPress 2.0 or earlier and you want to use this plugin, you should probably upgrade your WordPress first as wp_list_bookmarks is a new function introduced in WordPress v2.1. I don’t think it should matter what version of bbPress you use.

    This plugin ships with a database class called bbwpdb.php that lets us access the WordPress database tables. The bbwpdb.php file is basically a clone of the bbPress /bb-includes/db.php file, edited to let us retrieve WordPress tables. The remaining files are simply three WordPress PHP pages needed (wp-admin/admin-db.php, wp-includes/bookmark-templates.php, and wp-includes/bookmark.php), with slight edits to make it use the bbwpdb database class, instead of the WordPress or bbPress database class. The last file (list_bookmarks.php) just glues everything together.

    #59269
    M
    Member

    People that are attracted to bbPress will be attracted because of its out-of-the-box simplicity and its extensibility.

    It’s great… if you want a plugin and you’ve messed around with WordPress for any length of time, you’ll feel right at home. I personally dislike polls… _ck_ obviously doesn’t, and he’s not alone. That’s the beauty of bbPress. These features aren’t crammed down your throat; rather they are completely optional.

    Also, I don’t think that bbPress was built to win a popularity contest. It was built with certain things in mind and is continuing in that trend. I think that’s great.

    One more thing… those people who were attracted to other forum software solutions (ie, SMF, IPB, vB), wanted something feature-bloated. All kinds of things pouring out of every corner. They wouldn’t be attracted to bbPress unless it became a miniature of what they were already using. And what’s the point in that, eh?

    #59350
    M
    Member

    Stick with the ezSQL format… it’ll be much easier.

    Something like this (using foreach instead of while):

    $query = "SELECT * FROM $bbdb->menu
    WHERE set = 'inactive' ORDER BY order ASC";
    $r = $bbdb->get_results( $query );

    foreach( $r as $rw ) {
    // now mess with $rw
    echo $rw->database_row . "<br>n";
    }

    Something that might be helpful would be to browse the source of the ezSQL class in /wp-includes/wp-db.php

    The latest from Justin Vincent, the author

    http://www.woyano.com/jv/ezsql

    The version used in bbPress and WordPress

    https://trac.wordpress.org/browser/trunk/wp-includes/wp-db.php

    It might help you… you’d be able to see where mysql_query is begin used, and how to use the ezSQL format best.

    I think the reason you’re running into problems with mysql_fetch_array is because it’s already used.

    Not sure on that one though… I would have to check.

    Also, what might cause an error: $bbdb->query will not return anything at all. $bbdb->get_results needs to be used for multi-dimensional array data, $bbdb->get_row or $bbdb->get_col need to be used for single array data, and $bbdb->get_var needs to be used for non-array/string data. $bbdb->query is used for inserting data, the others are used for retrieving it.

    Someone correct me if I’m wrong, but I’m pretty positive that’s how it goes.

    ezSQL is lovely. It certainly takes the pain out of MySQL data manipulation.

    So I guess that makes the answer to your question “Neither.” $bbdb->get_results should do the trick.

    And sorry for the screed. :D

    #57453
    Vili
    Participant

    kenzor — That would indeed work the same way and be far easier to do. It remains a mystery to me why I didn’t do it that way to begin with. I must have lost my +5 Blessed Boots of Intelligence at some point.

    #57452
    kenzor
    Member

    So, if you now go through the template files for your bbPress installation, you will need to replace all instances of “<?php bb_get_header(); ?>” with the WordPress command “<?php get_header(); ?>“. The same thing goes for the footers, so you change all instances of “<?php bb_get_footer(); ?>” to “<?php get_footer(); ?>“.

    I used a simpler method to achieve the same result. Rather than going through and changing every call to bb_get_header() and bb_get_footer() I simply created a custom header.php and footer.php file.

    Then in the header I have only:

    <?php get_header(); ?>

    In the footer I have only:

    <?php get_footer(); ?>

    The benefit of this is you only need 2 custom files, you don’t need to search and replace all instances, and if you need to setup global vars for the more advanced WordPress integration techniques you only have to add them once into your custom header.php.

    #59300
    _ck_
    Participant

    Well there’s no way around the fact that “use display names for admin” basically MUST fetch the display name from the wp_users table when asked for it – and if it’s not been accessed before it’s not cached so it must hit the mysql db directly.

    However, since “use display names” forces the forums table to store the display name properly, there’s no need to run the last poster id through the routine again and force a fetch of the display name, it’s already in the username field for last poster.

    The good news however is between that tweak, a couple other bits of fine tuning and the undocumented $bb->load_options = true; I was able to get the queries down to just 10 for the front page for visitors and 13 for logged in members. This includes an extensive number of plugins, including useronline trackline (not the simplified one here but a port from wordpress).

    It’s never been faster and rather impressive :-)

    #59265
    Sam Bauers
    Participant

    I don’t think there’s any need to be so ernest about adoption rates of bbPress. I get the impression it would be supported by Automattic even if there was only one user.

    Sure there is room for improvement, but I don’t think there is a need to emulate every feature on the forum software check list. I’ve never heard anyone on the various bbPress related channels talk about a need for poll features (for example), although I may be wrong. I think if you want to improve bbPress, then you would be better directing your energy at some of the existing bugs and well-known shortcomings (like search).

    I’m not trying to stop you building a poll plugin by the way, and perhaps your suggestions regarding the quality of bbPress are well-founded. I just don’t think you are going to get much support from people around here by attempting to whip them into a competitive frenzy against other forum platforms.

    #59232
    Sam Bauers
    Participant

    There is a project with much broader scope to implement a full-blown plugin updater on WordPress which is part of the Google Summer of Code.

    #59231
    jolaedana
    Member

    Great stuff. :) I think this is something it would be cool if WordPress should attempt- though it’d require one heck of an organizational system.

Viewing 25 results - 25,151 through 25,175 (of 26,681 total)
Skip to toolbar