vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.7 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=228)
-   -   End-User Options - Personal Sticky Threads (https://vborg.vbsupport.ru/showthread.php?t=189444)

Kaelon 08-28-2008 10:00 PM

Personal Sticky Threads
 
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 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:


Requirements
  • vBulletin 3.7.x Series
Installation

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:
  1. Import product-personalsticky.xml
  2. Upload the two images into their respective folders
  3. Perform two file edits to forumdisplay.php
  4. Perform four template edits to three templates.
Add-Ons

This modification can be further customized: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!

db90 08-29-2008 03:17 AM

This thread is worth it....even for the file edits!

Kaelon 08-29-2008 03:18 AM

Quote:

Originally Posted by FreshFroot (Post 1609576)
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

Quote:

Originally Posted by db90 (Post 1609578)
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 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

Quote:

Originally Posted by n95gps (Post 1609581)
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

Quote:

Originally Posted by Kaelon (Post 1609580)
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 if you go with it. :) Thanks!

yup, this really nice, "install"

leannet 08-29-2008 10:55 AM

Quote:

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

Quote:

Originally Posted by leannet (Post 1609788)
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

Quote:

Originally Posted by db90 (Post 1609578)
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.

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:
Code:

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

Quote:

Originally Posted by Chris583 (Post 1613246)
Great mod. Can you have options to allow only certain groups access to it?

Absolutely. This is one of the add-ons listed on the original post and requires tinkering with a plug-in.

Kaelon 09-06-2008 03:29 PM

Quote:

Originally Posted by Dr. Bantham (Post 1610613)
The edits to FORUMDISPLAY.PHP appear to be causing the following database error:
Code:

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

Quote:

Originally Posted by Alfa1 (Post 1616935)
Can you define usergroup permissions for this function?

Yes, absolutely. Look at this posting. 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

Quote:

Originally Posted by Alfa1 (Post 1623003)
Thanks! Will install.

Thanks, Alfa1. Please mark as installed :)

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.

Attachment 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

Quote:

Originally Posted by Sawa Dee SohL (Post 1640514)
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....&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

Quote:

Originally Posted by Sawa Dee SohL (Post 1640528)
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

Code:

$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.


All times are GMT. The time now is 06:46 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01361 seconds
  • Memory Usage 1,839KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (3)bbcode_code_printable
  • (13)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete