display galleries if logged in
richman
Registered Users Posts: 20 Big grins
Hello.
Is there a function in javascript that will return whether or not I'm logged in?
For example, the following code is in my footer in the control panel to prevent hidden galleries from displaying:
for (i = 0; i < oList.length; i++) {
if (re.test(oList.getElementsByTagName('a')[0].href))
oList.parentNode.removeChild(oList);
}
But this also prevents these galleries from being listed when I'm logged into my control panel. The only way I know how to display these galleries is to comment out the script when I log in.
Is there a function I can use in an 'if' statement that will return whether or not I'm logged in so they will display in my control panel when I'm logged in?
Thanks,
Rich
Is there a function in javascript that will return whether or not I'm logged in?
For example, the following code is in my footer in the control panel to prevent hidden galleries from displaying:
for (i = 0; i < oList.length; i++) {
if (re.test(oList.getElementsByTagName('a')[0].href))
oList.parentNode.removeChild(oList);
}
But this also prevents these galleries from being listed when I'm logged into my control panel. The only way I know how to display these galleries is to comment out the script when I log in.
Is there a function I can use in an 'if' statement that will return whether or not I'm logged in so they will display in my control panel when I'm logged in?
Thanks,
Rich
0
Comments
You can use...
But this needs to be used from the footer javascript section.
Cheers,
David
SmugMug API Developer
My Photos