Advanced search  

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Pages: [1]   Go Down

Author Topic: Inserting link in "user menu"  (Read 2855 times)

0 Members and 1 Guest are viewing this topic.

LordShinyK

  • Coppermine newbie
  • Offline Offline
  • Posts: 2
Inserting link in "user menu"
« on: June 14, 2004, 03:14:10 am »

I'd like to insert a link to "Last Uploaded", "Most Rated" and "Most Viewed" in the user menu, the one with "Login / Register" and "My Gallery / Upload a picture / logout" (when logged-in).
How can I do that? I tried to copy an existing link, but I got the erro message: "Could not find block in theme.php ...." (can't remember it exactly but can edit the file I did to have this message again if require).
I'm sorry if it has been asked before, but i did a search but didn't find the answer. I also looked at the FAQ and eventhough, I saw a few nice tricks, I didn't find what I wanted.
Please help!

Cheers,

LSK
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Inserting link in "user menu"
« Reply #1 on: June 14, 2004, 10:30:24 am »

to add a menu item that is only visible when a user is logged in, edit themes/yourtheme/theme.php and find
Code: [Select]
<!-- BEGIN logout -->
                        <a href="{LOGOUT_TGT}">{LOGOUT_LNK}</a>
<!-- END logout -->
Replace it with
Code: [Select]
<!-- BEGIN logout -->
                        <a href="{LOGOUT_TGT}">{LOGOUT_LNK}</a>
                        <a href="your_custom_link.htm">Your link text</a>
<!-- END logout -->

To add a link into the user admin menu, find
Code: [Select]
// HTML template for user admin menu
$template_user_admin_menu = <<<EOT

                <div align="left">
                <table cellpadding="0" cellspacing="1">
                        <tr>
                                <td class="admin_menu"><a href="albmgr.php" title="">{ALBMGR_LNK}</a></td>
                                <td class="admin_menu"><a href="modifyalb.php" title="">{MODIFYALB_LNK}</a></td>
                                <td class="admin_menu"><a href="profile.php?op=edit_profile" title="">{MY_PROF_LNK}</a></td>
                        </tr>
                </table>
                </div>

EOT;
in theme.php and modify accordingly

GauGau
Logged
Pages: [1]   Go Up
 

Page created in 0.017 seconds with 19 queries.