vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   Thread & Forum Subscribe/Unsubscribe Link (https://vborg.vbsupport.ru/showthread.php?t=36151)

bigmattyh 03-14-2002 10:00 PM

Thread & Forum Subscribe/Unsubscribe Link
 
Thread & Forum Subscribe/Unsubscribe Link
Confirmed working with vB 2.2.6.

This hack changes the standard "subscribe" link to "unsubscribe" if you're already subscribed to that forum or thread. It's template-based, so you can easily change the text of the links to whatever you want.

Demo: Here. If you'd like to see it in action, you can register and play around with subscribing and unsubscribing to threads and forums.

Comments and criticism are always welcome, and if you like this hack, please install it !

JulianD 03-15-2002 01:48 AM

I just installed it... Thanks!

bigmattyh 03-15-2002 01:52 AM

You're welcome! ;)

If anyone installs this here hackity-hack and is satisfied with its performance, AND you'd like to see a similar version of this for forum subscriptions, post here and let me know! I may whip up a companion hack that does just that.

UPDATE: The hack now includes the same functionality for threads in forums.

intellected 03-15-2002 05:39 PM

Quote:

Originally posted by bigmattyh
You're welcome! ;)

If anyone installs this here hackity-hack and is satisfied with its performance, AND you'd like to see a similar version of this for forum subscriptions, post here and let me know! I may whip up a companion hack that does just that.

Oooh. I approve of this idea!

Logician 03-16-2002 07:28 PM

Hack already exists: (by me lol)

https://vborg.vbsupport.ru/showthrea...threadid=35493

;)

bigmattyh 03-16-2002 07:37 PM

Crazy! I just did the hack myself (out of frustration...) and posted it here when I was done with it.

Logician 03-16-2002 07:46 PM

Congratulations.. I didnt say otherwise. In fact if you check it out you'll see that coding and even algorithm is different. I've just stated that the hack already existed, that's all. :smoke:

bigmattyh 03-16-2002 10:59 PM

I've added extra functionality to this hack -- it can now do forums!

Check it out in the first post!

JulianD 03-16-2002 11:32 PM

What are the steps for upgrading the hack? I installed the first version, but I can't find upgrade instructions.

bigmattyh 03-17-2002 04:32 AM

JulianD -- and anyone else interested in upgrading from version I --

I've re-written the installation instructions so that they're much clearer on how to upgrade from the previous version of this hack. All you have to do is to download the new installation file (which is available now), and follow the instructions starting at PART II.

Sorry for all the confusion today! Enjoy!

JulianD 03-17-2002 04:36 AM

Thanks man. It seems very clear now!

bigmattyh 04-05-2002 04:44 AM

Thanks to Scott, this hack is now much more appropriately titled.

Enjoy!

bigmattyh 06-03-2002 11:53 AM

UPDATE: This hack is confirmed to be fully-functional with vB 2.2.6.

Also, just to clarify, this hack enables you to change the subscribe link to unsubscribe on forums and threads.

bigmattyh 06-03-2002 10:15 PM

Hey everyone,

I've fixed a minor bug which displays the unsubscribe link for guests. The zip file has the updated hack instructions, but if you've already installed the hack, here's the quick fix:

In forumdisplay.php and showthread.php, you inserted this line:
Quote:

if ($subscribed[userid] == $bbuserinfo[userid])
Just change that to:
Quote:

if (($subscribed[userid] == $bbuserinfo[userid]) and ($bbuserinfo[userid] != 0))
That's it!

XFLBret 06-05-2002 06:11 AM

I posted this on my 2.2.6 lat night, and now the bottom of my threads now look like the attached screenshot.

If you need to get into my forums to look around and see what I mean (thought the screenshot should pretty much say it all), the URL is

http://www.pcfootball.net/forums/index.php

username: vbhelper
password: helpme

Size 06-06-2002 07:12 PM

xflbret and bigmattyh,

There is an error in the instructions for editing the showthread template. When you follow the instructions and replace the portion of showthread with the code in the instructions, you get the result that XFL just posted. There is a missing </table> at the end of the replacement code. Just add that at the end of the inserted code and all will be well.

This might only be an issue with 2.2.6, that's what I'm running.

Size

bigmattyh 06-07-2002 07:07 PM

Sorry for the delay -- I was out of town for a couple of days.

The instructions are now fixed. :) Thanks for the heads-up!

Paul 06-14-2002 03:14 AM

Hi,

Excellent hack and something I hope to see in future versions of vB! :D I always thought it was silly that the subscribe links weren't dynamic.

I did find a minor error in your instructions:
Quote:

Template name: forumdisplay_subscribelink_sub
Template set: Default
Template: <a href="member2.php?s=&action=removesubscription&for umid=$forumid">Unsubscribe from this forum</a>

Template name: forumdisplay_subscribelink_notsub
Template set: Default
Template: <a href="member2.php?s=&action=addsubscription&forumi d=$forumid">Subscribe to this forum</a>
Both of these templates are lacking the $session[sessionhash] variable. The corrected code should be ...member2.php?s=$session[sessionhash]&action=....

Thanks! :D

Paul

Kriek 07-02-2003 12:02 AM

Quote:

03-16-02 at 05:28 PM Logician said this in Post #5
Hack already exists: (by me lol)
Which is confirmed working on 2.3.0 ;)


All times are GMT. The time now is 03:18 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.01191 seconds
  • Memory Usage 1,753KB
  • 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
  • (5)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (19)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete