PDA

View Full Version : Advance Sticky Options


SmEdD
24 Dec 2005, 04:08
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: 3 (auto)
Plugins Added: 7 (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


Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------

With:

Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------


Change Log
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.

WNxWakko
24 Dec 2005, 04:49
Very interesting. Ill Install it.

divided_by_fear
24 Dec 2005, 05:01
going to try it out thanks

wolfstream
24 Dec 2005, 09:36
Nice job!

FleaBag
24 Dec 2005, 13:50
This should be default in vB! Great work, thanks a lot! :)

nexialys
24 Dec 2005, 13:56
what would be cool on the design sight is to have that new block of functions displayed only when you click to stick the thread.. ;) -- ok, i'm paranoid!

SmEdD
24 Dec 2005, 18:16
what would be cool on the design sight is to have that new block of functions displayed only when you click to stick the thread.. ;) -- ok, i'm paranoid!
The problem is there area about 4 different spots to sticky posts. There is only one spot that you could do it reasonably. The rest get a bit more complicated especially the inline mod sticky as you can stick mass amounts of threads.

I will look into it though for a future version.

Psionic Vision
24 Dec 2005, 18:26
Very nice. Could use a bit of work, but on the bottom line this hack is great :)

uae
24 Dec 2005, 19:40
Awesome Work :)

SmEdD
24 Dec 2005, 20:48
Very nice. Could use a bit of work, but on the bottom line this hack is great :)Letme know what needs changed and I can fix em up :)

Snake
25 Dec 2005, 12:56
Cool hack...

Psionic Vision
25 Dec 2005, 13:28
Letme know what needs changed and I can fix em up

Design of the form:
Two buffed up with extra words. The select field is narrower than the text fields. The controls should only show up when sticky is selected.

Cron:
Integer fields do not require to be wrapped into single quotes. Ex: Use sticky = 0 instead of sticky = '0'
In MYSQL, you use <>, not !=. Therefore, use sticky_expiry <> 0 and not sticky_expiry != '0'
### is not a MySQL way to write comments. Therefore, there might be a MySQL error when running this query.



Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------


I am not 100% sure, but I think it must be written like this:


Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------


If it works the way you have it, excellent :)
Same thing with quotes goes with your XML. You do not need to wrap numeric values into quotes. Although it doesn't matter much, it does affect speed.

SmEdD
25 Dec 2005, 17:22
Design of the form:
Two buffed up with extra words. The select field is narrower than the text fields. The controls should only show up when sticky is selected.

Cron:
Integer fields do not require to be wrapped into single quotes. Ex: Use sticky = 0 instead of sticky = '0'
In MYSQL, you use <>, not !=. Therefore, use sticky_expiry <> 0 and not sticky_expiry != '0'
### is not a MySQL way to write comments. Therefore, there might be a MySQL error when running this query.



Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------


I am not 100% sure, but I think it must be written like this:


Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------


If it works the way you have it, excellent :)
Same thing with quotes goes with your XML. You do not need to wrap numeric values into quotes. Although it doesn't matter much, it does affect speed.




- The DROP (http://dev.mysql.com/doc/refman/5.0/en/alter-table.html) and Comment (http://dev.mysql.com/doc/refman/5.1/en/ansi-diff-comments.html) are correct as they are.
- Fixed up the PHP and removed the '' around numeric values and removed some excess spacing.
- Fixed the select field.

In the next version I will see about making the options only show up when there is a sticky. The major problem is you can sticky the thread on that page and it uses a check box instead of a radio button so it will take some time to code it.

Psionic Vision
25 Dec 2005, 17:52
The DROP and Comment are correct as they are.
Ok, sorry about it then. I was simply used to the syntax generated by phpMyAdmin.

- Fixed up the PHP and removed the '' around numeric values and removed some excess spacing.
- Fixed the select field.
Thank you.

The major problem is.... checkbox instead of radio button
I don't see it as a "major problem", because both checkbox and radiobutton use the same hidden "checked" parameter, and you hack should show the controls when that parameter has a state of 1, and not show the controls when the parameter has a state of 0. ;)

Enthonia Tech
27 Dec 2005, 23:24
Installed the mod but it is not workign , checked 10 times but still not workign..can you check template edits please ?

SmEdD
29 Dec 2005, 06:14
What part isn't working? And do you have the pulgin turned on?

Enthonia Tech
29 Dec 2005, 16:55
The advance sticky options isint displaying in thread edit and thread post and yes plugin is turned on! :)

SmEdD
29 Dec 2005, 23:17
Ok, do you just have on style on your forums? If you do you have to do this to all of your templates. If that dosn't help try this.

