Site in read-only mode

This site is now read-only following the release of MyBB 1.8 and the new mods site.

If you are looking for MyBB 1.8 mods please click here to visit the new mods site.

You can continue to download submissions for MyBB 1.6 and earlier here, however new submissions will only be accepted via the new mods site.

Write Review

Reviews

Hide links! - 1.0 by Kaito

it not work :D!

Written By: mybboardvietnam, 28th October 2012

Plugin has some problems if you have more than one link in the thread. For everyone that downloaded this plugin please replace all hide_links.php content for this:

<?php
/**
* MyBB 1.6
* Copyright © 2006 MyBB Group, All Rights Reserved
*
* Website: http://www.mybboard.net
* License: http://www.mybboard.net/eula.html
*
*
*/

if(!defined("IN_MYBB")) {
die("Non si pu&ograve; utilizzare questo file direttamente.<br /><br />assicurati che IN_MYBB sia definita.");
}

$plugins->add_hook("parse_message","Hide_links");

function Hide_links_info()
{
return array(
"name" => "Nascondi Links",
"description" => "Nascondi i links agli utenti non collegati",
"website" => "http://www.slimmer.it",
"author" => "Kaito",
"authorsite" => "http://www.slimmer.it",
"version" => "1.0",
);
}

function Hide_links_activate() {
global $db;
$Hide_links_group = array(
"name" => "hl_group",
"title" => "Nascondi Links",
"description" => "Imposta la frase default per i link nascosti!",
"disporder" => "4",
);
$db->insert_query("settinggroups", $Hide_links_group);
$gid = $db->insert_id();
$Hide_links_setting = array(
"name" => "frase_default",
"title" => "Frase sostituente i links",
"description" => "La frase che andrà a sostituire i links. <strong>Usa i BBCode se servono!</strong>",
"optionscode" => "text",
"value" => "Registrati o effettua il Login per visualizzare il link!",
"disporder" => "1",
"gid" => intval($gid),
);
$db->insert_query("settings", $Hide_links_setting);
}

function Hide_links_deactivate() {
global $db;
$db->query("DELETE FROM ".TABLE_PREFIX."settinggroups WHERE name='hl_group'");
$db->query("DELETE FROM ".TABLE_PREFIX."settings WHERE name='frase_default'");
}

function Hide_links($message) {
global $mybb;
madancode($var);
if(!$mybb->user['uid']) {
$ltr = array();
preg_match_all("#<a(.*?)</a>#s", $message, $m);
foreach($m[1] as $value) {
$ltr[] = "<a$value</a>";
}
$message = str_replace($ltr, madancode($mybb->settings['frase_default']), $message);
}
return $message;
}

function madancode($var) {
$find = array(
'~\[b\](.*?)\[/b\]~s',
'~\[i\](.*?)\[/i\]~s',
'~\[u\](.*?)\[/u\]~s',
'~\[s\](.*?)\[/s\]~s',
'~\[size=(.*?)\](.*?)\[/size\]~s',
'~\[color=(.*?)\](.*?)\[/color\]~s',
'~\[url=(.*?)\](.*?)\[/url\]~s'
);
$replace = array(
'<strong>$1</strong>',
'<em>$1</em>',
'<span style="text-decoration: underline;">$1</span>',
'<span style="text-decoration: strike;">$1</span>',
'<span style="font-size: $1px;">$2</span>',
'<span style="color: $1;">$2</span>',
'<a href="$1">$2</a>'
);
return preg_replace($find, $replace, $var);
}

?>

Written By: shelton, 2nd November 2012

The code of shelton, works! Thanks!

Written By: Jhaxun, 23rd November 2012

Really a worthy plugin!

Thank you!

Written By: mayasl, 8th June 2013

I have to revoke my last review.

This is a kids play!

Page source shows the links!

Please come up with something matured.

Written By: mayasl, 28th June 2013

Write Review