Info
- 6 posts
- 5 voices
- Started 2 years ago by _ck_
- Latest reply from _ck_
- This topic is not a support question
here's how to show super-stickies ("stick to front") also in their own forums
-
- Posted 2 years ago #
Here's a mini-plugin I whipped up to fix the behavior of bbPress where a sticky that is made to "stick to front" (aka "super-stickies") gets removed from its original forum.
Instead, now it will show as a regular sticky in its original forum but also as a super sticky on the front page.
<?php /* Plugin Name: Super Stickies Fix ................................................................................................................. */ function super_stickies_fix($where){return str_replace("topic_sticky = '1'","topic_sticky > 0",$where);} add_filter('get_sticky_topics_where','super_stickies_fix'); ?>Tested in bbPress 0.9, in theory it should work fine also in bbPress 1.x
You can remove the line of all dots, it's just there to fix the wrap problem for code on bbpress.org 2.0
-
- Posted 2 years ago #
Hi _ck_,
thanks for this mini plugin for bbPress 0.9. I will test it today in my develop enviroment.
On my live installations (trunk version 1.x) it seems no fix for super stickies is needed. Super stickies are stickies on the front and in its original forum.
Markus
-
- Posted 2 years ago #
In 1.0.2 no fix is needed too.
-
- Posted 2 years ago #
Thanks, _ck_! As you reported, it works fine in 0.9.
-
- Posted 2 years ago #
Yeah works in both, nice one.
Much better than my hack! -
- Posted 2 years ago #
Thanks for the feedback.
Good to hear they fixed it in 1.0 - it's actually easy to fix by hacking the core, only two characters need to be changed that way!
(
>0instead of=1) -
You must log in to post.