vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   Parsing username in member profile's field (https://vborg.vbsupport.ru/showthread.php?t=180212)

shlomot 05-23-2008 01:42 AM

Parsing username in member profile's field
 
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 06:31 AM

Not sure if this will help but:
https://vborg.vbsupport.ru/showthread.php?t=98904

shlomot 05-24-2008 01: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.

Quote:

Originally Posted by GameWizard (Post 1528716)


GameWizard 05-24-2008 03:17 PM

How about this?
https://vborg.vbsupport.ru/showthread.php?t=98904

shlomot 05-25-2008 02: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 08:14 AM

If you get your users to use something like [minicode]{username}[/minicode] in their custom field, then you can just do a str_replace() (using a plugin in the appropriate place) on the output.


All times are GMT. The time now is 08:15 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01397 seconds
  • Memory Usage 1,717KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (6)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete