logo image doesn't change when I create own theme from zaffatasa logo image doesn't change when I create own theme from zaffatasa
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

logo image doesn't change when I create own theme from zaffatasa

Started by BerndS, January 04, 2016, 12:18:16 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

BerndS

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

allvip

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.

BerndS

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?

BerndS

The code I quoted was taken from the browser with tools. I guess it is generated somehow by coppermine.

ron4mac

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.

BerndS

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.

klewless

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

ΑndrĂ©

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

klewless