forum.coppermine-gallery.net

Support => cpg1.5.x Support => cpg1.5 themes (visuals) => Topic started by: BerndS on January 04, 2016, 12:18:16 pm

Title: logo image doesn't change when I create own theme from zaffatasa
Post by: BerndS on January 04, 2016, 12:18:16 pm
Hello "Happy New Year",

I've just installed coppermine and created a new theme out of zaffatasa following the instructions. It worked well except of the logo inside the sidebar. I cannot change that.

The  html code shows:

<div class="logoimg">
            
            <a href="index.php"><img src="themes/zaffatasa/images/zaffatasa-logo-image.png"></a></div>

I can't find a way to change the sorce for the image.

Kind regards
Title: Re: logo image doesn't change when I create own theme from zaffatasa
Post by: allvip on January 04, 2016, 03:42:38 pm
Just add in themes/zaffatasa/images folder your custom image (png or jpeg or gif, whatever you want) then

REPLACE

Code: [Select]
<div class="logoimg">
           
            <a href="index.php"><img src="themes/zaffatasa/images/zaffatasa-logo-image.png"></a></div>

WITH

Code: [Select]
<div class="logoimg">
           
            <a href="index.php"><img src="themes/zaffatasa/images/YOUR IMAGE NAME.png"></a></div>

OR

Code: [Select]
<div class="logoimg">
           
            <a href="index.php"><img src="themes/zaffatasa/images/YOUR IMAGE NAME.jpg"></a></div>

Replace in the code above YOUR IMAGE NAME with the name of your image.
Title: Re: logo image doesn't change when I create own theme from zaffatasa
Post by: BerndS on January 04, 2016, 03:57:58 pm
Thank you.
That is exactly what I would like to do, but I don't find the file to replace that. It is not in styles.css not in the templete.html and not in theme.php.
Please where do I find that code?
Title: Re: logo image doesn't change when I create own theme from zaffatasa
Post by: BerndS on January 04, 2016, 04:26:56 pm
The code I quoted was taken from the browser with tools. I guess it is generated somehow by coppermine.
Title: Re: logo image doesn't change when I create own theme from zaffatasa
Post by: ron4mac on January 04, 2016, 04:53:34 pm
What you're looking for is in the theme's template.html file.

Code: [Select]
<td class="sidebarBG" bgcolor="#d8caa4" valign="top">
<div class="logoimg">
<a href="index.php"><img src="themes/zaffatasa/images/zaffatasa-logo-image.png"/></a>
</div>
<div class="sidebar">
<div class="topmenu">{SYS_MENU}</div>
<div class="topmenu">{SUB_MENU}</div>
<div class="topmenu">{ADMIN_MENU}</div>
</div>
</td>

That section, by the way, is improperly enclosed in a DIV tag that should be removed.
Title: Re: logo image doesn't change when I create own theme from zaffatasa
Post by: BerndS on January 04, 2016, 05:13:33 pm
Oh sorry, I was so stupid. I opened the templete from my ftp-client and it showed up in the browser. So I only saw the markers and a little layout.
It is crazy. Sorry again.
So the problem is solved.
Title: Re: logo image doesn't change when I create own theme from zaffatasa
Post by: klewless on June 19, 2016, 02:03:19 pm
This is a beautiful theme. I am going to make the same changes. However... I had another idea too.

My gallery is bridged with an SMF/TP forum. Is there some way to make the user's avatar appear on the sidebar instead of that little mountain?
Can I copy some code which works on my SMF skin and replace what's there with that?

Thanks in advance
Title: Re: logo image doesn't change when I create own theme from zaffatasa
Post by: Αndré on June 20, 2016, 10:06:37 am
If you know how to get the path to the avatar file, this should be a quite easy mod.

Open template.html, find
Code: [Select]
themes/zaffatasa/images/zaffatasa-logo-image.pngand replace with
Code: [Select]
{AVATAR}
Now, open theme.php and add the function pageheader from theme/sample/theme.php, if it doesn't exist yet. Then, find
Code: [Select]
$template_vars = CPGPluginAPI::filter('theme_pageheader_params', $template_vars);and above, add something like that:
Code: [Select]
$template_vars['{AVATAR}'] = // insert the path to the user's avatar file here - don't forget to add a fallback if the user has no avatar, e.g. the default zaffatasa-logo-image.png
Title: Re: logo image doesn't change when I create own theme from zaffatasa
Post by: klewless on June 23, 2016, 03:18:14 am
Just saw this. Oh, cool!!  Thank you!