News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Parsing of BBCode in Custom Field descriptions.

Started by GL700Wing, September 07, 2020, 01:34:33 AM

Previous topic - Next topic

GL700Wing

By default BBCode entered into the description section for a Custom Profile field is not parsed (ie, it is displayed as plain text). 
Example:
Enter your real name(s) here.
[b][color=red]Note: This information can ONLY be seen by you and the forum admin.[/color][/b]

By using 'parse_bbc' for the Custom Profile field description it will be displayed as intended in the Profile Fields list display and/or in the member's profile edit areas (ie, 'Account Settings', 'Forum Profile', and 'Look and Layout') and on the forum registration form.
Example:
Enter your real name(s) here.
Note: This information can ONLY be seen by you and the forum admin.

In ./Sources/ManageSettings.php
Find:
$rowData[\'field_desc\']
Replace With:
parse_bbc($rowData[\'field_desc\'])

In ./Sources/Profile.php
Find:
$row['field_desc']
Replace With:
parse_bbc($row['field_desc'])
Life doesn't have to be perfect to be wonderful ...

Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

Advertisement: