PDA

View Full Version : Moderators Functions - Advance Sticky Options


SmEdD
28 Jun 2006, 01:52
What this Hack Does
This hack will allow you to set a Display Order for Sticky Posts (ignore any sortorder) and set an Expiry Date to unstick your posts.

Hack Info
Templates to Edit: 1 (manual)
Files to Upload: 1 (auto)
DB Changes: 1 (auto)
Plugins Added: 7 (auto)
Cron Scripts Added: 1 (auto)

Instructions
1) Download the attached file.
2) Upload the file in the "upload" folder.
3) Import the plugin.
4) Find and Replace in template threadadmin_editthread
$posticonsWith: <fieldset class="fieldset">
<legend>$vbphrase[sticky_options]</legend>
<div style="padding:$stylevar[formspacer]px">
<div>
$vbphrase[sticky_order]<br />
<input type="text" class="bginput" name="sticky_order" value="$threadinfo[sticky_order]" size="5" maxlength="3" />
$vbphrase[sticky_order_desc]
</div>
<div>
$vbphrase[sticky_expiry]<br />
<table cellpadding="0" cellspacing="$stylevar[formspacer]" border="0">
<tr>
<td>
<span class="smallfont">$vbphrase[month]<br />
<select name="sticky_expiry[month]" tabindex="1">
<option value="-1" $monthselected[default]></option>
<option value="1" $monthselected[1]>$vbphrase[january]</option>
<option value="2" $monthselected[2]>$vbphrase[february]</option>
<option value="3" $monthselected[3]>$vbphrase[march]</option>
<option value="4" $monthselected[4]>$vbphrase[april]</option>
<option value="5" $monthselected[5]>$vbphrase[may]</option>
<option value="6" $monthselected[6]>$vbphrase[june]</option>
<option value="7" $monthselected[7]>$vbphrase[july]</option>
<option value="8" $monthselected[8]>$vbphrase[august]</option>
<option value="9" $monthselected[9]>$vbphrase[september]</option>
<option value="10" $monthselected[10]>$vbphrase[october]</option>
<option value="11" $monthselected[11]>$vbphrase[november]</option>
<option value="12" $monthselected[12]>$vbphrase[december]</option>
</select>
</span>
</td>
<td>
<span class="smallfont">$vbphrase[day]<br />
<input type="text" tabindex="1" class="bginput" name="sticky_expiry[day]" value="$sticky_expiry[day]" size="4" maxlength="2" />
</span>
</td>
<td>
<span class="smallfont">$vbphrase[year]<br />
<input type="text" tabindex="1" class="bginput" name="sticky_expiry[year]" value="$sticky_expiry[year]" size="4" maxlength="4" />
</span>
</td>
</tr>
</table>
</div>

</div>
</fieldset>

$posticons
Change Log
Version 1.5
- Updated to vBulletin 3.6
- Moved a hook location.
- Changed install code.

Version 1.0.3
- Fixed some broken uninstall code.

Version 1.0.2
- Changed the default value of sticky order from 0 to 5. This was done so you may have stickies like “Sig Testing” that are always below new stickies.

Version 1.0.1
- Fixed Select Field size.
- Removed '' from numeric values to lessen load and speed up the script.
- Removed excess spacing just to clean up the code.
- Changed != to <> in the MySQL Query to prevent problems.

3.7.x and 3.8.x Support
Currently this is verified working up to vB version 3.8.1

The SandKiller
28 Jun 2006, 02:09
First Post, yay! Excellent

Bad Bunny
28 Jun 2006, 05:18
Hey, this sounds really cool. :)

Atakan KOC
28 Jun 2006, 06:13
Nice. Thanks. :)

iTaLiAnBoY165
28 Jun 2006, 06:42
Will this work with 3.5 or absolutely not???

SmEdD
28 Jun 2006, 08:55
Will this work with 3.5 or absolutely not???
I have already released a version for 3.5 that can be found at http://www.vbulletin.org/forum/showthread.php?t=103642

A_N_K_A_R_A
28 Jun 2006, 15:29
installede very nice

Snake
29 Jun 2006, 18:55
Thanks for the hack man!

Derekclarke
08 Jul 2006, 22:55
installed on beta 4 and is NOT working.