Replace template threadadmin_editthread with this. (this is the default threadadmin_editthread with the addition)


Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------

SmEdD
02 Jan 2006, 12:07
Any updates on how it went?

SmEdD
24 Jan 2006, 00:14
Updated to v1.0.3
- 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.
- Fixed some broken uninstall code.

IrPr
26 Jan 2006, 14:16
seems i need DROP sticky_order and sticky_expiry columns before re-installing product, rite?

SmEdD
27 Jan 2006, 02:31
Yes there was an error on the 1.0.1 and 1.0.2 uninstall code. Run this query.



Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------

ssslippy
29 Mar 2006, 02:44
Ok ive tried to install this, doesnt seem to show up in the edit window. Its still showing the default. I even did a copy of paste of your code above. Still fails.

Tinbendr
31 Mar 2006, 02:39
Ref. Installed 1.0.3.
Seems I'm having the same problem. No changes to the edit box.

PolyMarauder
12 Apr 2006, 11:24
Thanks for the mod. Works like a charm, just what I needed.

Cheers!

Lady Divus
27 May 2006, 18:40
Ok, i have a couple questions,

1.) Does this work on 3.5.4?
2.) I installed it and it doesnt work, where do i check to make sure it is turned on?
3.) If it is turned on, what could be making it not work?

Any help would be greatly appreciated. Be well -

Lady Divus

whitetigergrowl
27 May 2006, 21:18
Did template edit, added plug-in..plug-ins turned on...file uploaded...but still not showing. Using Vb 3.5.4

utw-Mephisto
27 May 2006, 22:04
Did template edit, added plug-in..plug-ins turned on...file uploaded...but still not showing. Using Vb 3.5.4

Same here, even on a brand new test forum with no other modifications

Lady Divus
27 May 2006, 23:54
Did template edit, added plug-in..plug-ins turned on...file uploaded...but still not showing. Using Vb 3.5.4
It shows in the 'Thread Tools' option in each thread. Choose 'Edit Thread' and you will see the Sticky options, check out the screenie below...However, it doesnt work for me even when i try to use it. Hope this helps -

Lady Divus

utw-Mephisto
28 May 2006, 00:37
Lady, thanks, I knew that it only works on edit but I thought it is enough to use the regular edit button, now I can see the sticky options. You say that they don't work for you. Do you mean they don't show up or they don't go unstuck ? Just curious before I try the scheduled thing ..

Lady Divus
28 May 2006, 02:48
Lady, thanks, I knew that it only works on edit but I thought it is enough to use the regular edit button, now I can see the sticky options. You say that they don't work for you. Do you mean they don't show up or they don't go unstuck ? Just curious before I try the scheduled thing ..
Your welcome...They show up, they dont stick the way the hack was intended. They stick the same as they would if i didnt have the hack in place. I am hoping for help as to why this is happening...Thank you -

Lady Divus

whitetigergrowl
28 May 2006, 02:58
would be nice to have this as a default option at the bottom before posting.

sensimilla
29 May 2006, 10:09
I have uninstalled this hack as it didnt worked for me and I get this error on forums..

Database error in vBulletin 3.5.4:

Invalid SQL:

SELECT threadid

FROM thread AS thread

WHERE forumid = 16
AND sticky = 0
AND visible IN (0,1,2)

Thanks in advance for help.

utw-Mephisto
29 May 2006, 14:13
Installed (still 1.0.2) on 3.5.4 and works like a charm .. I first forgotten that the scheduled task has to run (changed time intervall) but then everything works as expected - thanks !

Lady Divus
29 May 2006, 18:16
Installed (still 1.0.2) on 3.5.4 and works like a charm .. I first forgotten that the scheduled task has to run (changed time intervall) but then everything works as expected - thanks !
Hello, could you share with us what you did to change the time interval? I went into my scheduled task manager and i dont see the cron options for this hack...

Do i need to add a cron job? If so, what attributes do i need to enter? I guess this will be my last attempt at trying to get this to work, if i cant get it resolved i will uninstall from both, here and from my site. Thank you for any help in advance -

Lady Divus

utw-Mephisto
29 May 2006, 18:53
I installed it according to the instructions. It installs the cronjob automatically and I simply changed the time from once a day to evey 15 minutes ...

Lady Divus
29 May 2006, 20:54
I installed it according to the instructions. It installs the cronjob automatically and I simply changed the time from once a day to evey 15 minutes ...
Wow, thank you, works perfectly...I also realized i was ordering the stickies the wrong direction...

