psytech Posted July 4, 2003 Share Posted July 4, 2003 i've added a flah header to my site and its working great except one thing the damn thing reloads everytime i navigate through the site. is there a way to make it only load once. so only when you first enter the site it'll load and stop and stay on the last frame? :? Link to comment Share on other sites More sharing options...
Guest Posted July 4, 2003 Share Posted July 4, 2003 Maybe you can set a cookie and use two separate flash animations. The code would look something like: if ( ( array_key_exists( 'FlashCookie', $_COOKIES ) && time() < $_COOKIES['FlashCookie'] ) { echo ( 'HTML_CODE_FOR_SINGLE_END_FRAME_FLASH' ); } else { setcookie ('FlashCookie'); /* This cookie expires at end of session */ echo ( 'HTML_CODE_FOR_FULL_FLASH' ); } I did not test this code and I am a lousy typist so don't be surprised if it doesn't work ;-). But you probably get the idea. Regards, Rob Link to comment Share on other sites More sharing options...
psytech Posted July 4, 2003 Author Share Posted July 4, 2003 i got the idea dude thanx. only problem is i don't know how to make a cookie :oops: i hardly know what a cookie is :oops: :oops: and can you just define 'HTML_CODE_FOR_SINGLE_END_FRAME_FLASH... :?: Link to comment Share on other sites More sharing options...
Guest Posted July 4, 2003 Share Posted July 4, 2003 Replace the oscommece.gif in header with yourname.gif Link to comment Share on other sites More sharing options...
psytech Posted July 4, 2003 Author Share Posted July 4, 2003 Replace the oscommece.gif in header with yourname.gif how would that stop my flash banner from reloading? :? Link to comment Share on other sites More sharing options...
Guest Posted July 4, 2003 Share Posted July 4, 2003 That willreplace the oscommece gif with your, if thats what you want, just check the checkout page good, some flash banners interfiere with SSL Link to comment Share on other sites More sharing options...
psytech Posted July 5, 2003 Author Share Posted July 5, 2003 if ( ( array_key_exists( 'FlashCookie', $_COOKIES ) && time() < $_COOKIES['FlashCookie'] ) { echo ( 'HTML_CODE_FOR_SINGLE_END_FRAME_FLASH' ); } else { setcookie ('FlashCookie'); /* This cookie expires at end of session */ echo ( 'HTML_CODE_FOR_FULL_FLASH' ); } where would i add that, here's what my header.php looksl like <?php /* $Id: header.php,v 1.39 2003/02/13 04:23:23 hpdl Exp $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2003 osCommerce Released under the GNU General Public License */ ?> <table border="0" width="100%" cellspacing="0" cellpadding="0"> <td class="header" align="center"> </td><td align="center" class="header"><a href=""> <OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://active.macromedia.com/flash2/cabs/swflash.cab#version=4,0,0,0" ID=specials WIDTH=780 HEIGHT=205> <PARAM NAME=movie VALUE="/images/e-tech.swf"> <PARAM NAME=quality VALUE=high> <PARAM NAME=loop VALUE=fasle> <EMBED src="/images/e-tech.swf?loaded=ok" loop=false quality=high WIDTH=780 HEIGHT=205 TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"> </EMBED> </OBJECT></a> </td> </tr> <?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 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 $HTTP_GET_VARS['info_message']; ?></td> </tr> </table> <?php } ?> Link to comment Share on other sites More sharing options...
Guest Posted July 5, 2003 Share Posted July 5, 2003 What do you have in your header already? do you have a link? the insert would normally go before" error message " Link to comment Share on other sites More sharing options...
Guest Posted July 5, 2003 Share Posted July 5, 2003 Something like: <?php /* $Id: header.php,v 1.39 2003/02/13 04:23:23 hpdl Exp $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2003 osCommerce Released under the GNU General Public License */ if ( ( array_key_exists( 'FlashCookie', $_COOKIES ) && time() < $_COOKIES['FlashCookie'] ) { $flash_banner= '/images/e-tech_single_frame.swf'; /* Single Frame Flash */ } else { setcookie ('FlashCookie'); /* This cookie expires at end of session */ $flash_banner= '/images/e-tech.swf'; /* Full Flash */ } ?> <table border="0" width="100%" cellspacing="0" cellpadding="0"> <td class="header" align="center"> </td><td align="center" class="header"><a href=""> <OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://active.macromedia.com/flash2/cabs/swflash.cab#version=4,0,0,0" ID=specials WIDTH=780 HEIGHT=205> <PARAM NAME=movie VALUE="<?php= $flash_banner ?>"> <PARAM NAME=quality VALUE=high> <PARAM NAME=loop VALUE=fasle> <EMBED src="<?php= $flash_banner ?>" loop=false quality=high WIDTH=780 HEIGHT=205 TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"> </EMBED> </OBJECT></a> Link to comment Share on other sites More sharing options...
psytech Posted July 5, 2003 Author Share Posted July 5, 2003 here's what i did: <?php /* $Id: header.php,v 1.39 2003/02/13 04:23:23 hpdl Exp $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2003 osCommerce Released under the GNU General Public License */ if ( ( array_key_exists( 'FlashCookie', $_COOKIES ) && time() < $_COOKIES['FlashCookie'] ) { $flash_banner= '/images/e-tech1f.swf'; /* Single Frame Flash */ } else { setcookie ('FlashCookie'); /* This cookie expires at end of session */ $flash_banner= '/images/e-tech.swf'; /* Full Flash */ } ?> <table border="0" width="100%" cellspacing="0" cellpadding="0"> <td class="header" align="left"> <? echo tep_image(DIR_WS_IMAGES . 'contact.jpg', '', '215', '205'); ?> </td><td align="left" class="header"><a href=""> <OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://active.macromedia.com/flash2/cabs/swflash.cab#version=4,0,0,0" ID=specials WIDTH=780 HEIGHT=205> <PARAM NAME=movie VALUE="<?php= $flash_banner ?>"> <PARAM NAME=quality VALUE=high> <PARAM NAME=loop VALUE=fasle> <EMBED src="<?php= $flash_banner ?>" loop=false quality=high WIDTH=780 HEIGHT=205 TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"> </EMBED> </OBJECT></a> </td> </tr> but now the niether of the banners load at all, am i doing omething worng or maby forgeting something? do i need to actually write a cookie manully for it to upload to the user?(i don't know much about cookies and how they work :oops: ) or does it create a cookie by itself? this really sucks that the banner keeps replaying. :cry: http://www.etechstore.co.il Link to comment Share on other sites More sharing options...
Guest Posted July 5, 2003 Share Posted July 5, 2003 My bad, I did not test the code and did it from memory and on rereading my code,... it's sloppy :-( This should be much better, still untested but probably ok. <?php /* $Id: header.php,v 1.39 2003/02/13 04:23:23 hpdl Exp $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2003 osCommerce Released under the GNU General Public License */ if ( array_key_exists('FlashCookie', $_COOKIE)) { $flash_banner= '/images/e-tech1f.swf'; /* Single Frame Flash */ } else { setcookie ('FlashCookie'); /* This cookie expires at end of session */ $flash_banner= '/images/e-tech.swf'; /* Full Flash */ } ?> <table border="0" width="100%" cellspacing="0" cellpadding="0"> <td class="header" align="left"> <? echo tep_image(DIR_WS_IMAGES . 'contact.jpg', '', '215', '205'); ?> </td><td align="left" class="header"><a href=""> <OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://active.macromedia.com/flash2/cabs/swflash.cab#version=4,0,0,0" ID=specials WIDTH=780 HEIGHT=205> <PARAM NAME=movie VALUE="<?php echo($flash_banner) ?>"> <PARAM NAME=quality VALUE=high> <PARAM NAME=loop VALUE=fasle> <EMBED src="<?php echo($flash_banner) ?>" loop=false quality=high WIDTH=780 HEIGHT=205 TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"> </EMBED> </OBJECT></a> </td> </tr> Link to comment Share on other sites More sharing options...
psytech Posted July 5, 2003 Author Share Posted July 5, 2003 now the banner is showing but its still reloading :cry: and i looked in the my temprary internet files but i didn't see a cookie in there called flashcookie i know its posible cause i've seen it on other sites i just wish i knew what i was doing :shock: Link to comment Share on other sites More sharing options...
Guest Posted July 5, 2003 Share Posted July 5, 2003 Odd, this should work, do you hae this online somewhere? Link to comment Share on other sites More sharing options...
psytech Posted July 5, 2003 Author Share Posted July 5, 2003 http://www.etechstore.co.il Link to comment Share on other sites More sharing options...
Guest Posted July 5, 2003 Share Posted July 5, 2003 The cookie is not being set. This usually means your php is producing output before you are setting the cookie is set in your code. (You could prevent this by turining on output buffering adjust output_buffering in php.ini) Anyway, I see osC is setting it's own cookie so you can check for that. Change: if ( array_key_exists('FlashCookie', $_COOKIE)) { $flash_banner= '/images/e-tech1f.swf'; /* Single Frame Flash */ } else { setcookie ('FlashCookie'); /* This cookie expires at end of session */ $flash_banner= '/images/e-tech.swf'; /* Full Flash */ } To: if ( array_key_exists('osCsid', $_COOKIE)) { $flash_banner= '/images/e-tech1f.swf'; /* Single Frame Flash */ } else { $flash_banner= '/images/e-tech.swf'; /* Full Flash */ } Link to comment Share on other sites More sharing options...
psytech Posted July 5, 2003 Author Share Posted July 5, 2003 THANKS!! it worked dude :D your the greatest thnx a lot m8 i really apreciate it :D hope i can pay you back some day 8) Link to comment Share on other sites More sharing options...
psytech Posted July 5, 2003 Author Share Posted July 5, 2003 one more question (sorry to be such a pain) how do i add a *.*.sql to my database? i tried doing /install/index.php --> update but that didn't work :( so either i'm doing it wrong or...hmm... well... i'm doing it worng :? Link to comment Share on other sites More sharing options...
Guest Posted July 5, 2003 Share Posted July 5, 2003 Congrats on getting it to work. I'm not sure if I understand you correctly, I think you want to do this: mysql -u USERNAME -p DATABASE < whatever.sql Link to comment Share on other sites More sharing options...
psytech Posted July 5, 2003 Author Share Posted July 5, 2003 what i'm trying to do is install some off the contibution addons and some of the have a ql file that needs to be added tothe database some how... but i don't know how... Link to comment Share on other sites More sharing options...
psytech Posted July 5, 2003 Author Share Posted July 5, 2003 what i'm trying to do is install some off the contibution addons and some of the have a ql file that needs to be added tothe database some how... but i don't know how... Link to comment Share on other sites More sharing options...
Guest Posted July 5, 2003 Share Posted July 5, 2003 See my previous message, that should work. Or look at install_database.php in the osC docs. It's the same procedure. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.