By Ali Majdzadeh Kohbanani on
Hello All,
How is it possible to use flash in the header of the Garland theme? What I mean by "header" is not the block region; it is where the site name and site logo are displayed.
Kind Regards
Ali Majdzadeh Kohbanani
Comments
which image u want to be
which image u want to be replaced by flash?
let me do a demo for u.
Banner Image
Hello mm167,
Consider Garland theme, there is a blue region where the site logo and the site name are placed. I want to replace this region by a flash animation. I am not sure, but I think it is the images/body.png file which is rendered by css in a way that constructs the region which I mention. I will post a screen shot from the region. Check it at the following address:
http://drupal.org/node/350665
Kind Regards
Ali Majdzadeh Kohbanani
want just a hard code
want just a hard code solution? or a full new theme?
by the way, the region, as in your screen shot, contains a blue background + a drupal logo + a site name.
I believe u want to replace the ( drupal logon + site name ) by a flash swf, right?
is your swf ready? what's the size of your swf? is it fit into the region?
if your swf is ready, I may show u how to do it in the hard code way. But for a full new theme, it may takes time.
About the SWF
Dear mm167,
Hello
Yes, I need a hard code solution, because my base theme is Garland. The size and other properties of the swf are OK. I need the blue background + site logo + site name to be replaced by the swf which contains all those elements itself.
Thanks a lot.
Kind Regards
Ali Majdzadeh Kohbanani
see if this is what u want
see if this is what u want ..
http://drupalway.com login as user=demo (psw=demo).
if u dont see the swf logo, select the 'swflogo' theme after login.
can u click the drupal logo? ..try ...
Exactly
mm167,
Hello
Yes, this is exactly what I am trying to achieve. I want to have a swf like yours and where yours is placed.
Thanks.
Kind Regards
Ali Majdzadeh Kohbanani
u dont have your swf?
u dont have your swf?
Yes
mm167,
Hi
Yes, I do have it. Would you please explain what I should do to make it appear in that region?
Kind Regards
Ali Majdzadeh Kohbanani
do u know how to make a new
do u know how to make a new theme?
I know, but ...
mm167,
I know how to do it, but as I explained before, I need to have Garland as my base theme.
Kind Regards
Ali Majdzadeh Kohbanani
1. copy the Garland theme to
1. copy the Garland theme to sites/all/themes and rename it as u like
2. modify the .info file accordingly
3. put swfobject.js in the folder (do u have/know this file?)
4. put your logo swf file in the folder
5. modify the page.tpl.php ...
6. active the new theme and set as default
modify the page.tpl.php:
1. add the following lines after "< ? php print $scripts ? >", add the "< ? php" and "? >" before and after the lines. replace xxxxxx by your theme folder name
global $base_url;
$swfjs = $base_url . '/' . drupal_get_path('theme','xxxxxx') . '/swfobject.js';
$x = '
';
print $x;
2. find "if($logo)" and "if ($site_name)", replace the lines in between as follows:
replace yyyy.swf by yout swf file name, wwww= width, hhhh=height of your wf
remove the space from the div and script tags
if ($logo) {
global $base_url;
$swffile = $base_url . '/' . drupal_get_path('theme','xxxxxx') . '/yyyyy.swf';
$x = '< d iv id="logoswf">< /div>'
. '< script type="text/javascript">'
. 'var s1 = new SWFObject("'.$swffile.'","logoswf","wwww","hhhh","9");'
. 's1.write("logoswf");'
. "< /script>";
print $x;
}
if ($site_name)
that's all ..
enjoy
Thanks
mm167,
Thanks a lot for your solution. I am going to give it a try. I will inform you about the results. Thanks again.
Kind Regards
Ali Majdzadeh Kohbanani
let me know if I may access
good day.
I am working on it
Hello mm167,
I am working on it. I will inform you immediately after I finished the job.
Thank you so much for your help.
Kind Regards
Ali Majdzadeh Kohbanani
hi mm167 I m following your
hi mm167
I m following your instruction to insert flash logo in my garland theme, I don't know where to get the swfobject.js file, can you tell me more about this swfobject.js?
thanks
The SWFObject download is
Thanks for the tutorial mm167.
@p1in9 - you will find the SWFObject download and documentation here - http://code.google.com/p/swfobject/
How about the name?
Is there a way I can replace the site name (and NOT the logo) by an image? So that way I can have both the logo image and a banner-like thing replacing the region?
Any solutions are welcome. Have been breaking my head over this for over a week.
Thanks a ton.