Guest Posted August 30, 2008 Posted August 30, 2008 Okay so what I have been wanting is a flash program or contrib that will throw a random picture on a page, and banner, either or. Here are two sites that do exactly what I am talking about. CDC's forum will do that on the top. Hit refresh on these pages to see what I am talking about. Its not a swf file either. They are .jpg photos that will randomly display. Even better! http://w3.cultdeadcow.com/cms/ http://www.johnnycupcakes.com/
germ Posted August 30, 2008 Posted August 30, 2008 Random store logo? Click this... If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you. "Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice." - Me - "Headers already sent" - The definitive help "Cannot redeclare ..." - How to find/fix it SSL Implementation Help Like this post? "Like" it again over there >
Guest Posted August 31, 2008 Posted August 31, 2008 Thank you very much! I am sure this is a quick fix. Since I am a complete .php nubble, I think its something right in my face. http://iburnclothing.com/try1/ My test site url (ignore my sons face) That was a attempt to do it the flash way but I figured it would be nicer to have that part without flash for a universal site.
germ Posted August 31, 2008 Posted August 31, 2008 If you post the code (text) I can help. The image does nothing for me... :blush: If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you. "Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice." - Me - "Headers already sent" - The definitive help "Cannot redeclare ..." - How to find/fix it SSL Implementation Help Like this post? "Like" it again over there >
Guest Posted August 31, 2008 Posted August 31, 2008 <?php /* $Id: header.php 1739 2007-12-20 00:52:16Z hpdl $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2003 osCommerce Released under the GNU General Public License */ // check if the 'install' directory exists, and warn of its existence if (WARN_INSTALL_EXISTENCE == 'true') { if (file_exists(dirname($HTTP_SERVER_VARS['SCRIPT_FILENAME']) . '/install')) { $messageStack->add('header', WARNING_INSTALL_DIRECTORY_EXISTS, 'warning'); } } // check if the configure.php file is writeable if (WARN_CONFIG_WRITEABLE == 'true') { if ( (file_exists(dirname($HTTP_SERVER_VARS['SCRIPT_FILENAME']) . '/includes/configure.php')) && (is_writeable(dirname($HTTP_SERVER_VARS['SCRIPT_FILENAME']) . '/includes/configure.php')) ) { $messageStack->add('header', WARNING_CONFIG_FILE_WRITEABLE, 'warning'); } } // check if the session folder is writeable if (WARN_SESSION_DIRECTORY_NOT_WRITEABLE == 'true') { if (STORE_SESSIONS == '') { if (!is_dir(tep_session_save_path())) { $messageStack->add('header', WARNING_SESSION_DIRECTORY_NON_EXISTENT, 'warning'); } elseif (!is_writeable(tep_session_save_path())) { $messageStack->add('header', WARNING_SESSION_DIRECTORY_NOT_WRITEABLE, 'warning'); } } } // check session.auto_start is disabled if ( (function_exists('ini_get')) && (WARN_SESSION_AUTO_START == 'true') ) { if (ini_get('session.auto_start') == '1') { $messageStack->add('header', WARNING_SESSION_AUTO_START, 'warning'); } } if ( (WARN_DOWNLOAD_DIRECTORY_NOT_READABLE == 'true') && (DOWNLOAD_ENABLED == 'true') ) { if (!is_dir(DIR_FS_DOWNLOAD)) { $messageStack->add('header', WARNING_DOWNLOAD_DIRECTORY_NON_EXISTENT, 'warning'); } } if ($messageStack->size('header') > 0) { echo $messageStack->output('header'); } ?> <table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr class="header"> <?php /* coded for 6 images */ $br = rand(0,5); switch ( $br ) { case 0: $random_image ='/includes/v01.jpg'; /* ghhhhhhhhhhhhh */ break; case 1: $random_image ='/includes/v02.jpg'; /* change the image name here */ break; case 2: $random_image ='/includes/v03.jpg'; /* change the image name here */ break; case 3: $random_image ='/includes/v04.jpg'; /* change the image name here */ break; case 4: $random_image ='/includes/v05.jpg'; /* change the image name here */ break; case 5: $random_image ='/includes/v06.jpg'; /* change the image name here */ break; } ?> <td valign="middle"><?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT) . '">' . tep_image(DIR_WS_IMAGES . $random_image, 'osCommerce') . '</a>'; ?></td> </tr> </table> <table border="0" width="100%" cellspacing="0" cellpadding="1"> <tr class="headerNavigation"> <td class="headerNavigation"> <?php echo $breadcrumb->trail(' » '); ?></td> <td align="right" class="headerNavigation"><?php if (tep_session_is_registered('customer_id')) { ?><a href="<?php echo tep_href_link(FILENAME_LOGOFF, '', 'SSL'); ?>" class="headerNavigation"><?php echo HEADER_TITLE_LOGOFF; ?></a> | <?php } ?><a href="<?php echo tep_href_link(FILENAME_ACCOUNT, '', 'SSL'); ?>" class="headerNavigation"><?php echo HEADER_TITLE_MY_ACCOUNT; ?></a> | <a href="<?php echo tep_href_link(FILENAME_SHOPPING_CART); ?>" class="headerNavigation"><?php echo HEADER_TITLE_CART_CONTENTS; ?></a> | <a href="<?php echo tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'); ?>" class="headerNavigation"><?php echo HEADER_TITLE_CHECKOUT; ?></a> </td> </tr> </table> <?php if (isset($HTTP_GET_VARS['error_message']) && tep_not_null($HTTP_GET_VARS['error_message'])) { ?> <table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr class="headerError"> <td class="headerError"><?php echo htmlspecialchars(stripslashes(urldecode($HTTP_GET_VARS['error_message']))); ?></td> </tr> </table> <?php } if (isset($HTTP_GET_VARS['info_message']) && tep_not_null($HTTP_GET_VARS['info_message'])) { ?> <table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr class="headerInfo"> <td class="headerInfo"><?php echo htmlspecialchars(stripslashes(urldecode($HTTP_GET_VARS['info_message']))); ?></td> </tr> </table> <?php } ?>
germ Posted August 31, 2008 Posted August 31, 2008 I think I can read the image names. They all start with "/includes/blah blah". Take out the the first "/". Like: "includes/blah blah". If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you. "Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice." - Me - "Headers already sent" - The definitive help "Cannot redeclare ..." - How to find/fix it SSL Implementation Help Like this post? "Like" it again over there >
Guest Posted August 31, 2008 Posted August 31, 2008 Tried that with no luck. I even put just v01.jpg instead to make sure it would not appear that way. Also when I take out the asterisks in /* change the image name here */ It throws a error.
germ Posted August 31, 2008 Posted August 31, 2008 There is no "includes" folder within the images folder. If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you. "Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice." - Me - "Headers already sent" - The definitive help "Cannot redeclare ..." - How to find/fix it SSL Implementation Help Like this post? "Like" it again over there >
germ Posted August 31, 2008 Posted August 31, 2008 When you get the path to the image correct it will work. If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you. "Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice." - Me - "Headers already sent" - The definitive help "Cannot redeclare ..." - How to find/fix it SSL Implementation Help Like this post? "Like" it again over there >
Guest Posted August 31, 2008 Posted August 31, 2008 Think this might have something to do with it not working?? This is a error from something else btw. It was there before I tried this Fatal error: Call to undefined function tep_draw_heading_top() in /home/inkedhum/public_html/iburnclothing.com/try1/index.php on line 336
Guest Posted August 31, 2008 Posted August 31, 2008 Okay I followed everything you said... and it worked!! Thank you very very much!
germ Posted August 31, 2008 Posted August 31, 2008 Much better! ;) If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you. "Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice." - Me - "Headers already sent" - The definitive help "Cannot redeclare ..." - How to find/fix it SSL Implementation Help Like this post? "Like" it again over there >
Recommended Posts
Archived
This topic is now archived and is closed to further replies.