Небольшое хак, расширяющий стандартные возможности модуля «Unreal Hide Hack». До этого, чтобы увидеть скрытое содержимое, вам приходилось оставлять сообщения в темах. Теперь же у вас появляется возможность сказать «спасибо» пользователю, который открыл тему и получить доступ к скрытому содержимому. Для полноценной работы хака требуется связка модулей: «Unreal Hide Hack» и «Thanks Mod Advanced».
Открываем файл /sources/classes/class_hide.php. И заменяем его код на этот:
<?php
/*
''~``
( o o )
+------------------.oooO--(_)--Oooo.------------------+
| Unreal Hide Hack 2.1 Whit Thanks |
| .oooO |
| ( ) Oooo. |
+---------------------\ (----( )--------------------+
\_) ) /
(_/
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|The Logo Looks Best in Courier New|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
—====—
Unreal Hide Hack 2.1 for IBF v2.3.0
By Cricket
Whit Thanx Mod
By Ipower
*/
if ( ! defined( ‘IN_IPB’ ) )
{
print «<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files.»;
exit();
}
class hide
{
function parse($post, $topicid)
{
//——————————————
// Unreal Hide Hack
//——————————————
if((preg_match(«#\[hide_me\](.+?)\[/hide_me\]#is», $post)) || (preg_match(«#\[hide\](.+?)\[/hide\]#is», $post)))
{
$this->ipsclass->DB->query(«SELECT post_thanks, author_id FROM ibf_posts WHERE topic_id=’».$topicid.»‘»);
while($info = $this->ipsclass->DB->fetch_row())
{
$allposters[] = $info['post_thanks'];
$allposters[] = $info['author_id'];
}
if($allposters != null)
{
$allposters = implode(«,»,$allposters);
$allposters = explode(«,»,$allposters);
if(in_array($this->ipsclass->member['id'], $allposters))
{
$post = preg_replace( «#\[hide_me\](.+?)\[/hide_me\]#is», «<{HIDE2}> \\1″, $post );
$post = preg_replace( «#\[hide\](.+?)\[/hide\]#is», «<{HIDE2}> \\1″, $post );
}
else
{
$post = preg_replace( «#\[hide_me\](.+?)\[/hide_me\]#is», «<{HIDE1}>», $post );
$post = preg_replace( «#\[hide\](.+?)\[/hide\]#is», «<{HIDE1}>», $post );
}
}
else
{
$post = preg_replace( «#\[hide_me\](.+?)\[/hide_me\]#is», «<{HIDE1}>», $post );
$post = preg_replace( «#\[hide\](.+?)\[/hide\]#is», «<{HIDE1}>», $post );
}
}
return $post;
}
}
?>
Источник: ipb-faq.ru