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: Custom menu link  (Read 2524 times)

0 Members and 1 Guest are viewing this topic.

Larsanna

  • Coppermine newbie
  • Offline Offline
  • Gender: Male
  • Posts: 18
    • Private Site
Custom menu link
« on: January 20, 2006, 06:40:50 pm »

Hi,

I am using the custom menu link in CPG 1.4.3, but how do I make the link open in a new window/tab and not to self...???


Mr-Q
http://www.larsanna.com/gallery/
Logged

Paver

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 1609
  • Paul V.
Re: Custom menu link
« Reply #1 on: January 22, 2006, 04:45:29 am »

Here's a crude way to do what you want.  In your theme.php, modify the SUB_MENU button as shown:
Code: [Select]
addbutton($sub_menu_buttons,'{CUSTOM_LNK_LNK}','{CUSTOM_LNK_TITLE}','{CUSTOM_LNK_TGT}" target="_blank','custom_link',$template_sub_menu_spacer);
A better way is to read through this thread and apply its suggestions to the custom link button:
http://forum.coppermine-gallery.net/index.php?topic=25580.0.

Depending upon which theme you are using, you may not have the addbutton line shown above in your theme.php.  If you have $template_sub_menu in there and you see a <!-- BEGIN custom_link --> section, modify that section replacing {CUSTOM_LNK_TGT} with:
Code: [Select]
{CUSTOM_LNK_TGT}" target="_blank
If you don't have either, copy the whole section from the sample theme's theme.php.  For more details, search for a thread that discusses modifying the SUB_MENU or SYS_MENU in your theme.
Logged
Pages: [1]   Go Up
 

Page created in 0.037 seconds with 19 queries.