I need help adding a link. Thanks. I need help adding a link. Thanks.
 

News:

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

Main Menu

I need help adding a link. Thanks.

Started by logopolis, November 08, 2005, 01:01:21 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

logopolis

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

COS@RIN

#1
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

logopolis

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

COS@RIN

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


Joachim Müller

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$template_main_menu = <<<EOT
                <span class="topmenu">
and add after it (in a new line)                        <a href="your/link/target/here.html" title="Return To QM">Return To QM</a> ::

logopolis

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