Results 1 to 1 of 1
-
6th May 2009, 12:27 AM #1OPMember
anonym links in mybb
here you go:
PHP Code:<?php
$plugins->add_hook("parse_message", "anonymurl_run");
function anonymurl_info()
{
return array(
"name" => "AnonymURL",
"description" => "Anonym Links in all Topics",
"website" => "http://redirectincognito.com",
"author" => "",
"authorsite" => "",
"version" => "1.0",
);
}
function anonymurl_activate()
{
}
function anonymurl_deactivate()
{
}
function anonymurl_run($message)
{
if (preg_match_all("/(\<a href=\")(.[^\"]*)/i", $message, $matches))
{
$preg_search = array();
$preg_replace = array();
//If you leave this setting blank, the value for myBB Settings Cookie Domain will be used.
//Use all the values separated by space
//example
//$ignore_these = "domain.com www.domain.com";
$ignore_these = "";
$should_force = 1;
$ignore_links = ($ignore_these ? explode(" ", $ignore_these) : ($mybb->settings['cookiedomain'] ? array($mybb->settings['cookiedomain']) : array($_SERVER['SERVER_NAME'])));
foreach ($matches[2] AS $key=>$rawurl)
{
//Testing Begin
// If we have any from $ignore_url, leave that as it is
if (($parsed_url = @parse_url($rawurl)) !== false)
{
$link = $parsed_url['host'];
//Ignore the link if it has local address or ignored link
foreach ($ignore_links AS $ignore_link)
{
//echo "$ignore_link<br />";
if (substr($ignore_link, 0, 1) == ".")
{
if (preg_match("/$ignore_link$/i", $link))
{
continue 2;
}
}
else
{
if (strtolower($ignore_link) == strtolower($link))
{
continue 2;
}
}
}
}
else
{
if ($should_force != 1)
{
continue;
}
}
//Testing end
$anonymurl = "http://redirectincognito.com/?" . $rawurl;
$preg_search["$rawurl"] = "<a href=\"$rawurl";
$preg_replace["$rawurl"] = "<a href=\"" . $anonymurl;
}
if ($preg_search)
{
return str_replace($preg_search, $preg_replace, $message);
}
}
}
?>
and upload to inc/plugins
Note: This is just modified by me to work with redirectincognito.com
If people want I will modify more..if there are requestsr0ck Reviewed by r0ck on . anonym links in mybb here you go: <?php $plugins->add_hook("parse_message", "anonymurl_run"); function anonymurl_info() { return array( "name" => "AnonymURL", "description" => "Anonym Links in all Topics", "website" => "http://redirectincognito.com", "author" => "", Rating: 5
Sponsored Links
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Similar Threads
-
help regarding Hide links with anonym.to
By Proaudiozone.info in forum WordpressReplies: 2Last Post: 26th Oct 2012, 05:58 PM -
[MyBB] How to make Links Clickable in Mybb?
By sycokiller in forum Web Application/Script SupportReplies: 4Last Post: 26th Mar 2012, 07:22 PM -
How to make wupload links clickable on mybb
By Bose in forum Webmaster ResourcesReplies: 1Last Post: 7th Jul 2011, 12:36 PM -
[MyBB] Adding nofollow to profile links
By Pirate in forum Web Application/Script SupportReplies: 1Last Post: 27th Mar 2011, 09:18 AM -
anonym.to external links excluding your Affiliates
By Prince in forum Webmaster ResourcesReplies: 0Last Post: 12th Oct 2009, 04:52 PM
themaManager - edit and manage...
Version 4.04 released. Open older version (or...