Search Results for '+.+default+.+'
-
Search Results
-
So I’ve been digging further into the strange behavior I’ve had with slashes in posts AND with HTML tag attributes being yanked out.
It’s all related. Apparently, there is some type of problem where slashes get added TWICE when the WP intergation is on. This is why slashes start showing up everywhere and why kses fails.
I finally discovered that even though the stripslashes filter is called before bb_filter_kses, there are still slashes in front of the quotes of the attributes. So they get tossed.
So I took out all the stripslashes hacks I had put into the title and post routines and called stripslashes TWICE as a pre_post filter. Voila – attributes are preserved.
add_filter('pre_post', 'stripslashes', 40);
add_filter('pre_post', 'stripslashes', 45); // 2nd Time
I also added this little section in default-filters.php:
// Slash problems when integrated with WordPress
if (defined('WP_BB') && WP_BB) {
add_filter('post_text', 'stripslashes');
add_filter('get_topic_title', 'stripslashes');
add_filter('get_bb_title', 'stripslashes');
add_filter('edit_text', 'stripslashes');
}
And it stripped out the slashes in titles, browser bars, posts, edit screens, etc. (Note there is a missing semi-colon after the sort_tag_heat_map line – you need to add on if you put this at the end)
This is still a hack. I don’t have magic quotes on. I still need to dig and find out why there seems to be alternate behavior when wordpress is integrated or not. Maybe WordPress is turning on magic quotes and bbPress doesn’t expect it to be on?
Still digging.
Topic: Plugin: private forum
When I use default template, this plugin doesn’t have a problem. But, I changed default into K2 template. I came to know, registered member also can see my private forums. I want it completely private.
Is there any solution for this?
I’ve upgraded Graphic Display Ranks to 0.6
Moved the configurable variables to gdr_config.php located in the ‘ranks’ subdirectory. I also added a new set of images that are smaller than the original set and should fit in the default threadauthor css width.
Topic: Looking for the right hook
I am fleshing out my plugin Graphic-display-ranks and I’m looking for the right hook to use to do the following:
I want to find out if a topic author is the Key Master or a moderator. Here is what I have so far —
function get_special_rank () {
global $special_rank, $use_special_rank, $bbdb;
if ($use_special_rank==1)
{$title_for_rank=<strong>I NEED THIS HOOK</strong>( get_post_author_id() );
switch ($title_for_rank) {
case "keymaster" :
$special_rank=1;
break;
case "moderator" :
$special_rank=2;
break;
default :
$special_rank=0;
}
}
else
{
$special_rank = 0;
}
return $special_rank;
}
Can anyone point me in the right directon?