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: moving links to admin area  (Read 5127 times)

0 Members and 1 Guest are viewing this topic.

rayne

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 24
moving links to admin area
« on: November 09, 2003, 12:35:53 am »

Hi-- I'm trying to figure out how to move the links Album list :: Last uploads :: Last comments :: Most viewed :: Top rated :: My Favorites :: Search to show up only when in the admin mode and not in the user mode. I can comment them out in the theme.php to not not up at all, but I can't figure out how to make them show up in just the admin mode.  Can anybody help me?
Thanks.
--Rayne
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
moving links to admin area
« Reply #1 on: November 09, 2003, 09:25:22 am »

notice the line
Code: [Select]
// HTML template for gallery admin menuin theme.php? Things that are supposed to turn up when the admin is logged in should go there.

GauGau
Logged

rayne

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 24
moving links to admin area
« Reply #2 on: November 10, 2003, 03:45:48 pm »

I did notice that line, but I thought that controlled the buttons that appear when you are in admin mode. I'm trying to move the text lnks which appear above those buttons. (like Album list :: Last uploads :: Last comments :: Most viewed :: Top rated :: My Favorites :: Search )  I would like those  to show up only in the admin mode when an admin is logged in, not when someone is just viewing the album. I want them to show up only when Upload picture and logout appears.  

Thanks for the response and sorry I didn't make myself clear.
--Rayne
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
moving links to admin area
« Reply #3 on: November 10, 2003, 05:37:10 pm »

that's what the user admin is for in the theme.php:
Code: [Select]
// HTML template for user admin menu

GauGau
Logged

the2jakes

  • Coppermine newbie
  • Offline Offline
  • Posts: 1
moving links to admin area
« Reply #4 on: December 17, 2003, 09:02:20 pm »

Here's a solution to remove thse link: "Last uploads :: Last comments :: Most viewed :: Top rated :: My Favorites :: Search  " from the standard USER mode, and make them only appear in admin mode

This solves a pb I noticed: when u are in user mode you can access photos you shouldn't have access to, simply by clicking on these links...)

 So, I modified the theme.php file like this:

----

Search for this in the theme.php file of the theme you are using:
Code: [Select]
$param = array('{ALB_LIST_TGT}' => "index.php$cat_l",
        '{ALB_LIST_TITLE}' => $lang_main_menu['alb_list_title'],
        '{ALB_LIST_LNK}' => $lang_main_menu['alb_list_lnk'],
        '{MY_GAL_TGT}' => "index.php?cat=$my_gallery_id",
        '{MY_GAL_TITLE}' => $lang_main_menu['my_gal_title'],
        '{MY_GAL_LNK}' => $lang_main_menu['my_gal_lnk'],
        '{MY_PROF_TGT}' => "profile.php?op=edit_profile",
        '{MY_PROF_LNK}' => $lang_main_menu['my_prof_lnk'],
        '{ADM_MODE_TGT}' => "admin.php?admin_mode=1&referer=$REFERER",
        '{ADM_MODE_TITLE}' => $lang_main_menu['adm_mode_title'],
        '{ADM_MODE_LNK}' => $lang_main_menu['adm_mode_lnk'],
        '{USR_MODE_TGT}' => "admin.php?admin_mode=0&referer=$REFERER",
        '{USR_MODE_TITLE}' => $lang_main_menu['usr_mode_title'],
        '{USR_MODE_LNK}' => $lang_main_menu['usr_mode_lnk'],
        '{UPL_PIC_TGT}' => "upload.php",
        '{UPL_PIC_TITLE}' => $lang_main_menu['upload_pic_title'],
        '{UPL_PIC_LNK}' => $lang_main_menu['upload_pic_lnk'],
        '{REGISTER_TGT}' => "register.php",
        '{REGISTER_TITLE}' => $lang_main_menu['register_title'],
        '{REGISTER_LNK}' => $lang_main_menu['register_lnk'],
        '{LOGIN_TGT}' => "login.php?referer=$REFERER",
        '{LOGIN_LNK}' => $lang_main_menu['login_lnk'],
        '{LOGOUT_TGT}' => "logout.php?referer=$REFERER",
        '{LOGOUT_LNK}' => $lang_main_menu['logout_lnk'] . " [" . USER_NAME . "]",
        '{LASTUP_TGT}' => "thumbnails.php?album=lastup$cat_l2",
        '{LASTUP_LNK}' => $lang_main_menu['lastup_lnk'],
        '{LASTCOM_TGT}' => "thumbnails.php?album=lastcom$cat_l2",
        '{LASTCOM_LNK}' => $lang_main_menu['lastcom_lnk'],
        '{TOPN_TGT}' => "thumbnails.php?album=topn$cat_l2",
        '{TOPN_LNK}' => $lang_main_menu['topn_lnk'],
        '{TOPRATED_TGT}' => "thumbnails.php?album=toprated$cat_l2",
        '{TOPRATED_LNK}' => $lang_main_menu['toprated_lnk'],
        '{FAV_TGT}' => "thumbnails.php?album=favpics",
        '{FAV_LNK}' => $lang_main_menu['fav_lnk'],
        '{SEARCH_TGT}' => "search.php",
        '{SEARCH_LNK}' => $lang_main_menu['search_lnk'],
        );

       
       
       
 and replace it with that:
 
