Advanced search  

News:

cpg1.5.46 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter recently discovered vulnerabilities. It is important that all users who run version cpg1.5.44 or older update to this latest version as soon as possible.
[more]

Pages: [1]   Go Down

Author Topic: logo image doesn't change when I create own theme from zaffatasa  (Read 2719 times)

0 Members and 1 Guest are viewing this topic.

BerndS

  • Coppermine newbie
  • Offline Offline
  • Posts: 6

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
Logged

allvip

  • Global Moderator
  • Coppermine addict
  • *****
  • Country: 00
  • Offline Offline
  • Posts: 1290
Re: logo image doesn't change when I create own theme from zaffatasa
« Reply #1 on: January 04, 2016, 04: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.
Logged

BerndS

  • Coppermine newbie
  • Offline Offline
  • Posts: 6
Re: logo image doesn't change when I create own theme from zaffatasa
« Reply #2 on: January 04, 2016, 04: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?
Logged

BerndS

  • Coppermine newbie
  • Offline Offline
  • Posts: 6
Re: logo image doesn't change when I create own theme from zaffatasa
« Reply #3 on: January 04, 2016, 05:26:56 PM »

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

ron4mac

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Posts: 609
Re: logo image doesn't change when I create own theme from zaffatasa
« Reply #4 on: January 04, 2016, 05: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.
Logged

BerndS

  • Coppermine newbie
  • Offline Offline
  • Posts: 6
Re: logo image doesn't change when I create own theme from zaffatasa
« Reply #5 on: January 04, 2016, 06: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.
Logged

klewless

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 107
Re: logo image doesn't change when I create own theme from zaffatasa
« Reply #6 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
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15381
Re: logo image doesn't change when I create own theme from zaffatasa
« Reply #7 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
Logged

klewless

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 107
Re: logo image doesn't change when I create own theme from zaffatasa
« Reply #8 on: June 23, 2016, 03:18:14 AM »

Just saw this. Oh, cool!!  Thank you!


Logged
Pages: [1]   Go Up
 

Page created in 0.07 seconds with 21 queries.