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.
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 {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 <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 <!--<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
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.