Code: [Select]
if (GALLERY_ADMIN_MODE || USER_ADMIN_MODE) {

    $param = array('{ALB_LIST_TGT}' => "index.php$cat_l",
        '{ALB_LIST_TITLE}' => $lang_main_menu['alb_list_title'],
        '{ALB_LIST_LNK}' => $lang_main_menu['alb_list_lnk'],
        '{MY_GAL_TGT}' => "index.php?cat=$my_gallery_id",
        '{MY_GAL_TITLE}' => $lang_main_menu['my_gal_title'],
        '{MY_GAL_LNK}' => $lang_main_menu['my_gal_lnk'],
        '{MY_PROF_TGT}' => "profile.php?op=edit_profile",
        '{MY_PROF_LNK}' => $lang_main_menu['my_prof_lnk'],
        '{ADM_MODE_TGT}' => "admin.php?admin_mode=1&referer=$REFERER",
        '{ADM_MODE_TITLE}' => $lang_main_menu['adm_mode_title'],
        '{ADM_MODE_LNK}' => $lang_main_menu['adm_mode_lnk'],
        '{USR_MODE_TGT}' => "admin.php?admin_mode=0&referer=$REFERER",
        '{USR_MODE_TITLE}' => $lang_main_menu['usr_mode_title'],
        '{USR_MODE_LNK}' => $lang_main_menu['usr_mode_lnk'],
        '{UPL_PIC_TGT}' => "upload.php",
        '{UPL_PIC_TITLE}' => $lang_main_menu['upload_pic_title'],
        '{UPL_PIC_LNK}' => $lang_main_menu['upload_pic_lnk'],
        '{REGISTER_TGT}' => "register.php",
        '{REGISTER_TITLE}' => $lang_main_menu['register_title'],
        '{REGISTER_LNK}' => $lang_main_menu['register_lnk'],
        '{LOGIN_TGT}' => "login.php?referer=$REFERER",
        '{LOGIN_LNK}' => $lang_main_menu['login_lnk'],
        '{LOGOUT_TGT}' => "logout.php?referer=$REFERER",
        '{LOGOUT_LNK}' => $lang_main_menu['logout_lnk'] . " [" . USER_NAME . "]",
        '{LASTUP_TGT}' => "thumbnails.php?album=lastup$cat_l2",
        '{LASTUP_LNK}' => $lang_main_menu['lastup_lnk'],
        '{LASTCOM_TGT}' => "thumbnails.php?album=lastcom$cat_l2",
        '{LASTCOM_LNK}' => $lang_main_menu['lastcom_lnk'],
        '{TOPN_TGT}' => "thumbnails.php?album=topn$cat_l2",
        '{TOPN_LNK}' => $lang_main_menu['topn_lnk'],
        '{TOPRATED_TGT}' => "thumbnails.php?album=toprated$cat_l2",
        '{TOPRATED_LNK}' => $lang_main_menu['toprated_lnk'],
        '{FAV_TGT}' => "thumbnails.php?album=favpics",
        '{FAV_LNK}' => $lang_main_menu['fav_lnk'],
        '{SEARCH_TGT}' => "search.php",
        '{SEARCH_LNK}' => $lang_main_menu['search_lnk'],
        );
       
        }else{
       
    $param = array('{ALB_LIST_TGT}' => "index.php$cat_l",
        '{ALB_LIST_TITLE}' => $lang_main_menu['alb_list_title'],
        '{ALB_LIST_LNK}' => $lang_main_menu['alb_list_lnk'],
        '{MY_GAL_TGT}' => "index.php?cat=$my_gallery_id",
        '{MY_GAL_TITLE}' => $lang_main_menu['my_gal_title'],
        '{MY_GAL_LNK}' => $lang_main_menu['my_gal_lnk'],
        '{MY_PROF_TGT}' => "profile.php?op=edit_profile",
        '{MY_PROF_LNK}' => $lang_main_menu['my_prof_lnk'],
        '{ADM_MODE_TGT}' => "admin.php?admin_mode=1&referer=$REFERER",
        '{ADM_MODE_TITLE}' => $lang_main_menu['adm_mode_title'],
        '{ADM_MODE_LNK}' => $lang_main_menu['adm_mode_lnk'],
        '{USR_MODE_TGT}' => "admin.php?admin_mode=0&referer=$REFERER",
        '{USR_MODE_TITLE}' => $lang_main_menu['usr_mode_title'],
        '{USR_MODE_LNK}' => $lang_main_menu['usr_mode_lnk'],
        '{UPL_PIC_TGT}' => "upload.php",
        '{UPL_PIC_TITLE}' => $lang_main_menu['upload_pic_title'],
        '{UPL_PIC_LNK}' => $lang_main_menu['upload_pic_lnk'],
        '{REGISTER_TGT}' => "register.php",
        '{REGISTER_TITLE}' => $lang_main_menu['register_title'],
        '{REGISTER_LNK}' => $lang_main_menu['register_lnk'],
        '{LOGIN_TGT}' => "login.php?referer=$REFERER",
        '{LOGIN_LNK}' => $lang_main_menu['login_lnk'],
        '{LOGOUT_TGT}' => "logout.php?referer=$REFERER",
        '{LOGOUT_LNK}' => $lang_main_menu['logout_lnk'] . " [" . USER_NAME . "]",
        '{LASTUP_TGT}' => "",
        '{LASTUP_LNK}' => "",
        '{LASTCOM_TGT}' => "",
        '{LASTCOM_LNK}' => "",
        '{TOPN_TGT}' => "",
        '{TOPN_LNK}' => "",
        '{TOPRATED_TGT}' => "",
        '{TOPRATED_LNK}' => "",
        '{FAV_TGT}' => "",
        '{FAV_LNK}' => "",
        '{SEARCH_TGT}' => "",
        '{SEARCH_LNK}' => "",
        );
       
        }



  I works fine, (it's not the cleanest solution I know  :lol:  )

  Hope it will help you

   Tom (France)
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
moving links to admin area
« Reply #5 on: December 18, 2003, 01:24:12 pm »

above mentioned solution is not recommended at all - if it works for you: fine! But others browsing this thread should not do this as well!
The way to do this has been described a thousand times on this board: if you want to disable your user to see the "last comments", you're supposed to edit /themes/yourtheme/theme.php and find
Code: [Select]
<a href="{TOPRATED_TGT}">{TOPRATED_LNK}</a> :: under the heading
Code: [Select]
// HTML template for main menu(that's the menu everyone sees, be it admin, registered user or guest) - just disable this message to be shown by commenting it out: change it to
Code: [Select]
<!--<a href="{TOPRATED_TGT}">{TOPRATED_LNK}</a> ::-->Now it's gone for everyone.
If you (as an admin) want to have this menu item, find
Code: [Select]
// HTML template for gallery admin menuand add the link underneath  (for example after the line that says
Code: [Select]
<td class="admin_menu"><a href="profile.php?op=edit_profile" title="">{MY_PROF_LNK}</a></td>you could add
Code: [Select]
<td class="admin_menu"><a href="{TOPRATED_TGT}">{TOPRATED_LNK}</a></td> instead).
Some features (for example registration) can be turned off in coppermine config as well.

Hope this helps

GauGau
Logged
Pages: [1]   Go Up
 

Page created in 0.019 seconds with 18 queries.