anyway: XOOPS is a CMS, its not a FORUM.
although its great to have an exceptional CMS with an exceptional Forum, I'm happy with XOOPS as an exceptional CMS at the moment.
I'm not willing to say goodbye to newbb yet.
if ( empty($topic_lastread[$topic_id]) ) {
$sql = 'UPDATE '.$xoopsDB->prefix('bb_topics').' SET topic_views = topic_views + 1 WHERE topic_id ='. $topic_id;
$xoopsDB->queryF($sql);
}
//if ( empty($topic_lastread[$topic_id]) ) { //not needed
$sql = 'UPDATE '.$xoopsDB->prefix('bb_topics').' SET topic_views = topic_views + 1 WHERE topic_id ='. $topic_id;
$xoopsDB->queryF($sql);
//}
This is a first line.
And this is a second.
...
[url=xoops.org]I want to write a sample of my code...[/url]
$replacements[] = "'xoopsCode">'.stripslashes(wordwrap(MyTextSanitizer::htmlSpecialChars('\1'), 100)).'
'";
//Begin hack: [ code] tag content output correction
$replacements[] = "''";
'.stripslashes(wordwrap(MyTextSanitizer::htmlSpecialCharsCode('\\1'), 100)).'
//End hack: [ code] tag content output correction
//Begin hack: [ code] tag content output correction
//copy of htmlSpecialChars function but adopted for [ code] content (thats may content other xoops's codes and required for unchanged linebreaks (for corrected htmltag work))
//masking all \n and \r symbols from nl2Br function
//masking '[' and ']' symbols for comatibility with XOOPS codes which may be in a brought code.
function &htmlSpecialCharsCode($text)
{
return preg_replace(array("/&/i", "/ /i", "/\[/", "/\]/","/(\015\012)|(\015)|(\012)/"), array('&', ' ', "[" ,"]",'[xoops_code_nl]'), htmlspecialchars($text, ENT_QUOTES));
}
//copy of nl2Br function that's awaiting internal '[xoops_code_nl]' tags for reverting its to the originals \n.
function &nl2BrCode($text)
{
return preg_replace("/\[xoops_code_nl\]/","\n",$text);
}
//End hack: [ code] tag content output correction
if ($br != 0) {
$text =& $this->nl2Br($text);
}
//Begin hack: [ code] tag content output correction
if ($xcode != 0) {
$text =& $this->nl2BrCode($text);
}
//End hack: [ code] tag content output correction
if ($br != 0) {
$text =& $this->nl2Br($text);
}
//Begin hack: [ code] tag content output correction
if ($xcode != 0) {
$text =& $this->nl2BrCode($text);
}
//End hack: [ code] tag content output correction
$text = $this->nl2Br($text);
//Begin hack: [ code] tag content output correction
if ($bbcode == 1) {
$text =& $this->nl2BrCode($text);
}
//End hack: [ code] tag content output correction
$text = $this->nl2Br($text);
//Begin hack: [code] tag content output correction
if ($bbcode == 1) {
$text =& $this->nl2BrCode($text);
}
//End hack: [code] tag content output correction