Simple Machines Community Forum

Customizing SMF => Tips and Tricks => Topic started by: GL700Wing on September 07, 2020, 01:34:33 AM

Title: Parsing of BBCode in Custom Field descriptions.
Post by: GL700Wing on September 07, 2020, 01:34:33 AM
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'])