CypherSTL
08 Jul 2006, 23:59
Same here, with Beta 4 there is no option for display order nor sticky experation

SmEdD
11 Jul 2006, 07:32
I will look into this, I am updating to RC build right now and I will see what was changed!

CypherSTL
19 Jul 2006, 05:34
cool thank you, I had heard there was some changes made and that is most likely the reason.

Freakpyromaniac
09 Aug 2006, 10:19
I have installed it on 3.6 Rc 3 but i dont see anything.
Do i have to turn it on ?

RaceJunkie
09 Aug 2006, 12:05
Great hack I have not installed yet, but this should be a default feature in vB

ctrl-alt-del
14 Aug 2006, 18:05
Okay, I can't figure out how to get to the options made available by this hack. I can get to the Edit Post, but not Edit Thread shown in your example image. What am I missing?

ctrl-alt-del
14 Aug 2006, 18:07
As usual, as soon as I post, I found the option to Edit Thread. (Thread Tools / Moderation Tools / Edit Thread radio button)

asj
14 Aug 2006, 22:14
Thanks for man..

jgrakowski
17 Aug 2006, 02:04
this hack needs one thing to be more usefull... make it so who ever can change the order of the stickies - when viewing the threadlist in the forum, all the sticky topics have a input box on them and a save button at the bottom and top of the stickys... so you can reorder the stickys without entering each thread and then entering edit thread for each one.

o0Hubba0o
18 Aug 2006, 00:09
You should put the template edit into the zip too, I just put in a new skin and had to come find this thread to get it. Just makes it easier for people if they need to re-install in the future and forget to copy it and save it themselves like I did. :D

ctrl-alt-del
18 Aug 2006, 02:11
this hack needs one thing to be more usefull... make it so who ever can change the order of the stickies - when viewing the threadlist in the forum, all the sticky topics have a input box on them and a save button at the bottom and top of the stickys... so you can reorder the stickys without entering each thread and then entering edit thread for each one.

Great suggestion. I second this feature request.

curriertech
18 Aug 2006, 17:55
*waits for 3.6 Gold version*

jgrakowski
18 Aug 2006, 21:45
oh and wouldnt it make more sense to have a ascending order? where 1 is at the top? makes 99.99999% more sense.

dutchbb
19 Aug 2006, 02:39
great hack, good work

BETIServices
19 Aug 2006, 03:31
As usual, as soon as I post, I found the option to Edit Thread. (Thread Tools / Moderation Tools / Edit Thread radio button)

After braking my head looking where I execute the option I found it thanks to you post.

Nice hack...

bongwater
20 Aug 2006, 10:08
installed on 3.6 gold. It shows up but it doesnt seem to unsticky the threads automatically at the expiration date

BETIServices
21 Aug 2006, 04:36
I had not test that feature yet but can somebody confirm the bug .. thanks

voteforbird
21 Aug 2006, 15:49
Any chance the expiry options can also be shown on newthread.php?

nevetS
29 Aug 2006, 07:09
installed on 3.6 gold. It shows up but it doesnt seem to unsticky the threads automatically at the expiration date

Did you upload the file to your includes folder?

I just installed on 3.6 and all seems to work correctly. I just went into the scheduled task manager, and clicked "Run Now" on "Sticky Cleanup" and it expired a sticky for me.

If you don't have that option, you probably didn't upload the file to the correct location. it should be includes/cron/stickycleanup.php

If you do have that option, definitely try "Run Now" and see if it exhibits any error messages.

mIRCnet
03 Sep 2006, 16:00
/installed
Great hack ,
Now what about if an admin didnt specify sticky options ? Stick Expire Date or Sticky Order, does it effect in the corn ? like to unstock the thread

category
04 Sep 2006, 07:19
hack doesnt work for 3.6.0 i did everything what said uploaded the product and the includes and updated the templates

JonUrban
08 Sep 2006, 18:45
Just installed this product. It works great. THANKS!

Jon Urban
www.quadraphonicquad.com

RedWingFan
11 Sep 2006, 16:46
To add this option when you are creating a new thread, add it to your newthread template as follows.

Find the following line:

$threadmanagement

Add after:



<!-- ADVANCED STICKY OPTIONS -->

