Hello Friends,
I am creating site but I want to use my won logo as my site logo.
But My logo is gif file. I try to use this from admin section as setting logo with the help of upload and unchecked use default logo option.

Can i use gif or jpg file instead of png.
Please help me.

Aniket

Comments

xabooth’s picture

If you are familiar with html/css you can try opening up page.tpl.php in your theme folder and removing <img src="<?php print $logo ?>" /> and replacing it with <img src"<?php print base_path() . path_to_theme() ?>/path/to/logo-name.gif" />
The theme config option to upload images supports png only, the simplest option would just be to export your image as png :)

aniket.rasal’s picture

Thanks xabooth,
I tried this one but won't work.
i removed the following line

Only local images are allowed. print check_url($logo) " alt=" print $site_name " id="logo" />
and replaced with

Only local images are allowed. print base_path().path_to_theme() http://mysite.com/demo/sites/MyNewSite/files/logo.gif" id="logo" />

Is it correct.
Please reply.

waiting for your reply.

Anonymous’s picture

Yes, if your logo is not that complicated I suggest you edit it to PNG format.

raystin’s picture

hi,caketoad, can u tell me why use png format? i found png is not display very well in ie6~~

Anonymous’s picture

Because you can just drop it inside your themes folder and considering your theme's settings is correct, It will automatically get picked up as the default logo.

with regards to transparency, IE6 is also a big trouble for me but there's a lot of png fixes for IE, I believe there's even a module for it.

zjelev’s picture

I tried this on a custom Zen sub-theme, because my logo.png did not show well in IE6. So I exported it in gif format and renamed the new file logo.gif to logo.png.
Moreover, the original png file was 35 КВ, and after the conversion it shrinked to 2 KB !?

pk_akbar’s picture

Open the file "theme.inc" from "includes" folder... search for "/logo.png" and change it to"/logo.gif" or "/logo.jpg"

vm’s picture

^ the above is a terrible idea. Hacking a core .inc file for a simple logo alteration is silly.

goto administer -> themes -> configure (the theme in use)
locate the logo area
upload new logo in any extension you want

One could also change this at the theme level if they wanted to "hack" away, by hardcoding the logo into page.tpl.php

errata’s picture

<?php
function phptemplate_preprocess_page(&$vars) {
  $vars['logo'] = base_path() . path_to_theme() . '/logo.gif';
}
?>