Hi everyone, I have a flash banner rotator that runs using PHP at the backend. The way in which the flash banner is called into the script is by using the following PHP: <? php include("http://www.mysite.com/banners"); ?> I have also used this in other ways such as: <?php $file = file_get_contents("http://www.mysite/banners"); ?> I am struggling to incorporate this into the <object> tag. Is there a way in which I can do this? Can I somehow get this to work in the <param name="movie"> tag? Or is there some other method that I can use? I should also mention that the file I am working with is a 'tpl' file. I do not think that these support PHP, but I may be wrong. Any help would be great as I am really struggling with this one. Kind regards, Jp
well it'll be banners/index.php just set the source of the object to the absolute path to the php script and it'll work just fine.
Hello there, thanks for the reply. I tried the absolute path already and it didn't work......I really thought that it would but it doesn't???? It's very strange?? I have the code like this, maybe its wrong??
can you post an actual link to this index.php; if the index.php outputs this object tag you'll need to do it another way
replace <object classid="clsid27CDB6E-AE6D-11cf-96B8-444553540000" codebase= "http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="468" height="60" class="flash"> <param name="movie" value="http://www.mysite.com/banners/index.php" /> <param name="quality" value="high" /> <embed src="http://www.mysite.com/banners/index.php" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="468" height="60"> </embed> </object> Code (markup): with <?=file_get_contents("http://you.know.the.url") ?> PHP: That should work.
Ah it didnt work.....gutted. I think that the .tpl files work with a php file at the backend which passes the information to the tpl file. I'm not 100% sure. The site I am trying to get the Flash banner to work in uses Cubecart as its major coding system....are you familiar with that at all? Maybe I have to add the PHP to the index.php file, and then pass the info to the index.tpl file? hmmm tricky.
yeah do that, get the data into a var that can be used by the tpl then pass it before you output the page.
I added this code to the index.php file: include("http://www.mysite.com/banners/index.php"); $body->assign("FLASH_ROT",$box_content); And when i view the webpage the banner rotator is there! My problem is now trying to position the flash using CSS - the problem is that the rotator just sits right at the top of the page and seems to ignore any CSS command i apply to it??
WHAY! I did it It works! I added this code to the index.php file: $file = file_get_contents("http://www.mysite.com/banners"); $body->assign("FLASH_ROT", $file); And then called it in index.tpl using {FLASH_ROT} I'm chuffed with myself LOL