The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Modifying the [url] function?
Due to spam the owner of the board I help wants links to open in a new window through his own site in a frame. Similar to the way external links are viewed on about.com or the Google image search feature. But there is no way to edit the [ url] code from the admin panel. It is not listed with the vbcode, can anyone advise please how we add this domain to the link?
The new links would look similar to this: http://www.hisdomain.com/link?out=http://www.submittedlink.com Anyone please? |
#2
|
||||
|
||||
You could check the class_bbcode.php in includes.
url's are parsed in there, i think. |
#3
|
|||
|
|||
Thank you, it would seem we are half way there now. I found the lines. They look like this....
Code:
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)); if (!preg_match('#^[a-z0-9]+(?<!about|javascript|vbscript):#si', $rightlink)) { $rightlink = "http://$rightlink"; } if (!trim($link) OR $text == $rightlink) { $tmp = unhtmlspecialchars($rightlink); if (vbstrlen($tmp) > 55 AND $this->is_wysiwyg() == false) { $text = htmlspecialchars_uni(substr($tmp, 0, 36) . '...' . substr($tmp, -14)); } } // remove double spaces -- fixes issues with wordwrap $rightlink = str_replace(' ', '', $rightlink); // standard URL hyperlink return "<a href=\"$rightlink\" target=\"_blank\">$text</a>"; } Can anyone give a suggestion? I keep getting the following error: Code:
Parse error: parse error, unexpected T_STRING in /domainname/public_html/forum/includes/class_bbcode.php on line 1705 Again what we need the rendered as is : http://www.hisdomain.com/link?out=http://www.link.com I assume too that $rightlink is the submitted link. Can anyone help out with the proper php format for adding the additional domain before the submitted? |
#4
|
|||
|
|||
Seriously, nobody can help with that last sentence?
|
#5
|
||||
|
||||
you could use the redirection page from this hack
https://vborg.vbsupport.ru/showthrea...threadid=91021 and the options from this hack https://vborg.vbsupport.ru/showthread.php?t=95753 |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|