flash size

Support for coding, modules or other software issues
Post Reply
LOLFlash
Posts: 4
Joined: Tue Mar 23, 2010 5:40 pm

flash size

Post by LOLFlash » Tue Mar 23, 2010 5:51 pm

Hi
I just downloaded AlegroCart and want to make a little changes regarding flash banner.
Where stored variable flash size and variable $flash in if(isset($flash)) in homepage.tpl

User avatar
Brent
Site Admin
Posts: 4459
Joined: Sat Dec 12, 2009 3:35 pm
Location: Canada eh

Re: flash size

Post by Brent » Tue Mar 23, 2010 6:24 pm

Welcome.

Home page module instructions

To get to the home page, login to admin, click Home page and your size setting are there.
I am assuming you have version 1.2.1

LOLFlash
Posts: 4
Joined: Tue Mar 23, 2010 5:40 pm

Re: flash size

Post by LOLFlash » Tue Mar 23, 2010 6:45 pm

I want php determinate size of flash file and insert it

Where the size stored?

I did check setting table it's not there.

And one more

I did change
div flash:

Code: Select all

 <div class="flash">
   	<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="<?php echo $flash_width; ?>" height="<?php echo $flash_height; ?>" id="FlashHomepage" title="">
   <param name="movie" value="<?php echo $flash;?>" />
    <param name="quality" value="high" />
    <param name="wmode" value="opaque" />
    <param name="swfversion" value="6.0.65.0" />
    <!-- This param tag prompts users with Flash Player 6.0 r65 and higher to download the latest version of Flash Player. Delete it if you don’t want users to see the prompt. -->
    <param name="expressinstall" value="/Scripts/expressInstall.swf" />
    <!-- Next object tag is for non-IE browsers. So hide it from IE using IECC. -->
    <!--[if !IE]>-->
    <object type="application/x-shockwave-flash" data="<?php echo $flash;?>" width="<?php echo $flash_width; ?>" height="<?php echo $flash_height; ?>">
      <!--<![endif]-->
      <param name="quality" value="high" />
      <param name="wmode" value="opaque" />
      <param name="swfversion" value="6.0.65.0" />
      <param name="expressinstall" value="/Scripts/expressInstall.swf" />
      <!-- The browser displays the following alternative content for users with Flash Player 6.0 and older. -->
      <div>
        <h4>Content on this page requires a newer version of Adobe Flash Player.</h4>
        <p><a href="http://www.adobe.com/go/getflashplayer"><img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" width="112" height="33" /></a></p>
      </div>
      <!--[if !IE]>-->
    </object>
    <!--<![endif]-->
  </object>
    <script type="text/javascript">
	<!--
	swfobject.registerObject("FlashHomepage");
	//-->
	</script>
  </div>
but I want to include
code

Code: Select all

  <script type="text/javascript">
	<!--
	swfobject.registerObject("FlashHomepage");
	//-->
	</script>
in a footer
how to do so?

I did try

Code: Select all

<?php if(isset($flash)){ ?>
 <script type="text/javascript">
	<!--
	swfobject.registerObject("FlashHomepage");
	//-->
	</script>
  <?php }else echo 'no flash'?>
but seems like variable $flash not exist in footer.tpl

User avatar
Brent
Site Admin
Posts: 4459
Joined: Sat Dec 12, 2009 3:35 pm
Location: Canada eh

Re: flash size

Post by Brent » Wed Mar 24, 2010 5:02 am

I'm not sure what your trying to do.
If you just want to add a flash image to the footer, You need to specify the flash.image in footer.php first.

Check out the controller/home.php and module.homepage.php.
All you are really doing in the controller file is setting the path to the flash and passing to the tpl with $view->set

LOLFlash
Posts: 4
Joined: Tue Mar 23, 2010 5:40 pm

Re: flash size

Post by LOLFlash » Thu Mar 25, 2010 1:05 pm

To have flash work properly in browser and send command to flash from javascrip I have to register flash object in browser. The Adobe does it by adding javascript on the bottom of page
If flash present in my home page I did include script file in homepage.tpl on top I added:

Code: Select all

if(isset($flash)) $head_def->set_javascript("com/swfobject_modified.js");
I'm loading swfobject_modified.js if flash present as well I'm loading HTML code for flash, it was mentioned above.


Now I need include one more javascript in footer :

Code: Select all

<script type="text/javascript">
   <!--
   swfobject.registerObject("FlashHomepage");
   //-->
   </script>
but i need this only when flash present and I need to pass a flash id to footer.tpl in my case --"FlashHomepage"

http://www.shop.uplight.ca/

User avatar
Brent
Site Admin
Posts: 4459
Joined: Sat Dec 12, 2009 3:35 pm
Location: Canada eh

Re: flash size

Post by Brent » Thu Mar 25, 2010 4:03 pm

in catalog/extension/module/footer.php add this line.

Code: Select all

$view->set('flash', $image->href('flash/yourflash.swf'));
That will pass the flash path to the variable $flash in the footer.

Any other information you would pass the same way. FORMAT

Code: Select all

$view->set('tpl_ variable', $whatever_your_passing);

LOLFlash
Posts: 4
Joined: Tue Mar 23, 2010 5:40 pm

Re: flash size

Post by LOLFlash » Thu Mar 25, 2010 6:35 pm

Thanks Brent

That what I need...

Post Reply