Skip to:
Content
Pages
Categories
Search
Top
Bottom

here's how to show super-stickies ("stick to front") also in their own forums


  • _ck_
    Participant

    @_ck_

    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

Viewing 5 replies - 1 through 5 (of 5 total)

  • Markus Pezold
    Participant

    @markus-pezold

    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


    zaerl
    Participant

    @zaerl

    In 1.0.2 no fix is needed too.


    citizenkeith
    Participant

    @citizenkeith

    Thanks, _ck_! As you reported, it works fine in 0.9.


    kevinjohngallagher
    Member

    @kevinjohngallagher

    Yeah works in both, nice one.

    Much better than my hack!


    _ck_
    Participant

    @_ck_

    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!

    ( >0 instead of =1 )

Viewing 5 replies - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.
Skip to toolbar