Skip to:
Content
Pages
Categories
Search
Top
Bottom

Re: New plugin request: reorder stickies


_ck_
Participant

@_ck_

This would be a very good beginners plugin to write, it’s very simple (other than the admin interface).

bbPress fetches stickies via a separate query (which I have always found to be a waste, except for this case) and you could manipulate the results before the final template is loaded.

For example on the front-page if you looks at index.php

you’ll see that

$super_stickies = get_sticky_topics();

and then there is

do_action( 'bb_index.php', '' );

so you hook the action bb_index.php

and then you do a global on $super_stickies

and then you manipulate the order of the array as desired.

for forum pages it’s

$stickies = get_sticky_topics( $forum_id, $page );

and

do_action( 'bb_forum.php', $forum_id );

same concept

That part would take less than an hour to write.

and you’d store the order in the topicmeta

But the part that will take much more time is the admin interface.

Instead you could simply add an extra field on the post edit page that only admin would see and let them chose the topic stickiness priority.

(this is not a plugin I will be writing)

Skip to toolbar