Search Results for 'code'
-
Search Results
-
A few people have expressed concerns about the growing number of template files included with the bbp-twentyten theme. Not counting CSS/JS/Images, we’re up to 32 individual template files to handle forums, topics, replies, loops, forms, users, and pagination. These concerns are totally valid, but mostly unavoidable.
The goal for bbp-twentyten is for it to be as simple to understand as possible without tons of proprietary functions or complex logic to figure out. To do that, we’ve split some of the files into ‘parts’ that focus on specific functionalities. Some of this doesn’t make a whole lot of sense right now because of lack of documentation, and it uses functions that are new to WordPress as of 3.0, but I’m confident it’s the best way to go.
When I think back to my beginning days of learning WordPress, a lot of what I did was butcher Kubrick and make my own frankentheme. I’m trying to keep that in mind here. Since the first place people naturally make changes is on the front end of their site, this theme should make that really easy to do.
We also have an empty folder for a theme named ‘bbp-default’ which will more than likely be a full-featured theme that flexes a bit more bbPress muscle.
I think when bbPress has more eyes on the code and more developers start integrating forum files into their themes, we’ll see some really neat things start to happen.
Topic: Issues with Search
I’m trying to open up search on my bbPress install, I can search, it works properly. What I decided, for now, was to not show the Recent Results, but only the Relevant Results, the problem is that some of the Relevant Results are not displaying a proper link to the post.
This line in /bbpress/search.php is the issue, I think, but I can’t figure out how to correct it.
Line 12:
Code:$bb_query_form->BB_Query_Form( ‘post’, array(), array( ‘per_page’ => 5, ‘post_status’ => 0, ‘topic_status’ => 0, ‘post_text’ => $q, ‘forum_id’, ‘tag’, ‘topic_author’, ‘post_author’ ), ‘bb_recent_search’ );Whatever I set the ‘per_page’ array to, that is the number of Relevant Results that do not work properly at the top. So since it’s set to 5, the first 5 results under Relevant Results do not work, but 6-end do.
What can I do to correct this? Thanks,
Topic: bb-query help!
I’m trying to display a list of posts that are tagged with one tag but NOT another. For example, I want to display all posts tagged “FRUIT” but exclude posts tagged “Apples”.
I tried creating a custom View, but this code does not work:
function my_custom_views_init() {
$args = array(
'tag_id' => '35',
'tag_id' => '!=72'
);
bb_register_view(
'fruit-without-apples',
'Fruit (excluding apples)',
$args,
false
);
}Neither does this code using bb-query directly:
$topic_query = new BB_Query( 'topic',
array(
'tag_id' => '35',
'tag_id' => '!=72'
)
);
$results = $topic_query->results;
foreach($results as $result) {
echo $result->topic_title . '';
}Any ideas?


