4images Forum & Community
4images Issues / Ausgaben => Discussion & Troubleshooting => Topic started by: nyiguinyogui on November 28, 2005, 05:24:51 PM
-
Hello,
In my footer.html I need to use the $site_sess variable but, while it is set in header.html, it seems empty in footer.html.
For example, this code:
<? if ($site_sess->user_info['user_level']==ADMIN) { ?>
you are admin
<? } ?>
would work ok in header.html but not in footer.html, as the variable $site_sess seems to be unset.
Can anybody please tell me how to "propagate" this variable, $site_sess, so that it can be used from within footer.html?
Thank you.
-
if the user level is only what you need you can use {if is_admin} {endif is_admin} tags
Otherwise, you'll need add <?php
global $site_sess;
?>
-
Thanks a lot V@no. This is exactly what I needed.
I had been trying to get this by touching page_header.php and didn't get it.
So, now I am curious to know which lines in the code are responsible for the fact that $site_sess is set within header.html.
Thank you.
-
none...I dont know why it worked for you in header.html :?
-
Well, since I installed 4images some months ago, I have been touching the code here and there so that it fits my needs. I installed some mods from the forum, but also did developments on my own for very specific needs.
So, according to what you say, I presume I probably managed to get site_sess readable from header.html (which, I am conscious about it, may lead to a security problem).
Regards.