PDA

View Full Version : Suggestion - time to update the new page break BB code


h2ojunkie
12-21-2008, 09:56 PM
For the most part the current BB code format for new page breaks works well.


However, this can cause problems in some areas since there is no closing tag for the BB code.

For example:
http://www.thedogpound.org/forum/archive/index.php/t-188.html
Search the page for "Why did my vet not recommend glucosamine"

You will notice this line is preceded by a B (bold) bbcode tag that was not stripped from the page.

This is being caused by the fact that the gars BREAK bbcode has no closing tag.

After doing a little testing, I found a simple way to correct this issue by updating the gars BREAK bbcode to the following

[BREAK]New Page

Maybe this can be considered for the next maintenance release.

Morgan
12-23-2008, 03:16 AM
Please create a post in this (http://www.thevbgeek.com/forumdisplay.php?f=41) forum with what you are using so that I can see an example. Note that the BREAK tag should be used as follows:

Page One Text
[BREAK=page2]
Page Two Text
[BREAK=page3]
Page Three Text

h2ojunkie
12-23-2008, 05:27 AM
Working as it should:
http://www.thevbgeek.com/showthread.php?p=27306

And the achier having problems stripping out all BB code because the BREAK tag doesn't have a closing tag:
http://www.thevbgeek.com/archive/index.php/t-4903.html

As you can see, the archive strips out the opening BREAK tag just fine.

However, the function that strips out BB code for the archive first looks for an opening tag, strips it, then looks for a matching closing tag and strips that.

Since the tags on this page appears as:
some text

some more text

VB successfully strips out the first open/close B tags

Then strips the opening BREAK tag, skips the opening B tag (because it's looking for a closing tag match for BREAK.

Then it goes on to strip the closing B tag

The only workaround I found without editing VB core files is to change the format of the BREAK tag as I mentioned earlier so it also has a closing tag.

When the BB code appears on the page like this:
some text
[break=new page]
some more text

OR:
some text
newpage
some more text

Everything strips out fine. Of course, in the first example the closing tag ends up appearing in the full version and print version since GARS doesn't strip it out, and the second version isn't supported at all by gars but is probably the better way to do it since the 2nd version would allow the page title to show in the archive and in the printthread version without any further modifications.

P.S. This bug will only appear in the archive if there are BB code tags after the BREAK tag

Morgan
12-26-2008, 01:22 AM
Thanks for the details. Will look into changing this in the next version.