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
-
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
-
Just add in themes/zaffatasa/images folder your custom image (png or jpeg or gif, whatever you want) then
REPLACE
<div class="logoimg">
<a href="index.php"><img src="themes/zaffatasa/images/zaffatasa-logo-image.png"></a></div>
WITH
<div class="logoimg">
<a href="index.php"><img src="themes/zaffatasa/images/YOUR IMAGE NAME.png"></a></div>
OR
<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.
-
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?
-
The code I quoted was taken from the browser with tools. I guess it is generated somehow by coppermine.
-
What you're looking for is in the theme's template.html file.
<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.
-
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.
-
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
-
If you know how to get the path to the avatar file, this should be a quite easy mod.
Open template.html, find
themes/zaffatasa/images/zaffatasa-logo-image.png
and replace with
{AVATAR}
Now, open theme.php and add the function pageheader from theme/sample/theme.php, if it doesn't exist yet. Then, find
$template_vars = CPGPluginAPI::filter('theme_pageheader_params', $template_vars);
and above, add something like that:
$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
-
Just saw this. Oh, cool!! Thank you!