coppermine-gallery.com/forum

Support => Older/other versions => cpg1.2 Standalone Support => Topic started by: LordShinyK on June 14, 2004, 03:14:10 AM

Title: Inserting link in "user menu"
Post by: LordShinyK 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
Title: Re: Inserting link in "user menu"
Post by: Joachim Müller 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<!-- BEGIN logout -->
                       <a href="{LOGOUT_TGT}">{LOGOUT_LNK}</a>
<!-- END logout -->
Replace it with<!-- 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 // 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