MyBB Community Forums

Full Version: Removing urls
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I want to remove clickable links COMPLETELY

what i mean is.. when i write www.google.com, it doesnt convert it to {url}www.google.com{/url}


And i dont want it as an option that members can choose.. i want to remove it! so links appear like text!



thanks
bump....Toungue
In inc/class_parser.php, you want to remove these snippets:
		$message = $this->mycode_auto_url($message);
		$standard_mycode['url_simple']['regex'] = "#\[url\]([a-z]+?://)([^\r\n\"<]+?)\[/url\]#sei";
		$standard_mycode['url_simple']['replacement'] = "\$this->mycode_parse_url(\"$1$2\")";

		$standard_mycode['url_simple2']['regex'] = "#\[url\]([^\r\n\"<]+?)\[/url\]#ei";
		$standard_mycode['url_simple2']['replacement'] = "\$this->mycode_parse_url(\"$1\")";

		$standard_mycode['url_complex']['regex'] = "#\[url=([a-z]+?://)([^\r\n\"<]+?)\](.+?)\[/url\]#esi";
		$standard_mycode['url_complex']['replacement'] = "\$this->mycode_parse_url(\"$1$2\", \"$3\")";

		$standard_mycode['url_complex2']['regex'] = "#\[url=([^\r\n\"<&\(\)]+?)\](.+?)\[/url\]#esi";
		$standard_mycode['url_complex2']['replacement'] = "\$this->mycode_parse_url(\"$1\", \"$2\")";

You might need to update this file when you upgrade your forum, so it's best to make a list of changes you've made in a simple text file, and store it somewhere you'll remember!

Always remember to backup your files and database too before making any changes to the source code...

Smile
Thanks guys... working fine!!


Is there a way maybe to remove the "insert hyperlink" button??




thanks
Edit jscripts/editor.js, and find (circa line 218):

				{type: 'button', name: 'img', sprite: 'image', insert: 'image', extra: 1, title: this.options.lang.title_image},
				{type: 'button', name: 'url', sprite: 'link', insert: 'url', title: this.options.lang.title_hyperlink},
				{type: 'button', name: 'email', sprite: 'email', insert: 'email', extra: 1, title: this.options.lang.title_email},

Just remove:

				{type: 'button', name: 'url', sprite: 'link', insert: 'url', title: this.options.lang.title_hyperlink},

That will just remove the add-URL button... Smile