i think i will use all ur hacks hehehehe
note :
but plz dont forget to upgrade this hacks after release new version of XOOPS
btw can you help me with this topic
click here
its about newbb you can test the views count to make sure
This is a first line.
And this is a second.
...
[url=xoops.org]I want to write a sample of my code...[/url]
$replacements[] = "'<div class="xoopsCode"><code><pre>'.stripslashes(wordwrap(MyTextSanitizer::htmlSpecialChars('\1'), 100)).'</pre></code></div>'";
//Begin hack: [ code] tag content output correction
$replacements[] = "'<div class=\"xoopsCode\"><code><pre>'.stripslashes(wordwrap(MyTextSanitizer::htmlSpecialCharsCode('\\1'), 100)).'</pre></code></div>'";
//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 html <pre> tag 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
patagon wrote:
also, does one have to "uninstall' one of the hacks before "installing" the other? I have been trying so many things to get this done that I dont even know how many files I modified...
patagon wrote:
Hi:
I wonder if anyone can explain (in a simple, for non programmers way) the difference between these hacks. I currently use one of them (I believe its jan's) and it seems to work, users stay logged for the time that I specify the custom session to last. I have setted that in minutes to a day, I would like to set it longer (like some sites I visit where I'm never logged out) but I read someplace that it wasnt a good idea, because of performance issues with the server.
What i wonder is if these new hack by andrey will let me set it so that users never log out (unless they want to). I guess I am missing something here, but thats why a good explanation would help