View Full Version : Play embeded video only in homepage
B16MCC
09-30-2008, 02:49 PM
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
<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
<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:
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:
<if condition="THIS_SCRIPT == 'index'">
do whatever only on the 'index' page
<else />
do something else on all other pages
<if>
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.