Skip to:
Content
Pages
Categories
Search
Top
Bottom

Re: Quote Plugin Weirdness

Not sure what black magic you just haxed up there (MySQL I am fairly clueless about), I just did this:

$quoted = bb_get_user( $row->poster_id );

My full modifications are:

function bb_quote_message() {
global $bbdb, $topic;
$post_id = (int)$_GET['quote'];
if ($post_id) {
$row = $bbdb->get_row("SELECT * FROM $bbdb->posts WHERE post_id={$post_id} AND topic_id={$topic->topic_id} AND post_status=0");
$//row->post_text = preg_replace( '(|
)', '', $row->post_text );
$row->post_text = preg_replace( '/<blockquote>.*</blockquote>/', '', $row->post_text );
$row->post_text = str_replace( '', '', $row->post_text );
$row->post_text = str_replace( '
', '', $row->post_text );
$quoted = bb_get_user( $row->poster_id );
$quotesince = bb_since( $row->post_time );
$quotesince = ' - ' . $quotesince . ' ago ';
$quotelink = get_post_link( $row->post_id );
$quotelink = '<a href="' . $quotelink . '">&nbsp;&raquo;&nbsp;</a>';
if ($row) echo htmlentities('<blockquote><cite>'.$quoted->user_login . $quotesince . $quotelink . "</cite>n".$row->post_text.'</blockquote>', ENT_COMPAT, 'UTF-8');
}
}

function fel_addcitetag( $tags )
{ $tags['cite'] = array();
return( $tags ); }

add_filter( 'bb_allowed_tags', 'fel_addcitetag' );

You can see my regex attempt to get rid of blockquotes, although for some reason despite it being marked as code the b-quote tags were still removed.

I also switched from regexing the paragraph tags tostr_replaceing them, which is apparently much faster. Again, though, they’re filtered out.

Skip to toolbar