View Full Version : End-User Options - Personal Sticky Threads
Kaelon
08-28-2008, 10:00 PM
What are "Personal Sticky Threads"?
Personal Sticky Threads (aka "Personal Stickies") is an Add-on for vBulletin that will allow your users to sticky threads that only they will see as stickied; these "personal stickies" will appear beneath normal sticky threads. This Hack was originally designed by Mephisteus (https://vborg.vbsupport.ru/member.php?u=3654) for vBulletin 3.5, and re-released (with his permission) for vBulletin 3.7.x. This hack requires a couple of File Edits, and should be attempted by those who are comfortable editing vBulletin source files. That said, I have included modified detailed instructions that should make installation straight-forward and easy.
Special thanks are owed to Mephisteus, for allowing an updated re-release for vBulletin 3.7, and to john1744 and zendive for improving upon the query alterations. As I typically disclaim with my other Add-ons, I am generally a neophyte at this sort of stuff and I tend to modify hacks and tinker with pre-existing code to get the results that I want. That said, please use this discussion thread as a community-support and mutual learning opportunity.
Finally, if you like this hack and install it, please:
Mark this Add-on as Installed (https://vborg.vbsupport.ru/vborg_miscactions.php?do=installhack&threadid=189444)
Requirements
vBulletin 3.7.x SeriesInstallation
Installation is straight-forward. Simply download the attached archive, decompress on your local hard drive, and review the Installation.txt file for the specific steps. There are, broadly, four steps:
Import product-personalsticky.xml
Upload the two images into their respective folders
Perform two file edits to forumdisplay.php
Perform four template edits to three templates.Add-Ons
This modification can be further customized:
Limit to Specific Usergroups (iRO Wiki, imported from 1.0.3b) (https://vborg.vbsupport.ru/showpost.php?p=1474355&postcount=141)Version History
1.0.3c: Updated for vBulletin 3.7.3 (August 28, 2008)
FreshFroot
08-29-2008, 03:14 AM
nice one!
Great stuff.
Sadly, I don't really go with file edits... It just makes more work when upgrading.
other than that, nice hack!
This thread is worth it....even for the file edits!
Kaelon
08-29-2008, 03:18 AM
nice one!
Great stuff.
Sadly, I don't really go with file edits... It just makes more work when upgrading.
other than that, nice hack!
Absolutely. Unfortunately, there's no way around them for this sort of functionality; I couldn't find any hooks that existed that allowed me to modify the pre-existing queries, and I didn't want to add any new queries. As it stands, the two (minor) file edits to a (single) file enable this hack to keep overhead low/non-existent. That said, you are totally right -- these file edits would have to be something that would be maintained while upgrading.
Kaelon
08-29-2008, 03:19 AM
This thread is worth it....even for the file edits!
Glad that you like it! Some great work by coders far better than I went into this add-on; be sure to Mark this Add-on as Installed (https://vborg.vbsupport.ru/vborg_miscactions.php?do=installhack&threadid=189444) if you go with it. :) Thanks!
n95gps
08-29-2008, 03:19 AM
REally nice hack
but like Fresh Froot said .. editing templates is a pain specaily when upgrading
so maybe you can do something about it
Kaelon
08-29-2008, 03:21 AM
REally nice hack
but like Fresh Froot said .. editing templates is a pain specaily when upgrading
so maybe you can do something about it
I'm totally open to suggestions! Like I said, I'm still pretty new at this, so if anyone knows of better hooks that accomplish the same thing as these two minor file edits (less than a few characters each) without adding any queries, like the file edits accomplish, please let me know! I'd love to learn. :)
Subah
08-29-2008, 04:02 AM
Great mod , i remmber there is another mod it is add a favorite thread for you !
bchertov
08-29-2008, 04:41 AM
I think what is really needed is a bookmark feature so people can tag threads of interest and then be able to find them. Having those thread stuck to the top means that they are always in your face. I suppose its the right answer for some applications, but not the general case, IMO.
Anybody know of a well-done bookmark hack?
Hornstar
08-29-2008, 08:46 AM
yeah nice work and thanks for sharing. I might hold off on this. I have a feeling some members might think it is global and will go crazy with it until they realize it is only showing for them lol.
GaiLoan
08-29-2008, 10:09 AM
Glad that you like it! Some great work by coders far better than I went into this add-on; be sure to Mark this Add-on as Installed (https://vborg.vbsupport.ru/vborg_miscactions.php?do=installhack&threadid=189444) if you go with it. :) Thanks!
yup, this really nice, "install"
leannet
08-29-2008, 10:55 AM
Warning: in_array() [function.in-array]: Wrong datatype for second argument in [path]/showthread.php(2153) : eval()'d code on line 479
I keep getting that error message I have been over everything a million times and I dont know where I am going wrong, can anyone help please.
Kaelon
08-29-2008, 11:48 AM
I keep getting that error message I have been over everything a million times and I dont know where I am going wrong, can anyone help please.
That's weird. Are you using unmodified vBulletin 3.7.3 Files? Did you make sure to apply the two file edits only to forumdisplay.php?
Kaelon
08-29-2008, 04:02 PM
This thread is worth it....even for the file edits!
Thank you! I hope you enjoy this add-on, and if you do, please mark it as installed (https://vborg.vbsupport.ru/vborg_miscactions.php?do=installhack&threadid=189444).
Hostboard
08-29-2008, 05:45 PM
The "addon" was a step in the direction I was going to see if it could be added. While I am looking for a per user group (preferably ACP controled) I would also like to be able to control how many personal stickies any particular user group can actualy have.
abrecher
08-29-2008, 09:19 PM
Fantastic Mod! PLEASE figure a way to cut out the file and template edits.
Dr. Bantham
08-30-2008, 02:29 PM
The edits to FORUMDISPLAY.PHP appear to be causing the following database error:
Database error in vBulletin 3.7.2:
Invalid SQL:
SELECT thread.threadid, lastpost, open
FROM thread AS thread
WHERE forumid = 271
AND (sticky = 1
OR threadid IN ())
AND visible IN (0,1,2);
MySQL Error : You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '))
AND visible IN (0,1,2)' at line 5
Error Number : 1064
Request Date : Saturday, August 30th 2008 @ 10:23:56 AM
Error Date : Saturday, August 30th 2008 @ 10:23:56 AM
Script : http://www.ligotti.net/forumdisplay.php?s=&daysprune=&f=271
Referrer :
IP Address : XXXXXXXXXXXXXXX
Username : Dr. Bantham
Classname : vB_Database
MySQL Version : 5.0.51a-community
farplane dragon
08-31-2008, 01:09 AM
Templates I don't mind, since we have only 2, but I don't want to be modifying files. Will tag to watch for a change.
dt_truck11
08-31-2008, 03:31 AM
great mod! altho it is a pain to add when you have alot of styles
Scott77
08-31-2008, 11:40 AM
Installed cheers.
A great addition!
Chris583
09-03-2008, 01:42 AM
Great mod. Can you have options to allow only certain groups access to it?
Kaelon
09-03-2008, 12:27 PM
Great mod. Can you have options to allow only certain groups access to it?
Absolutely. This is one of the add-ons (https://vborg.vbsupport.ru/showpost.php?p=1474355&postcount=141) listed on the original post and requires tinkering with a plug-in.
Kaelon
09-06-2008, 03:29 PM
The edits to FORUMDISPLAY.PHP appear to be causing the following database error:
Database error in vBulletin 3.7.2:
Invalid SQL:
SELECT thread.threadid, lastpost, open
FROM thread AS thread
WHERE forumid = 271
AND (sticky = 1
OR threadid IN ())
AND visible IN (0,1,2);
MySQL Error : You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '))
AND visible IN (0,1,2)' at line 5
Error Number : 1064
Request Date : Saturday, August 30th 2008 @ 10:23:56 AM
Error Date : Saturday, August 30th 2008 @ 10:23:56 AM
Script : http://www.ligotti.net/forumdisplay.php?s=&daysprune=&f=271
Referrer :
IP Address : XXXXXXXXXXXXXXX
Username : Dr. Bantham
Classname : vB_Database
MySQL Version : 5.0.51a-community
Apparently, you did not apply the file edits appropriately, or were using an unclean version of forumdisplay.php. Please make sure you're using the forumdisplay.php from vBulletin 3.7.3 and follow the directions exactly.
Thanks again!
Alfa1
09-07-2008, 09:19 PM
Can you define usergroup permissions for this function?
space?
09-09-2008, 08:46 AM
Very good Idea:)
User will feel more mighty with that...thanks.
Kaelon
09-09-2008, 12:19 PM
Can you define usergroup permissions for this function?
Yes, absolutely. Look at this posting (https://vborg.vbsupport.ru/showpost.php?p=1474355&postcount=141). You basically edit a couple of lines of code, and you're all set.
Alfa1
09-16-2008, 12:27 AM
Thanks! Will install.
Kaelon
09-17-2008, 02:37 PM
Thanks! Will install.
Thanks, Alfa1. Please mark as installed (https://vborg.vbsupport.ru/vborg_miscactions.php?do=installhack&threadid=189444) :)
Alfa1
09-18-2008, 01:02 AM
I always do so, right after I install a mod.
BigDog56
09-18-2008, 10:36 AM
Very nice! Works like a charm, Thank You!
Edit. One small problem. It is showing up twice, once about the normal stickies and once again below the normal stickies.
87008
BigDog56
09-18-2008, 11:46 AM
Another problem, regestered members do not see the icon image. It works, in 2 places, but the little icon is missing.
EDIT: Once a person posts in the thread they have stuck, then the icon will show up.
GoTTi
09-19-2008, 08:08 AM
i would like also to see this mod as a full plugin with no file edits and if possible no template edits. good luck
Sawa Dee SohL
10-08-2008, 05:53 PM
Great hack - got a question thought
I have this enabled on my forum - but I want it so only certain members can access this feature (ie depends on what usergroup their in)
How can I make this possible? So that only certain groups can use this?
Kaelon
10-08-2008, 06:02 PM
Great hack - got a question thought
I have this enabled on my forum - but I want it so only certain members can access this feature (ie depends on what usergroup their in)
How can I make this possible? So that only certain groups can use this?
Hi there. I'm glad that you like it. Please "Mark as Installed" so that I can keep you informed of any changes and improvements I make.
Re: your question, the first add-on for this patch can limit it by usergroup:
https://vborg.vbsupport.ru/showpost.php?p=1474355&postcount=141
Sawa Dee SohL
10-08-2008, 06:15 PM
Beautiful! Thank you for your prompt support!
(i clicked mark and it went back to this page) - so I hope I did it correct :D
Kaelon
10-08-2008, 06:22 PM
Beautiful! Thank you for your prompt support!
(i clicked mark and it went back to this page) - so I hope I did it correct :D
You are most welcome, and yes, you are all set. Thank you!
The Add-on that I linked you to is the basic principle by which you can limit by usergroup; it just requires some minor tinkering with the plugin and you can get it to be a special benefit; I use it, for example, for my subscribers.
hoseman666
10-09-2008, 07:20 AM
I'm pretty much a noob here, was able to get this somewhat functional. The only problem I can see right now is instead of the .gifs showing, instead it says "Personal Sticky Thread" (in thread tools it just says Unstick This Thread; no image).
Any ideas what I need to do to remedy this?
TIA
Hose
*edit* nvm, fixed in myself. Forgot to add the .gifs to the skin directories
mangus580
10-14-2008, 06:51 PM
GREAT Mod...
wonder if there is a way to incorporate this https://vborg.vbsupport.ru/showthread.php?t=165550 to work with it??
rob01
10-16-2008, 04:32 AM
i try to add it
but i get a databese error
when i add this line
AND threadid NOT IN ($personalstickysq)
from
$getthreadids = $db->query_read_slave("
SELECT " . iif($sortfield == 'voteavg', $votequery) . " thread.threadid,
$tachy_columns
$hook_query_fields
FROM " . TABLE_PREFIX . "thread AS thread
$tachyjoin
$hook_query_joins
WHERE forumid = $foruminfo[forumid]
AND sticky = 0
AND threadid NOT IN ($personalstickysq)
$prefix_filter
$visiblethreads
$globalignore
$limitothers
$datecut
$hook_query_where
someone knows whats going?
edit: it seems to work even if you dont add the editions in forumdisplay.php, in vb 3.8.0
Keyser S?ze
11-03-2008, 08:03 PM
in threadbits template i get this error, i have checked and rechecked it
The following error occurred when attempting to evaluate this template:
The conditional on line 14 appears to be missing its end tag (</if>). The template will not function properly unless this is fixed.
This is likely caused by a malformed conditional statement. It is highly recommended that you fix this error before continuing, but you may continue as-is if you wish.
DPtheGod
11-09-2008, 04:04 PM
This is definitely an interesting hack. I'm going to give it a shot at home tonight. Thanks! :)
BigDog56
11-15-2008, 01:13 PM
If the thread drops a page, the sticky does not show up, unless you go to that page. It is also showing up twice on that page. Once above the regular stickies and the again below the stickies.
iNRoC
11-15-2008, 02:47 PM
Amazing. I love it. Installed.
bugtraq at securityfocus dot com:
Personal Sticky Threads is an addon for vbulletin that allows users to create personal stickies. There appears to be a small problem when toggling the personal sticky on a thread you do not have persmission to access.
If I am denied persmission to:
http://forums.somesite.com/showthread.php?t=7
Toggling personal stickies for the thread to on I am able to view the thread title, author, and pages:
http://forums.somesite.com/misc.php?do=togglestick&thread=47
This does not allow me access to the thread but does display information not intended to be viewed by me :)
Rene Kriest
12-27-2008, 02:46 AM
bugtraq at securityfocus dot com:
Uah, scarry. I think I gonna wait with installing the addon until the security issue has been resolved.
mystikmedia
02-18-2009, 07:59 AM
Does anyone know if this works with 3.8.1?
Kaelon
02-18-2009, 06:20 PM
Does anyone know if this works with 3.8.1?
This does. However, be advised, that I discovered a minor security flaw in this code that would enable any user to gain unauthorized access to the name/title of threads in private forums (but not their content). Since I did not originally code this, and merely ported it, I believe there are a series of missing checks in the plugins themselves. However, I am not actively supporting this mod due to time constraints.
mystikmedia
02-18-2009, 07:51 PM
This does. However, be advised, that I discovered a minor security flaw in this code that would enable any user to gain unauthorized access to the name/title of threads in private forums (but not their content). Since I did not originally code this, and merely ported it, I believe there are a series of missing checks in the plugins themselves. However, I am not actively supporting this mod due to time constraints.
Darn. I tried it, but got a message about invalid SQL with this change:
================================================== =========================
==== Find in forumdisplay.php
$stickies = $db->query_read_slave("
SELECT thread.threadid, lastpost, open
FROM " . TABLE_PREFIX . "thread AS thread
WHERE forumid = $foruminfo[forumid]
AND sticky = 1
$prefix_filter
$visiblethreads
$limitothers
$globalignore
==== Replace with
$stickies = $db->query_read_slave("
SELECT thread.threadid, lastpost, open
FROM " . TABLE_PREFIX . "thread AS thread
WHERE forumid = $foruminfo[forumid]
AND (sticky = 1
OR threadid IN ($personalstickysq))
$prefix_filter
$visiblethreads
$limitothers
$globalignore
================================================== =========================
This is the exact error if you're interested:
Database error in vBulletin 3.8.1:
Invalid SQL:
SELECT thread.threadid, lastpost, open
FROM thread AS thread
WHERE forumid = 12
AND (sticky = 1
OR threadid IN ())
AND visible IN (0,1,2);
MySQL Error : You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '))
AND visible IN (0,1,2)' at line 5
Error Number : 1064
Request Date : Wednesday, February 18th 2009 @ 03:52:55 PM
Error Date : Wednesday, February 18th 2009 @ 03:52:55 PM
Script : http://www.gadgetadvisor.com/hammerfall/forumdisplay.php?f=12
Referrer :
IP Address : 71.11.83.89
Username : Gadget Advisor
Classname : vB_Database
MySQL Version : 5.0.67-community
Too bad about you not having time to support, but I can certainly understand. Good luck!
dbirosel
04-22-2009, 02:24 PM
Awwww that sucks. This was a real good idea too.
FeatheredFriend
06-24-2009, 11:08 PM
So i am going to ask what do I do if I don't have anything in the show thread.php folder? I have all the other edits done but this one. Thanks.
down.low
06-28-2009, 10:12 PM
In case no one has asked or answered this question- it works on vB 3.8.1 with no problems. Thanks for the hack- works great.
down.low
06-28-2009, 10:24 PM
So i am going to ask what do I do if I don't have anything in the show thread.php folder? I have all the other edits done but this one. Thanks.
Umm, since you said .php- it would only be the forumdisplay.php file on your server that you would have to edit.
Then you have to edit the said templates- which your showthread template would not possibly be empty.
FeatheredFriend
06-30-2009, 02:51 PM
Thanks down.low I am going to come up with the thought that the templet i am to edit is in my admin cp.
Fangs404
07-13-2009, 12:05 AM
I just installed this on a 3.8.3 install, and it worked without any problems.
RobbieZ
07-26-2010, 12:40 PM
Works on a 3.8.4 PL 1 board, but I want it to work on a Vb 4 :D
inciarco
07-29-2010, 05:28 AM
Darn. I tried it, but got a message about invalid SQL with this change:
================================================== =========================
==== Find in forumdisplay.php
$stickies = $db->query_read_slave("
SELECT thread.threadid, lastpost, open
FROM " . TABLE_PREFIX . "thread AS thread
WHERE forumid = $foruminfo[forumid]
AND sticky = 1
$prefix_filter
$visiblethreads
$limitothers
$globalignore
==== Replace with
$stickies = $db->query_read_slave("
SELECT thread.threadid, lastpost, open
FROM " . TABLE_PREFIX . "thread AS thread
WHERE forumid = $foruminfo[forumid]
AND (sticky = 1
OR threadid IN ($personalstickysq))
$prefix_filter
$visiblethreads
$limitothers
$globalignore
================================================== =========================
This is the exact error if you're interested:
Database error in vBulletin 3.8.1:
Invalid SQL:
SELECT thread.threadid, lastpost, open
FROM thread AS thread
WHERE forumid = 12
AND (sticky = 1
OR threadid IN ())
AND visible IN (0,1,2);
MySQL Error : You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '))
AND visible IN (0,1,2)' at line 5
Error Number : 1064
Request Date : Wednesday, February 18th 2009 @ 03:52:55 PM
Error Date : Wednesday, February 18th 2009 @ 03:52:55 PM
Script : http://www.gadgetadvisor.com/hammerfall/forumdisplay.php?f=12
Referrer :
IP Address : 71.11.83.89
Username : Gadget Advisor
Classname : vB_Database
MySQL Version : 5.0.67-community
Too bad about you not having time to support, but I can certainly understand. Good luck!
The Error is in this Line:
OR threadid IN ($personalstickysq))
It should be:
OR threadid IN ($personalstickysq)
Without the Second ")".
My Best Regards.
:)
john1744
08-08-2010, 01:13 PM
Has anyone attempted this with vB 4.0?
Kaelon
01-27-2011, 02:28 AM
Has anyone attempted this with vB 4.0?
This won't work with vBulletin 4.x, nor do I plan to port this to vB 4.x. This mod is intended only for vB 3.7.x or vB 3.8.x.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.