MyBB Community Forums

Full Version: The only problem I get from upgrading...
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5
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 Undecided

Maybe I change that setting and didn't remember Confused

Hope the same solution to work at alv4 board.

Tanks for helping out in this one -G33k- Smile
Thanks a lot Smile
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?
You can report it here:
http://dev.mybboard.net/projects/mybb/issues

I'm not very sure if it is a bug, that is why I didn't reported it (apart from the fact that I'm too lazy to create a account).
Thanks I just reported it Smile
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).
Pages: 1 2 3 4 5