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: LOGOUT BUTTON - Show it only when i want too...  (Read 4984 times)

0 Members and 1 Guest are viewing this topic.

Steve

  • Coppermine newbie
  • Offline Offline
  • Posts: 6
    • http://xxx.xxx.xxx
LOGOUT BUTTON - Show it only when i want too...
« on: October 16, 2003, 05:24:55 pm »

Hi all!

Here I am (yes! again) at this great board, looking for 'solutions' to my PHP/Coppermine doubts.

Well, this will be kinda 'weird' to understand, but please, be patiente and read it thru Ok?

I've customized my CPG and i 'ripped' the {ADMIN_MENU} from it.
Instead of it, i inserted a direct link to LOGIN (http://nonono.non.non/login.php?referer=/album/index.php).
I took it of, because of 'layout matters'.

But the main problem is:
- Since i Took out the {ADMIN_MENU} when I log in (thru my direct link), i can't see the LOGOUT button anymore (kind obvious, since it does make part of {ADMIN_MENU}).

- How can i make it possible to 'SHOW' up the LOGOUT button, only when i've LOGGED IN. Resuming, how can i make the {ADMIN_MENU} be shown only when i've logged as Admin.

Hope this ain't too much 'confusing', and that you guys may understand my question and kindly help me.  :lol:

Thanks!

ps: if you need my URL, just let me known here, them i'll PM you.
Logged
[size=9]The Only Thing Necessary For The Triumph Of Evil,
Is For Good Men To Do Nothing. - Edmund Burke.[/size]

(https://forum.coppermine-gallery.net/proxy.php?request=http%3A%2F%2Fwww.signatures.kit.net%2Fozmosis-br.gif&hash=326963619c8131d13b88176b506ad69fc7770710)

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
LOGOUT BUTTON - Show it only when i want too...
« Reply #1 on: October 16, 2003, 07:35:31 pm »

1) no reason to remove the admin menu for layout reasons - the only person who will see it is you. Just edit /themes/yourtheme/template.html and find
Code: [Select]
{ADMIN_MENU}and put it somewhere where it doesn't "disturb" your layout.
2) there are two admin menus in fact: gallery admin and user admin, so there are two places to edit
3) Comment out the unnecessary features in /themes/yourtheme/theme.php and just leave the logout link intact - do not completely remove stuff there.
Example: find
Code: [Select]
               <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>
and replace it with
Code: [Select]
               <!--<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>-->


GauGau
Logged

Steve

  • Coppermine newbie
  • Offline Offline
  • Posts: 6
    • http://xxx.xxx.xxx
LOGOUT BUTTON - Show it only when i want too...
« Reply #2 on: October 16, 2003, 08:20:21 pm »

Thanks again GauGau!
It worked...

Gee, i'll look further to use more the '<!-- -->'.
They are very simple but very usefull as well.

About the 'Layout Reason'.
Yes it makes the diference, since when i activate the {ADMIN_MENU}, it will show the "LOGIN" (icon/link), but i didn't wanted to, cause, like you saw my website, i have the LOGIN ADMIN (as a .GIF), at my "ladder menu". Using the {ADMIN_MENU} to show "LOGIN" would be out of my Layout parameters. Hope you "got" what i'm trying to explain.

Well, nevermind, your tip worked fine!
Just thinking that i don't need to "Clear Cookies" after i've logged in, to LOG OUT... it's great!

About the "<!-- -->", i even wrote a "Special Thanks" mentioning the Coppermine Desenv team and Board users. If you have a free time, just take a look at my 'Code Source'.

Thanks GauGau.
Logged
[size=9]The Only Thing Necessary For The Triumph Of Evil,
Is For Good Men To Do Nothing. - Edmund Burke.[/size]

(https://forum.coppermine-gallery.net/proxy.php?request=http%3A%2F%2Fwww.signatures.kit.net%2Fozmosis-br.gif&hash=326963619c8131d13b88176b506ad69fc7770710)
Pages: [1]   Go Up
 

Page created in 0.016 seconds with 14 queries.