vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   If currently running this script do nothing else? (https://vborg.vbsupport.ru/showthread.php?t=227996)

Simon Lloyd 11-15-2009 09:30 AM

If currently running this script do nothing else?
 
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?

PHP Code:

<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?

kh99 11-15-2009 11:55 AM

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

Quote:

Originally Posted by kh99 (Post 1914558)
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 :)

kh99 11-15-2009 12:22 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 '/').

Code:

<if condition="THIS_SCRIPT == 'register'">
.
.
.


ETA: and unless you have something you're going to do if THIS_SCRIPT is 'register', then maybe

Code:

<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

Quote:

Originally Posted by kh99 (Post 1914567)
But I think what does work is to put a quote at the end of that condition on the first line (and remove the '/').

Code:

<if condition="THIS_SCRIPT == 'register'">
.
.
.


ETA: and unless you have something you're going to do if THIS_SCRIPT is 'register', then maybe

Code:

<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)

kh99 11-15-2009 01:29 PM

Quote:

Originally Posted by Simon Lloyd (Post 1914591)
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

Quote:

Originally Posted by kh99 (Post 1914593)
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 [DATE]1258391365[/DATE] at [TIME]1258391365[/TIME] ---------------

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?
HTML Code:

<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>


kh99 11-17-2009 04:20 AM

Sorry, I just now noticed your post.

I think THIS_SCRIPT is 'index' when index.php is running, so try:

Code:

<if condition="THIS_SCRIPT == 'index'">
    etc.


Simon Lloyd 11-17-2009 09:46 AM

Thanks for that, i used this:
HTML Code:

<if condition="THIS_SCRIPT == 'index' AND  is_member_of($bbuserinfo,5,6,7)">
Can you tell me what the difference is between
HTML Code:

...="THIS_SCRIPT != 'index'
and
HTML Code:

...="THIS_SCRIPT == 'index'

kh99 11-17-2009 10:16 AM

!= means "is not equal to"
== means "is equal to"


All times are GMT. The time now is 09:40 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
  • Page Generation 0.01128 seconds
  • Memory Usage 1,749KB
  • 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_code_printable
  • (4)bbcode_html_printable
  • (1)bbcode_php_printable
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete