Search Results for 'code'
-
Search Results
-
How do I use bb_query to fetch all topics that were started within a given date range?
Here’s an example found an example of a bb_query code on the bbPress blog:
$topic_query = new BB_Query( ‘topic’,
array(
‘topic_author’ => ‘mdawaffe’,
‘started’ => ‘2007-06’,
‘tag’ => ‘bbpress’,
‘order_by’ => ‘topic_start_time’
)
);
$topic_query->results; // Here’s the array of topics the query returned.
This shows how to get topics that where started on June 2007. But what if I wanted to get all topics that were started between June 2, 2007 10:30:49 PM and February 12, 2008 9:02:32 am?
I think I may be missing something totally obvious. Any suggestions? I
Is there a way to show a paginated list of front page stickies? In the default bbPress template file “front-page.php”, I found this code:
<?php if ( $super_stickies ) : foreach ( $super_stickies as $topic ) : ?>
<tr<?php topic_class(); ?>>
<td><?php bb_topic_labels(); ?> <big>“><?php topic_title(); ?></big></td>
<td class=”num”><?php topic_posts(); ?></td>
<td class=”num”><?php topic_last_poster(); ?></td>
<td class=”num”>“><?php topic_time(); ?></td>
</tr>
<?php endforeach; endif; // $super_stickies ?>
It display a list of front page stickies, but it doesn’t have any pagination if you have a lot of stickies. I tried adding this:
<?php forum_pages(); ?>
But it doens’t work.
Any suggestions on getting this to paginate?
I figured this out by accident after not finding much in the forums about it, so I thought I’d post it fresh.
In wordpress, we use
<?php bloginfo('template_url'); ?>to go straight to your template directory (i.e. “http://mysite.com/wp-content/themes/mytheme”).In bbPress, to go yout theme directory (i.e. “http://mysite.com/bb-templates/mytheme”), you use
<?php bb_option('template_uri'); ?>I would like to put some plugins from bbpress into the WP widget.
For example: The Simple Online By Thomas Klaiber would be great on a widget.
If I put the code on WP widget it errors when on WP but comes up when on BB.
I guess I just need an if-then statement? but I don’t know how to write it.
Topic: bb-avatars (gr)avatar plugin
I’ve made a plugin that lets you set your own default gravatar.
You can also choose to use Identicons, Wavatar or monsterID as the default gravatar.
You set the size and the rating you want.
This plugin overrides the built in Gravatar function, but you still have to choose to show the avatars in the standard options page, but all other gravatar options from that page is ignored.
I’ve tested it on bbPress 0.9.0.2 and 1.0-dev (from trunk), but it should work on all 0.9.x versions.
You can download the plugin from here.
I’ve also submitted it to the plugins list here on bbpress.org, and will (hopefully) show up there to

—
RG
After experiencing the initial problem of a signup confirmation mail not going out, and going through the various posts on that topic, I finally found a fix without having to use a plugin or use pear functions.
In the file /bb-includes/pluggable.php add the following lines at the top:
ini_set("SMTP","mail.YourDomain.com"); //IP or server name for smtp server
ini_set("smtp_port","25");
ini_set('sendmail_from', 'ValidEmailAccount@YourDomain.com');This worked in my case. I hope this solves other people’s problems too.
Topic: Paragraph tag after TinyMCE
I have successfully integrated TinyMCE to my editor in bbpress, which I found that is so easy.
However, when doing the submit, TinyMCE submits the HTML code on behind to bbpress. I found that each line TinyMCE created a <p>…</p> tags, but bbpress is not allowing this. Finally, <p></p> comes to the screen when viewing the post.
Is there any workaround for this?
I updated my web site today to bbPress 0.9.0.2 and WordPress 2.5.1. Cookie integration settings got out of whack and I put them back, but now the two are in conflict.
I’ve verified (by clearing cookies and watching as new cookies are registered) that both bbPress and WordPress are using the same cookie for login info — same name, path, etc.
However, when logging into WordPress I am logged out of bbPress, and when logging into bbPress I am logged out of WordPress. So they appear to be using the same cookie and overwriting it as I login to each section.
Note that the SECRET_KEY and BB_SECRET_KEY definitions in each respective config files are identical.
The cookie seems to be broken up into three parts: user name, a shortish numerical code (in decimal), and a long hexadecimal code. The name and shortish numerical code are identical between bbPress and WordPress but the long hex code changes every time. Does this help provide a clue?