<fieldset class="fieldset">
<legend>$vbphrase[sticky_options]</legend>
<div style="padding:$stylevar[formspacer]px">
<div>
$vbphrase[sticky_order]<br />
<input type="text" class="bginput" name="sticky_order" value="$threadinfo[sticky_order]" size="5" maxlength="3" />
$vbphrase[sticky_order_desc]
</div>
<div>
$vbphrase[sticky_expiry]<br />
<table cellpadding="0" cellspacing="$stylevar[formspacer]" border="0">
<tr>
<td>
<span class="smallfont">$vbphrase[month]<br />
<select name="sticky_expiry[month]" tabindex="1">
<option value="-1" $monthselected[default]></option>
<option value="1" $monthselected[1]>$vbphrase[january]</option>
<option value="2" $monthselected[2]>$vbphrase[february]</option>
<option value="3" $monthselected[3]>$vbphrase[march]</option>
<option value="4" $monthselected[4]>$vbphrase[april]</option>
<option value="5" $monthselected[5]>$vbphrase[may]</option>
<option value="6" $monthselected[6]>$vbphrase[june]</option>
<option value="7" $monthselected[7]>$vbphrase[july]</option>
<option value="8" $monthselected[8]>$vbphrase[august]</option>
<option value="9" $monthselected[9]>$vbphrase[september]</option>
<option value="10" $monthselected[10]>$vbphrase[october]</option>
<option value="11" $monthselected[11]>$vbphrase[november]</option>
<option value="12" $monthselected[12]>$vbphrase[december]</option>
</select>
</span>
</td>
<td>
<span class="smallfont">$vbphrase[day]<br />
<input type="text" tabindex="1" class="bginput" name="sticky_expiry[day]" value="$sticky_expiry[day]" size="4" maxlength="2" />
</span>
</td>
<td>
<span class="smallfont">$vbphrase[year]<br />
<input type="text" tabindex="1" class="bginput" name="sticky_expiry[year]" value="$sticky_expiry[year]" size="4" maxlength="4" />
</span>
</td>
</tr>
</table>
</div>

</div>
</fieldset>

<!-- /ADVANCED STICKY OPTIONS -->

Save the template, and you're done! This will appear at the bottom of the page, directly under Thread Management.

Masters
19 Sep 2006, 00:08
This doesn't work in 3.6.1.

ctrl-alt-del
19 Sep 2006, 13:27
This doesn't work in 3.6.1.

Huh?? Yes it does....for me anyway. Unless you were talking about what RedWingFan posted...then, I haven't tried.

tspore
25 Sep 2006, 08:34
Cool mod, I have 1 request. I would like to be able to use this when a mod, sticks a topic, for like 3 days. After the first post is done. So either need it to work on the edit post, or under the edit tools/stick thread.
Thanks for making this very cool.

wjkids
10 Oct 2006, 06:45
Really would like to use this MOD. Does this work with 3.6.2?

Invalid ID
12 Oct 2006, 02:29
Can't find "Sticky Options" shown in the photo. Plz help. Thanks

TVNettet
12 Oct 2006, 10:47
Added and edited template, but couldn't even find the product in vB 3.6.2.
Have added loads of products b4, so not that green ;-)
But of course this is a great idea and can't understand wtf vB haven't made this part of the default...

Invalid ID
12 Oct 2006, 10:59
May be because it doesn't work :)

Konstantinos
17 Dec 2006, 09:15
i upgraded from 3.5.6 to 3.6.4 and i tried to overwrite the product and i get

Database error in vBulletin 3.6.4:

Invalid SQL:

ALTER TABLE vbthread
ADD sticky_order SMALLINT( 5 ) UNSIGNED DEFAULT '5' NOT NULL AFTER sticky,
ADD sticky_expiry INT( 10 ) UNSIGNED DEFAULT '0' NOT NULL AFTER sticky_order;

MySQL Error : Duplicate column name 'sticky_order'

OffRoadManiac
22 Jan 2007, 13:41
never mind......

Cybershaolin
26 Jan 2007, 20:24
Does it or not work with 3.6.4?

Cybershaolin
28 Jan 2007, 09:32
Works very well with 3.6.4. Tested.

