Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 Programming Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 11-15-2009, 09:30 AM
Simon Lloyd's Avatar
Simon Lloyd Simon Lloyd is offline
 
Join Date: Aug 2008
Location: Manchester
Posts: 3,481
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default 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?
Reply With Quote
  #2  
Old 11-15-2009, 11:55 AM
kh99 kh99 is offline
 
Join Date: Aug 2009
Location: Maine
Posts: 13,185
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #3  
Old 11-15-2009, 12:18 PM
Simon Lloyd's Avatar
Simon Lloyd Simon Lloyd is offline
 
Join Date: Aug 2008
Location: Manchester
Posts: 3,481
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by kh99 View Post
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
Reply With Quote
  #4  
Old 11-15-2009, 12:22 PM
kh99 kh99 is offline
 
Join Date: Aug 2009
Location: Maine
Posts: 13,185
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #5  
Old 11-15-2009, 01:24 PM
Simon Lloyd's Avatar
Simon Lloyd Simon Lloyd is offline
 
Join Date: Aug 2008
Location: Manchester
Posts: 3,481
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by kh99 View Post
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)
Reply With Quote
  #6  
Old 11-15-2009, 01:29 PM
kh99 kh99 is offline
 
Join Date: Aug 2009
Location: Maine
Posts: 13,185
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Simon Lloyd View Post
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.
Reply With Quote
  #7  
Old 11-15-2009, 04:35 PM
Simon Lloyd's Avatar
Simon Lloyd Simon Lloyd is offline
 
Join Date: Aug 2008
Location: Manchester
Posts: 3,481
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by kh99 View Post
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>
Reply With Quote
  #8  
Old 11-17-2009, 04:20 AM
kh99 kh99 is offline
 
Join Date: Aug 2009
Location: Maine
Posts: 13,185
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #9  
Old 11-17-2009, 09:46 AM
Simon Lloyd's Avatar
Simon Lloyd Simon Lloyd is offline
 
Join Date: Aug 2008
Location: Manchester
Posts: 3,481
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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'
Reply With Quote
  #10  
Old 11-17-2009, 10:16 AM
kh99 kh99 is offline
 
Join Date: Aug 2009
Location: Maine
Posts: 13,185
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

!= means "is not equal to"
== means "is equal to"
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 04:02 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.07072 seconds
  • Memory Usage 2,273KB
  • Queries Executed 13 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (5)bbcode_code
  • (4)bbcode_html
  • (1)bbcode_php
  • (4)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete