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: Add my latest additions link to main menu  (Read 3102 times)

0 Members and 1 Guest are viewing this topic.

evolver

  • Coppermine newbie
  • Offline Offline
  • Posts: 17
Add my latest additions link to main menu
« on: April 13, 2005, 06:40:27 am »

Hi

I need to add a link to the main menu which leads to the users profile which shows the  last uploaded image of a user

This is the link I need to show which is found  in theme.php under $template_user_list_info_box

Code: [Select]
<a href="profile.php?uid={USER_ID}">{USER_NAME}</a>
Thanks
Arek

« Last Edit: April 13, 2005, 10:51:20 pm by evolver »
Logged

OmegaGOD

  • Supporter
  • Coppermine frequent poster
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 346
  • I approve.
Re: Add profile link to main menu
« Reply #1 on: April 13, 2005, 05:30:53 pm »

You'll need to put that link into the file theme.php located in the directory corresponding to your theme. Look for the variable definition for $template_main_menu

Hope this helps,

--OmegaGOD
Logged
Please do not PM me with support questions. Please read the manual and then if posting questions please place them in the proper sub-boards.

evolver

  • Coppermine newbie
  • Offline Offline
  • Posts: 17
Re: Add profile link to main menu
« Reply #2 on: April 13, 2005, 10:33:19 pm »

Well this is what I did. Hopefully its done properly . When the user logs in and there are  no personal galleries allowed they can view all their photos by clicking on a link "my photos"  in the main menu which takes them to here http://www.photomize.com/gallery/thumbnails.php?album=lastupby&uid=3

In theme.php

in  $template_main_menu = <<<EOT

 I added

Code: [Select]
<!-- BEGIN my_photo_list -->
                        <a href="{MY_LST}">{MY_GAL_PHOTOS}</a><br>
<!-- END my_photo_list -->


In  function theme_main_menu()

I added 

template_extract_block($template_main_menu, 'my_photo_list')

To

Code: [Select]
    if (USER_ID) {
        template_extract_block($template_main_menu, 'login');
    } else {
        template_extract_block($template_main_menu, 'logout');
        template_extract_block($template_main_menu, 'my_profile');;

Then to

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'],
        '{MEMBERLIST_TGT}' => "usermgr.php",
        '{MEMBERLIST_TITLE}' => $lang_main_menu['memberlist_title'],
        '{MEMBERLIST_LNK}' => $lang_main_menu['memberlist_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 . "]",
        '{FAQ_TGT}' => "faq.php",
        '{FAQ_TITLE}' => $lang_main_menu['faq_title'],
        '{FAQ_LNK}' => $lang_main_menu['faq_lnk'],
        '{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'],

I added

'{MY_GAL_PHOTOS}' => $lang_main_menu['my_gal_photos'],

and

'{MY_LST}'  => "thumbnails.php?album=lastupby&uid=" . USER_ID . " ",

In english.php

In

$lang_main_menu = array(
  'alb_list_title' => 'Go to the album list',
  'alb_list_lnk' => 'gallery list',
  'my_gal_title' => 'Go to my personal gallery',
  'my_gal_lnk' => 'my gallery',
  'my_prof_lnk' => 'my profile',
  'adm_mode_title' => 'Switch to admin mode',
  'adm_mode_lnk' => 'Admin mode',
  'usr_mode_title' => 'Switch to user mode',
  'usr_mode_lnk' => 'User mode',
  'upload_pic_title' => 'Upload a file into an album', //cpg1.3.0
  'upload_pic_lnk' => 'upload file', //cpg1.3.0
  'register_title' => 'Create an account',
  'register_lnk' => 'register',
  'login_lnk' => 'login',
  'logout_lnk' => 'logout',
  'lastup_lnk' => 'last uploads',
  'lastcom_lnk' => 'last comments',
  'topn_lnk' => 'most viewed',
  'toprated_lnk' => 'top rated',
  'search_lnk' => 'search',
  'fav_lnk' => 'favorites',
  'memberlist_title' => 'memberlist', //cpg1.3.0
  'memberlist_lnk' => 'memberlist', //cpg1.3.0
  'faq_title' => 'Frequently Asked Questions on the picture gallery &quot;Coppermine&quot;', //cpg1.3.0
  'faq_lnk' => 'FAQ', //cpg1.3.0

I added

  'my_gal_photos' => 'my photos',







Logged
Pages: [1]   Go Up
 

Page created in 0.081 seconds with 20 queries.