Advertisement:

Author Topic: StickyTopicsOrder  (Read 23320 times)

Offline maestrosite.ru

  • Semi-Newbie
  • *
  • Posts: 89
    • Сопровождение и модификация форумов SMF
StickyTopicsOrder
« on: September 19, 2012, 10:45:22 AM »
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 smf@maestrosite.ru

This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.
« Last Edit: November 18, 2012, 10:39:29 PM by maestrosite.ru »
First of all, sorry for my english. По-русски у меня получается значительно лучше.

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

You can try other modifications - see demo

Offline PopUpSteve

  • Semi-Newbie
  • *
  • Posts: 74
  • Gender: Male
    • PopUpPortal
Re: StickyTopicsOrder
« Reply #1 on: October 12, 2012, 03:48:37 PM »
Installed the mod but can't seem to figure out how to set the weight on a sticky topic.  ???

Quote
a 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."

Offline hcfwesker

  • SMF Hero
  • ******
  • Posts: 2,214
  • Gender: Male
  • SMF 2.0.4
Re: StickyTopicsOrder
« Reply #2 on: October 12, 2012, 04:00:51 PM »
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.

Offline PopUpSteve

  • Semi-Newbie
  • *
  • Posts: 74
  • Gender: Male
    • PopUpPortal
Re: StickyTopicsOrder
« Reply #3 on: October 12, 2012, 04:53:07 PM »
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."

Offline natasa (NT)

  • Semi-Newbie
  • *
  • Posts: 66
  • Gender: Female
Re: StickyTopicsOrder
« Reply #4 on: October 15, 2012, 08:42:42 AM »
I really needed this mod.
Thanks a lot  :)!

Offline steveshiver

  • Newbie
  • *
  • Posts: 1
Re: StickyTopicsOrder
« Reply #5 on: October 16, 2012, 09:52:24 AM »
Thanks for sharing this mod! I needed it badly!

Offline fran-

  • Semi-Newbie
  • *
  • Posts: 34
  • Gender: Female
    • Atelier Ajwan
Re: StickyTopicsOrder
« Reply #6 on: November 08, 2012, 07:02:17 PM »
Thanks. Very useful topic !  :)
« Last Edit: November 08, 2012, 07:48:00 PM by fran- »

Offline Badetuch

  • Newbie
  • *
  • Posts: 4
Re: StickyTopicsOrder
« Reply #7 on: November 17, 2012, 08:20:33 AM »
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?

Offline maestrosite.ru

  • Semi-Newbie
  • *
  • Posts: 89
    • Сопровождение и модификация форумов SMF
Re: StickyTopicsOrder
« Reply #8 on: November 17, 2012, 09:18:51 AM »
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

Offline Badetuch

  • Newbie
  • *
  • Posts: 4
Re: StickyTopicsOrder
« Reply #9 on: November 17, 2012, 11:34:49 AM »
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.
« Last Edit: November 17, 2012, 12:26:12 PM by Badetuch »

Offline maestrosite.ru

  • Semi-Newbie
  • *
  • Posts: 89
    • Сопровождение и модификация форумов SMF
Re: StickyTopicsOrder
« Reply #10 on: November 18, 2012, 01:02:33 AM »
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

Offline Badetuch

  • Newbie
  • *
  • Posts: 4
Re: StickyTopicsOrder
« Reply #11 on: November 18, 2012, 06:51:53 AM »
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".



Offline maestrosite.ru

  • Semi-Newbie
  • *
  • Posts: 89
    • Сопровождение и модификация форумов SMF
Re: StickyTopicsOrder
« Reply #12 on: November 18, 2012, 09:37:29 AM »
Yes, it is a bug. Please, insall update (v0.5)

Badetuch, thank you for bugreport!
« Last Edit: November 18, 2012, 10:36:30 PM by maestrosite.ru »
First of all, sorry for my english. По-русски у меня получается значительно лучше.

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

You can try other modifications - see demo

Offline Badetuch

  • Newbie
  • *
  • Posts: 4
Re: StickyTopicsOrder
« Reply #13 on: November 19, 2012, 03:05:35 AM »
Allright! Thank you! :)

Offline wattie

  • Semi-Newbie
  • *
  • Posts: 14
Re: StickyTopicsOrder
« Reply #14 on: November 20, 2012, 06:40:41 AM »
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!

Offline FragaCampos

  • Sophist Member
  • *****
  • Posts: 1,359
  • Gender: Male
    • docsPT
Re: StickyTopicsOrder
« Reply #15 on: January 29, 2013, 08:51:07 PM »
Nice mod.
Simple, clean and effective.

Thanks, maestrosite.ru.

Offline Westwegoman

  • Jr. Member
  • **
  • Posts: 202
  • Gender: Male
    • westwegoman on Facebook
    • Westwegoman on LinkedIn
    • Bayou State Fishing
Re: StickyTopicsOrder
« Reply #16 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.

Offline PopUpSteve

  • Semi-Newbie
  • *
  • Posts: 74
  • Gender: Male
    • PopUpPortal
Re: StickyTopicsOrder
« Reply #17 on: February 28, 2013, 09:08:21 AM »
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."

Offline maestrosite.ru

  • Semi-Newbie
  • *
  • Posts: 89
    • Сопровождение и модификация форумов SMF
Re: StickyTopicsOrder
« Reply #18 on: February 28, 2013, 09:37:40 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

Offline maestrosite.ru

  • Semi-Newbie
  • *
  • Posts: 89
    • Сопровождение и модификация форумов SMF
Re: StickyTopicsOrder
« Reply #19 on: February 28, 2013, 09:40:52 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