e107help.org Q&A
0 like 0 dislike

Does anyone know how I can display shortcodes & user data on a page?

lets say I am using a custom page


$ns->tablerender("Welcome", "This is a Blank Template,");
echo ('') .SITENAME."\n";

the above simply displays the sitename, but how can I display the users "username" and the extended field that I already created?

I have tried a few times with no success, I think I need an example as Im doing something wrong, if  someone could please help how I show the current users data plus shortcodes {user}, they seem even harder and fail me everytime it seems

thank you

e107 version 2.18
in Core by (30 points) 4

1 Answer

0 like 0 dislike
by (1.9k points) 15 46 57
There are 2 types of extended fields.  For example birthday is core extended field. And there are custom extended fields.

If you need example how to use core extended field, you can see at birthday plugin on my site.

Sorry, I don't use custom extended field anywhere.   But if it works at user profile page (standard), you have something wrong.  If not, create issue on github.


$qry = "
SELECT u.*, ue.* FROM #user AS u
LEFT JOIN #user_extended AS ue ON ue.user_extended_id = u.user_id
WHERE u.user_id=".intval(USERID);



It was at that link I gave you in first answer. I tried it on contact page.



I did look at the link you gave me, and didnt quite understand it...

I am using a custom field... I should have noted that,


Waht I said was I tried to scalp the user_ page (template) since it did display the field fine, but wont show in my version without all the extra stuff...

I guess my understanding is that user data is floating around somewhere in a variable, just how to properly display the field, I can do name & email, and all the standard ones fine, this is only my first year in school so im struggling with a few things and teacher is busy with kids that are more lost, i study all the time but this is hard

anyways thanks, I try working with what you sent


Maybe there is other way, but I don't know it.
Welcome to e107 Q&A, where you can ask questions and receive answers from other members of the e107 community.
935 questions
1,337 answers
2,318 users