[SOLVED] User ID of displayed Profile

1 year 6 months ago - 1 year 6 months ago #330773 by VladKireev
[SOLVED] User ID of displayed Profile was created by VladKireev
Dear,

Could you please describe how to output the User ID on each profile page?
I need the ID not of the user who is viewing the page (logged in), but of the displayed user.

Thank you in advance!

Please Log in to join the conversation.

1 year 6 months ago #330778 by krileon
Replied by krileon on topic User ID of displayed Profile
Add [user_id] substitution to a Custom HTML field. You can use IF substitutions to limit who can see it. Check out our substitutions tutorial below for examples and usage instructions.

www.joomlapolis.com/documentation/279-community-builder/tutorials/18353-using-substitutions-throughout-cb


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in to join the conversation.

1 year 6 months ago #330786 by VladKireev
Replied by VladKireev on topic User ID of displayed Profile
krileon, thank you for response.

But it's quite difficult to the average user. Could you please describe the procedure more detailed.
Do I understand correctly that I need to:
1. Create a Field (which type if I need to output id? Integer?).
2. Create a custom layout in /html/layouts/com_fields/field
3. Set the Layout of the new Field to the custom one.

But how should php code look like in a custom layout?
 

Please Log in to join the conversation.

1 year 6 months ago #330803 by krileon
Replied by krileon on topic User ID of displayed Profile
In CB > Field Management create a Custom HTML field (this is a field type in the dropdown). Then just add [user_id] to the HTML parameter. That's all you need to do. You do not need to create layouts. You do not need to write or know PHP to use substitutions.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.
The following user(s) said Thank You: VladKireev

Please Log in to join the conversation.

1 year 6 months ago #330837 by VladKireev
Replied by VladKireev on topic User ID of displayed Profile
krileon, great! Thank you very much!!!

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.286 seconds

Facebook Twitter LinkedIn