Html or MyCode in Custom Profile Fields
Sama34 Offline
Senior Member
****
Posts: 490
Joined: May 2011
Post: #11
RE: Html or MyCode in Custom Profile Fields
*TO OP*

Open inc/functions_post.php, find:

PHP Code:
	    $post[$post_field] = htmlspecialchars_uni($field_value);


Replace:

PHP Code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
		// EDITING...
		//Comma separated list of groups ALLOWED to use bbcode, html, etc...
		$groups = '3,4,6'; // Empty to disable.

		$groupss = explode(',', $groups);
		if(empty($groups) || !in_array($post['usergroup'], $groupss))
		{
			// 0 = NO, 1 = YES
			$parseroptions = array(
				'allow_html' => 0,
				'allow_mycode' => 1,
				'allow_smilies' => 1,
				'allow_imgcode' => 0,
				'allow_videocode' => 0,
				'filter_badwords' => 1
			);
			$post[$post_field] = $parser->parse_message($field_value, $parseroptions);
		}
		else
		{
			$post[$post_field] = htmlspecialchars_uni($field_value);
		}
		// EDITING...


Open member.php, find:

PHP Code:
$customfield['name'] = htmlspecialchars_uni($customfield['name']);


Replace:

PHP Code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
		// EDITING...
		//Comma separated list of groups id ALLOWED to use bbcode, html, etc...
		$groups = '3,4,6'; // Empty to disable.

		$groupss = explode(',', $groups);
		if(empty($groups) || !in_array($post['usergroup'], $groupss))
		{
			// 0 = NO, 1 = YES
			$parseroptions = array(
				'allow_html' => 0,
				'allow_mycode' => 1,
				'allow_smilies' => 1,
				'allow_imgcode' => 0,
				'allow_videocode' => 0,
				'filter_badwords' => 1
			);
			$customfieldval = $parser->parse_message($customfieldval, $parseroptions);
		}
		else
		{
			$customfield['name'] = htmlspecialchars_uni($customfield['name']);
		}
		// EDITING...


Comments are self explanatory. I din't tested BTW, that will be your job Tongue


Support PM's will be ignored. Yipi
Plugins: Announcement Bars - Custom Reputation - Mark PM As Unread
(This post was last modified: 04-02-2012 01:00 PM by Sama34.)
03-27-2012 01:41 PM
Visit this user's website Find all posts by this user Quote this message in a reply

« Next Oldest | Next Newest »

Messages In This Thread
RE: Html or MyCode in Custom Profile Fields - Sama34 - 03-27-2012 01:41 PM

 Standard Tools
Forum Jump: