The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
whats wrong with my if subscribed condition
whats wrong with this its not working =/
ive looked it over 10+ times Code:
<if condition="$show['member']"> <if condition="$show['forumsubscription']"> <li class="forumactionlink unsubslink"> <a href="subscription.php?$session[sessionurl]do=removesubscription&f=$forum[forumid]" rel="nofollow" title="$vbphrase[unsubscribe_from_this_forum]">$vbphrase[unsubscribe_from_this_forum]</a> </li> <else /> <li class="forumactionlink subslink"> <a href="subscription.php?$session[sessionurl]do=addsubscription&f=$forum[forumid]" rel="nofollow" title="$vbphrase[subscribe_to_forum]">$vbphrase[subscribe_to_forum]</a> </li> </if> </if> |
#2
|
||||
|
||||
The single forward slash on the else doesn't appear correct.
In php a single forward slash is a division operator. |
#3
|
||||
|
||||
Thats how if else statements work in vb3
<if condition="something"> do something <else /> do something else </if> |
Благодарность от: | ||
Dr.CustUmz |
#4
|
|||
|
|||
Looks fine to me. Are you sure those $show array keys are usable in the forumbit templates?
|
Благодарность от: | ||
Dr.CustUmz |
#5
|
||||
|
||||
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> and i haven't found an option for subscriptions anywhere... i may have overlooked it --------------- Added [DATE]1459967670[/DATE] at [TIME]1459967670[/TIME] --------------- after searching a crap ton of different things, i finally came across this http://tracker.vbulletin.com/browse/VBIV-8931 Code:
Create a subforum. Go to it's parent forum. Note that there is a green checkmark icon in the forum bit (see screenshot 1) Click on this to subscribe to the forum Return to parent forum Note that there is still a green checkmark icon inviting you to subscribe to the forum. The initial issue is caused by a flag that does not appear to be set correctly in the forum generation code around line 453 of functions_forumlist.php change $show['forumsubscription'] = ($subsonly ? true : false); to $show['forumsubscription'] = !empty($forum['subscribeforumid']); This will expose some additional problems (see screenshot 2) There is a fairly unattractive unsubscribe link next to the forum title. There is also supposed to be an unsubscribe to replace the subscribe link with the action icons (under the rss icon in the screenshot). The link is actually present, however the background image – images/misc/unsubscribed_40b.png – doesn't exist. Recommend creating the image and removing the text link. so i first double checked my code in forumbit lvl 1 & lvl 2 post (since thats where the if condition im trying to get to work is) I open up functions forumlist.php quick search for Code:
$show['forumsubscription'] Code:
$show['forumsubscription'] = !empty($forum['subscribeforumid']); so this is an issue that needs to be addressed in an update i take it, since i am on the latest vb3 and this problem is still here. why have a default template conditional if the code doesnt even function properly... --------------- Added [DATE]1459968612[/DATE] at [TIME]1459968612[/TIME] --------------- looking into it further, this only fixed forumdisplay. forumhome still is not functioning properly, this has also caused other issues that may or may not be my template messing it up lol. but the default code in lvl1 & lvl 2 post i have not yet found any other way to make it actually show the unsubscribe if subscribed. --------------- Added [DATE]1459971413[/DATE] at [TIME]1459971413[/TIME] --------------- ok the other errors were in my templates, but the fix for this only applies to forumdisplay, im going through files now to see i can get it to work on forumhome. ....its supposed to, by default... so it shouldnt be too hard... right? its just bugging me now lol |
Благодарность от: | ||
MarkFL |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|