Order Stickied Topics

Started by Nathaniel, August 09, 2008, 06:39:32 AM

Previous topic - Next topic

Nathaniel

Link to Mod
Overview:

This mod allows you to order your stickied topics the way that you want them to be. It allows anyone with permissions to create a sticky in a particular board, to order those stickied topics by clicking on the "Order Stickied Topics" link, on the topic list page for any particular board.

Version Changes:

v1.01
Fixed a spelling mistake, for the title ('Sticked ' => 'Stickied ').

v1.0
Original Mod release.
SMF Friend (Former Support Specialist) | SimplePortal Developer
My SMF Mods | SimplePortal

"Quis custodiet ipsos custodes?" - Who will Guard the Guards?

Please don't send me ANY support related PMs. I will just delete them.

jossanaijr


Simplemachines Cowboy

Excellent.
Been wanting this for quite some time.

Spelling error, tho:
In Modifications.english.php & utf8:

// Text for the Order Stickied Topics Mod.
$txt['OrderStickiedTopics_title'] = 'Order Sticked Topics';


Should be 'Order Stickied Topics'
My SMF forum: The Open Range

Nathaniel

@Simplemachines Cowboy,
Argggggggg, ;) You don't know how happy and annoyed I am, all at the same time. A very big thank you for finding this annoying little error. :D

* Bug fixed. Mod is now at version 1.01.

Thank you,
LHVWB
SMF Friend (Former Support Specialist) | SimplePortal Developer
My SMF Mods | SimplePortal

"Quis custodiet ipsos custodes?" - Who will Guard the Guards?

Please don't send me ANY support related PMs. I will just delete them.

Simplemachines Cowboy

No problem.
I only noticed it 'cause I changed all the values to say "pinned" instead of "stickied"
My SMF forum: The Open Range

ccbtimewiz


AlkaSeltxer

~Josh~
Over 16 keyboards lost to raging.

Apllicmz




evil-angelist

Thanks worked great and went in easy. ;) ;)

m1ss1nnocent


tk2012


Nathaniel

Quote from: tk2012 on August 11, 2008, 03:13:04 AM
:D  easy as 1, 2, 3!

Actually the limit on the 'Sticky' value is 127, but anyway. :P

I am glad you guys like it. Thanks all. :D
SMF Friend (Former Support Specialist) | SimplePortal Developer
My SMF Mods | SimplePortal

"Quis custodiet ipsos custodes?" - Who will Guard the Guards?

Please don't send me ANY support related PMs. I will just delete them.

Nodaz

i haven't tried it yet but THANKS !
Edit downloaded and started the install when i see this:
    Description
1.    Execute Modification    ./index.php    Test successful
2.    Execute Modification    ./Sources/Post.php    Test successful
3.    Execute Modification    ./Sources/MessageIndex.php    Test successful
4.    Execute Modification    ./Themes/default/MessageIndex.template.php    Test successful
5.    Execute Modification    ./Themes/default/Post.template.php    Test successful
6.    Execute Modification    ./Themes/default/languages/Modifications.english.php    Test successful
7.    Execute Modification    ./Themes/default/languages/Modifications.english-utf8.php    Skipping file

Any issue?
That said...i am using a theme, how do i apply it to that?

ccbtimewiz

You most likely don't have to do any edits. Just install it and see if it'll work. :P

Nodaz

Quote from: ccbtimewiz on August 11, 2008, 10:23:36 PM
You most likely don't have to do any edits. Just install it and see if it'll work. :P
Like it was meant to be there  !
AWESOME LHVWB !
Thank you  !

Nathaniel

@UbinTook,
ccbtimewiz is correct (it happens sometimes :P), you shouldn't need to make any edits to custom themes, unless they contain the 'Post.template.php' or 'MessageIndex.template.php' template files, I will try to add some documentation which shows you how to edit these files, if you ever get a theme which has their own copies of these files.
SMF Friend (Former Support Specialist) | SimplePortal Developer
My SMF Mods | SimplePortal

"Quis custodiet ipsos custodes?" - Who will Guard the Guards?

Please don't send me ANY support related PMs. I will just delete them.

DSollick

When installing this mod, I get the following error:

2.   Execute Modification   ./Sources/Post.php   Test failed

Mod seems to work fine, so should I be worried about that at all?

Nathaniel

@DSollick,
The edits to that file are important, the most important edit to that file adds most of the code for the mod so if its working properly then thats not an issue. However the other changes fix some annoying behaviour which cause the 'sticky' value will be set to 1 whenever you edit a stickied topic or message. If you post your Post.php then I can install the parts which the package manager failed to install, thus fixing that problem.
SMF Friend (Former Support Specialist) | SimplePortal Developer
My SMF Mods | SimplePortal

"Quis custodiet ipsos custodes?" - Who will Guard the Guards?

Please don't send me ANY support related PMs. I will just delete them.

DSollick

Sorry for taking so long, I was attempting to manually install another package [Which I will never, ever, do again] that involved this file.

Thanks again for looking into this for me :)

Nathaniel

@DSollick,
Most of the mod installed fine for that file, the only edit that didn't work is below, if you want to do it personally for your file. I have also attached it.

Find this code (line 2167 for your file):
    // Assume the first message if no message ID was given.
    $request = db_query("
            SELECT
                m.subject,
                t.locked, t.numReplies, t.ID_MEMBER_STARTED, t.ID_FIRST_MSG,


Replace with:
    // Assume the first message if no message ID was given.
     $request = db_query("
             SELECT
                 m.subject,
                 t.locked, t.numReplies, t.ID_MEMBER_STARTED, t.ID_FIRST_MSG, t.isSticky,


The only difference which made the install fail for that edit was the 'm.subject' part, that's probably from a different mod. It should definetly work properly now.
SMF Friend (Former Support Specialist) | SimplePortal Developer
My SMF Mods | SimplePortal

"Quis custodiet ipsos custodes?" - Who will Guard the Guards?

Please don't send me ANY support related PMs. I will just delete them.

Advertisement: