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: Future mods to coppermine (custom admin settable menu )link  (Read 3130 times)

0 Members and 1 Guest are viewing this topic.

Chickenkicker

  • Coppermine newbie
  • Offline Offline
  • Posts: 16
Future mods to coppermine (custom admin settable menu )link
« on: February 10, 2005, 02:37:47 pm »

It would be nice if you featured a url link so that when doing configuration of the gallery, you could enter the url back to your homepage for the website the gallery is installed on.. I know this is a minor edit, but for some this is a rough task, if it were included and appeared on the cfg screen, that would be, easy, practical and time saving.. Just a thought!

Thanks
« Last Edit: March 06, 2005, 08:03:43 pm by TranzNDance »
Logged

Casper

  • VIP
  • Coppermine addict
  • ***
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 5231
Re: Future mods to coppermine
« Reply #1 on: February 10, 2005, 02:52:17 pm »

Good idea,

I think I'll look into making this.
Logged
It has been a long time now since I did my little bit here, and have done no coding or any other such stuff since. I'm back to being a noob here

Casper

  • VIP
  • Coppermine addict
  • ***
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 5231
Re: Future mods to coppermine (custom admin settable menu )link
« Reply #2 on: February 10, 2005, 03:53:45 pm »

OK, here's a mod to easily add a custom link into the gallery main menu, by setting it in config.
Whilst it would probably still be easier just to hard code it in the theme.php than applying as a mod, this may well be put in the next version.

Open your lang.php (english.php shown here).

Find;

Code: [Select]
array('Allow ZIP-download of favorites', 'enable_zipdownload', 1),
Add after, in new line;
Code: [Select]
  array('Custom menu link name', 'custom_lnk_name', 0),
  array('Custom menu link URL', 'custom_lnk_url', 0),

 
 
Open sql/update.sql.

Add, at the end;

Code: [Select]
INSERT INTO CPG_config VALUES ('custom_lnk_name', '');
INSERT INTO CPG_config VALUES ('custom_lnk_url', '');

Note, DO NOT change the above, regardless of your table prefixes, this will work correctly.



Open your theme.php.

Find;

Code: [Select]
<span class="topmenu">
Add, in new line immediately after (shown here for classic, other formatting may be required for other themes);

Code: [Select]
<!-- BEGIN custom_link -->
<a href="{CUSTOM_LNK_TGT}" title="{CUSTOM_LNK_TITLE}">{CUSTOM_LNK_LNK}</a> ::
<!-- END custom_link -->


Find;

 
Code: [Select]
$my_gallery_id = FIRST_USER_CAT + USER_ID;
Add, immediately after;


Code: [Select]
if (!$CONFIG['custom_lnk_url'] != '') {
        template_extract_block($template_main_menu, 'custom_link');
    }



Find;

Code: [Select]
'{ALB_LIST_LNK}' => $lang_main_menu['alb_list_lnk'],

Add, in new line, immediately after;

Code: [Select]
'{CUSTOM_LNK_TGT}' => $CONFIG['custom_lnk_url'],
'{CUSTOM_LNK_TITLE}' => $CONFIG['custom_lnk_name'],
'{CUSTOM_LNK_LNK}' => $CONFIG['custom_lnk_name'],
      
      
      
Save all the above files, and upload them to the server, in the relevent folders.

Run update.php, by browsing to your gallery/update.php.
Then go into config, and fill in the details of the link name and url.

« Last Edit: February 10, 2005, 04:11:12 pm by Casper »
Logged
It has been a long time now since I did my little bit here, and have done no coding or any other such stuff since. I'm back to being a noob here
Pages: [1]   Go Up
 

Page created in 0.02 seconds with 20 queries.