clinart Posted April 17, 2007 Posted April 17, 2007 Hello, My site should have a flash embed in the header -- but it should only show on the main page. It's easy enough to get it in the header by editing header.php, but then it shows up on every page. Anyone have any suggestions? Sorry for being such an annoying newb...
clinart Posted April 17, 2007 Author Posted April 17, 2007 Hello, My site should have a flash embed in the header -- but it should only show on the main page. It's easy enough to get it in the header by editing header.php, but then it shows up on every page. Anyone have any suggestions? Sorry for being such an annoying newb... Would changing the following in index.php <!-- header //--> <?php require(DIR_WS_INCLUDES . 'header.php'); ?> <!-- header_eof //--> to <!-- header //--> <?php require(DIR_WS_INCLUDES . 'header_main.php'); ?> <!-- header_eof //--> and then creating a header_main.php file work? Thanks (and sorry) again.
frescodesign Posted April 17, 2007 Posted April 17, 2007 well of course embedding flash in the header will show up on every page. Almost all front end PHP files have the "<?php require(DIR_WS_INCLUDES . 'header.php'); ?>" statements. If you just want the flash embedded on one particular page, for example.. index.php.. then i would suggest embedding it into index.php only. Search for header and look for the following code. <!-- header //--> <?php require(DIR_WS_INCLUDES . 'header.php'); ?> <!-- header_eof //--> <!-- body //--> <table border="0" width="<?php echo FRES_TABLE_WIDTH; ?>" cellspacing="3" cellpadding="3"> just add the embedded object after <!-- body //-->.
♥FWR Media Posted April 17, 2007 Posted April 17, 2007 Would changing the following in index.php <!-- header //--> <?php require(DIR_WS_INCLUDES . 'header.php'); ?> <!-- header_eof //--> to <!-- header //--> <?php require(DIR_WS_INCLUDES . 'header_main.php'); ?> <!-- header_eof //--> and then creating a header_main.php file work? Thanks (and sorry) again. Try ... <?php if (empty($_SERVER['QUERY_STRING'])) include( DIR_WS_INCLUDES . 'header_main.php' ); else include( DIR_WS_INCLUDES . 'header.php' ); ?> Ultimate SEO Urls 5 PRO - Multi Language Modern, Powerful SEO Urls KissMT Dynamic SEO Meta & Canonical Header Tags KissER Error Handling and Debugging KissIT Image Thumbnailer Security Pro - Querystring protection against hackers ( a KISS contribution ) If you found my post useful please click the "Like This" button to the right. Please only PM me for paid work.
clinart Posted April 17, 2007 Author Posted April 17, 2007 Try ... <?php if (empty($_SERVER['QUERY_STRING'])) include( DIR_WS_INCLUDES . 'header_main.php' ); else include( DIR_WS_INCLUDES . 'header.php' ); ?> That works. Thanks. Now there's another problem, though: The flash shows like it should, only on the index page, but the rest of the body gets bollixed. At first I thought the .swf file was pushing outside of the header area and somehow messing things up that way, but when I made it tiny, the same thing happened. Could there be some kind of error in the flash file? As long as we're on the subject, how do you make the header taller? I can't find any height parameters in stylesheet.css.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.