![]() |
[Core - FIX] Broken Unsubscribe from forum
1 Attachment(s)
im not too sure how good of a fix this is, i have been up and down the core files, trying to figure this out. Just because it bothered me they include in the default template a condition for this, yet it does not work (by default)
By default when you subscribe to a forum (not a thread) underneath the forum you should see an unsubscribe link Attachment 154644 This is supposed to happen with the code from: forumhome_forumbit_level1_post forumhome_forumbit_level2_post Code:
<if condition="$show['forumsubscription']"><div class="smallfont"><strong><a href="subscription.php?$session[sessionurl]do=removesubscription&f=$forum[forumid]" rel="nofollow">$vbphrase[unsubscribe_from_this_forum]</a></strong></div></if> I was trying to show images for this using an if / else statement but couldn't for the life of me get it to work. so hours browsing / searching / asking; I finally find a fix (source: http://tracker.vbulletin.com/browse/VBIV-8931) in includes/functions_forumlist.php Find: Code:
$show['forumsubscription'] = ($subsonly ? true : false); Code:
$show['forumsubscription'] = !empty($forum['subscribeforumid']); so I searched the core files up and down and I came up with this, which i took from another core file. in index.php (forumhome) add: Code:
cache_ordered_forums(1, 1, $vbulletin->userinfo['userid']); Code:
// ######################## START MAIN SCRIPT ############################ I did how ever notice in index.php is Code:
cache_ordered_forums(1, 1); Code:
$show['subscribed_to_forum'] = ($vbulletin->forumcache["$foruminfo[forumid]"]['subscribeforumid'] != '' ? true : false); Code:
cache_ordered_forums(1, 1, $vbulletin->userinfo['userid']); Now for an addon! got the fix applied? well you have to for this. Attachment 154641 so now if your users are subscribed to a forum they can see an unsubscribe link under the forum title, but hey you've come all this way, lets not keep it ugly. so in both forumhome_forumbit_level1 & level2_post find: Code:
<if condition="$show['forumsubscription']"><div class="smallfont"><strong><a href="subscription.php?$session[sessionurl]do=removesubscription&f=$forum[forumid]" rel="nofollow">$vbphrase[unsubscribe_from_this_forum]</a></strong></div></if> Code:
<if condition="$show['forumsubscription']"> |
All times are GMT. The time now is 03:52 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|