News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

StickyTopicsOrder

Started by maestrosite.ru, September 19, 2012, 10:45:22 AM

Previous topic - Next topic

maestrosite.ru

Link to Mod

Set sticky topics order.

Ability to specify the order is only available to board administrators. The order is determined by the importance (weight) of topics, a negative value attach to the end of the topic to the list.

Demo http://smf2.maestrosite.ru/index.php/board,2.0.html
Support http://MaestroSite.ru/
Support topic http://smf2.maestrosite.ru/index.php/topic,27.0.html
E-mail [email protected]

This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.
First of all, sorry for my english. По-русски у меня получается значительно лучше.

Проблема на форуме? Сначала посмотрите лог ошибок вашего форума и лог ошибок сайта (error_log)

You can try other modifications - see demo

PopUpSteve

Installed the mod but can't seem to figure out how to set the weight on a sticky topic.  ???

Quotea negative value attach to the end of the topic to the list.
???
Steve
"Even a broken clock is right twice a day, unless it's digital."

hcfwesker

Admin > Configuration > Misc. > StickyTopicsOrder

It will list all boards that have topics.  The number of topics shown, click that number, this will bring up all sticky topics in the board.  Input numbers in the box, highest number will show up top.  Adding a negative makes the sticky topic show at the bottom of all topic listing.

Testing this, I came across one bug.  When you set a weight to a sticky topic, you can't un-sticky the topic from the quick mod checkboxes on MessageIndex.  you have to manually goto the post and unsticky it from the Mod buttons at the bottom of the post.

This is a nice MOD, though.  Can be very useful.

PopUpSteve

Thanks. I found it under Admin > Configuration > Modification Settings > StickyTopicsOrder.

Not quite sure why the number order is reversed. I.E. with two sticky topics the one on top is #2 and the second one is #1. But it works. Thanks for the mod and thanks for the help.
Steve
"Even a broken clock is right twice a day, unless it's digital."

natasa (NT)

I really needed this mod.
Thanks a lot  :)!

steveshiver

Thanks for sharing this mod! I needed it badly!

fran-

#6
Thanks. Very useful topic !  :)

Badetuch

I have the problem, that the topic weight (order) get lost, when someone writes a new comment in the sticky topic. :(

What can I do?

maestrosite.ru

That means, you changed Post.php after install mod. This mod has only one code replaced - a specially for save current order. Please sure that modify is preset: http://custom.simplemachines.org/mods/index.php?action=parse&attach=208588&smf_version=2.0.2&mod=3425

First of all, sorry for my english. По-русски у меня получается значительно лучше.

Проблема на форуме? Сначала посмотрите лог ошибок вашего форума и лог ошибок сайта (error_log)

You can try other modifications - see demo

Badetuch

#9
There was no change after the install. I replaced the code again, but when someone post something new in the sticky topic the "Weight" is going to "1".

Edit: Okay, there is only the change when a mod/admin post a new post... when a "normal" user writes something, there is no problem!

Edit 2: No problem via "Quick reply" but when I use the normal reply button.

maestrosite.ru

Sorry, but I can't get this bug on localhost forum. Can you describe your UseCase step-by-step ?
First of all, sorry for my english. По-русски у меня получается значительно лучше.

Проблема на форуме? Сначала посмотрите лог ошибок вашего форума и лог ошибок сайта (error_log)

You can try other modifications - see demo

Badetuch

Okay.

1) The weight of the topics is set to "1" when one of our admins post something new.
2) There is no problem for "normal" users.
3) There is no problem when the admins reply via quick reply.

I guess that the attribute of the topic is gonna update via the normal reply and so the weight is set again to "1".



maestrosite.ru

#12
Yes, it is a bug. Please, insall update (v0.5)

Badetuch, thank you for bugreport!
First of all, sorry for my english. По-русски у меня получается значительно лучше.

Проблема на форуме? Сначала посмотрите лог ошибок вашего форума и лог ошибок сайта (error_log)

You can try other modifications - see demo

Badetuch


wattie

Works awesome. Thank you very much. I was making an eLearning forum where the order is very important (first lesson, second lesson, etc). This mod saved my project from migrating to other software!

FragaCampos

Nice mod.
Simple, clean and effective.

Thanks, maestrosite.ru.

Westwegoman

Is there a way to make this work on all post in one board? (not the stickies)

I would like to have a board where I can rearrange the post by date of the event, with latest event at top.

PopUpSteve

What table is this info being stored? I ask because I'm automating the creation of boards and threads and I want to make them sticky and make them accordingly in your system.

Thanks
Steve
"Even a broken clock is right twice a day, unless it's digital."

maestrosite.ru

Quote from: PopUpSteve on February 28, 2013, 09:08:21 AM
What table is this info being stored?

Table smf_topics, field is_sticky. Value this field - it is a "weight"
First of all, sorry for my english. По-русски у меня получается значительно лучше.

Проблема на форуме? Сначала посмотрите лог ошибок вашего форума и лог ошибок сайта (error_log)

You can try other modifications - see demo

maestrosite.ru

Quote from: Westwegoman on February 28, 2013, 08:32:09 AM
Is there a way to make this work on all post in one board? (not the stickies)

I would like to have a board where I can rearrange the post by date of the event, with latest event at top.

Sorry, I do not understand your question.
First of all, sorry for my english. По-русски у меня получается значительно лучше.

Проблема на форуме? Сначала посмотрите лог ошибок вашего форума и лог ошибок сайта (error_log)

You can try other modifications - see demo

Advertisement: