4images Forum & Community
4images Issues / Ausgaben => Discussion & Troubleshooting => Topic started by: Yan on December 20, 2009, 12:59:24 PM
-
I need to get current user ID, and paste it to template like member.php?id=$current_user_id
-
Since I don't know what you are trying to do, and because no links should be constructed in template itself, without first parsed through $site_sess->url() function, I'd suggest use this in the template:
<a href="<?php
global $site_sess, $user_info, $user_table_fields;
echo $site_sess->url(ROOT_PATH."member.php?".URL_USER_ID."=".$user_info[$user_table_fields['user_id']];
?>">link text</a>
-
Thanks, its works :D
One more questions. I need a show some content only for admin
Something like this:
<if current user =admin>
content
</if>
-
{if is_admin} {endif is_admin}