Wedge

Public area => The Pub => Features => Topic started by: Arantor on January 16th, 2013, 05:11 PM

Title: Ordering sticky topics
Post by: Arantor on January 16th, 2013, 05:11 PM
Been thinking about this a bit, wondering what people think.

Would it be interesting/useful to allow site owners to re-organise sticky topics into a fixed order, regardless of last post?

Technically it makes little or no difference, ordering is always done on is_sticky which is a tinyint, and that's before ordering by last post. Right now, it's simply 1 or 0, but you could introduce non-1 values to force a specific ordering. It doesn't require changing indexes, since the nature of it will still mean zero rows will form the bulk of the index (and thus render it useless) and it is not significantly expensive to pull just the sticky rows from a board.

Just wondering if it's worth the effort; it's mostly just some UI and a little bit of logic change (where it currently assumes it's 1/0 rather than non-zero/zero)
Title: Re: Ordering sticky topics
Post by: Dragooon on January 16th, 2013, 05:14 PM
Yes! There are a few topics that I'd always like at the top (I have a bunch of stickies).
Title: Re: Ordering sticky topics
Post by: spoogs on January 16th, 2013, 05:18 PM
Agrees with Dragoon
Title: Re: Ordering sticky topics
Post by: stackmouse on January 16th, 2013, 07:29 PM
Quote from Arantor on January 16th, 2013, 05:11 PM
Would it be interesting/useful to allow site owners to re-organise sticky topics into a fixed order, regardless of last post?
Not sure about "interesting", but damn useful! :)
Title: Re: Ordering sticky topics
Post by: Pandos on January 16th, 2013, 07:31 PM
Very useful. Nice idea.
Title: Re: Ordering sticky topics
Post by: Farjo on January 16th, 2013, 08:28 PM
As above it would be useful on our forum too.
Title: Re: Ordering sticky topics
Post by: MultiformeIngegno on January 16th, 2013, 09:00 PM
Why not :)
Title: Re: Ordering sticky topics
Post by: Pentaxian on January 16th, 2013, 10:55 PM
Very useful indeed. Please realize!
Title: Re: Ordering sticky topics
Post by: Aaron Smith on January 17th, 2013, 10:36 PM
I think this is one of those features that no one misses right now, because they don't have it. That said I also think this is one of those features that every single forum admin will use once they do. Very useful imho.
Title: Re: Ordering sticky topics
Post by: Arantor on January 18th, 2013, 01:41 AM
Does it need its own permission or would being able to make pinned topics be sufficient?

(yes, bah, I keep forgetting we renamed it to 'pinned topics' rather than 'sticky topics' a long time ago)
Posted: January 18th, 2013, 01:39 AM

Also, this is in no way related to the fact that I have a shiny new toy (jQuery UI Sortable) and want to use it in cool ways :D
Title: Re: Ordering sticky topics
Post by: godboko71 on January 18th, 2013, 05:24 AM
I would think being able to post a pinned topic would be enough. I mean how would you trust someone to post a pinned topic but not to sort them?
Title: Re: Ordering sticky topics
Post by: Arantor on January 18th, 2013, 05:25 AM
That was my thinking so far, though I did leave myself a note in case needs to become a permission later.
Title: Re: Ordering sticky topics
Post by: godboko71 on January 18th, 2013, 05:35 AM
Quote from Arantor on January 18th, 2013, 05:25 AM
That was my thinking so far, though I did leave myself a note in case needs to become a permission later.
Sounds like a plan to me
Title: Re: Ordering sticky topics
Post by: spoogs on January 18th, 2013, 01:54 PM
I'd argue for permissions default to admin only at install.

Assuming in most cases a moderator would pin/unpin a topic, surely they should be competent enough to know when(not) to sort the pinned topics.

I've been rather busy and tired lately so I could have easily misread/misunderstood what's being said about permissions here.
Title: Re: Ordering sticky topics
Post by: Arantor on January 19th, 2013, 05:19 AM
Well, here's the quandary. I could have it so that mods can pin/unpin topics (sticky/unsticky for those not yet familiar with Wedge terms) but not be able to reorganise them, or I could have it so that people who can pin/unpin can also arrange them too.

I'd assume that anyone who can pin can also arrange them, and that's how I wrote the code, but it's really no hardship to change it, it's two lines of existing code (one for the menu item, one for the permissions check in the main function) then just adding a new permission.

I'm happy with that to be honest.

There is a fringe issue that I'm not yet sure whether it bugs me enough. I'll relate it and see what folks think. Essentially, when you pin a new topic, it won't necessarily go to the bottom of the list of pinned topics - it will typically go one above bottom, if you've already organised them in the past, that is. All bets are off if you haven't previously reorganised them at all.

Do I care about this or do I forcibly ensure that a given pinned topic ends at the bottom of the list? I'm inclined not to care at this time of day about it (it's not a *huge* deal, it just means writing a query to bump everything up when pinning one, and another to unbump when unpinning, but there's several places this has to happen)

Admins before now didn't have the choice whether to care, it was just a mash of topics in whatever order. I'm assuming now that they'll fix it to place it wherever they want, or if they don't care, it'll just be wherever it ended up before.

In other news... happy <festival day>, have some screenshots.
Title: Re: Ordering sticky topics
Post by: godboko71 on January 19th, 2013, 05:40 AM
Pain meds so keeping it short. It can pin can reorder (for now can change in future if demand and/or you decide otherwise.) also the order of a new pinned topic doesn't matter to much will most likely get placed if one cares otherwise it will stay where it lands.
Title: Re: Ordering sticky topics
Post by: Arantor on January 19th, 2013, 05:42 AM
That's pretty much what I concluded, yes :)

And now it's committed and done, so I can move onto the next thing :)

Also, get better soon!!
Title: Re: Ordering sticky topics
Post by: Aaron Smith on January 19th, 2013, 05:51 AM
I can see myself automatically re-ordering them just as a normal part of my process of pinning things. I'm kind of a freak like that. So I'm content with it like it is. Besides the UI is slick enough that it's will only take seconds to re-order them and how often do we really pin topics?
Title: Re: Ordering sticky topics
Post by: Arantor on January 19th, 2013, 05:53 AM
Well, that's the thing, it's very much one of those 'once it's done, it's done' operations, both for pinning and ordering.
Title: Re: Ordering sticky topics
Post by: Aaron Smith on January 19th, 2013, 06:21 AM
Now if I could just get used to calling it Pinning and not Stickying :D
Title: Re: Ordering sticky topics
Post by: spoogs on February 3rd, 2013, 07:44 PM
A little late returning to the party, I would think the newly pinned should be at the bottom of the list, just seems that would be the better flow; however, I'm not terribly fussed about it either.