Use tags like [FIRST_NAME] [LAST_NAME] in articles

More
7 years 6 months ago #105022 by Bill Worden
Replied by Bill Worden on topic Use tags like [FIRST_NAME] [LAST_NAME] in articles
Yea I have DirectPHP to use in articles , its the PHP code that I can not figure out how to get that membership_id to display.
Just starting PHP so I have been playing with these. I can pull in custom field from Membership Pro and joom user names and IDs.

<?php $user = JFactory::getUser();echo $user->name;?>

<?php echo $user->extra ;?>

Please Log in or Create an account to join the conversation.

More
7 years 6 months ago #105023 by Alan Bennett
Replied by Alan Bennett on topic Use tags like [FIRST_NAME] [LAST_NAME] in articles
See the code in the attached file. It works a treat and gets all the data from the subscriber record
Attachments:
The following user(s) said Thank You: Tuan Pham Ngoc, Bill Worden

Please Log in or Create an account to join the conversation.

More
7 years 6 months ago #105024 by Alan Bennett
Replied by Alan Bennett on topic Use tags like [FIRST_NAME] [LAST_NAME] in articles
If you need data from other tables such as the custom fields or the plan name then just change the sql to create a join
The following user(s) said Thank You: Bill Worden

Please Log in or Create an account to join the conversation.

More
7 years 6 months ago #105026 by Bill Worden
Replied by Bill Worden on topic Use tags like [FIRST_NAME] [LAST_NAME] in articles
That worked like a charm! :woohoo:
Thanks so much, been beating my head....
The following user(s) said Thank You: Alan Bennett

Please Log in or Create an account to join the conversation.