lmcm2008 Posted October 24, 2014 Share Posted October 24, 2014 Hi: I have a wordpress, and I want to publish a flash animation. I´ve modified the wordpress file sidebar.php with a include to this code in another .php file, but I don´t see nothing, but I don´t have any error... just "white space" instead the animation... Can you help me with the code?? <? $wmode = "opaque"; $refererId = 258; $bannerId = 210; $width = 250; $height = 250; $link = "http://www.bellross.com/index.php?bannerId=".$bannerId."&refererId=".$refererId; $flashLink = "http://www.bellross.com/index.php?bannerId=".$bannerId."%26refererId=".$refererId; ?> <style type="text/css"> body, object { padding:0; margin:0; } #timekeeper, .link { width: <?= $width?>px; height:<?= $height?>px; } .hand { bottom: 0px; left: 107px; } </style> <link href="wp-content/themes/sahifa/template/style.css" rel="stylesheet" type="text/css"/> <script type="text/javascript"> window.onload = function() { if(document.getElementsByTagName('body')[0].style.MozTransform == '' || document.getElementsByTagName('body')[0].style.WebkitTransform == '' || document.getElementsByTagName('body')[0].style.OTransform == '' || document.getElementsByTagName('body')[0].style.transform == '') { function hand() { handS.style.MozTransform = handS.style.WebkitTransform = handS.style.OTransform = handS.style.transform = 'rotate(' + (time * 6) + 'deg)'; handM.style.MozTransform = handM.style.WebkitTransform = handM.style.OTransform = handM.style.transform = 'rotate(' + (time / 10) + 'deg)'; handH.style.MozTransform = handH.style.WebkitTransform = handH.style.OTransform = handH.style.transform = 'rotate(' + (time / 120) + 'deg)'; } var handH = document.getElementById('handH'); var handM = document.getElementById('handM'); var handS = document.getElementById('handS'); var timekeeper = document.getElementById('timekeeper'); var d = new Date(); var time = d.getSeconds() + 60 * d.getMinutes() + 3600 * d.getHours(); hand(); setInterval(function() {time = time+0.20; hand();}, 200); setInterval(function() {r = new Date(); time = r.getSeconds() + 60 * r.getMinutes() + 3600 * r.getHours(); hand()}, 10000); } }; </script> <script src="wp-content/themes/sahifa/swf/Scripts/swfobject_modified.js" type="text/javascript"></script> <script type="text/javascript"> swfobject.registerObject("FlashID"); </script> <object id="FlashID" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="<?= $width?>" height="<?= $height?>"> <param name="movie" value="wp-content/themes/sahifa/swf/timekeeper.swf"> <param name="quality" value="high"> <param name="wmode" value="<?= $wmode?>"> <param name="swfversion" value="8.0.35.0"> <param name="FlashVars" value="clickTAG=<?=$flashLink?>" /> <!-- Cette balise <param> invite les utilisateurs de Flash Player en version 6.0 r65 et ultérieure à télécharger la version la plus récente de Flash Player. Supprimez-la si vous ne voulez pas que cette invite soit visible. --> <param name="expressinstall" value="wp-content/themes/sahifa/swf/Scripts/expressInstall.swf"> <!-- La balise <object> suivante est destinée aux navigateurs autres qu'IE. Supprimez-la d'IE à l'aide d'IECC. --> <!--[if !IE]>--> <object type="application/x-shockwave-flash" data="wp-content/themes/sahifa/swf/timekeeper.swf" width="<?= $width?>" height="<?= $height?>"> <!--<![endif]--> <param name="quality" value="high"> <param name="wmode" value="<?= $wmode?>"> <param name="swfversion" value="8.0.35.0"> <param name="expressinstall" value="wp-content/themes/sahifa/swf/Scripts/expressInstall.swf"> <param name="FlashVars" value="clickTAG=<?=$flashLink?>" /> <!-- Le navigateur affichera le contenu alternatif suivant pour les utilisateurs d'un lecteur Flash de version 6.0 ou de versions plus anciennes. --> <div id="timekeeper"> <a href="<?= $link; ?>" target="_blank" class="link"></a> <img src="template/images/handH.png" class="hand" id="handH" alt="heure"/> <img src="template/images/handM.png" class="hand" id="handM" alt="minute"/> <img src="template/images/handS.png" class="hand" id="handS" alt="seconde"/> </div> <!--[if !IE]>--> </object> <!--<![endif]--> </object> Do you see anything wrong? How can I make this work in my page? I hope you can help me. Thanks. Regards Quote Link to comment https://forums.phpfreaks.com/topic/292034-flash-using-php-for-wordpress/ Share on other sites More sharing options...
QuickOldCar Posted October 25, 2014 Share Posted October 25, 2014 (edited) Try using full <?php tags versus short <? tags, some servers are not configured for it. change these width: <?= $width?>px; height:<?= $height?>px; to width:<?php echo $width;?>px; height:<?php echo $height;?>px; css errors can cause the white page as well with no error messages If you need to see the errors you can enable debug in wp-config.php define('WP_DEBUG', true); define('WP_DEBUG_LOG', true); define('WP_DEBUG_DISPLAY', false); @ini_set('display_errors',0); The log will be saved in wp-content as debug.log Edited October 25, 2014 by QuickOldCar Quote Link to comment https://forums.phpfreaks.com/topic/292034-flash-using-php-for-wordpress/#findComment-1494675 Share on other sites More sharing options...
QuickOldCar Posted October 25, 2014 Share Posted October 25, 2014 Down below you have a lot that look like <?=$variable?> change them all to <?php echo $variable;?> Quote Link to comment https://forums.phpfreaks.com/topic/292034-flash-using-php-for-wordpress/#findComment-1494676 Share on other sites More sharing options...
lmcm2008 Posted October 25, 2014 Author Share Posted October 25, 2014 I´ve change all the <?= $variable ?> to <? echo $variable ?> and also move this lines <script type="text/javascript"> swfobject.registerObject("FlashID"); </script> right under the <object></object> with all the code inside... And works in all navigators!!... Great!!! But... now doesn´t do it in mobiles phones and ipads... jeje... Can you help me now with this matter? just to adapt the code to mobile phones and Ipads? Or its not possible? How can I do it? Thanks a lot to everybody! Quote Link to comment https://forums.phpfreaks.com/topic/292034-flash-using-php-for-wordpress/#findComment-1494677 Share on other sites More sharing options...
QuickOldCar Posted October 25, 2014 Share Posted October 25, 2014 Are you talking using html5 video versus flash? Quote Link to comment https://forums.phpfreaks.com/topic/292034-flash-using-php-for-wordpress/#findComment-1494678 Share on other sites More sharing options...
lmcm2008 Posted October 25, 2014 Author Share Posted October 25, 2014 Yeah. In any case right now is working in all navigators, but I lost it in phones and Ipads.... Any advice to fix this??? Thanks. Regards Quote Link to comment https://forums.phpfreaks.com/topic/292034-flash-using-php-for-wordpress/#findComment-1494681 Share on other sites More sharing options...
QuickOldCar Posted October 25, 2014 Share Posted October 25, 2014 Sadly not all browsers support all video types. This means must have ogg and mp4 versions in order to play them all popular browsers. http://html5hub.com/html5-video-on-mobile-a-primer/ Quote Link to comment https://forums.phpfreaks.com/topic/292034-flash-using-php-for-wordpress/#findComment-1494685 Share on other sites More sharing options...
luismc2007 Posted October 27, 2014 Share Posted October 27, 2014 OK. Thanks. How I mark this item as closed or finish?? I´m sorry but don´t know how to do it... thanks. Quote Link to comment https://forums.phpfreaks.com/topic/292034-flash-using-php-for-wordpress/#findComment-1494911 Share on other sites More sharing options...
QuickOldCar Posted October 27, 2014 Share Posted October 27, 2014 On every comment is a "Mark Solved" lower right side. Decide the best answer or just click the last one like some others do. Quote Link to comment https://forums.phpfreaks.com/topic/292034-flash-using-php-for-wordpress/#findComment-1494966 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.