Search Results for 'code'
-
Search Results
-
Topic: Hiding Sub-Forums
Greetings,
After searching and reading around a bit, I still cannot resolve this “issue”. Basically I’d like to hide the sub-forums from my homepage So that only the category or parent forum shows up.
I came across this post:
http://bbpress.org/forums/topic/hide-subforums-on-main-page
which seemed to offer a quick fix of replacing one line of code:
<?php if ( bb_forums() ) : ?>
to
<?php if ( bb_forums("depth=1") ) : ?>
Unfortunately this does not seem to work.
If any further information is needed, please let me know! Thanks very much!
Hello,
There is a bug in bb-includes/functions.bb-forums.php, at line 101 in bbpress v1.0.2. The code assumes that the forum_id is the sames the array_id when the array is flattened. This is not always the case if you apply_filters to the forum list such as private forums does.
The code ccurrently reads:
_forums[$_id] = $forums[$_id]
Which may not be true if the forum id is not the same as the array id.
This code does fixed the problem…. The key is to convert forum_id into an array enumerator so that when you look at $_ids you compare to the proper array which is no longer the full array but one with missing topics/forums.
$forums = (array) apply_filters( ‘get_forums’, $forums );
+ foreach($forums as $f) {
+ $fids[$f->forum_id] = $f;
+ }
if ( $child_of || $hierarchical || $depth ) {
$_forums = bb_get_forums_hierarchical( $child_of, $depth, $forums );
if ( !is_array( $_forums ) )
return false;
$_forums = (array) bb_flatten_array( $_forums, $cut_branch );
foreach ( array_keys($_forums) as $_id )
+ $_forums[$_id] = $fids[$_id];
Topic: / in usernames?
Is it possible to allow for / in usernames?
I recently converted my phpbb board to bbPress, but one of my members had a username that looked like ///Abcd.
So as opposed to forcing him to change his username, is it possible to dig into the code and allow /’s for usernames?
Any help would be greatly appreciated!
Edit: Sorry if this thread is in the wrong forum!
Hi.
I have added a bbpress to a wordpress. Everything works fine, but now I would like to change how the appearance is in the forum list on the front page. Right now I am not fully happy with that. I can see that the class is
either: <tr class=”alt”> or only <tr> which affects how each row is presented. But I can not find this in the style.css file. It drives me nuts…
Also where forums is presented I get the <bb-precedes-sibling bb-follows-sibling bb-root> and alt at the end. But where is it controlled how they look like?
Regards,
Chris