I also tried the RedWingFan code and it works also but the only problem with new threads is when putting a value in the sticky order field, it reverts to the default value of "5" set in the table after the message is posted. It does not keep your value.

In edit modes there are no problems.

So, you still need yo edit the options afterwards...

Only thing I did not check is if all these sticky management options are visible by the members other than the staff.

Overall, it's a nice hack and I like it. Very helpful.

Cybershaolin
28 Jan 2007, 10:04
I'm still trying to figure out about the default value of "5" though.

I had a sticky thread set at 30, just to make sure it would remain on top.

Then I made a reply in the second sticky thread in taht sub-forum and refreshed the sub-forum. What I saw was that the second sticky thread, even if had a default value of "5" was now the first one displayed in the sub-forum!

I had to edit the sticky order of that thread to another random number (but to put something different) in order to have my order back.

Strange.

Maybe a default value of 0 instead of 5 would be better but I noticed it was changed in one of the hack's update (1.02). I dont' know why since I don't understand what a Sig testing can be...

Cybershaolin
30 Jan 2007, 04:44
Also, did anybody notice that their forums are much slower with this hack installed? Am I dreaming?

mshehan
01 Feb 2007, 16:55
Can someone post steps on how to get this to work with 3.6.4 please?

Staxed
02 Feb 2007, 04:35
Works very well with 3.6.4. Tested.


really? it isn't working at all for me.

Any plans on updating this at all?

stwilson
25 Feb 2007, 16:07
Just what I needed. Thanks for the hack.

Hellboys
25 Feb 2007, 17:11
Thanks a lot for the fine Hack. This one will bring us a better looking Sticky sorting. Well done mate.

Bree
15 Apr 2007, 09:34
*Installed* Works great.. vB 3.6.5.. No problems installing. Took all of like 2 minutes.

Also... I like the 0 being lowest... When I add a new one and want it to be on top... a lot easier to put in a higher number than to go back and reorder all the rest.

Love it, Thanks!
Always, Bree

alahmed
25 May 2007, 23:55
i am sorry to say:

its not working with version 3.6.7

pcoskat
28 May 2007, 19:01
Great hack I have not installed yet, but this should be a default feature in vB

Ditto that

DSLTD
17 Jul 2007, 18:16
When i try to import the XML file i get this error;

Database error in vBulletin 3.6.4:

Invalid SQL:

ALTER TABLE thread
ADD sticky_order SMALLINT( 5 ) UNSIGNED DEFAULT '5' NOT NULL AFTER sticky,
ADD sticky_expiry INT( 10 ) UNSIGNED DEFAULT '0' NOT NULL AFTER sticky_order;

MySQL Error : Duplicate column name 'sticky_order'
Error Number : 1060
Date : Tuesday, July 17th 2007 @ 07:15:32 PM
Script : http://kingofpop.info/forum/admincp/plugin.php?do=productimport
Referrer : http://kingofpop.info/forum/admincp/plugin.php?do=productadd
IP Address : 88.107.84.28
Username : admin
Classname : vB_Database


Anyone got any ideas why?

