bbPress

Simple, Fast, Elegant

bbPress plugin browser »

Forum is category (1.2)

Download

Version: 1.2

Other Versions

Last Updated: 2008-7-22

Requires bbPress Version: 0.7.2 or higher

Compatible up to: 0.9.0.2

Author Homepage »

Plugin Homepage »

Average Rating

5 stars
4 stars
3 stars
2 stars
1 star
(1)

Your Rating

Author: Nightgunner5

The forums that you specify in the forum-is-category.php file are turned into no-posts-allowed categories.

If a specified forum has a parent, the parent will also be turned into a no-posts-allowed category, whether specified or not.

Do not use this with bbPress 1.0 or higher, categories are in the core on those versions.


  1. Oops, I set it up wrong. Use version 1.1, 1.0 does nothing.

    Posted: 4 months ago #
  2. Very nice coding.
    You definitely should be writing more plugins ;-)

    (At first I thought someone was borrowing from my "Read-Only Forums" but I can see you figured out the process by yourself - well done.)

    Two problems you need to look into - I get a huge page of warnings/errors when I "un-category" a forum in the admin menu. Also when active "Add New" doesn't seem to work correctly at all.

    Posted: 4 months ago #
  3. "I get a huge page of warnings/errors when I "un-category" a forum in the admin menu."

    This will be fixed in 1.2, which should be released later today.

    "Also when active "Add New" doesn't seem to work correctly at all. "

    What version of bbPress are you on?

    Posted: 4 months ago #
  4. Using 0.9.0.2 of course. If you can't reproduce the error it may be a conflict with one of my other plugins, though not certain at this time.

    Posted: 4 months ago #
  5. "Using 0.9.0.2 of course. If you can't reproduce the error it may be a conflict with one of my other plugins, though not certain at this time. "

    I've tried making a new forum on 0.9.0.2, it worked.

    Posted: 4 months ago #
  6. No, not a new forum, sorry, bad miscommunication.
    Try using the "ADD NEW" on the front page of your site.

    Posted: 4 months ago #
  7. "No, not a new forum, sorry, bad miscommunication.
    Try using the "ADD NEW" on the front page of your site."

    I tried that just now with version 1.1 of Forum is category and version 1.2. 1.1 didn't show the form, but 1.2 showed it. It's fixed now, anyway.

    Posted: 4 months ago #
  8. Hello,
    If you want forums which are categories not to be clickable, and to be bolded (to act as real category), here's what you need to do: Open up front-page.php in your template directory for editing and:

    1) Add following code right BELOW the <?php bb_get_header(); ?>:

    <?php
    $forums_that_are_categories = bb_get_option("forum_is_category_forums");
    if (!is_array($forums_that_are_categories))
    	$forums_that_are_categories = array();
    ?>

    2) Look for <?php while ( bb_forum() ) : ?> and first <?php endwhile; ?> after it, and replace everything BETWEEN those with:

    <tr<?php bb_forum_class(); ?>>
    	<td><?php bb_forum_pad( '<div class="nest">' ); ?>
    	<?php
    	ob_start();
    	forum_id();
    	$fix_forum_id = ob_get_clean();
    	if (in_array($fix_forum_id, $forums_that_are_categories)) {
    		echo "<strong>"; forum_name(); echo "</strong>";
    	}
    	else {
    	?>
    	<a href="<?php forum_link(); ?>"><?php forum_name(); ?></a><small><?php forum_description(); ?></small>
    	<?php } ?>
    	<?php bb_forum_pad( '</div>' ); ?></td>
    	<td class="num"><?php forum_topics(); ?></td>
    	<td class="num"><?php forum_posts(); ?></td>
    </tr>

    3) Save and re-upload file.

    Hope you like it :-)

    Demo: http://www.mladenovac.in.rs/forums/

    Posted: 2 months ago #

RSS feed for this topic

Add a Comment

You must log in to post.

Code is Poetry.