View Full Version : If currently running this script do nothing else?
Simon Lloyd
11-15-2009, 09:30 AM
Hi all, im trying to get this to work, it displays a floating menu on all pages but i do not want it visible on any of the register pages, can someone help?
<if condition="THIS_SCRIPT == 'register' />
<else />
<if condition="is_member_of($bbuserinfo,1)"><div id="floatdiv" style="
position:absolute;
width:240px;height:110px;left:0px;top:0px;
padding:16px;background:#FFFFFF;
border:2px solid #2266AA">Your viewing of our forums and Resources will be restricted shortly and plus you are missing out on many benefits, to get unrestricted access and benefits <a href="http://www.thecodecage.com/forumz/register.php">Join here!</a> for free!
</div></if></if>Right now i get an error when trying to save saying i have my </if> beginning tag missing but i cant see it?
I think it might be the '/>' at the end of the first line, where maybe it should just be '>'
ETA: ...but it isn't because I just tried it and it makes no difference.
Simon Lloyd
11-15-2009, 12:18 PM
I think it might be the '/>' at the end of the first line, where maybe it should just be '>'
ETA: ...but it isn't because I just tried it and it makes no difference.Yeah i know that, i've tried a few things :)
But I think what does work is to put a quote at the end of that condition on the first line (and remove the '/').
<if condition="THIS_SCRIPT == 'register'">
.
.
.
ETA: and unless you have something you're going to do if THIS_SCRIPT is 'register', then maybe
<if condition="THIS_SCRIPT != 'register' AND is_member_of($bbuserinfo,1)">
<div id="floatdiv" style="
position:absolute;
width:240px;height:110px;left:0px;top:0px;
padding:16px;background:#FFFFFF;
border:2px solid #2266AA">Your viewing of our forums and Resources will be restricted shortly and plus you are missing out on many benefits, to get unrestricted access and benefits <a href="http://www.thecodecage.com/forumz/register.php">Join here!</a> for free!
</div></if>
would be an alternative.
Simon Lloyd
11-15-2009, 01:24 PM
But I think what does work is to put a quote at the end of that condition on the first line (and remove the '/').
<if condition="THIS_SCRIPT == 'register'">
.
.
.
ETA: and unless you have something you're going to do if THIS_SCRIPT is 'register', then maybe
<if condition="THIS_SCRIPT != 'register' AND is_member_of($bbuserinfo,1)">
<div id="floatdiv" style="
position:absolute;
width:240px;height:110px;left:0px;top:0px;
padding:16px;background:#FFFFFF;
border:2px solid #2266AA">Your viewing of our forums and Resources will be restricted shortly and plus you are missing out on many benefits, to get unrestricted access and benefits <a href="http://www.thecodecage.com/forumz/register.php">Join here!</a> for free!
</div></if>
would be an alternative.Thanks for your continued efforts, i dont want to show my floating menu if they are viewing register.php (are in the registering process)
Thanks for your continued efforts, i dont want to show my floating menu if they are viewing register.php (are in the registering process)
So is it working now? I don't really know anything about the floating menu, I just thought I could help you get past that error. Sometimes it just takes another pair of eyes.
Simon Lloyd
11-15-2009, 04:35 PM
So is it working now? I don't really know anything about the floating menu, I just thought I could help you get past that error. Sometimes it just takes another pair of eyes.
Sorry, yeah, it was the last " that was missing, thanks for that :)
--------------- Added 1258391365 at 1258391365 ---------------
KH99, i wonder if you can help further?, i am trying to display my floating box only when index.php is being viewed, i assumed that the script is forumhome but the box displays on forumhome, forum, sub forum and even in thread, can you help fix this so it only shows in forumhome?
<if condition="THIS_SCRIPT != 'FORUMHOME'">
<if condition="is_member_of($bbuserinfo,5,6,7)"><div id="floatdiv" style="
position:absolute;"> blah! blah!
</div></if></if>
Sorry, I just now noticed your post.
I think THIS_SCRIPT is 'index' when index.php is running, so try:
<if condition="THIS_SCRIPT == 'index'">
etc.
Simon Lloyd
11-17-2009, 09:46 AM
Thanks for that, i used this:
<if condition="THIS_SCRIPT == 'index' AND is_member_of($bbuserinfo,5,6,7)">Can you tell me what the difference is between ...="THIS_SCRIPT != 'index'and...="THIS_SCRIPT == 'index'
!= means "is not equal to"
== means "is equal to"
Simon Lloyd
11-17-2009, 02:59 PM
Thanks for clearing that up :)
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.