I have changed the text and replaced it with what the instructions say to in the threadbit also, the XML file just wont upload :(

rpainter
02 Aug 2007, 14:42
Great MOD

lazserus
02 Sep 2007, 01:05
I just can not get this to work on 3.6.7 or above. I have installed and reinstalled it and nada. Any ideas? I'm receiving no errors, the sticky options just don't appear.

DiMoNd21
02 Sep 2007, 22:14
Just installed it on 3.6.8. Not working... Any ideas?

Marys242
09 Sep 2007, 01:05
As usual, as soon as I post, I found the option to Edit Thread. (Thread Tools / Moderation Tools / Edit Thread radio button)

thank you...i was also wondering were it was....

dismas
07 Oct 2007, 18:16
Does this work/does anyone have it installed on 3.6.8?

lazserus
08 Oct 2007, 12:54
It doesn't work for me either. I was running 3.6.7 when I installed it and it didn't work. After upgrading to 3.6.8, it still does not work. The version on the hack shows 3.6.0 Beta. The developer just needs to update the hack to work with 3.6.8.

stwilson
17 Feb 2008, 15:49
I was able to get this working on 3.7B5 without any problems. As far as I can tell, it is working. I was able to sticky a thread. I set it to expire tomorrow and will post up the result, ie, did the sticky automatically go away.

justchil
20 Feb 2008, 17:00
I'd love to have this hack.... any chance it will ever be updated?

baymortgage99
29 Apr 2008, 03:38
Where do you post stickies in admin panel?

gatman
15 May 2008, 07:24
no in the forum your posting in

za3bour
03 Jun 2008, 09:05
this hack is excellent it's working fine for me , i made it in arabic so if any one wants the translation please let me know

ArnyVee
18 Jun 2008, 01:48
Does this work in 3.7.1 P1?

I'm looking for something just like this to keep certain sticky threads in a particular order.

hippiesimz
13 Jul 2008, 06:55
workin perfectly on 3.68

Ingress
13 Jul 2008, 13:17
I had the 3.5.-Version (http://www.vbulletin.org/forum/showthread.php?t=103642) installed on my 3.5.-Board and after Upgrade to 3.7.2 PL1 this old hack still works fine. Will test the 3.6.-Version soon.

Ingress

TFEX
13 Jul 2008, 21:06
installed

Mitsuomi
15 Jul 2008, 11:19
Not working in 3.6.9

KAWIE1
24 Jul 2008, 15:21
Not working on 3.6.8

manning
25 Jul 2008, 03:04
Does this work in 3.7.1 P1?

I'm looking for something just like this to keep certain sticky threads in a particular order.

GOOD question - anyone installed this on 3.7.2?

Further, why isnt this a standard feature?


EDIT - INSTALLED & WORKING

anderow
10 Aug 2008, 23:10
GOOD question - anyone installed this on 3.7.2?

Further, why isnt this a standard feature?


EDIT - INSTALLED & WORKING

Thanks for testing!!

This should definately be installed as standard on vbulletin.
its elementary but important!!

Going to try and install it now

anderow
10 Aug 2008, 23:19
Update -

Seems to work flawlessly in 3.7.2 PL1

Great work to the OP!!:)

lostgirl815
11 Aug 2008, 04:30
Thanks so much for this!

virus9112002
31 Aug 2008, 19:49
Need for 3.7.3

Nadeemjp
26 Sep 2008, 02:08
is this usable with 3.7.3?

SirFlash
25 Oct 2008, 23:04
Does not work in vb3.8.0.Beta1.

TFEX
19 Jan 2009, 02:08
EDITED: this works find in 3.8 Gold. Just be sure to do the template edit in the instructions again after upgrade. tested OK.

bisshop
22 Jan 2009, 13:01
Hi guys,

can anyone post a quickfix how to get this working for 3.8.0?

Thank you.

robbiefritz
23 Jan 2009, 20:09
Will try it in 3.7.3

SmEdD
02 Mar 2009, 06:56
Just to confirm as I have had people asking me to make it compatible with 3.7.x and 3.8.x. I just tested on a clean install and seems to work just fine for me.

Saviour
12 May 2009, 22:55
Working great on vb 3.8.2.

Thanks for this...

robbiefritz
22 Jun 2009, 21:59
I no longer have the ability to edit my post icons when editing the post. Your screen shot shows the post icons but I do not see them on mine. Any ideas? Thanks.

SmEdD
23 Jun 2009, 05:23
Sounds like you didn't copy the code correctly, if you look at the end of the template code you should see $posticons

That is what calls the icons.

robbiefritz
25 Jun 2009, 10:42
Sounds like you didn't copy the code correctly, if you look at the end of the template code you should see $posticons

That is what calls the icons.

Will check that, thanks!

Update: Sure enough, I missed it.

Puntoboy
08 Sep 2009, 11:59
I've just tried upgrading my forum to 3.8.4. I had this installed already (v1.0.1) and I get a DB error about a duplicate column.

Database error in vBulletin 3.8.4:

Invalid SQL:

ALTER TABLE vb3_thread
ADD sticky_order SMALLINT( 5 ) UNSIGNED DEFAULT '5' NOT NULL AFTER sticky,
ADD sticky_expiry INT( 10 ) UNSIGNED DEFAULT '0' NOT NULL AFTER sticky_order;

MySQL Error : Duplicate column name 'sticky_order'
Error Number : 1060
Request Date : Tuesday, September 8th 2009 @ 12:53:44 PM
Error Date : Tuesday, September 8th 2009 @ 12:53:44 PM
Script : http://www.puntosports.co.uk/forums/admincp/plugin.php?do=productimport
Referrer : http://www.puntosports.co.uk/forums/admincp/plugin.php?do=productadd
IP Address : 188.220.15.42
Username : Puntoboy
Classname : vB_Database
MySQL Version : 4.1.22-community-nt-log

How can I fix this without having to set up all my stickies again?

medicalforums
04 Oct 2009, 17:39
Installed on 3.8.3
Works fabulous

Silviu
05 Jan 2010, 08:28
Is there any chance that this hack will make the transition to vB 4.0?

Gnomie
29 Jan 2010, 11:43
Is there any chance that this hack will make the transition to vB 4.0?

that would be nice, would like sort order for stickies for 4.0.1 myself as i have a few per forum.... :)

