The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
<if> Statement For Navbar Link
Hi there everyone, I played around with this a little, but I obviously do not know what I am doing!
I would like to add an <if> statement to a link on my navbar...if members click that link, it take them to the page and the link is removed from the navbar, if they leave that page, the link is then added again. I know that there <if> <else> statements out there that will change the links, however, I just want it to be removed, not replaced with anything else. Any help would be most appreciated! Thank you |
#2
|
||||
|
||||
Quote:
If it is that page, it wont show the link. |
#3
|
||||
|
||||
Quote:
Thanks so much for the help! |
#4
|
||||
|
||||
Quote:
<if condition="THIS_SCRIPT != index">show link</if> showthread.php <if condition="THIS_SCRIPT != showthread">show link</if> Etc. If its a non vBpage THIS_SCRIPT can be defined to make use of it. |
#5
|
||||
|
||||
Thank you for the help!!
Alright, maybe this is more difficult than I thought: Here is my navar link code, it generates a pull down menu: Code:
<td id="chat" class="vbmenu_control"><a href="$show[nojs_link]#chat">$vbphrase[javachat_chat]</a> <script type="text/javascript"> vbmenu_register("chat"); </script></td> Code:
<div class="vbmenu_popup" id="chat_menu" style="display:none"> <table cellpadding="4" cellspacing="1" border="0"> <tr><td class="thead">$vbphrase[javachat_chat_menu]</td></tr> <tr><td class="vbmenu_option"><a href="javachat.php$session[sessionurl_q]">$vbphrase[javachat_javachat]</a></td></tr> <tr><td class="vbmenu_option"><a href="#" onclick="window.open('javachat.php?$session[sessionurl]do=lite','javachat','statusbar=no,menubar=no,toolbar=no,scrollbars=no,resizable=yes,directories=no,width=750,height=550,left=50,top=100,screenX=50,screenY=100'); return false;">$vbphrase[javachat_javachat_popup]</a></td></tr> <tr><td class="vbmenu_option"><a href="irc://$vboptions[javachat_network]/$vboptions[javachat_channel]">$vbphrase[javachat_chat_w_mirc]</a></td></tr> <tr><td class="vbmenu_option"><a href="http://www.mirc.com/get.html">$vbphrase[javachat_download_mirc]</a></td></tr> </table> </div> Something like: Code:
<if condition="THIS_SCRIPT != javachat"><td id="chat" class="vbmenu_control"><a href="$show[nojs_link]#chat">$vbphrase[javachat_chat]</a> <script type="text/javascript"> vbmenu_register("chat"); </script></td></if> Crap. no one knows?? |
#6
|
|||
|
|||
The javachat.php file (if a vbulletin extension) should have THIS_SCRIPT defined at the start of the file.
If it is, you can use THIS_SCRIPT != 'WHATEVER_IT_IS' in the condition to check to see if the person is not on that page. Just like Zach said. |
#7
|
||||
|
||||
Ok so the code Zach gave me was
<if condition="THIS_SCRIPT != page">show link</if> So then the javachat.php would go where he has page labled, however, does anything go where he has show link labled? Or does the code simply go just before the link? <if condition="THIS_SCRIPT != javachat.php">show link</if> (just like that?) Thanks for the help! |
#8
|
|||
|
|||
No. Look for the define in javachat.php for THIS_SCRIPT. If it doesnt exist you cant do it.
|
#9
|
||||
|
||||
WOOHOO I got it...thank you all so much
Quote:
|
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|