solved Profile Bio Smarty Code

SoftDesigns
SoftDesigns
@softdesigns
6 years ago
242 posts
Hi - Is there any way to inject smarty code into a Profile Bio section? Can we use say, jrCore_list, to paste inside a Profile Bio? Example:
--
{jrCore_list module="jrGallery" search1="_profile_id = 22" order_by="_item_id random" limit="4" template="item_image_list.tpl" tpl_dir="jrGallery"}
updated by @softdesigns: 12/29/18 10:05:02AM
paul
@paul
6 years ago
4,326 posts
Not sure that I'm understanding exactly what you want to do.
You want to 'inject' the output of that jrCore_list call into the content of a $profile_bio variable?


--
Paul Asher - JR Developer and System Import Specialist
SoftDesigns
SoftDesigns
@softdesigns
6 years ago
242 posts
Not exactly...
Trying to simply drop that Smarty Code into the "Profile Biography" field on a profile page. (The area where the user normally enters text of their bio info etc...)

But it just shows as plain text only, it does not seem to get processed?
--
Is it possible to drop Smarty Code into the "Profile Biography" field on any profile page?
paul
@paul
6 years ago
4,326 posts
[quote]Is it possible to drop Smarty Code into the "Profile Biography" field on any profile page? [/code]
No, as you have found out. The profile_bio field is a variable that is passed in when a template is parsed. Parsing isn't recursive, if you see what I mean.
Can you not just put the jrCore_list directly into the appropriate skin profile template, instead of (or as well as) the {$profile_bio} call?


--
Paul Asher - JR Developer and System Import Specialist
michael
@michael
6 years ago
7,714 posts
The profile_bio section is a section that your users can edit. Allowing them to add in a {jrCore_list} call is giving them free mostly-unrestricted access to the database.

If that was possible I could signup to your site and drop in a jrCore_list call to the users table and get a list of names and email addresses of everyone on your site.

bad idea. Whats the actual reason you're thinking about doing it this way?

Look at the way the embed module works, it allows for replacement stuff to put in other stuff from the database via the use of a placeholder. (eg, add an audio file to the bio via the embed module and it will put a tag like:)
 [ jrEmbed module="jrAudio" id="3" ]
Then replace that with the player on output.
updated by @michael: 09/29/18 05:11:11PM
SoftDesigns
SoftDesigns
@softdesigns
6 years ago
242 posts
@michael - Yes, you are right. Your explanation makes perfect sense :)
--
To achieve something like this, we can create a custom module.
No worries, all good, custom module just takes a bit more time to build...
--
Great Support - Solved
updated by @softdesigns: 09/29/18 07:31:43PM

Tags