PET
24 Feb 2010, 08:57
Hello. Can you please update this so it will work for version 4?

Thanks

mike2902
31 Mar 2010, 16:53
Installed on 3.8.2 and nothing. Tried it twice so Im not sure of the problem.

washingtonboise
07 Apr 2010, 06:28
Also interested in seeing a paid sticky option where a user could pay $20, get a paid sticky, maybe bold title as well.

This has been requested numerous times in the past in other threads, however the demand was never met with supply

mgurain
28 Oct 2010, 06:06
Hello SmEdD,
Can you update this (very needed) mod to 3.8.x and make it a product without the need to manually modify templates ?
Thanks,,

Avrojet
26 Mar 2011, 11:06
I'd love to see this on VB4

the_ace
12 Apr 2011, 15:34
works great on 3.8.7.
Thanks for this mod.

quantquant
10 May 2011, 12:27
works fine in 3.8.4, thanks!

(didn't test the cron job, cause I don't need it)

NTMID8
08 Aug 2011, 19:43
It seems the developer has not been onlne since March. Any other coders out there who can adapt this to 4.1.5?

EdQ
08 Aug 2011, 22:30
I wish

NTMID8
01 Jun 2012, 05:36
bump

deverill2010
19 Aug 2012, 22:03
Ah I just came to see if there was a VB4 version. Shame looks like it hasn't been ported. :(

BeoRski
01 Dec 2012, 17:08
Any chance this gets to vb4? :)

Gamelobby
31 Dec 2012, 01:39
It seems the developer has not been onlne since March. Any other coders out there who can adapt this to 4.1.5?

or 4.2 :)

BeoRski
05 Jan 2013, 17:08
Still wishing someone could port this over to 4.x... ^_^

Jamey
02 Aug 2013, 16:02
Working fine on 3.8.4. Thanks.

Dr.Adrian
15 Sep 2013, 21:05
No news on 4.x for this mod?

ia7
24 Jan 2014, 15:11
After reading this thread (http://www.vbulletin.org/forum/showthread.php?t=290009) and seeing what kh99 said I had a go at trying to make it work, and I succeeded in getting the display order working but the expiry time eludes me, though I only wanted the ordering functionality anyway. :)

It works on 4.2.0 PL4 so not sure how or even if it will work on your version but you can give it a try if you want.

After Importing the Product copy the below into threadadmin_editthread and paste it before the div containing $posticons.

Paste this:

<!-- Advanced Sticky Options Begin -->
<h3 class="blocksubhead">{vb:rawphrase sticky_options}</h3>
<div class="section">
<div class="blockrow">

<label for="displayorder">{vb:rawphrase sticky_order}</label>
<input type="text" class="primary textbox" name="sticky_order" value="{vb:raw threadinfo.sticky_order}" size="5" maxlength="3" />
<span class="stickyorderdesc">{vb:rawphrase sticky_order_desc}</span>
<p class="description"></p>

</div><!--/.blockrow-->
</div><!--/.section-->
<!-- Advanced Sticky Options End -->


before this:

<div class="section">
{vb:raw posticons}
</div>


Worth disabling the Sticky Expiry Scheduled task too seeing as that doesn't function.