Results 1 to 2 of 2
  1. #1
    Join Date
    Nov 2007
    Location
    Texas
    Posts
    6
    Plugin Contributions
    0

    Default 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: 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-

  2. #2
    Join Date
    Nov 2007
    Location
    Texas
    Posts
    6
    Plugin Contributions
    0

    Default 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.

    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:

    Code:
    <!--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/showth...ght=java+flash

 

 

Similar Threads

  1. Need Flash to Show on Main Page Only
    By ljdream00 in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 29 Aug 2010, 06:17 AM
  2. Trying to get flash installed on main page only
    By strugglingnovice in forum Templates, Stylesheets, Page Layout
    Replies: 5
    Last Post: 21 Jul 2010, 12:20 PM
  3. flash on main page with javascript ASAP
    By MaxBodine in forum General Questions
    Replies: 4
    Last Post: 23 Jul 2009, 03:19 PM
  4. Problem with flash on main page (not header)
    By sartor in forum General Questions
    Replies: 7
    Last Post: 14 Jan 2009, 10:59 AM
  5. How to display flash header only on main page?
    By funksdaburn in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 18 Sep 2007, 07:59 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg