Link Parsing ?

p.n.c

New Member
now when we insert a link we just type it in and it will be parsed automatically and tags will be added to it automatically

how do i edit this i want to add more tags to it
where is the file or code i edit

note i am using vB 3.7


Thanx
 
Funny I was just trying to sort something similar out this morning, on vb.com they say its basicly imposible but I would suggest you look in the /includes/class_bbcode.php file

This is the url tags section:
PHP:
/**
	* Handles a [url] tag. Creates a link to another web page.
	*
	* @param	string	If tag has option, the displayable name. Else, the URL.
	* @param	string	If tag has option, the URL.
	*
	* @return	string	HTML representation of the tag.
	*/
	function handle_bbcode_url($text, $link)
	{
		$rightlink = trim($link);
		if (empty($rightlink))
		{
			// no option -- use param
			$rightlink = trim($text);
		}
		$rightlink = str_replace(array('`', '"', "'", '['), array('`', '"', ''', '['), $this->strip_smilies($rightlink));

		// remove double spaces -- fixes issues with wordwrap
		$rightlink = str_replace('  ', '', $rightlink);

		if (!preg_match('#^[a-z0-9]+(?<!about|javascript|vbscript|data):#si', $rightlink))
		{
			$rightlink = "http://$rightlink";
		}

		if (!trim($link) OR str_replace('  ', '', $text) == $rightlink)
		{
			$tmp = unhtmlspecialchars($rightlink);
			if (vbstrlen($tmp) > 55 AND $this->is_wysiwyg() == false)
			{
				$text = htmlspecialchars_uni(substr($tmp, 0, 36) . '...' . substr($tmp, -14));
			}
			else
			{
				// under the 55 chars length, don't wordwrap this
				$text = str_replace('  ', '', $text);
			}
		}

		// standard URL hyperlink
		return "<a href=\"$rightlink\" target=\"_blank\">$text</a>";
	}

as to what you need to do I don't know...
 
ok this is a fat file lol i will read it slowly and reply to u

thanx a million but a lil question popped in my head as m typin now

i have the inferno shoutbox installed which got bbcodes enabled... does it parse links from this file or it has its own?

thanx
 
ok i dont really know what to do but basically what i wanna do is when parsing a link it shudnt just add tags to it like for example we typ...][/charge ] without spaces..... thank u
 
i thought so too, but cud u reply to my next reply ? :D

P.N.C said:
ok i dont really know what to do but basically what i wanna do is when parsing a link it shudnt just add tags to it like for example we typ...] without spaces..... thank u [/quote]
 
well i dont know how this works but there are hacks that hide links from certain usergroups (unregistered)
it apparently add some sort of tags to it, is it possible to modify these hacks and make it add the tags i want and i edit the usergroups involved ?

thanx


EDIT:

I forgot to mention i have created a custome bbcode and made the tags become [charge="10"][url] and it w...ads and posts but does not act like a bb code
 
Back
Top