PhotoDune

Embeding on .php pages

10 posts
  • Bought between 10 and 49 items
  • Has been a member for 2-3 years
Milo99 says

Sorry about the spelling EMBEDDING … I followed the instructions from the Active Den blog for embedding an .swf on an .html page and it worked very nicely but now when I applied the same code to a .php page (using Smarty Templates) it didn’t work. It throws Smarty errors. Is there another tutorial or does anyone know how to embed on such pages?

Would Be Much Appreciated

3359 posts
  • Has been a member for 4-5 years
  • Contributed a Tutorial to a Tuts+ Site
  • Netherlands
  • Community Moderator
  • Microlancer Beta Tester
  • Sold between 10 000 and 50 000 dollars
  • Repeatedly Helped protect Envato Marketplaces against copyright violations
  • Exclusive Author
+4 more
Joost moderator says
There’s no real difference between embedding on a php page and on a html page; just make sure you paste the code outside the PHP tags:
<?php //here goes php code
?>
//here goes the embed code
571 posts
  • Bought between 10 and 49 items
  • Exclusive Author
  • Has been a member for 3-4 years
  • Referred between 1 and 9 users
  • Singapore
  • Sold between 10 000 and 50 000 dollars
  • Won a Competition
dexterous says

You can use a ‘literal’ tag. Smarty erases html tags.

{literal}

Read more here for literal – http://www.smarty.net/docsv2/en/language.function.literal.tpl

10 posts
  • Bought between 10 and 49 items
  • Has been a member for 2-3 years
Milo99 says

Thanks guys

So would I use the literal tag on both includes like this…

{literal} AC_FL_RunContent = 0; {/literal}



{literal} if (AC_FL_RunContent == 0) { alert(“This page requires AC_RunActiveContent.js.”); } else { AC_FL_RunContent( ‘codebase’, ‘http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0’, ‘width’, ‘590’,<!-Select your width in pixels or %. If %, must include % sign.-> ‘height’, ‘300’,<!-Select your height in pixelsor %.-> ‘src’, ‘pathToFile/yourFileName’,<!-Full path WITHOUT .swf on the end.-> ‘quality’, ‘high’, ‘pluginspage’, ‘http://www.macromedia.com/go/getflashplayer’, ‘align’, ‘middle’, ‘play’, ‘true’, ‘loop’, ‘true’, ‘scale’, ‘showall’, ‘wmode’, ‘window’, ‘devicefont’, ‘false’, ‘id’, ‘yourFileName’,<!-File name WITHOUT .swf on the end.-> ‘bgcolor’, ’#ffffff’, ‘name’, ‘yourFileName’,<!-File name WITHOUT .swf on the end.-> ‘menu’, ‘true’, ‘allowFullScreen’, ‘false’, ‘allowScriptAccess’,’sameDomain’, ‘movie’, ‘pathToFile/yourFileName’,<!-Full path WITHOUT .swf on the end.-> ‘salign’, ’’ ); //end AC code } <!-Change your width, height, and file name WITHOUT .swf on the end.-> <!-Full path WITH .swf on the end.-> <!-Change your width, height, and file name WITHOUT .swf on the end.-> {/literal}

10 posts
  • Bought between 10 and 49 items
  • Has been a member for 2-3 years
Milo99 says

Not sure why that didn’t allow me to paste the whole thing but you get the idea

3359 posts
  • Has been a member for 4-5 years
  • Contributed a Tutorial to a Tuts+ Site
  • Netherlands
  • Community Moderator
  • Microlancer Beta Tester
  • Sold between 10 000 and 50 000 dollars
  • Repeatedly Helped protect Envato Marketplaces against copyright violations
  • Exclusive Author
+4 more
Joost moderator says

Not sure why that didn’t allow me to paste the whole thing but you get the idea

It would probably help to put any long piece of code between

<pre> </pre>
tags ;)

10 posts
  • Bought between 10 and 49 items
  • Has been a member for 2-3 years
Milo99 says

hmm boy this is getting frustrating nothing is working here. There is a pause button on this rotator and for some reason the only thing I can see is the bottom part of that button in the top left corner of the display area for the rotator and nothing else. So I guess it is there KINDA !

10 posts
  • Bought between 10 and 49 items
  • Has been a member for 2-3 years
Milo99 says
1571 posts
  • Beta Tester
  • Bought between 50 and 99 items
  • Canada
  • Exclusive Author
  • Has been a member for 4-5 years
  • Repeatedly Helped protect Envato Marketplaces against copyright violations
  • Sold between 5 000 and 10 000 dollars
mafloral says

Hey

Is your theme WP?

There are a few ways of embedding swf into php

{literal}
<script src="../Scripts/AC_RunActiveContent.js" type="text/javascript"></script>
{/literal} 
<div id="YOURSWF"> 
{literal}
<script type="text/javascript">
AC_FL_RunContent( 'codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0','width','600','height','300','src','../images/YOURSWF','quality','high','pluginspage','http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash','wmode','transparent','loop','false','movie','../images/YOURSWF' ); //end AC code
</script><noscript><object height="300" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="600" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0">
<param name="movie" value="../images/YOURSWF.swf" />
<param name="quality" value="high" />
<param name="wmode" value="transparent" /><param name="LOOP" value="false" />
<embed pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" src="../images/YOURSWF.swf" wmode="transparent" type="application/x-shockwave-flash" height="300" loop="false" quality="high" width="600"></embed>
</object>
</noscript>
{/literal}
</div>
 

Try this just replace the YOURSWF to your files name and make sure that the path to the swf is correct. You also gonna need the AC_FL_RunContent.js hope this helps

Cheers Lester

10 posts
  • Bought between 10 and 49 items
  • Has been a member for 2-3 years
Milo99 says

Hey

Is your theme WP?

There are a few ways of embedding swf into php

{literal}
<script src="../Scripts/AC_RunActiveContent.js" type="text/javascript"></script>
{/literal} 
  
{literal}
 
AC_FL_RunContent( ‘codebase’,’http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0’,’width’,’600’,’height’,’300’,’src’,’../images/YOURSWF’,’quality’,’high’,’pluginspage’,’http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash’,’wmode’,’transparent’,’loop’,’false’,’movie’,’../images/YOURSWF’ ); //end AC code
   
 
 
  
  
 
 
{/literal}
 

	

Try this just replace the YOURSWF to your files name and make sure that the path to the swf is correct. You also gonna need the AC_FL_RunContent.js hope this helps

Cheers Lester
Thanks Lester but still no go. No it is not WP. Here is a screenshot of the original embedded into an html page: http://www.canucklist.net/news-rotator/2-Test/rotator.html Now see the pause button on that sample? Here is a screenshot of the only thing showing up on the php page (note size was modified) http://www.canucklist.net/news-rotator/2-Test/rotator.jpg Just the pause button shows up. This is the same no matter what type of embed string I use. With {literal} or without doesn’t change what shows. This is frustrating to say the least.
by
by
by
by
by