vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   conditional help (https://vborg.vbsupport.ru/showthread.php?t=68754)

neocorteqz 08-27-2004 04:07 AM

conditional help
 
Ok, I'd like to create a conditional for a script to show up in a specific forum.
HTML Code:

<if condition="THIS_SCRIPT == 'script name'">  </if> 
I know that'd be the code to start, what I don't know is what the code would be after that, if I wanted to display it in just a specific forum, say http://www.nemesisforums.net/forumdisplay.php?f=11

Thanks.

Colin F 08-27-2004 04:36 AM

HTML Code:

<if condition="$forumid == 11">do foo</if>]

neocorteqz 08-27-2004 07:15 AM

1 Attachment(s)
I'm trying to add a script to a single page, a screenie is attached of what it looks like.

I'm trying to add that to one single topic, instead of all the topics, so would the code be
HTML Code:

<if conditional="THIS_SCRIPT == 'scriptname'" and "$forumid == '11'">Code here</if>
?

Here's the attached screenie.

Thanks for the help. :)

Colin F 08-27-2004 07:58 AM

na, change $forumid to $threadid and change the 11 to whatever the threadid is.

neocorteqz 08-27-2004 09:02 AM

Quote:

Originally Posted by Colin F
na, change $forumid to $threadid and change the 11 to whatever the threadid is.

Ahh, so you don't need the script name.. Thought ya did if it was calling to an external script.

thanks.

nexialys 08-27-2004 09:56 AM

the if condition is to integrate any PHP conditional, written the PHP way, so you have to put your details in the brackets...:
PHP Code:

<if condition="THIS_SCRIPT == 'scriptname' AND $forumid == '11'">Code here</if> 

you can add the THIS_SCRIPT because some other page may require $forumid (like the bug report, articles, etc...)


All times are GMT. The time now is 10:30 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.01172 seconds
  • Memory Usage 1,725KB
  • 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
  • (3)bbcode_html_printable
  • (1)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (6)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete