vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   hide some part of code in header template FORUMHOME (https://vborg.vbsupport.ru/showthread.php?t=165653)

LiLSnooP 12-20-2007 12:18 AM

hide some part of code in header template FORUMHOME
 
hi

i would like to placed some html code
in header template

but also i wish to do in such way that it doesn't appear only in forumhome template

its possible ?

maybe it need to use something like that

<if condition="in_array($show['forumhome'])">

BLABLABLA

</if>

its correct ?

please help me ....
thank you

Triky 12-20-2007 09:26 AM

Do you want it displayed only in your ForumHome page? If yes, this is your code:

Code:

<if condition="THIS_SCRIPT == 'index'">Your code here!</if>

LiLSnooP 12-20-2007 11:23 AM

what do you mean by
THIS_SCRIPT ???

Opserty 12-20-2007 11:56 AM

Just copy the code he gave and try it :P

If you really want to know, its a PHP constant which set by vB for most scripts so you can compare it to a set value to identify the script. (You don't need to edit anything within the double quotes, just edit between the opening and closing if conditionals.)

LiLSnooP 12-20-2007 12:24 PM

okej
but how to do it vice versa

show code on all pages besides index

?

in_array it solve the problem ?

Lynne 12-20-2007 02:19 PM

Quote:

Originally Posted by LiLSnooP (Post 1405394)
okej
but how to do it vice versa

show code on all pages besides index

?

in_array it solve the problem ?

Either:
Code:

<if condition="THIS_SCRIPT == 'index'">
  Code if on index page
<else />
  Code on all pages except index page
</if>

Or
Code:

<if condition="THIS_SCRIPT <> 'index'">
  Code for all pages except index page
</if>

I think that should do it. (I used "<>", but I seem to recall someone saying that we should use "!=" instead, or it was vice versa. Can someone comment on that and why?)

Triky 12-20-2007 02:41 PM

Quote:

Originally Posted by Lynne (Post 1405474)
(I used "<>", but I seem to recall someone saying that we should use "!=" instead, or it was vice versa. Can someone comment on that and why?)

I've always seen "!=". I don't know why.

Kirk Y 12-20-2007 03:26 PM

Quote:

Originally Posted by Triky (Post 1405487)
I've always seen "!=". I don't know why.

Because != is for negative comparison; doesn't equal.

Triky 12-20-2007 04:13 PM

And what does <> stand for?

Kirk Y 12-20-2007 07:54 PM

I've never seen that operator... and I don't see how it could logically exist. It'd be "is greater than and less than" - which isn't possible.


All times are GMT. The time now is 01:54 AM.

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.00967 seconds
  • Memory Usage 1,736KB
  • 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_code_printable
  • (3)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