forum.coppermine-gallery.net

Support => cpg1.3.x Support => Older/other versions => cpg1.3 Themes/Skins/Templates => Topic started by: logopolis on November 08, 2005, 01:01:21 am

Title: I need help adding a link. Thanks.
Post by: logopolis on November 08, 2005, 01:01:21 am
Hi

In the Links section at the top of the page where it has the following links seen below, I want to add another link just above "Album list ::  Login". This will be the Return link "Return To QM" to take users back to specified QM homepage that they originally used to arrive at the Coppermine Photo Gallery.

I also want to make the LOGO in the top left corner to take users back to the specified QM homepage. Currently it's set to the default which is to take users back to the Coppermine Photo Gallery front page.


----------
<< I want the 'Return To QM' link here >>
Album list ::  Login
Last uploads :: Last comments :: Most viewed :: Top rated :: My Favorites :: Search
----------

AND HERE

----------
<< I want the 'Return To QM' link here >>
Album list ::  My gallery ::  User mode ::  Upload file ::  Logout [username]
Last uploads :: Last comments :: Most viewed :: Top rated :: My Favorites :: Search
----------



If anyone can guide me on how to do this and what files I need to modify then that would be great.

Regards,
Logopolis
Title: Re: I need help adding a link. Thanks.
Post by: COS@RIN on November 08, 2005, 01:10:27 am
All you need to do is alter the template.html you are using contained within the templates album and the name of your theme.

for example.

your_gallery_base_folder/themes/classic/template.html

simply add your link as a HTML link above {MAIN_MENU}

And dont forget to add <class="admin_menu> or whatever style you are using for your main gallery menu style.

You can also alter the link of the header logo image at this point as well

Hope this helps

COS@RIN
Title: Re: I need help adding a link. Thanks.
Post by: logopolis on November 08, 2005, 01:53:41 am
Hi

Thanks for your reply. I had a go trying to edit the files. I had success with modifying the LOGO link by editing the "template.html". I've now got that pointing to the website I want it to return to.

However, I've not had much luck with adding the "Return To QM" link above the other menu links.

In my theme I have these three files:

Template.html
Index.php
Theme.php


I edited the 'theme.php' of my theme and above tried to add a HTML link above {MAIN_MENU} as seen below:

------
<class="admin_menu"><a href="http://www.my_domain_here.com/home">Return to QM</a>
'{MAIN_MENU}' => theme_main_menu(),
------

It gave me this error:

Parse error: parse error, unexpected '<', expecting ')' in /public_html/gallery/themes/prakash/theme.php on line 820

Maybe I'm missing something obvious here, but any ideas what went wrong?

Thanks.
Logopolis
Title: Re: I need help adding a link. Thanks.
Post by: COS@RIN on November 08, 2005, 06:06:30 am
I really appologise, I was suppost to tell you to add the link above {MAIN_MENU} in template.html not theme.php.

I have changed this in my original reply too.

COSARIN

Title: Re: I need help adding a link. Thanks.
Post by: Joachim Müller on November 08, 2005, 07:58:35 am
Cosarin is right, you can add links in the way he describes. To make the link match even better to the navigation links you already have, edit themes/yourtheme/theme.php, find
Code: [Select]
$template_main_menu = <<<EOT
                <span class="topmenu">
and add after it (in a new line)
Code: [Select]
                        <a href="your/link/target/here.html" title="Return To QM">Return To QM</a> ::
Title: Re: I need help adding a link. Thanks.
Post by: logopolis on November 09, 2005, 12:18:20 am
Hi

Thanks for your help, it was much appreciated!

Thanks to the two of you, I've now got the links installed and working as I want them!

Regards,
Logopolis