Michael Adams (mdawaffe) (@mdawaffe)

Forum Replies Created

Viewing 25 replies - 276 through 300 (of 335 total)
  • @mdawaffe

    Member

    Let’s see if that’s true on this server.

    EDIT: nope. Perhaps it’s a PHP magic quotes issue. I’m surprised this does not happen for new posts, though.

    In reply to: Using RSS Feeds

    @mdawaffe

    Member

    There are links to the RSS feeds on every page that has them (… except the front page… what happened it that one… ?)

    The URLs are:

    http://bbpress.example.com/rss/ for the main feed

    http://bbpress.example.com/rss/forum/1 for the feed for forum with ID = 1

    http://bbpress.example.com/rss/topic/1 for the feed for topic with ID = 1

    http://bbpress.example.com/rss/profile/1 for the feed for the user favorites of user with ID = 1

    http://bbpress.example.com/rss/tag/bbpress for the feed for the ‘bbpress’ tag.

    These URLs can be easily generated by:

    get_recent_rss_link();

    get_forum_rss_link();

    get_topic_rss_link();

    get_tag_rss_link();

    get_favorites_rss_link();

    or echoed with recent_rss_link(), forum_rss_link(), etc.

    The content for the feed is generated by /rss.php on bb-templates/rss2.php and is fully pluggable.

    @mdawaffe

    Member

    Copy bb-templates/topic.php to my-templates/

    Find and remove

    <li id="resolution-flipper"><?php _e('This topic is') ?> <?php topic_resolved(); ?></li>

    This will likely be removed by default in future versions of bbPress.

    @mdawaffe

    Member

    Are you using bbPress 0.72 or some older pre-release version?

    In reply to: wp bb login issues

    @mdawaffe

    Member

    You’re using WPmu, yes?

    It’s a little different. See my response here: https://bbpress.org/forums/topic/77?replies=6

    You could use the $bb->wp_home stuff, but you’ll have to also:

    $bb->usercookie = ‘wordpressuser’;

    $bb->passcookie = ‘wordpresspass’;

    Since MU cookies are structured a little differently than WP cookies.

    In reply to: Cookies and WPMU

    @mdawaffe

    Member

    Try this.

    Look at the cookie you have from you mu site. (In firefox: preferences -> privacy -> cookies -> view cookies then find the cookie in question. I’m sure there’s a way to do this in other browsers as well.)

    I bet it looks like this:

    Name: wordpressuser

    Domain: example.com // or is it .example.com ?

    Path: /

    Send For: Any type of connection

    And one for the password too:

    Name: wordpresspass

    Domain: example.com

    Path: /

    Send For: Any type of connection

    If that is the case, in bbPress’ config.php set the following.

    $bb->usercookie = ‘wordpressuser’;

    $bb->passcookie = ‘wordpresspass’;

    $bb->cookiedomain = ‘example.com’; // or .example.com if there was a . above

    $bb->cookiepath = ‘/’;

    If I’m wrong in my guess about the structure of yrour cookies, please post what they are (name, domain, path, send for only. Don’t post the content of the cookie).

    @mdawaffe

    Member

    Make sure there is no whitespace (spaces, extra lines, tabs, etc.) before the <?php in your plugin nor after the ?>

    In reply to: Cookies and WPMU

    @mdawaffe

    Member

    In bbPress, where and how are you loading wpmu?

    Are your mu blogs set up like someblog.example.com or example.com/someblog?

    @mdawaffe

    Member

    The DB has not changed. You shouldn’t even have to run the install script.

    @mdawaffe

    Member

    There’s no good way to do this right now. We can make this pluggable in a future version of bbPress.

    @mdawaffe

    Member

    The easy way is to find get_thread( $topic_id, $page ) in /topic.php and change it to get_thread( $topic_id, $page, true ).

    The better way is to use a plugin so that you aren’t modifying any core files. (This is untested)

    <?php

    /*

    Plugin Name: Reverse Post Order

    Plugin URI: https://bbpress.org/forums/topic/76

    */

    function reverse_post_order() {

    global $topic_id, $page, $topic, $bb_current_user;

    global $bb_db_override, $posts, $forum, $tags, $user_tags, $other_tags, $list_start;

    $bb_db_override = true;

    $posts = get_thread( $topic_id, $page );

    $forum = get_forum ( $topic->forum_id );

    $tags = get_topic_tags ( $topic_id );

    if ( $bb_current_user && $tags ) {

    $user_tags = get_user_tags ( $topic_id, $bb_current_user->ID );

    $other_tags = get_other_tags ( $topic_id, $bb_current_user->ID );

    } elseif ( is_array($tags) ) {

    $user_tags = false;

    $other_tags = get_public_tags( $topic_id );

    } else {

    $user_tags = false;

    $other_tags = false;

    }

    $list_start = ($page – 1) * bb_get_option(‘page_topics’) + 1;

    post_author_cache($posts);

    }

    add_action( ‘bb_topic.php_pre_db’, ‘reverse_post_order’ );

    ?>

    @mdawaffe

    Member

    Try require_once('/path/to/wp-blog-header.php'); instead of wp-config.php.

    @mdawaffe

    Member

    The red only applies to deleted topics, as the CSS class you found suggests.

    In reply to: Cookies and WPMU

    @mdawaffe

    Member

    $bb->passcookie = PASS_COOKIE

    Might work if you load wp before you load bb.

    Is your bbPress URL a sudbirectory of your mu URL? If so, you should be able to use the $bb->wp_home and $bb->wp_siteurl variables.

    @mdawaffe

    Member

    Oops, my fault. Do exactly what you did but put

    global $bb;

    directly under the function line.

    <?php

    function front_page_topics() {

    global $bb;

    $bb->page_topics = 2;

    }

    add_action( ‘bb_index.php_pre_db’, ‘front_page_topics’ );

    ?>

    @mdawaffe

    Member

    If you have any blocked users, you should run upgrade_160() found in bb-admin/upgrade.php. Otherwise, you shouldn’t have to worry about anything.

    Just overwrite the files and you should be good to go (backup first!)

    @mdawaffe

    Member

    Do you know the date of the nightly or the revision number you installed?

    @mdawaffe

    Member

    andrea_r,

    What is the goal? Are you trying to to have mu and bbPress share the same user table? bbPress and mu are using different databases (as opposed to different tables in the same database)?

    I can help, but I need to know exactly how things are and how you want them to work.

    I think this is your situation (apologies if I misunderstood you):

    You have mu and bbPress installed and working off of different databases. You want bbPress to store its content in that separate database, but you want it to draw its users from mu’s database.

    If that is the case, this is what should work. The top of bbPress’ config.php should look like:

    //These are for the information about the database into which bbPress should store its content

    define('BBDB_NAME', 'bbpress');

    define('BBDB_USER', 'username');

    define('BBDB_PASSWORD', 'password');

    define('BBDB_HOST', 'localhost');

    // This is the information about mu's database. bbPress will look for users in this database

    define('USER_BBDB_NAME', 'mu');

    define('USER_BBDB_USER', 'mu username');

    define('USER_BBDB_PASSWORD', 'mu password');

    define('USER_BBDB_HOST', 'localhost');

    // You just told bbPress to use that mu database to look for users, but it doesn't yet know the name of the *table* to use.

    // Change 'wp_users' and 'wp_usermeta' to be the table names of mu's user tables.

    define('CUSTOM_USER_TABLE', 'wp_users');

    define('CUSTOM_USER_META_TABLE', 'wp_usermeta');

    @mdawaffe

    Member

    What you’re trying to do should be done in bbPress’ config.php file, but you’re really close :)

    Put your index.php back the way it was. In bbPress’ config.php file, put the following two lines right after the <?php line.

    require_once('/path/to/wp-blog-header.php');

    define('WP_BB', true);

    It seems you’ve found the correct path to use in you system: /home/myusername/public_html/blog/wp-blog-header.php

    So it should now look like:

    <?php

    require_once('/home/myusername/public_html/blog/wp-blog-header.php');

    define('WP_BB', true);

    Then, copy your bb-templates/ directory to my-templates/ this is so you can modify the template files without editing the original ones; bbPress will use the files in that directory automatically instead of the original ones.

    In my-templates/front-page.php (and any of your other template iles), you can now call any WordPress template function, even get_header().

    In reply to: Recounts do not work

    @mdawaffe

    Member

    Thanks for the tip. We’ll get that fixed in the next release.

    @mdawaffe

    Member

    How about this plugin?

    function front_page_topics() {

    $bb->page_topics = 10;

    }

    add_action( 'bb_index.php_pre_db', 'front_page_topics' );

    In reply to: tagsize plugin

    @mdawaffe

    Member

    I don’t believe a plugin is necessary for this. The core function tag_heat_map() is just the same, isn’t it?

    See my comment here: https://bbpress.org/forums/topic/67?replies=3#post-295

    In reply to: Importing from phpBB

    @mdawaffe

    Member

    You should always feel free to discuss this or anything eles on the mailing list: https://lists.bbpress.org/mailman/listinfo/bbdev

    @mdawaffe

    Member

    There is no need to edit any core files.

    Copy bb-template/front-page.php to my-templates/front-page.php and then in that file find

    <?php tag_heat_map(); ?>

    and replace it with:

    <?php tag_heat_map( 10, 30, 'px', 40); ?>

    to generate a tag cloud of the top 40 tags where the smallest tag displays with a 10px font-size and the largest with a 30px font-size.

    The first parameter is the size of the smallest tag, the second is the size of the largest tag, the third is what unit to use (’em’, ‘px’, ‘pt’, …) and the last is how many tags to show.

    @mdawaffe

    Member

    You should be able to use any bbPress functions you like in WordPress as long as you

    require_once('path/to/bbpress/config.php');

Viewing 25 replies - 276 through 300 (of 335 total)