4images Forum & Community
4images Modifications / Modifikationen => Mods & Plugins (Requests & Discussions) => Topic started by: 131 on November 25, 2007, 07:45:34 PM
-
Hello
Like in topic
I woudl like to call loged member id {user_id} in template, ive try few things which should works but no results or results are random id.
I need something like index.php?template=xxx&member={user_id}
regards
for any help
-
If install this:
http://www.4homepages.de/forum/index.php?topic=8141.msg37488#msg37488
is possible. ;)
I help after for user id.
-
calling template its not a problem, I made something ages ago and still works.
so template=xxx works well, and static text with dynamic blocks like {header} works (FAQ, TERMS, etc)
main problem is calling user ID and user Name, looks like they are "remeber" from last "visitors?" last "random photo?".
when I use {user_id} i recive random ID - dont know where comes from :(
We can start from displaying user name and ID in loged user panel, I'll try do rest my self ;)
regards
-
when I use {user_id} i recive random ID - dont know where comes from
You no say if you install MOD from V@no ... if so - is easy to code from includes/sessions.php with $user_info[$user_table_fields['user_id']] or format_text(trim($user_info[$user_table_fields['user_name']]), 2) . ;)
-
hmmm ...
Dont works or I do something wrong
in login template (user_logininfo.html) I just put for tests (without calling template - just home.html/main site):
<li><a href="member.php?action=showprofile&user_id=
<?php
echo format_text(trim($user_info[$user_table_fields['user_name']]), 2);
?>">Profil</a></li>
<li><a href="{url_control_panel}">Edit myProfil</a></li>
<li><a href="user_id/
<?php
echo "user_id=".$user_info[$user_table_fields['user_id']];
?>
Could You check this? mayby its works for You, I dont have any data on both fx.
regards
-
Ohh ! so you want PHP use in HTML ? You no say before. ;)
Ok so if no have PHP in HTML enable (includes/constants.php file) - is ok.
Try this:
<li><a href="{url_member}?action=showprofile&user_id={user_id}">{user_name}</a></li>
<li><a href="{url_control_panel}">Edit myProfil</a></li>
This line :
<li><a href="user_id/ ...
I no get why is there ...
-
I try this before, just start with this template tags, but I recive random names and Ids - look before
Could You confirm that this works for You after refreshing page and still have this same id/name ?
Now Im loged as a admin -> id=1, with your code I have {user_id} from user which upload random image. I dont remeber it is mod or bulid fx, I use&set 4images ages ago.
Mayby You could show my where {user_id} can by changed by fx coping/modyfing to something like {logged_user_id}
_______
php is enabled in templates - I try to integrte now 4images and wordspressmu, so urls are strange :)
regards
Pawel
-
Ok so you want same for this:
http://www.4homepages.de/forum/index.php?topic=19374.0
I add in TODO list before. I code later. Thank for posting. ;)