Customizing SMF > Tips and Tricks

Parsing of BBCode in Custom Field descriptions.

(1/1)

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:

--- Code: ---$rowData[\'field_desc\']
--- End code ---
Replace With:

--- Code: ---parse_bbc($rowData[\'field_desc\'])
--- End code ---

In ./Sources/Profile.php
Find:

--- Code: ---$row['field_desc']
--- End code ---
Replace With:

--- Code: ---parse_bbc($row['field_desc'])
--- End code ---

Navigation

[0] Message Index

Go to full version