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: Getting Started : Customizing  (Read 2739 times)

0 Members and 1 Guest are viewing this topic.

Cyco

  • Coppermine newbie
  • Offline Offline
  • Posts: 3
Getting Started : Customizing
« on: January 27, 2005, 07:47:14 am »

Hi
I just installed the gallery. Which file should I modify to customize my site.? For example I need to "MyDomain.com" text on top & change coppermine logo to mysite's logo.

Thanks in advance
Logged

donnoman

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1615
  • From donovanbray.com
    • Donovan Bray
Re: Getting Started : Customizing
« Reply #1 on: January 27, 2005, 08:00:56 am »

Read the sticky in the EXACT forum you posted in.

creating a skin, where to start?
Logged

Cyco

  • Coppermine newbie
  • Offline Offline
  • Posts: 3
Re: Getting Started : Customizing
« Reply #2 on: January 27, 2005, 09:00:34 am »

That askes to start by modifing theme.php under my theme. If I be more specific on my questions,
1)I know I can remove top menu item by commenting "<a href="{LASTUP_TGT}">{LASTUP_LNK}</a>" parts.
But how can I make it visible when loged as "admin" ?

2) How to temove the "myDomain.com" heading on top. I cant find any clue in theme.php

Thanks
Logged

Abbas Ali

  • Administrator
  • Coppermine addict
  • *****
  • Country: in
  • Offline Offline
  • Gender: Male
  • Posts: 2165
  • Spread the PHP Web
    • Ranium Systems
Re: Getting Started : Customizing
« Reply #3 on: January 27, 2005, 12:43:02 pm »

1)I know I can remove top menu item by commenting "<a href="{LASTUP_TGT}">{LASTUP_LNK}</a>" parts.
But how can I make it visible when loged as "admin" ?

You will have to edit pageheader function in theme.php and apply condition to check whether the user is admin before building each menu.

Code: [Select]
if (GALLERY_ADMIN_MODE) {
  //code to build menu/link
}

2) How to temove the "myDomain.com" heading on top. I cant find any clue in theme.php

Look for it in template.html in theme folder.
Logged
Chief Geek at Ranium Systems

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Getting Started : Customizing
« Reply #4 on: January 27, 2005, 01:02:39 pm »

You will have to edit pageheader function in theme.php and apply condition to check whether the user is admin before building each menu.
not quite, you can use the existing menus: edit themes/yourtheme/theme.php, find
Code: [Select]
<a href="{LASTUP_TGT}">{LASTUP_LNK}</a> ::and replace with
Code: [Select]
<!--<a href="{LASTUP_TGT}">{LASTUP_LNK}</a> ::-->Next, find
Code: [Select]
// HTML template for gallery admin menu
$template_gallery_admin_menu = <<<EOT

                <div align="center">
                <table cellpadding="0" cellspacing="1">
                        <tr>
and add after it
Code: [Select]
<td class="admin_menu"><a href="{LASTUP_TGT}">{LASTUP_LNK}</a></td>Then, find
Code: [Select]
    if (GALLERY_ADMIN_MODE) {
        $param = array('{CATL}' => $cat_l,
            '{UPL_APP_LNK}' => $lang_gallery_admin_menu['upl_app_lnk'],
            '{CONFIG_LNK}' => $lang_gallery_admin_menu['config_lnk'],
            '{ALBUMS_LNK}' => $lang_gallery_admin_menu['albums_lnk'],
            '{CATEGORIES_LNK}' => $lang_gallery_admin_menu['categories_lnk'],
            '{USERS_LNK}' => $lang_gallery_admin_menu['users_lnk'],
            '{GROUPS_LNK}' => $lang_gallery_admin_menu['groups_lnk'],
            '{COMMENTS_LNK}' => $lang_gallery_admin_menu['comments_lnk'],
            '{SEARCHNEW_LNK}' => $lang_gallery_admin_menu['searchnew_lnk'],
            '{MY_PROF_LNK}' => $lang_user_admin_menu['my_prof_lnk'],
            '{UTIL_LNK}' => $lang_gallery_admin_menu['util_lnk'],
            '{BAN_LNK}' => $lang_gallery_admin_menu['ban_lnk'],
            '{DB_ECARD_LNK}' => $lang_gallery_admin_menu['db_ecard_lnk'],
            );
and replace with
Code: [Select]
    if (GALLERY_ADMIN_MODE) {
        $param = array('{CATL}' => $cat_l,
            '{UPL_APP_LNK}' => $lang_gallery_admin_menu['upl_app_lnk'],
            '{CONFIG_LNK}' => $lang_gallery_admin_menu['config_lnk'],
            '{ALBUMS_LNK}' => $lang_gallery_admin_menu['albums_lnk'],
            '{CATEGORIES_LNK}' => $lang_gallery_admin_menu['categories_lnk'],
            '{USERS_LNK}' => $lang_gallery_admin_menu['users_lnk'],
            '{GROUPS_LNK}' => $lang_gallery_admin_menu['groups_lnk'],
            '{COMMENTS_LNK}' => $lang_gallery_admin_menu['comments_lnk'],
            '{SEARCHNEW_LNK}' => $lang_gallery_admin_menu['searchnew_lnk'],
            '{MY_PROF_LNK}' => $lang_user_admin_menu['my_prof_lnk'],
            '{UTIL_LNK}' => $lang_gallery_admin_menu['util_lnk'],
            '{BAN_LNK}' => $lang_gallery_admin_menu['ban_lnk'],
            '{DB_ECARD_LNK}' => $lang_gallery_admin_menu['db_ecard_lnk'],
            '{LASTUP_TGT}' => "thumbnails.php?album=lastup$cat_l2",
            '{LASTUP_LNK}' => $lang_main_menu['lastup_lnk'],
            );
Save the file and upload it to your webserver. Make a backup of the file before modifying it, so you can savely go back if something goes wrong.

Joachim
Logged
Pages: [1]   Go Up
 

Page created in 0.017 seconds with 21 queries.