This topic was marked solved by its starter, on January 19th, 2013, 04:01 PM
Ordering sticky topics

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
Ordering sticky topics
« 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)
When we unite against a common enemy that attacks our ethos, it nurtures group solidarity. Trolls are sensational, yes, but we keep everyone honest. | Game Memorial

Dragooon

  • I can code! Really!
  • polygon.com has to be one of the best sites I've seen recently.
  • Posts: 1,841
Re: Ordering sticky topics
« Reply #1, 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).
The way it's meant to be

spoogs

  • Posts: 417
Stick a fork in it SMF

Re: Ordering sticky topics
« Reply #3, 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! :)

Pandos

  • Living on the edge of Wedge
  • Posts: 635
# dpkg-reconfigure brain
error: brain is not installed or configured

Farjo

  • "a valuable asset to the community"
  • Posts: 492

MultiformeIngegno

  • Posts: 1,337

Pentaxian

  • Ah!
  • Posts: 20

Aaron Smith

  • The mini menus on Thoughts... Damn Sexy!
  • Posts: 39
Re: Ordering sticky topics
« Reply #8, 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.

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
Re: Ordering sticky topics
« Reply #9, 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

godboko71

  • Fence accomplished!
  • Hello
  • Posts: 361
Re: Ordering sticky topics
« Reply #10, 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?
Thank you,
Boko

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
Re: Ordering sticky topics
« Reply #11, 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.

godboko71

  • Fence accomplished!
  • Hello
  • Posts: 361

spoogs

  • Posts: 417
Re: Ordering sticky topics
« Reply #13, 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.

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
Re: Ordering sticky topics
« Reply #14, 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.

📎 order_pinned_topics_1.png - 35.72 kB, 918x386, viewed 196 times.

📎 order_pinned_topics_2.png - 24.71 kB, 917x432, viewed 194 times.