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: [Solved]: Adding photo links to the top of my gallery  (Read 2437 times)

0 Members and 1 Guest are viewing this topic.

disposition

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 183
[Solved]: Adding photo links to the top of my gallery
« on: April 02, 2008, 05:52:11 pm »

Hi,

If you look at my gallery you will see the links "FORUM, CHAT, NEWSBLOG, CONTEST.  I want to change these into photo images but I am not sure how to do this.  I hope you can help.

I attached my theme just in case you need it.
The folder in the zip called "logopics" these are the photos that I want in replace of the links.

www.blackdeathmetal.com

« Last Edit: April 03, 2008, 07:58:58 am by Joachim Müller »
Logged

steveeh131047

  • Supporter
  • Coppermine frequent poster
  • ****
  • Offline Offline
  • Posts: 217
Re: Adding photo links to the top of my gallery
« Reply #1 on: April 02, 2008, 06:20:10 pm »

Not sure if this is a good way, or the best way, but it worked when I just tried it on my development site.

I like to edit "gallery/themes/yourtheme/theme.php" so that the menu items added by the addbutton function are "hard coded", rather than picking up the {tokens}. I just tried swapping one of my menu names in theme.php with <img src="thumbnail.jpg"> and it worked fine; the menu name was replaced by the image and it still linked OK.
Logged

disposition

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 183
Re: Adding photo links to the top of my gallery
« Reply #2 on: April 02, 2008, 09:02:15 pm »

Thanks for the reply, I guess I just don't get what I am supposed to change in the theme.  You are obviously a bit more rehearsed than me. :)

Logged

disposition

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 183
Re: Adding photo links to the top of my gallery
« Reply #3 on: April 02, 2008, 09:20:41 pm »

O.K. I got the logos on now I just have to make them look correct.  Thanks for your help.
Logged

steveeh131047

  • Supporter
  • Coppermine frequent poster
  • ****
  • Offline Offline
  • Posts: 217
Re: Adding photo links to the top of my gallery
« Reply #4 on: April 02, 2008, 09:24:59 pm »

I'm also relatively new to cpg - I'm sure if the following is not right one of the Dev Team will correct me  :)

In your theme.php file you should be able to find something like this:

Code: [Select]
  // HTML template for template sys_menu buttons
    // {HREF_LNK}{HREF_TITLE}{HREF_TGT}{BLOCK_ID}{SPACER}
    addbutton($sys_menu_buttons,'{HOME_LNK}','{HOME_TITLE}','{HOME_TGT}','home',$template_sys_menu_spacer);

with probably a lot more addbutton function calls to add all the required menu items. The "tokens" between the "curly brackets" get filled in when the page is dynamically generated by the cpg core PHP stuff. The tokens are typically filled in from information you have entered in the Config section.

But you can (and I do) replace the token placeholders with your own "hard coded" material; I find it a bit easier when I'm developing to edit theme.php than work through the Config section. So, for example, the above addbutton call could be replaced with:
Code: [Select]
    addbutton($sys_menu_buttons,'Home','Go to the home page','/','home',$template_sys_menu_spacer);
Then if you want to replace the menu word 'Home' with an image, it becomes:

Code: [Select]
    addbutton($sys_menu_buttons,'<img src="themes/mytheme/images/image.jpg">','Go to the home page','/','home',$template_sys_menu_spacer);
Hope that helps, and that I'm not too far off the mark!

Logged

disposition

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 183
Re: Adding photo links to the top of my gallery
« Reply #5 on: April 03, 2008, 12:51:40 am »

Thanks for updating I used the original way and it seems to work perfect, I don't seem to have any issues with it at all.  Thanks for taking your time and helping me.

www.blackdeathmetal.com
Logged
Pages: [1]   Go Up
 

Page created in 0.018 seconds with 19 queries.