coppermine-gallery.com/forum

Support => Older/other versions => cpg1.3.x Support => Topic started by: Joe Belmaati on August 29, 2004, 04:45:30 PM

Title: Logged in/logged out switches in Coppermine
Post by: Joe Belmaati on August 29, 2004, 04:45:30 PM
Please forgive the broad nature of my question. Is it possible to assign logged in/logged out switches to certain elements in themes/classic/template.html? If so, what are they..?
Sincerely and thank you very much in advance.
Joe Belmaati
Copenhagen Denmark
Title: Re: Logged in/logged out switches in Coppermine
Post by: mstralka on August 29, 2004, 05:13:25 PM
Yes it is possible, but it's not done in template.html.  Depending on what you are trying to "switch", it is probably in themes/yourtheme/theme.php.
Do something like this in the code:

if (USER_ID) {
     //the code that you only want to display to logged in users goes here
} else {
    //the code that logged-out users should see goes here.
}
Title: Re: Logged in/logged out switches in Coppermine
Post by: Joe Belmaati on August 29, 2004, 06:56:59 PM
Thanks a bunch, I'll give it a whirl! It is some links that I want to wrap the switches around. I'll move them into theme.php