Forum Replies Created
-
In reply to: Plugin: Allow additional or custom profile fields
Plugins for bbPress have to go in
/your-bbpress-folder/my-plugins
. They will not work in any other place. If themy-plugins
folder does not yet exist, you have to create it.In reply to: always logged on / security issue ?I don’t know about “feature”, but all it means is that it sets a cookie that isn’t cleared until a week from when you log in. Unless you log out, that cookie remains. In WordPress, you can untick the “Remember Me” thing; I don’t know if bbPress can (yet) be configured to not remember you like that.
If you’re worried, just log out when you’re done.
In reply to: Trying to integrate bbpress with my wordpressRather than filling up pages of this forum, it would be nice if you could use something like pastebin.
That’s not your only stylesheet. Style declarations for your forum are also made in http://www.bozzysworld.com/wp-content/themes/k2, which is where you need to make the changes to
.secondary
and so on. Since you have several different stylesheets referenced they may be conflicting. Changing that stylesheet may have knock-on effects on your main site’s theme. Are you using your wordpress header? It may be easier to recreate your header for bbPress but with seperate stylesheets, so that modifications for your forums will not affect your front page.In reply to: Import from vBulletin 3.6.51. Unfortunately there’s nothing I can find. No-one on these forums has posted about switching from vBulletin yet, presumably because they’ve invested in it. I can’t help since, well, it’s licensed. Maybe you can look at the data structure yourself and write a converter?
2. No idea, but my guess is far better for performance. That’s one of the main reasons for bb’s existence – to provide even faster forum software than the best the WordPress people could get their hands on.
In reply to: Function integration problemYou certainly need an absolute path like GTim said. Now your forum seems to work, how’d you get it to be so?
I should also say that in my
config.php
I have the path to wordpress’wp-config.php
, nothing else.In reply to: Profile PermalinksThat’s easy enough to do; it’s implemented already in the bleeding-edge not-officially-released version of bbPress (which is actually perfectly stable and bug-free for me). This direct link will give you the currently newest version, revision 817. To activate these super-pretty permalinks, open your
config.php
and set the pretty permalinks option to'slugs'
instead, then if applicable (you’ll probably know if it is) change the contents of your.htaccess
file to whatever/bb-admin/rewrite-rules.php
tells you to.In reply to: How to refer to the current topic?What do you mean, no go?
This code should do it! At a wild guess, remember that globals have to be declared as globals again in each function.
global $topic;
$topic_poster_id = $topic->topic_poster;It may also be helpful to know that the attributes or whatever they are (things after the ->) correspond to the columns of data in the table.
In reply to: Hack: bb replies as wp comments; using bb API?You do need to use that table, but if you installed WP yourself it should also be created when you activate the plugin. Maybe de-activate and re-activate.
However I’m working on a plugin that will do the entire thing (complete integration hopefully) based on a different, IMO much neater system. I don’t want to promise anything before it’s done, but if this plugin doesn’t work for you there’ll be a simpler alternative soon.
In reply to: Rss feed for latest topicsI did Should every affected topic be tagged modlook or is it better to tag just one?
In reply to: Show exact date of post? (not freshness)Okay, I promise in future I’ll be all mature and responsible and test these things first. Sorry for the inconvenience. This works on my forum now; just copy and paste this into a new plugin file. Then put
<?php aposttime(); ?>
for default time output, or<?php aposttime( 'DATE FORMAT' ); ?>
for your own time formatting.<?php
/*
Plugin Name: Accurate Post Time
Plugin URI:
Description: Outputs an accurate post time in, optionally, your choice of formatting. Use <?php aposttime( 'DATE FORMAT' ); ?> in your template, <a href="http://uk3.php.net/date">date formatted according to PHP standards.</a>
Author: fel64
Version: Phi
Author URI: http://www.loinhead.net/
*/
function aposttime ( $dtformat = "jS F 'y" ) {
global $bb_post;
$aposttime = date( $dtformat, strtotime( $bb_post->post_time ) );
echo $aposttime;
}
?>In reply to: Theme problem with new topic page from front pageI really do This Patrick Ehrlund? He’s great – even if he does have a flash website
I’d argue that the coolness of appearance is worth it, since the login form’s not exactly rocket science. I think it’s still pretty distinguishable anyway. Mockups:
http://img513.imageshack.us/img513/5090/ochreblackuf9.jpg
http://img338.imageshack.us/img338/5758/ochrewhiteyh4.jpg
That’s just suggestions if you’re interested, no need to give it further thought
Test account to see the problem with the HTML, didn’t realise Chris had already fixed it. My bad.
In reply to: Anonymous postIt can’t be done yet, but I think it was in a discussion on trac that the devs were discussing this, and the plan is to change core files so that a plugin can make it possible. It just won’t be until 1.0 or later is released, sorry.
In reply to: Theme problem with new topic page from front pageIt’s a really nice site and I love the header. The login form would fit in more if you remove the
background: #FFFFFF
property in the CSS.Could you make a test account please, so we can see the HTML?
In reply to: Trying to integrate bbpress with my wordpressYes. Put the
Secondary
inMain
, get rid of its margin, add the CSSfloat
property to bothSecondary
andDiscussion
– onefloat: right
, onefloat: left
. That will make it work.In reply to: Show exact date of post? (not freshness)I see. Sorry, I thought that was just an example for the format.
How’s this instead?
<?php global $post;
$lalaposttime = date( 'D M Y', strtotime( $post->post_time ) );
echo $lalaposttime; ?>In reply to: WordPress and PHPBBWP and phpBB … you can probably bend them to your will together if your php mojo is strong indeed.
I would recommend converting your phpBB forum to bbPress using a converter, because WP and bb go together like something awesome with something also very awesome. That’ll make your site look streamlined and funky like anything.
In reply to: Code for different size tags<?php tag_heat_map(); ?>
will do that.In reply to: Show exact date of post? (not freshness)What does it show? Something completely crazy or something slightly wrong?
You can set your timezone in
config.php
, just change$bb->gmt_offset
to whatever you want.Ack, I’m sorry but the stupid easy mistake is mine. This will only work for blog posts which have a corresponding topic in bbPress, so for any blog posts you made before installing the bbPress Post plugin it won’t work. Should’ve thought about that before copying you the code.
function forumreplylink() {
//must be called from within the loop yadda yadda
global $post;
$rl = get_option( 'wpbb_path' ) . '/topic.php?id=';
$tid = felblogtotopicid( $post->ID );
if( $tid ) {
echo '<a href="' . $rl . $tid . '">Reply!</a>' . "n";
} else {
comments_number('No Comments','1 comment','% comments');
}
}Replace the old
forumreplylink()
with this and it will either show the reply link or a link to the comments. If you only want it to show the reply link but no link to comments, just take that comments line out.That’s strange, it works for me. At a guess the root of it is that $post doesn’t exist, or that $post->ID is nonexistant.
Can you replace
function forumreplylink() { ... }
with:function forumreplylink() {
//must be called from within the loop yadda yadda
global $post;
if( $post ) {
$rl = get_option( 'wpbb_path' ) . '/topic.php?id=';
$tid = felblogtotopicid( $post->ID );
echo '<a href="' . $rl . $tid . '">Reply!</a>' . "n";
} else {
echo 'ouch!';
}
}If it outputs ouch we’ll know that a missing global $post is indeed the problem. You are using it inside The Loop, aren’t you?
That’s very simple; go to wp-admin > Options > Discussion and set it so comments are off. You can also modify your template by deleting all the code for comments.
To get the ‘discuss in forums’ link, simply open your template file, and replace the
<?php comments_popup_link(' make a comment', '1 comment', '% comments','','comments off'); ?>
or similar with this:<?php forumreplylink(); ?>
That’ll give you what you want. Note that you’ll need to put
felblogtotopicid()
into a WP plugin, like so:<?php
/*
Plugin Name: HFFIB
Plugin URI:
Description: Helper function for integrating bbPress into your theme.
Version: 0
Author: fel64
Author URI: http://www.loinhead.net/
*/
function felblogtotopicid( $felpostID ) {
global $table_prefix, $wpdb;
$posts_table = $table_prefix . "bbpress_post_posts";
$topic_id = $wpdb->get_var("SELECT topic_id FROM <code>$posts_table</code> WHERE <code>post_id</code> = $felpostID LIMIT 1;");
return $topic_id;
}
function forumreplylink() {
//must be called from within the loop yadda yadda
global $post;
$rl = get_option( 'wpbb_path' ) . '/topic.php?id=';
$tid = felblogtotopicid( $post->ID );
echo '<a href="' . $rl . $tid . '">Reply!</a>' . "n";
}
?>If you do that, you have to take it out of the hack should you implement it.
There are a few things you can do. This WP plugin will, using also the bbPress Post plugin, show replies from the appropriate thread in your forum under your newspost, plus links to the thread to reply to it. You can also transfer existing comments; you need to be careful to only do it once, but that can also be found in that thread. It hasn’t yet been successfully made so that you can reply to the forum from the wordpress part of the site, as far as I know, but I’m sure it’s possible and will be done.
So it’s perhaps 2/3rds of the way there.
In reply to: Trying to integrate bbpress with my wordpressThat’s because you’re using a left-hand margin on your sidebar and your main div to push them to the right.
<div id="main">
<div id="discussions">
<div id="secondary">That’s roughly your HTML structure.
Main
is the full width of the central white bar, so there’s no way you can getSecondary
next to it.Discussions
is a sub-part ofMain
, and it’s pushed over to the right by a large margin on the left.Secondary
is not part ofMain
, and pushed over to the far right because it has a humoungous 71% margin.Firstly you want to put
Secondary
into yourMain
div, otherwise there’s no way to do it. Then you need to put either one on the left; the way to do this would be to get rid of its giant margin. That should work.Otherwise, if you’re not doing it by the margin property, you could put
Secondary
intoMain
again, then giveSecondary
andDiscussions
afloat: left;
and afloat: right;
property (or the other way around). If there’s enough room, they should now be side by side – otherwise make them narrower.You can also get rid of the
wrapper
‘sborder
properties, that’s what’s giving you the double-width line.That’s a nice theme you made, though.
In reply to: No ajax on repliesI don’t think it’s AJAX here.
Firebug does not detect any GET or POST requests, and said that the page loaded in 453 ms – with FF having the stylesheet and probably images in cache, and the extremely fast server this is on, it might seem like it’s AJAXed but I don’t think it is.
In reply to: limit forums included in latest discussionsYup! Find this (or similar) codeblock in your theme’s
front-page.php
.<tr<?php topic_class(); ?>>
<td><a href="<?php topic_link(); ?>"><?php topic_title(); ?></a></td>
<td class="num"><?php topic_posts(); ?></td>
<td class="num"><?php topic_last_poster(); ?></td>
<td class="num"><small><?php topic_time(); ?></small></td>
</tr>Around it put
<?php if( $topic->forum_id != 666 ) { ?>
... that code block ...
<?php } ?>You will probably want to change
666
to whatever forum id you actually want to exclude. You can put any conditional logic you like inside those if( … ) brackets, so for example to filter for two forums you would putif( $topic->forum_id != 666 && $topic->forum_id != 999 )
. Hope that helps.