News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

StickyTopicsOrder

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

Previous topic - Next topic

Westwegoman

Basically, I want to be able to rearrange all topics in one board to my preference.

PopUpSteve

Quote from: maestrosite.ru on February 28, 2013, 09:37:40 AM
Table smf_topics, field is_sticky. Value this field - it is a "weight"
Cool, thanks! ;D
Steve
"Even a broken clock is right twice a day, unless it's digital."

maestrosite.ru

Quote from: Westwegoman on February 28, 2013, 09:48:28 AM
Basically, I want to be able to rearrange all topics in one board to my preference.

If topics  is not sticky then they ordered by timestamp by default. Or not?
First of all, sorry for my english. По-русски у меня получается значительно лучше.

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

You can try other modifications - see demo

Westwegoman

Yes, they are ordered by time stamp by default.

PopUpSteve

 :( Found a major bug!

Love this mod but one of my forum members spotted a problem today. It looks like not only is the Sticky Topic Order ignored when viewing a forum using Tapatalk, but none of the Sticky Topics which have a sort order greater then "1" appear at all under Tapatalk.

I had to reset all my topics where "is_sticky" was greater to "1", back to "1".

I can't see Tapatalk making a change to accommodate the mod. And since so many of my members are now using Tapatalk to access the forum, I'll have to uninstall this mod. :'(
Steve
"Even a broken clock is right twice a day, unless it's digital."

Arantor

I blame Tapatalk for being naive. There are two different mods for reordering sticky topics... and both do it the same way. Says to me that Tapatalk should fix it.

(It's not hard, it just means they have to fix the logic to be in line with how SMF did it originally anyway, i.e. order by is_sticky DESC first)

maestrosite.ru

Sorry, it's not a bug this mod. You can fix Tapatalk - replace select with {int:iis_sticky} in MessageIndex.php. Something like that:
Quote
... AND is_sticky ' . ($getStickyTopics ? '!=' : '=' ) . ' 0

and in mobiquo_action.php
Quote... AND t.is_sticky = {int:is_sticky}
replace with:
Quote... AND t.is_sticky != 0
First of all, sorry for my english. По-русски у меня получается значительно лучше.

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

You can try other modifications - see demo

MaryLouW

In the older version of SMF, I had a mod to re-order the sticky topics. It was "attached" to each individual board and the moderators could set the order themselves.

I cannot find one like that for the 2.x versions so I am using this one.  It works nicely BUT only an admin can change it. That means, I am constantly having to make changes for the various boards.  It means a lot of trips back and forth to the Admin panel and a whole lot of work for me.

Is there one that will allow the board moderator to set the sticky order by board without having to run to the admin panel? If not, it sure would be nice to have one like that old one.  It was so convenient because if they did it wrong, they could see it immediately and make corrections and not have to PM me to do it for them.

Steve

Is there a limit to the number of topics that can be stickied and ordered?

If not, one could theoretically sticky all topics and put them in whatever order you want, right?
DO NOT pm me for support!

MaryLouW

I love this mod but do have one problem with it.  It shows all the html code that we use to give the titles different colors This makes it hard to find the board you're looking for.  Is there a way around this?  I'm attaching an example of what I mean.   Thanks!!!

Neil Bombd

Sadly, this mod stickys negative value threads to the VERY bottom of our forum listing, so at the end of page 356 for me :-) I wanted to use it to move threads that annoy me to the bottom of the first page, is this possible?  This would leave these threads on the forum for people who still want them, but I wouldn't have to look at them all the time.

skb

Installed it. It's quite a handy mod. Thanks.
Quote from: Westwegoman on February 28, 2013, 09:48:28 AM
Basically, I want to be able to rearrange all topics in one board to my preference.
I would second that, whenever possible. 

SMF 2.1.4 / TP 2.2.2

mkucuksari

This mod is really great. I was using it for a long time.

I am not sure how it happens but I can not see this mod at admin panel. It disappears ??

I have upgrade SMF from 2.0.3 to 2.0.13 and my hosting company also upgrade PHP version to 5.5.6.

I have checked all the related files. They are still existed at right place. Any idea please


mkucuksari

Quote from: maestrosite.ru on April 22, 2013, 11:41:07 AM
Sorry, it's not a bug this mod. You can fix Tapatalk - replace select with {int:iis_sticky} in MessageIndex.php. Something like that:
Quote
... AND is_sticky ' . ($getStickyTopics ? '!=' : '=' ) . ' 0

Could someone can help me exactly how I will change messageindex.php.

Here is the original codes.

$smcFunc['db_query']('', '
UPDATE {db_prefix}topics
SET is_sticky = CASE WHEN is_sticky = {int:is_sticky} THEN 0 ELSE 1 END
WHERE id_topic IN ({array_int:sticky_topic_ids})',
array(
'sticky_topic_ids' => $stickyCache,
'is_sticky' => 1,
)
);

sribharath

Is this is the mod to set which sticky post is first and which is second ?

Sorry i dint understand as the demo is in sme other language

may be i am dumb

Steve

Yes, this sets what order your sticky topics are in.
DO NOT pm me for support!

Grammy

2.0.17, Default

I apologize for bumping such an old thread.  (Don't hurt me.)

Here's the thing:  I used to love this mod and I really did look for a more up-to-date version.  But once I glanced at the edits (only 2 small ones on Post.php) and saw it should pass the installation, I gave it a go.  Everything was green lights, no errors, no need to emulate to 2.0.2, easy.  I checked to make sure that all files were properly edited and placed in the correct directories, including the language files; that's all good.

Except that even though StickyTopicsOrder appears in Admin-->Configuration-->Modification Settings, there are no actual settings.  When you click it, the field below is blank.  So, I thought I'd try running the install.php in my browser.  I got a success message "Your settings have been entered into the database!".  But I'm looking at the database and I see no new tables.  I even rummaged through the databases of older forums, thinking I'd grab those tables.  Nothing there, either.

I've dumped the cache, run forum maintenance, all clean, no errors.

If YOU were going to try to get an older mod to work, and you were at this point would you chuck it in, or do you see something I've missed?   :(

Steve

Silly question but I assume you have stickied topics? Did you try unstickying them then restickying them?

Did you try to install it by emulating 2.0.2 even though you got the go ahead?

Other than that, I can't imagine why it wouldn't work ... :-\
DO NOT pm me for support!

Grammy

Quote from: Steve on January 18, 2021, 05:04:43 PM
Silly question but I assume you have stickied topics? Did you try unstickying them then restickying them?

Did you try to install it by emulating 2.0.2 even though you got the go ahead?

Other than that, I can't imagine why it wouldn't work ... :-\


Well, no, I didn't have any yet... it's a new "tire kicking" forum I set up today.  Well, I did add stickys after the problem, but since I can't enable it in settings, I can't test it.
You know, that's a thought...  I'll try uninstalling it and then running the emulator.  'Cause I'm thinking that maybe something in the source file or language file has changed since 2.0.2?  Lemme go try, I know you're just gonna sit here and wait for me to get back.   :D

Grammy

No joy in Mudville.   :(

Okay, that's my next rabbit trail, then.  Comparing 2.0.2 language and source files to 2.0.17.  After that, I'm out. 

Advertisement: