jenz (@jenz)

Forum Replies Created

Viewing 7 replies - 1 through 7 (of 7 total)
  • @jenz

    Member

    With bbPress v 1 RC – I had the same need and ended up putting this into the topic-tags.php template – and it worked great:

    <div id="topic-tags">
    <?php if ( bb_get_topic_tags() ) : ?>
    <?php foreach ( $tags as $tag ) : ?>
    <?php if ($tag == end($tags)) :?>
    <a href="<?php tag_link(); ?>" rel="tag"><?php tag_name(); ?></a> <?php tag_remove_link(); ?>
    <?php else :?>
    <a href="<?php tag_link(); ?>" rel="tag"><?php tag_name(); ?></a><?php tag_remove_link(); ?>,
    <?php endif;?>
    <?php endforeach; ?>
    <?php else : ?>
    <p><?php printf(__('No <a href="%s">tags</a> yet.'), bb_get_tag_page_link() ); ?></p>
    <?php endif; ?>
    <?php tag_form(); ?>
    </div>

    This added the commas appropriately.

    @jenz

    Member

    I figured it out and wanted to share. This code goes at the top of my forums.php file (template).

    <?php
    $forum_id = 1;
    $limit = bb_get_option('page_topics');
    $offset = ($page-1)*$limit;
    $forum_one_topics = $bbdb->get_results("SELECT * FROM $bbdb->topics WHERE forum_id = $forum_id AND topic_status = 0 ORDER BY topic_id DESC LIMIT $limit OFFSET $offset")
    ?>

    My posts loop:

    <?php

    foreach($forum_one_topics as $topic) : $forum_one_topic_posts = get_thread( $topic->topic_id); ?>

    Works like a charm

    @jenz

    Member

    Just for some more clarification – I would like my forum to show the most recent topics first – not the most active. Is there some easy way to set this up?

    @jenz

    Member

    If I used:

    <?php
    $forum_id = 1;
    $number_of_topics = 7;
    $forum_one_topics = $bbdb->get_results("SELECT * FROM $bbdb->topics WHERE forum_id = $forum_id ORDER BY topic_id DESC LIMIT 0,$number_of_topics")
    ?>
    <?php
    foreach($forum_one_topics as $topic) : $forum_one_topic_posts = get_thread( $topic->topic_id); ?>

    (as see at the beginning of this topic) – how can I show the initial topic time on the front page instead of the last reply time?

    @jenz

    Member

    A plugin would be great – can you post the URL for the plugin?

    I believe I defined the WP information post installation, so I deleted the bbPress DB, created a new one, went through the 1 step install and still no go. None of the WP users show up in the bbPress user list and I still cannot log in with to WP with the bbPress users nor log into bbPress with the WP users. When I look at my bbPress DB, I have the following tables:

    bb_forums

    bb_posts

    bb_tagged

    bb_tags

    bb_topicmeta

    bb_topics

    wp_usermeta

    wp_users

    As soon as I saw the DB structure, I realized that I needed to specify my WP database, and not create a new one for bbPress for this to work. Once I put in my WP DB information at the top of the config.php file, all worked! Thanks for your prompt response.

    Hello. I have a WordPress installation (2.1) at / and then the bbPress installation (0.8) at /forums/. I have followed the instructions: https://bbpress.org/documentation/integration-with-wordpress/ and still no go. The WordPress integration plugin is installed and activated in my WP install and I have defined the bbPress tables (bb_) prefix correctly in the plugin options.

    I have defined the options:

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

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

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

    in my config.php file, but do I need to add anything else? Right now, my WordPress users cannot log into the bbPress install, and the bbPress users cannot log into the WordPress install. Any help would be creatly appreciated.

Viewing 7 replies - 1 through 7 (of 7 total)