i added a flash banner to my site. it works fine. but if i login as any user or browse admin pages it never loads. any idea?

<div id="header">
  <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="770" height="209">
    <param name="movie" value="<?php print $directory; ?>/header.swf" />
    <param name="quality" value="high" />
    <embed src="<?php print $directory; ?>/header.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="770" height="209"></embed>
  </object>
</div>

Comments

JoshLangner’s picture

The problem is when you browse to admin/ or comment/edit/ etc., the browser adds those onto the $directory and looks for the file in that location. For example, when browsing admin/ or comment/edit, the file link appears to be in http://yoursite.com/admin/[$directory]/myfile.swf or http://yoursite.com/comment/edit/[$directory]/myfile.swf.

Obviously that won't work.

To solve the problem, you need to generate an "absolute" URL to the file. So, instead of $directory, you need to have base_path() . $directory, like on this image tag:

 <img src="<?php print base_path() . $directory; ?>/images/12346.jpg" style="padding:0px;margin:0px" />
ngohaiweb’s picture

I use theme "newsportal". I want to edit banner with Flash, but i can't ...
I don't know What file ? I have to edit: "page.tpl.php" or "style.css".....
Please show me the code ...
thanks a lot

--ngohaiweb--