MyBB Community Forums

Full Version: MYCode and HTML
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello...I have disabled html in posts, but MYCode seems to allow it no matter what.

How do I allow MYCode without allowing the html in MyCode?
There is actually a post by Yumi in my mycode tutorial that says how. I would link it, but I'm on my iPod touch now.
What do you mean by it allows it...?? Can you give an example of what you mean...??
In other words, if I just type www.google.com and nothing else, the post becomes nested and the URL becomes a link.
BTW...I only typed the www and NOT the http://
Oh, well that's just how links work, it isn't HTML as such... in ./inc/class_parser.php, from line 821, see what removing this does:

	function mycode_parse_url($url, $name="")
	{
		if(!preg_match("#^[a-z0-9]+://#i", $url))
		{
			$url = "http://".$url;
		}
		$fullurl = $url;

		$url = str_replace('&', '&', $url);
		$name = str_replace('&', '&', $name);


		if(!preg_match("#[a-z0-9]+://#i", $fullurl))
		{
			$fullurl = "http://".$fullurl;
		}
		if(!$name)
		{
			$name = $url;
		}
Lex has a nolink on Mybbcentral.com
When I removed the code, I got a parse error

I can't find the "nolink" on the other forum
(2009-05-13, 12:27 PM)T0m Wrote: [ -> ]Lex has a nolink on Mybbcentral.com

No i don't;
Mine prevents users to post links when they don't have enough posts or not registered long enough.
If you want to disable automatic linking, edit inc/class_parser.php by removing the following line:
$message = $this->mycode_auto_url($message);