Slightly lighter version <a href="<?php post_link($topic->topic_last_post_id); ?>">Latest</a>
After a few days, the “error” repeated: I posted a couple of things which, later, showed as “anonymous”. See here http://www.kirpi.it/r/
What could it be done to prevent this, please?
What should I check?
Could there be any flaw to look for/after, please?
I admit that such a behaviour scares me a bit
Doing a quick var_dump
of the passed argument, it’s just a string of the tags passed by the user (commas and all) and before checks are made to see if they’re existing tags. I think you’d want to use bb_tag_added
which passes $tt_id, $user_id, $topic_id
as each tag is added (if you register the action function as taking as many variables).
hi fellows,
iam running this blog http://www.embtrans.com , my hosting is running on Windows IIS and it doesnt allow mod_rewrite functionality.
i have managed to configure the pretty permalinks for WordPress using custom 404. here is its code
<?php
$qs = $_SERVER;
$_SERVER = substr($qs, strpos($qs, ‘:80’)+3);
$_SERVER = $_SERVER;
include(‘index.php’);
?>
i would like to know if there is some custom 404 code for bbpress on Windows IIS to make pretty permalinks work.
thanks in advance
Hello bbpress community.
I’m trying to write a plugin that checks certain actions and saves them to a “status feed” so they appear in a friendfeeed-ish manner.
eg.
User made a new post
User started a topic
User tagged a topic
etc.
bb_new_post and bb_new_topic return the post and topic id respectively so it’s easy to grab it… But I’m using add_action('bb_add_topic_tags', 'status_tags_update');
to check the tags. The thing is, it seems to break tagging.
I checked bb_add_topic_tags and it returns tt_ids, which I assumed was an array of the inserted tag ids. But I’m probably wrong. I don’t understand very well what $tt_ids = $wp_taxonomy_object->set_object_terms( $topic->topic_id, $tags, 'bb_topic_tag', array( 'append' => true, 'user_id' => $user_id ) );
is supposed to do. So I don’t understand what’s being returned. I’m trying to get either the tag id, or preferably the topic id.
Any of you plugin-savvy users have any idea/help?
The default 404 page doesn’t have much of value to offer a visitor that stumbles your website via an organic search result. This is why I have enhanced mine 404 page a bit and I would like to share that with you guys.
Add 301 redirect for 404 pages
Pages that have been removed to a different URL, will show a 404 page. Add a 301 redirect to your 404 page that will redirect the user to its new address.
Suppose you had an address domain/old-url this got moved to domain/new-address, add the follow code to your 404.php (located in your bb-templates folder). Add this to the top of the page.
<?php
$redirect_301 = array(
'/old-url/' => '/new-url',
'/another-old-url' => '/another-new-url'
);
$request = $_SERVER;
if (array_key_exists($_SERVER, $redirect_301)) {
header(“HTTP/1.1 301 Moved Permanently”);
header(‘Location: http://www.yourdomain.com’ . $redirect_301[$request] );
die();
}
?>
Also you can change the default text:
<p><?php _e('I'm sorry, but there is nothing at this URL.'); ?></p>
Into something more nice, like:
<p><?php _e('The page you are looking for can not be found or it has been removed. You can always just browse the website or even use the search form below to try another search.'); ?></p>
<?php search_form(); ?>
What do you guys think?
Try this code instead, this is what I’m using on my own forums:
<?php printf( __('Posted on %s'), bb_datetime_format_i18n( bb_get_post_time( array( 'format' => 'timestamp' ) ) ) ); ?>
Thanks guys, especially code012! After installing reCAPTCHA, spambot stop completely!!
Check for an extra line or space after the closing ?>
tag, seems to be a common problem copying from the forums. Or an extra line or space before the <?php
tag.
Argh it ate part of it. Check the link and copy the line opening $text
from there instead. There’s meant to be $1 in-between the spaces before target
.
Hello all. I am starting a new wordpress site with bbpress installed in a subdirectory. I am not very tech savy and don’t know how to do code, but I am wondering how difficult it would be to have my bbpress forums inside my wordpress blog theme.
In other words, is it possible to have the same look and menu structure from my blog appear when in the forums?
From what I can find in the forums this is called deep integration. I have viewed the posts on that, but I am wondering if there is any further development that would help me, because I don’t have the ability to do the tasks as they are presented in those posts.
@grassrootspa
I doubt that too but I am wondering if that didn’t work out
A while back, I added bbPress to my website. I used the bbPress Integration plugin and followed the screencast instructions, but it never quite worked right. Since then, I’ve seen too little need for integration, and I’d like to just get rid of it — keeping the bbPress installation, but getting rid of integration.
I can’t find good instructions on how to do this. Further, I can’t even properly get into my bbPress admin area. I log in, but I just get the regular bbPress screen, and when I click Admin, it just redirects me right back to the regular screen. And I do believe this is the result of things going wrong with cookies because of the integration plugin.
Help! Thanks
<?php
/*
Plugin Name: No Duplicate Display Names
Description: Prevents users from using already existing display names.
*/
function check_display_name ( $user_id ) {
global $bbdb, $bb_current_id, $display_name;
$name_query = <<<EOQ
SELECT
user_login
FROM
$bbdb->users
WHERE
display_name = "$display_name"
AND
ID != "$bb_current_id"
EOQ;
if ( $name_clash = $bbdb->get_var( $name_query ) ) {
wp_redirect( add_query_arg( 'nameclash', $name_clash, get_user_profile_link( $user->ID ) ) );
exit;
}
}
add_action ( 'before_profile_edited', 'check_display_name' );
?>
You also need in your theme’s profile.php, before the line <?php elseif ( $user_id == bb_get_current_user_info( ‘id’ ) ) : ?>
<?php elseif ( $_GET['nameclash'] ) : ?>
<div class="notice error">
<p><?php printf(__('Display name already taken by %s'), $_GET['nameclash' ]); ?>. <a href="<?php profile_tab_link( $user_id, 'edit' ); ?>"><?php _e('Edit again »'); ?></a></p>
</div>
Also, I just set my display name to a SQL query string, yay
<?php $last_post = bb_get_last_post(); ?><a href="<?php echo get_post_link($last_post->post_id); ?>">Latest post</a><?php unset($last_post); ?>
Put that in your front-page.php
in the parts you want the latest post link to appear. Try after <?php topic_page_links(); ?>
A threaded forum layout could be achieved using a template, you’d just have to code it yourself by loading the titles from each thread (and add titles, either yourself or with a plugin) or find someone who has already done it. Why isn’t bbPress like that? It’s made to be as simple as possible so you can build what you want from it.
Nope, that’s to fix your capabilities setting, without which I think it’d be impossible to access admin ever. Ah well
Hostnames will just be the public-facing DNS entry for your IP, which in my case at least is just a nice text-and-numbers version of my IP
Of course it’s possible but around half the plugins will stop working.
depends on which plugins you’re using 
I’m using all the plugins I have used before
WordPress itself just underwent a pretty serious security attack:
http://www.cmswire.com/cms/web-cms/wordpress-under-attack-upgrade-now-or-forever-live-in-fear-005489.php
Since bbPress 1.0 shares a lot of code with WordPress (through BackPress), it may or may not be vulnerable… hopefully Sam can weigh in definitively on this one!
Mine was to check the bug tracker… oh dear
my first reaction was to check the sourcecode haha