PDA

View Full Version : Change "Subscribe to This Thread" link to "Unsubscribe" if already subscribed


Logician
02-26-2002, 10:00 PM
CHANGE SUBSCRIBE LINK TO UNSUBSCRIBED IF ALREADY SUBSCRIBED HACK -- Logician
-----------------------------------------------------------------
If the user subscribed to a thread, this hack will change the "Subscribe to this Thread" link at the bottom to "Unsubscribe from this Thread" link and if clicked he will be unsubscribed.

So the users are not supposed to go to user control panel to unsubscribe anymore, they can subscribe/unsubscribe to the threads when they're reading them.

The hack will work with any vbulletin versions I know and easy to apply..

If you liked this hack, you may want to take a look at these 2 hacks too:
*Show all thread subscribers while reading the thread (https://vborg.vbsupport.ru/showthread.php?s=&threadid=36544)
* Confirm Unsubscribe From All Threads Requests (https://vborg.vbsupport.ru/showthread.php?s=&threadid=42900)

If you install it, please click install (https://vborg.vbsupport.ru/misc.php?s=&action=install&threadid=35493) , thank you..

Enjoy! //=^))

Logician

30.06.2002: Hack installation instructions attached to a text file upon request.

nafae
02-27-2002, 09:39 AM
nice, i shall test this out tonight

AkiraLite
02-27-2002, 01:13 PM
You need to swap Unsubscribe and Subscribe in the two possible links at the end of the script in showthread.php. They're backwards.
Otherwise great tip.

Logician
02-27-2002, 01:50 PM
Originally posted by AkiraLite
You need to swap Unsubscribe and Subscribe in the two possible links at the end of the script in showthread.php. They're backwards.

Right.. Corrected..Thanks..

In my board they were not in English, so while copying here, made a typo.

fonzerelli_79
02-27-2002, 02:21 PM
top hack log

just a small note to everyone else
the {imagesfolder} part should be a link to the images folder but this site changes it to the vbulletin images folder

Logician
02-27-2002, 02:52 PM
Originally posted by fonzerelli_79
just a small note to everyone else
the https://vborg.vbsupport.ru/vbimages part should be a link to the images folder but this site changes it to the vbulletin images folder

Good catch pal.. I have edited my post, thx..

Erwin
02-28-2002, 08:15 AM
Great hack!!! I love it! Should be made standard in the next version.

Lesane
02-28-2002, 09:47 AM
Very nice, well done :up:

Smoothie
04-04-2002, 07:38 AM
Installed, and works great!

mashby
05-05-2002, 01:58 PM
It's probably me, but I'm getting a parse error on the first "{" Any thoughts?

Logician
05-05-2002, 04:29 PM
Originally posted by mashby
It's probably me, but I'm getting a parse error on the first "{" Any thoughts?
Can you post the code you receive error from begining 10-15 lines before the error and ending 10-15 lines after that.
(You'd better copy paste it to a text file and attach it to your message)

mashby
05-05-2002, 10:13 PM
Logician,

Thank you for your help today! The file that you sent back did the trick. :)

Logician
05-16-2002, 02:59 PM
HACK UPDATED!

I updated the hack and I suggest using the new version. To upgrade just apply the STEP 1 (in the first message of this thread) again (the code changed a bit). Simply delete the code you inserted before in step 1 from showthread.php and insert the new code instead, that's all..

It's ok if you stick with the older version, but the new code will save your board from an extra SQL query if thread viewer is a Guest. This will make a very tiny performance increase. I suggest using it..

If you havent installed this hack yet, just apply the hack as you see in the first message of this thread. It's already the new (updated) code..

Regards,
Logician

David Bott
05-16-2002, 03:31 PM
Thank you for the update. On a site like ours...all the queries we can save the better. We see 30,000 unique people a day.

Thanks again.

David Bott
AVS Forum
http://www.avsforum.com

FleaBag
05-16-2002, 11:11 PM
Just installed this on 2.2.5. Works great. Simple but highly effective! Thanks! :)

DWZ
05-17-2002, 08:17 AM
Just installed the update... Works great :D

Erwin
05-17-2002, 10:47 PM
It works well. Thanks! :)

FleaBag
06-20-2002, 09:32 AM
Working great on 2.2.6 too, thanks. :)

Logician
06-20-2002, 09:42 AM
Gamerforums: thx for feedback :)

FleaBag
06-20-2002, 09:45 AM
No worries, it's the least I can do when you're providing me with hacks. :D

mashby
06-30-2002, 06:19 AM
I like this hack so much, I just installed it on a new board (2.2.6) that I'm putting together. Installed like a charm. Thanks for all your hard work Logician.

Just one small thing, it would be nice if you posted the hack as a .txt attachement. I ran into the same error I did on my first board. Luckily I remembered to copy the code in IE and not in Opera. :) A little attachment would make it easier for those of use not using IE.

Just a thought.

Logician
06-30-2002, 04:16 PM
Originally posted by mashby
Just one small thing, it would be nice if you posted the hack as a .txt attachement.
done, enjoy.. :)

mashby
06-30-2002, 05:16 PM
Thanks Logician! I'll be sure to use it on my next board. :)

Gary King
07-06-2002, 02:48 PM
Quick and easy hack :) Nice job :D

FleaBag
09-04-2002, 06:33 AM
Works with 2.2.7, cheers. :D

Brew
11-05-2002, 11:49 PM
The last part of the hack in the txt file is a bit confusing....Do you add the text to below the showthread template area, replace?

Thanks!

Brew

Logician
11-06-2002, 06:51 AM
Originally posted by Brew
The last part of the hack in the txt file is a bit confusing....Do you add the text to below the showthread template area, replace?

it's "REPLACE"..

mashby
03-11-2003, 01:31 PM
Still working like a charm on my 2.3.0 board.

Any way to have this hack work with Subscribed Forums as well? It just works so perfectly, but it would be great if it also worked with subscribing to a Forum as well. :)

Kriek
07-02-2003, 12:16 AM
Excellent modification, should be made standard.

/me clicks install

zsmom
10-25-2003, 10:43 PM
Works great on my board! (2.3.2)

*zsmom clicks install

chrisvonc
01-03-2004, 06:22 PM
Nice hack. Just installed it on my site. Thank you very much!!

Caught a few things in the install directions I thought I would mention:
- In step 2 you dont actually say what to do once you find the original code. For newbies like me following the "Follow each step" guideline of hacking our forum, the "Replace with" is helpful. :)
- After installing on a 2.3.2 forum, the spacing was not consistant with the other options in that nav bar and missing a space inbetween the graphic and text. I just added a space in your replacement code in front of the "$log_subscription_link" to remain consistant with the look of the other options.
- Lastly, I have the "Download this thread" hack installed and needed to simply just cut the "</smallfont></td>" from the end of the same line.

Thank you very much again!

Chris

bigdaddy04
04-10-2004, 07:48 PM
wonderful hack, installed on vB 2.3.3 and works like a charm :)