Example:
If i want a particular sticky to be at the top, i dont number it number 1, but rather if i have a total of 4 stickies i would want to number it number 4 to make it number 1...In other words, order backwards, not forward...Sheesh im getting dizzy lol

Anyway, it works! Thank you for your help utw-Mephisto, this this was a very important hack to me...Be well -

Lady Divus

whitetigergrowl
17 Jun 2006, 08:23
Can't seem to uninstall from 3.6

Milchi
18 Jun 2006, 12:42
Nice :)

kissythecutie
18 Jun 2006, 22:04
can this be installed on vb3.5.4?

kissythecutie
18 Jun 2006, 22:11
where is the upload folder?

phOny
04 Jul 2006, 09:25
brilliant, just what i needed at www.totallypsp.com/forum - thanks, saved my life in the cheats forum... thanks!

Extreme John
05 Jul 2006, 19:31
installed and works great :) thanks

ssslippy
25 Jul 2006, 06:21
Still has broken uninstall code, cant uninstall this plugin as it fails to work.

zeroality
26 Jul 2006, 06:26
Is this restricted to admins only?

SmEdD
29 Jul 2006, 09:52
Still has broken uninstall code, cant uninstall this plugin as it fails to work.
What's the error you are reciving?

Is this restricted to admins only?
Anyone who can edit the thread (close/sticky/etc), not the post will have access to this.

CypherSTL
31 Jul 2006, 23:27
Can you port this to 3.6 please? would be very grateful.

bada_bing
21 Aug 2006, 18:42
Is this usergroup permissions based?

Harley D
29 Oct 2006, 15:26
For those who can't find the Sticky Options after installing "Like me" and those who what the options in the New Thread and Edit Thread templates as options.

In editpost and newthread find:


Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------



After add:


Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------



The code above was found in the Advance Sticky Options for 3.6 in this post http://www.vbulletin.org/forum/showpost.php?p=1072751&postcount=32 Made by RedWingFan. I take no credit, but I will tell you it does work with VB 3.5.4.

DSLTD
17 Jul 2007, 17:42
Hi all, hoping for some pro help or from someone who can tell me whats gone wrong!

OK - So i downloaded and followed the instructions here for an advanced sticky options plug in (so i can position old sticky's at the top of the forums)

Importing the plug in - i found this instruction difficult having never done it before and not being able 2 find any guides on this forum.. anyway, vbulletin said it was a product not a plug in, so i installed a product, filled in the details so it pointed to the .php file i had uploaded to my 'cron' folder. How to "turn on" a plugin or product i do not know, but when i EDIT a thread the advanced sticky options appear so i guess ive done something right!

The problem is when i specify a position and click save the changes are not made and the sticky remains in the same position it would be if this plugin/product were not installed at all!

I also added some code to my threadadmin_editthread as per the plugin thread linked at the top of my post.. so my threadadmin_editthread now reads as follows incase the fault is in there?? ;




Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------




Anyone got any ideas?

The guy who made the plug in does not accept PM's and he's not online at all (msn) so im at a lost end..

DSLTD
17 Jul 2007, 18:47
bump

NashChristian
20 Jul 2007, 11:20
Is this going to be made to function on 3.6.7?

Ingress
29 Jun 2008, 04:27
Installed on 3.7.2, noted no problems so far.

Ingress.

KAWIE1
23 Jul 2008, 00:32
Does it work on 3.6.8?

Ingress
24 Jul 2008, 15:56
Why not daring to use the fine search? Saves many a post.

This is what it found for me:

Advance Sticky Options for 3.6 (http://www.vbulletin.org/forum/showthread.php?t=119746)

Ingress

KAWIE1
24 Jul 2008, 16:27
Why not daring to use the fine search? Saves many a post.

This is what it found for me:

Advance Sticky Options for 3.6 (http://www.vbulletin.org/forum/showthread.php?t=119746)

Ingress

Because that one won't work for 3.6.8 ;)

Ingress
24 Jul 2008, 17:01
Well, I managed this old 3.5 version to work with my 3.7.2 board without any modifications to it apart from manually updating the templates the same way as in 3.5. I doubt it wouldn't work with 3.6.x for that reason ;-)

Since I've never run 3.6 I can't help here but I bet it's either a template issue or a conflict with some other mod you have installed.

Just test it in a clean test environment without any other mod installed and make sure the template edits are done correctly, that surely will make it work.

Ingress

Ghost Shadow
06 Dec 2008, 19:24
Is it possible to have sticky open on the thread, so user sees it without having to click on it?