MyBB Community Forums

Full Version: automatically add [code][/code] between link??
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
like title.. can help me to make mybb automatically
between link?? example if i type
www.kikil.org
mybb will create
www.kikil.org
automatically

thx for help!
regards
You still haven't fixed the copy right like you were told in this thread.

http://community.mybboard.net/thread-34228.html

But this can only be done through a plugin.
Here's a quick modification which may be what you want:
In inc/class_parser.php, find and delete:
if(!$name)
		{
			$name = $url;
		}
and
if($name == $url && $this->options['shorten_urls'] != "no")
		{
			if(my_strlen($url) > 55)
			{
				$name = my_substr($url, 0, 40)."...".my_substr($url, -10);
			}
		}
Then find:
$link = "<a href=\"$fullurl\" target=\"_blank\">$name</a>";
and replace with:
if($name) $name .= ": ";
$link = $this->mycode_parse_code($name.$fullurl);
(haven't tested, so hope it works Toungue)
(2008-07-27, 05:15 PM)NetSage Wrote: [ -> ]You still haven't fixed the copy right like you were told in this thread.

http://community.mybboard.net/thread-34228.html

But this can only be done through a plugin.

i'd already fixed the copyright.. it's still wrong? i'm apologize.. i added link mybboard.net into it..
(2008-07-27, 11:49 PM)ZiNgA BuRgA Wrote: [ -> ]Here's a quick modification which may be what you want:
In inc/class_parser.php, find and delete:
if(!$name)
		{
			$name = $url;
		}
and
if($name == $url && $this->options['shorten_urls'] != "no")
		{
			if(my_strlen($url) > 55)
			{
				$name = my_substr($url, 0, 40)."...".my_substr($url, -10);
			}
		}
Then find:
$link = "<a href=\"$fullurl\" target=\"_blank\">$name</a>";
and replace with:
if($name) $name .= ": ";
$link = $this->mycode_parse_code($name.$fullurl);
(haven't tested, so hope it works Toungue)


it did'nt work bro.. thx
(2008-07-28, 02:08 AM)www.kikil.org Wrote: [ -> ]it did'nt work bro.. thx
When you say that, could you please give details? For example, "it broke links" (and give screenshot).
Thanks.
nothing happen with that modification, bro..
i cannot give screeshot.. because.. nothing happen into it. same if i didn't use this modification..
all link in members post in my forum still without between [code] tag Smile
thx
Just tested this on MyBB 1.4 && MyBB 1.2.14; and it works fine.