Advanced search  

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]

Pages: [1]   Go Down

Author Topic: I need help adding a link. Thanks.  (Read 5048 times)

0 Members and 1 Guest are viewing this topic.

logopolis

  • Coppermine newbie
  • Offline Offline
  • Posts: 6
I need help adding a link. Thanks.
« 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
« Last Edit: November 09, 2005, 02:26:20 am by TranzNDance »
Logged

COS@RIN

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 24
    • Cosarin Internet
Re: I need help adding a link. Thanks.
« Reply #1 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
« Last Edit: November 08, 2005, 06:09:22 am by cosarin »
Logged

logopolis

  • Coppermine newbie
  • Offline Offline
  • Posts: 6
Re: I need help adding a link. Thanks.
« Reply #2 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
Logged

COS@RIN

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 24
    • Cosarin Internet
Re: I need help adding a link. Thanks.
« Reply #3 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

Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: I need help adding a link. Thanks.
« Reply #4 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> ::
Logged

logopolis

  • Coppermine newbie
  • Offline Offline
  • Posts: 6
Re: I need help adding a link. Thanks.
« Reply #5 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
Logged
Pages: [1]   Go Up
 

Page created in 0.021 seconds with 21 queries.