Hacks: Hidden Content Hack
Posted by: canbulaOn 2006/12/6 11:23:34 17070 readsEverybody knows 'Hidden Content' in Vbulletin forums. Now we can use it in XOOPS. It is very very easy.
File: class/module.textsanitizer.php
We add only a few lines in our module.textsanitizer.php then we can use Hidden Content in news, newbb, sections etc. modules.
Now you must find these lines in module.textsanitizer.php
function &xoopsCodeDecode(&$text, $allowimage = 1)
{
$patterns = array();
$replacements = array();function &xoopsCodeDecode(&$text, $allowimage = 1)
{
$patterns = array();
$replacements = array();
$patterns[] = "/XhiddencontentX(.*)X/hiddencontentX/sU";
if($_SESSION['xoopsUserId']) {
$replacements[] = '\1';
}
else {
$replacements[] = '<a href="'.XOOPS_URL.'/register.php"><img src="'.XOOPS_URL.'/hidden.gif" alt="Hidden Content" /></a>';
}
and now you can use it like this
XhiddencontentX This is hidden content. You can see this when you register and login X/hiddencontentXYou must wrote the this at the hidden contents beginning
XhiddencontentXX/hiddencontentX
Bora Canbula ( boracanbula@gmail.com - http://www.xoopshocasi.com )





