
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[] = '.XOOPS_URL.'/register.php">
.XOOPS_URL.'/hidden.gif" alt="Hidden Content" />';
}
XhiddencontentX This is hidden content. You can see this when you register and login X/hiddencontentX
XhiddencontentX
X/hiddencontentX
function geshi_highlight( $source, $language )
{
$source = str_replace('"', '"', $source);
include_once(XOOPS_ROOT_PATH . '/class/geshi.php');
$language = strtolower($language);
$source = $this->undoHtmlSpecialChars($source);
// Create the new GeSHi object, passing relevant stuff
$geshi = new GeSHi($source, $language, XOOPS_ROOT_PATH . '/class/geshi/');
// Enclose the code in a
$geshi->set_header_type(GESHI_HEADER_PRE);
// Turn CSS classes on to reduce output code size
$geshi->enable_classes();
// Parse the code
$code = $geshi->parse_code();
// Remove
's added by GeSHi - they are added by phpBB later anyway
$code = str_replace('
', '', $code);
return $code;
}
I made some changes and now the hack is cool following chars;
function geshi_highlight( $source, $language )
{
$source = str_replace('"', '"', $source);
include_once(XOOPS_ROOT_PATH . '/class/geshi.php');
$language = strtolower($language);
$source = $this->undoHtmlSpecialChars($source);
// Create the new GeSHi object, passing relevant stuff
$geshi = new GeSHi($source, $language, XOOPS_ROOT_PATH . '/class/geshi/');
// Enclose the code in a
$geshi->set_header_type(GESHI_HEADER_PRE);
// Turn CSS classes on to reduce output code size
$geshi->enable_classes();
// Parse the code
$code = $geshi->parse_code();
// Remove
's added by GeSHi - they are added by phpBB later anyway
$code = str_replace('
', '', $code);
// Added By Bora Canbula to show Turkish chars
$code = str_replace('ð', 'ğ', $code);
$code = str_replace('ý', 'ı', $code);
$code = str_replace('þ', 'ş', $code);
$code = str_replace('Ð', 'Ğ', $code);
$code = str_replace('Ý', 'I', $code);
$code = str_replace('Þ', 'Ş', $code);
return $code;
}
that's all..if anybody has a problem in his own language..can do the same thing
[/code]
hhttp://www.xoops-tr.com - Turkish Xoops