I Saw This Posted At XooPS.Org And So I Adapted It To Use With Frameworks 1.20
Xoops.org| Hacks : Hidden Content Hack
in the config.php file in the textsanitizer folder in Frameworks 1.20 . Insert This Line
define('EXTCODE_ENABLE_HIDE',1);//hidehack
and then edit module.textsanitizer.php to enable the hide plugin in the function xoopsCodeDecode_extended. (in my example i have enabled the hide plugin and also a module that loads bbcode plugin files.)
if (EXTCODE_ENABLE_RTSP) {
$this->loadExtension("rtsp");
}
if (EXTCODE_ENABLE_WIKI) {
$this->loadExtension("wiki");
}
//Enable Hide Plugin
if (EXTCODE_ENABLE_HIDE) {
$this->loadExtension("hide");
}
//Done Loading
//if bbcoder is enabled then.. we run the plugin that includes the extra plugins
if(ENABLE_EXTCODE_MODULE){
include_once XOOPS_ROOT_PATH."/modules/bbcoder/include/functions_lite.php";
bbcoder_loadplugin('TEXTSANITIZER', $this);
}
and then place the file hide.php in the plugins folder. contents of the file are.
<?php
/*
Credits: invision hide hack adapted by maydo, modification of canbula's hide tag
Purpose: using Hidden Content in news, newbb, sections etc. modules.
File Made By Bandit-X
*/
function textsanitizer_hide(&$ts)
{
$ts->patterns[] = "/\[hide](.*)\[\/hide\]/sU";
if($_SESSION['xoopsUserId']) {
$ts->replacements[] = '\\1';
}else{
$ts->replacements[] = '<a href="'.XOOPS_URL.'/register.php"><img src="'.XOOPS_URL.'/hidden.gif" alt="Hidden Content" /></a>';
}
}
?>
ps.. i need to modify the credits on that file... |