Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / Header with Flash on Main Page only

Header with Flash on Main Page only

Locked

Views: 1,089

Results 1 to 2 of 2
This thread is locked. New replies are disabled.
20 Apr 2008, 8:57 PM
#1
dbran30 avatar

dbran30

New Zenner

Join Date:
Nov 2007
Location:
Texas
Posts:
6
Plugin Contributions:
0

Header with Flash on Main Page only

Hello all!

On the main page - and for the main page only - I need my header's div id "logoWrapper" location to display a 760x109 flash based logo, instead of my normal 760x109 JPG that should display on every other page.

I've read in many places on the forum how one might accomplish this, and have tried several including using part of gjh42's excellent contrib Smart Backgrounds for the logic in deciding if the page is "main" or not inside my includes/templates/custom/common/tpl_header.php file.

But I can't get anything I've tried to work. With everything I've read here, I'm sure a lot of people would appreciate this help.

Could one of you brilliant PHP programmers please, please post the code change for tpl_header.php that provides the logic to decide if this is the "main" page, and if it is main, call a java script to 'document.write' the flash file in place of the normal logo. If it isn't the main page, then display the normal logo in that space as is the default.

Please let me know if you need more info. Thanks very much for your help!

Site: https://www.4mySecurity.com
v1.3.8a
Image Handler 2
Better Together
CSS Horizontal Drop Down Menu 1.4
Order Steps
Google Sitemap Admin 1.3.18

-David-

21 Apr 2008, 10:01 PM
#2
dbran30 avatar

dbran30

New Zenner

Join Date:
Nov 2007
Location:
Texas
Posts:
6
Plugin Contributions:
0

Re: Header with Flash on Main Page only

Well, surprisingly enough, more research answered my questions. I found and implemented the "nice 'n ez flo (flash object)" mod which was contributed by someone who is now banned from the forums. It provided precisely what we needed. :clap:

By including the logic statement suggested many times by Misty in several different posts, and using the get_flashed routine from nice 'n ez (inside the nnez_flo_output.php file), it works like a charm. Here's my modified code in the tpl_header.php file:

<!--bof-branding display-->
<?php if ($this_is_home_page) { ?>
<div id="logoWrapperJ">
<?php echo get_flashed('JavaFileName','750','109'); ?>
<?php
}
else
{
?>
<div id="logoWrapper"> 
... remainder is normal Zen code

As you may notice, I created a new logoWrapperJ div - it eliminates the:
background-image: url(../images/header_bg.jpg) that the Stylesheet usually supplies to the logoWrapper.

Can anyone familiar with the nice 'n ez mod suggest any potential problems? It appears to work correctly in FF and IE7.

Thanks for any suggestions!

-David-

BTW, the post often referenced as THE starting place for this type of project doesn't seem to work:
http://www.zen-cart.com/forum/showthread.php?t=34807&highlight=java+flash