Thursday, 14 May 2009

#68 - Create a Joomla Flash Logo

 A frequently asked question in the Joomla forums is how to edit the Joomla logo to a flash logo. The following tip shows you how to do this with the default Joomla template.

Go to the template.css in the css folder of your template and change the code <!-- change here --> identified below to suit your needs. Make sure your flash file (referenced here as myjoomlaflashlogo.swf) have uploaded the flash file to images/flash. Make backups!

#ja-headerwrap {
background: #990000;
color: #990000;
line-height: normal;
height: 200px; <!-- change here -->
}

#ja-header { 


position: relative;
height: 200px; <!-- change here -->
width: 600px; <!-- change here -->
}

.ja-headermask {
width: 602px;
display: block;
background: url(../images/header-mask.png) no-repeat top right;
height: 200px; <!-- change here -->
position: absolute;
top: 0;
right: -1px;
}

#ja-header a {
color: #990000;
}

h1.logo, h1.logo-text {
margin: 0 0 0 5px;
padding: 0;
font-size: 180%;
text-transform: uppercase;
}

/*  insert flash instead of image ../images/logo.png*/
h1.logo a {
width: 610px;
display: block;
background: url(../images/flash/myjoomlaflashlogo.swf) no-repeat; <!-- change here -->
height: 160px;
position: relative;
z-index: 100;
}

After these changes, go to the index.php of the template and do the following changes:

<?php 
$siteName = $tmpTools->sitename(); 
if ($tmpTools->getParam('logoType')=='image') { ?>
<h1 class="logo">
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" 
codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0"

width="600" height="200" align="left">
<param name="width" value="600" /><param name="height" value="200" /><param name="align" value="left" />

<param name="src" value="images/flash/myjoomlaflashlogo.swf" /><embed type="application/x-shockwave-flash" width="600" height="200" align="left" src="images/flash/myjoomlaflashlogo.swf"></embed></object>
</h1>
<?php } else { 
$logoText = (trim($tmpTools->getParam('logoText'))=='') ? $config->sitename : $tmpTools->getParam('logoText');
$sloganText = (trim($tmpTools->getParam('sloganText'))=='') ? JText::_('SITE SLOGAN') : $tmpTools->getParam('sloganText'); ?> 

 Obviously you'll need to insert your own parameters for size and Joomla logo flash file where necessary. And do remember to make BACKUPS  before your start! 

Comments
Search RSS
kentccs   |81.199.17.xxx |2009-06-11 10:48:02
awesome! very helpful and useful thanx!
javitolin   |93.172.150.xxx |2009-10-08 15:32:16
i didnt understand where i have to change the second part inside the
index.php..:S:S:S
flovic   |200.51.92.xxx |2009-10-14 12:19:30
It works fine for both firefox and iexplorer, but when navigating in ie It
doesn't load the flash logo, it only loads at first time. Any suggestion?
Thanks
in advance.
priyankatiwari  - nice but..     |122.181.1.xxx |2009-11-16 11:58:17
very nice tutorial..but not working for me ..
Only registered users can write comments!

3.26 Copyright (C) 2008 Compojoom.com / Copyright (C) 2007 Alain Georgette / Copyright (C) 2006 Frantisek Hliva. All rights reserved."

Last Updated ( Thursday, 14 May 2009 )