coppermine-gallery.com/forum

Support => cpg1.4.x Support => Older/other versions => cpg1.4 themes/skins/templates => Topic started by: disposition on April 02, 2008, 05:52:11 PM

Title: [Solved]: Adding photo links to the top of my gallery
Post by: disposition 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

Title: Re: Adding photo links to the top of my gallery
Post by: steveeh131047 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.
Title: Re: Adding photo links to the top of my gallery
Post by: disposition 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. :)

Title: Re: Adding photo links to the top of my gallery
Post by: disposition 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.
Title: Re: Adding photo links to the top of my gallery
Post by: steveeh131047 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:

  // 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:
    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:

    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!

Title: Re: Adding photo links to the top of my gallery
Post by: disposition 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