PHP Scripting Forums » bbpress plugins and modifications

removing "replies=x" from topic url

(14 posts)
Great offers not only for geeks!
Your Ad Here

  1. "Olaf, that could well be the reason that while my URL contains 2 keywords, glam & rock, entering the "glam rock" search string into google finds me on page 5.
    The google dance hasn't been kind to me and it's been getting worse and I suspect the reason is as you said."- edwinfoo

    I edited your function because you're using the users from Wordpress:

    function bb_quote_message() {
    		global $bbdb, $topic;
    	$post_id = (int)$_GET['quote'];
    	if ($post_id) {
    		$row = $bbdb->get_row("SELECT * FROM $bbdb->posts INNER JOIN bb_users ON bb_posts.poster_id = bb_users.ID WHERE bb_posts.post_id={$post_id} AND bb_posts.topic_id={$topic->topic_id} AND bb_posts.post_status=0");
    		$row->post_text = rtrim(preg_replace( '(|
    )', '', $row->post_text ));
    		if ($row) echo htmlentities('<blockquote>"'.trim($row->post_text).'"<strong>- '.$row->user_login.'</strong></blockquote>', ENT_COMPAT, 'UTF-8');
    	}
    }

    ...and tested the modified version within this post, does it look like you made it?

    Posted 10 months ago #
  2. Mine is an integrated Wordpress/bbPress installation. When I tried what you suggested, it didn't work and came up with errors in the post creation box.

    Posted 10 months ago #
  3. I'm using your function, but posted the modified version for users with only bbpress installed

    just keep your own code...

    Posted 10 months ago #
  4. After a update to version 0.9 I have noticed that this fix is not needed anymore (they solved it in the core code)

    Posted 6 months ago #

RSS feed for this topic

Reply

You must log in to post.