Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • leonida Friend
    #117340

    Hello,

    Is there a way in Ja Polaris to sue as header images .swf or .gif images?

    What changes shoud I change?

    I believe it should be possible.

    Thank you,

    leonida Friend
    #210844

    I managed to use .swf objects by changing this code:

    <div id=”ja-topstory” style=”background: url(<?php ja_loadHeader(‘user9’);?>) top left; height: 200px;”>
    <?php mosLoadModules ( ‘user9’,-2 ); ?>
    </div>

    with this:

    <div id=”ja-topstory” style=”top left; height: 200px;”>
    <?php mosLoadModules ( ‘user9’,-2 ); ?>
    <div align=”left”>
    <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=”832″ height=”200″>
    <param name=”movie” value=”<?php echo $ja_template_path;?>/images/header/header_image13.swf” />
    <param name=”quality” value=”high” />
    <embed src=”<?php echo $ja_template_path;?>/images/header/header_image13.swf” quality=”high” pluginspage=”http://www.macromedia.com/go/getflashplayer” type=”application/x-shockwave-flash” width=”832″ height=”200″></embed>
    </object>
    </div>

    Although, i can not make it use the user9 module in order to place different kind of flash animations in different pages through the modules section of joomla administration.

    The above codes places the same flash object in user9 position in all of the pages.

    It is quite good for the moment but if anyone has any suggestions why not improve it 😉

    P.S. the smiley in the code was put automatically for the : D (without space) text.

    leonida Friend
    #210856

    I figured it out finally and now works smoothly. I post the changes in the code for anyone interested. In the modules section, you have to create the same user9 modules, with the only difference that you use the .swf ending than the .jpg

    You change this in the index.php file around line 186:

    <div id=”ja-topstory” style=”background: url(<?php ja_loadHeader(‘user9’);?>) top left; height: 200px;”>
    <?php mosLoadModules ( ‘user9’,-2 ); ?>
    </div>

    with this:

    <div id=”ja-topstory” style=”top left; height: 200px;”>
    <?php mosLoadModules ( ‘user9’,-2 ); ?>
    <div style=”position:absolute; margin-right:inherit; margin-left:0; z-index:1; visibility: visible” align=”left”>
    <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=”<?php detectWide();?>” height=”200″>
    <param name=”movie” value=”<?php ja_loadHeader(‘user9’);?>” />
    <param name=”quality” value=”high” />
    <param name=”wmode” value=”transparent” />
    <param name=”bgcolor” value=”#ffffff” />
    <embed src=”<?php ja_loadHeader(‘user9’);?>” quality=”high” wmode=”transparent” bgcolor=”#ffffff” pluginspage=”http://www.macromedia.com/go/getflashplayer” type=”application/x-shockwave-flash” width=”<?php detectWide();?>” height=”200″></embed>
    </object>
    </div>
    </div>

    and in the ja_templatetools.php, around line 121:

    foreach ($modules as $module){
    $filename = $module->title;
    $regex = ‘/(.gif)|(.jpg)|(.png)|(.bmp)$/i’;
    if (is_file($ja_template_absolute_path.”/images/header/”.$filename) && preg_match($regex, $filename)) {
    return “$ja_template_path/images/header/” . $filename;
    }
    }
    return “”;

    with this(notice that I only added the “|(.swf)” in the third line):

    foreach ($modules as $module){
    $filename = $module->title;
    $regex = ‘/(.gif)|(.jpg)|(.swf)|(.png)|(.bmp)$/i’;
    if (is_file($ja_template_absolute_path.”/images/header/”.$filename) && preg_match($regex, $filename)) {
    return “$ja_template_path/images/header/” . $filename;
    }
    }
    return “”;

    and in the same file(ja_templatetools.php) add somewhere the following functions (that corrects the witdh of the template if the user changes from wide to narrow and vica versa):

    function detectWide(){
    global $screenWide, $ja_width;
    if ($ja_width==’wide’){
    $screenWide=832;
    }else if($ja_width==’narrow’){
    $screenWide=612;
    }
    echo $screenWide;
    }

    Now place your flash animations in the header directory and enjoy nice animated flash headers! 😎

    P.S. the smiley in the code was put automatically again, for the : D (without space)!

    Hung Dinh Friend
    #210875

    Hi leonida,
    Thank you for posting your hacks, many people will find this very hepful.

    leonida Friend
    #210944

    Hello,

    For anyone intersted I slightly edited the above code in order to make functional the drop down menu over the flash animation.

    edited: If you want to avoid having this box around your flash animation in the latest versions of internet explorer study this page:

    http://www.adobe.com/devnet/activecontent/articles/devletter.html

    and you can adjust your code easily. If you have any questions post them here. I will gladly help.

    Best regards,

Viewing 5 posts - 1 through 5 (of 5 total)

This topic contains 5 replies, has 2 voices, and was last updated by  leonida 18 years, 1 month ago.

We moved to new unified forum. Please post all new support queries in our New Forum