You mean the "
Number of Characters before Word Wrapping Occurs" setting right?
Never thought about that, but I don't know why it started failing after the upgrade
Maybe I change that setting and didn't remember
Hope the same solution to work at alv4 board.
Tanks for helping out in this one -G33k-
Thanks a lot
That fixed the problem. I think that is a bug new in 1.6.4.
Where can I report it? Or you already did it?
Thanks I just reported it
In response to
Issue #1719: Mycode affected by word wrap setting, wordwrap is in fact doing it's job. It finds a string that has 40 continuous letters and splits it, as per the user's setting.
There are two optimizations for this situation. You either a). make the 'onclick' a function call, which will be beneficial if there are multiple spoiler tags on the same page or b). write better javascript.
For example, the following replacement works exactly the same and yet doesn't get hit by a 40 character wordwrap setting.
<div class="spoiler" vling="top" align="center"><div class="spoiler_header"><button class="button spoilerb" onclick="el = $(this).up().next(); el.visible() ? this.innerHTML = 'Mostrar contendido' : this.innerHTML = 'Ocultar contenido'; el.toggle();">Mostrar contenido</button>Spoiler:</div><div class="spoiler_content" style="display: none;">$1</div></div>
As a function call, using the following replacement and adding the function to the bottom of the showthread template will work equally (if not efficiently) better.
<div class="spoiler" vling="top" align="center"><div class="spoiler_header"><button class="button spoilerb" onclick="showSpoiler(this);">Mostrar contenido</button>Spoiler:</div><div class="spoiler_content" style="display: none;">$1</div></div>
function showSpoiler(e)
{
var el = $(e).up().next();
el.visible() ? this.innerHTML = 'Mostrar contendido' : this.innerHTML = 'Ocultar contenido';
el.toggle();
}
^
Alright then Tomm, I managed to solve the issue in my forum using the code you provide in one forum and using -G33K- solution in another one (because of some issues).