vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   Play embeded video only in homepage (https://vborg.vbsupport.ru/showthread.php?t=192316)

B16MCC 09-30-2008 02:49 PM

Play embeded video only in homepage
 
Hi guys & gals. I use a skin that has a left hand column for navigation etc. In one section of the left hand bar I have a small embedded video. I'm looking for a 'If condition' type statement or something similar to detect when users are in the homepage of my forum, and therefore the video is played.

Since the left hand column is present in all forum pages, I only want to play the video on the homepage. Any help with this is greatly appreciated.

Thanks
MCC.

Lynne 09-30-2008 03:34 PM

HTML Code:

<if condition="THIS_SCRIPT == 'index'">
do whatever
<if>

'index' should be changed to whatever THIS_SCRIPT is defined as at the top of your page.

B16MCC 09-30-2008 06:57 PM

Thanks for the reply. I've tried that but it has just removed the video completly. It could be ofcourse I've done something wrong. The code involved is the header template of my forums. Thats where the video embed code is. The first line of the template is

Code:

<a name="top"></a>
I replaced index with top and thats obviously not correct. Any further advice please ?

Cheers
MCC

Lynne 09-30-2008 07:31 PM

What is the page url for your 'homepage'? Isn't it index.php? Go to edit your index.php page. Look at the top for a line similar to this:
PHP Code:

define('THIS_SCRIPT''index'); 

that defines what "THIS_SCRIPT" is called for that page - in this case it's called 'index'. Put that name in the conditional and in that condition put the action/code you only want done on that page. If you want something else done on others, go:

HTML Code:

<if condition="THIS_SCRIPT == 'index'">
do whatever only on the 'index' page
<else />
do something else on all other pages
<if>



All times are GMT. The time now is 06:39 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.00952 seconds
  • Memory Usage 1,717KB
  • 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
  • (1)bbcode_code_printable
  • (2)bbcode_html_printable
  • (1)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (4)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