View Full Version : Parsing username in member profile's field
shlomot
05-23-2008, 02:42 AM
Hello,
Is there a trick in the book that allows to parse the username into the text that shows on member's profile from a database's [custom] field?
Example of database storage: This song was written by $username in 1998
So far, I was fooling around with Phrases and BBCode, but no success:o
Thank you all.
GameWizard
05-23-2008, 07:31 AM
Not sure if this will help but:
https://vborg.vbsupport.ru/showthread.php?t=98904
shlomot
05-24-2008, 02:01 PM
Thanks for your help. Unfortunately, this vB3.5 post is about parsing title, description, and select-control options. It doesn't address (and I'm not surprised) parsing data stored in a text field.
Not sure if this will help but:
https://vborg.vbsupport.ru/showthread.php?t=98904
GameWizard
05-24-2008, 04:17 PM
How about this?
https://vborg.vbsupport.ru/showthread.php?t=98904
shlomot
05-25-2008, 03:14 AM
I'm gratified for your ongoing support. However, this mod parses an expression into a fix string in the translation table. I'll be able to use this technique for another purpose altogether but not bot dynamic display of username in the text that is retrieved from the database.
Opserty
05-25-2008, 09:14 AM
If you get your users to use something like {username} in their custom field, then you can just do a str_replace() (http://php.net/str_replace) (using a plugin in the appropriate place) on the output.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.