Advanced search  

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

Pages: [1]   Go Down

Author Topic: logo image doesn't change when I create own theme from zaffatasa  (Read 6329 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

  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Posts: 1362
Re: logo image doesn't change when I create own theme from zaffatasa
« Reply #1 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.
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, 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?
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, 04:26:56 pm »

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

ron4mac

  • Administrator
  • Coppermine addict
  • *****
  • Country: us
  • Offline Offline
  • Posts: 2026
Re: logo image doesn't change when I create own theme from zaffatasa
« Reply #4 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.
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, 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.
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: 15764
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.952 seconds with 20 queries.