Its that time of year again!
This bug is now in effect and will be until after April 4.

Note that this forum apparently has its Visit timeout set to one hour, but it needs to be longer. (PunBB SysAdmin - Please read posts 1 and 8 again)

Happy Daylight Savings Time everybody!

I brought this up in another thread: PunBB 1.3 discussion » Usernames containing square brackets.

The temporary fix is to use "double quotes". I guess this is considered to be a feature.

3

(12 replies, posted in Discussions)

In config.php file, what is your $base_url set to?

Yes, when the username is enclosed in double quotes, it appears to render correctly. But try it with either single quotes or no quotes, and you get the problem I described. For example:

[quote='username[with]brackets']Hello![/quote]

produces:

username[with]brackets wrote:

Hello!

and:

[quote=username[with]brackets]Hello![/quote]

produces:

username[with wrote:

brackets]Hello!

Kovalski wrote:

But if you write the string

*astericks
versus
Cesar*

your tags will be disabled and you will only see normal strings, not in bold...
If you add this features to the next version, then it will be created! smile

With Textile, the *bold* and _emphasized_ tags generate HTML in-line tags (i.e. <strong> and <em>), which must be wholly contained within a block tag (i.e. <p>, <div>, <blockquote> etc). Your example contains newlines, each of which Textile interprets as a new paragraph. Thus, the *bold* and _emphasis_ Textile tags cannot span multiple paragraphs. To make your example work, you must close each tag before a newline like so...

*asterisks*
*versus*
*Cesar*

Sorry, but that's just the way the Textile cookie crumbles... smile

Kovalski wrote:

Nice work. You have added many important BBcode tags.
But when I tested your extension, I found that tags were enabled only on one line, not on several lines.
The extension pun_bbcode supports this, and I can write tags on several lines.

Actually, I added only one BBCode tag: [textile] (and all other BBCodes become unavailable when you use it). And this tag must be the one and only BBCode in a message, and the entire message must be enclosed in the [textile] tag. But inside this one new BBCode tag, you can use many differtent textile syntax "tags'. For example, To emphasize something, sandwich it with _underscores_ to produce: underscores. To make something bold, sandwich it in *astericks* to produce: astericks. To make a numbered list, start each list item on a new line which begins with a # pound sign -

# item one
# item two
# item three

which produces:

  1. item one

  2. item two

  3. item three

The textile syntax is quite rich and once you get to know it, faster to type. You can also created bulleted lists, headers, tables, links, images, quotes, code, subscript, superscript and more.

I am working on another version of this extension which allows you to freely mix BBCode tags with Textile. Standby...

While looking into the latest beta version of FluxBB (1.4), I did some analysis of the parser (version 1078 - which is a variation of PunBB/FLuxBB 1.3). Well as it turns out the first two regular expressions both have errors! I wrote an in-depth article which describes these two regexes in detail (and their problems), and provides improved versions (which solve the problems). Although this article was originally written to target the FluxBB 1.4 parser.php, the exact same problems exist in PunBB 1.3.4. The only difference is the line numbers on which they occur. I have updated the article to include the affected line numbers for the PunBB 1.3.4 parser.

Here is a link to my article: FluxBB Parser Regular Expressions

(Caution: this is something only a true regex-geek would love!)

Note that the negative effects of these regex errors are minor - the only effect that users will see is that nested lists do not work correctly when the nested list has no '1', 'a' or '*' attribute specified. (i.e. you can nest using the {list=1} or {list=*} syntax, but you cannot nest the simple, attribute-free {list} syntax.)

PunBB/FluxBB 1.3 allows registration with usernames which contain square [] brackets (i.e. "ridge[run]ner]"). This causes problems when quoting these users, because the parser does not properly handle QUOTE attributes that contain [square brackets] (and by default, the quoted username is always added to the quote attribute). The resulting post after the parser chokes on it is not pretty (the parser cuts off the quote attribute at the first right square bracket and places the rest of it in the main message. You can see these effects by manually inserting some [text] into a QUOTE attribute and see the results. This bug is probably not serious, just cosmetic (but all the ramifications have not been tested).

Recommended short term fix is to simply dis-allow new usernames containing square brackets. For current users that have brackets in their usernames (probably very few or none), there are several options: 1.) Do nothing (and tolerate the resulting minor consequences). 2.) Inform the users that they need to sign up with a new account and then delete the offending accounts, or 3.) modify the offending usernames to remove the brackets (which might have unforeseen consequences), and notify the users. Fixing the parser to properly handle tag attributes which contain square brackets is possible, but is probably not going to be easy.

Note that PunBB/FluxBB version 1.2 also alows registration with usernames that contain square brackets, but that version appears to properly handle quotes from these users.

I've written a new PunBB 1.3.x extension (Textile BBCode Wrapper) that allows the user to compose a post (or signature) using Textile markup. Once the extension is installed, a post can be written in Textile by enclosing the entire message (or signature) in the new [textile]...[/textile] BBCode tag. Existing and future posts written using standard BBCode are completely unaffected and continue to work exactly the same. But new posts written using this new [textile] BBCode tag will be parsed by the classTextile.php code and HTML will be generated according to the Textile syntax. The extension adds a new section to the BBCode help page which describes some of the supported Textile syntax.

Note that, the [textile] start tag must be the very first text in the post and the [/textile] end tag must be the very last text in the post. It is a simple extension that uses the TextileRestricted() method of the classTextile.php class that was borrowed from the Textpattern 4.0.8 distribution. This restricted subset of the Textile code should be web safe (it does not allow setting element classes or attributes, but does allow a large subset of the Textile syntax - it uses the same subset as the Textpattern.org forums). Although I've christened it with an initial version of v0.1.0, its actually been tested pretty rigorously and works without any problems on PunBB 1.3.4 (but of course I am just one tester and would appreciate feedback from any other users.)

Download it here: jmr_textile_v0.1.0_20090719.zip

Enjoy! smile
Jeff Roberson - 2009-07-19

10

(21 replies, posted in News)

Is the PunBB 1.2 branch going to continue to be maintained?

11

(3 replies, posted in Discussions)

Regarding bold and italic, its already implemented. When you enter b and i bbcode tags, they are converted to <strong> and <em> html tags in the markup. Look at the source of this very page to see for yourself!

The cause of the problem is most definitely on the client end. In the affected areas (USA, Canada and others), a Windows (XP SP2 or earlier) box without the DST patch gets confused during this short period between the 2nd Sunday in March and the 1st Sunday in April. During this time period, if the local time is manually set correctly (ahead one hour), the internal GMT time (or UTC) is off by one hour into the future. So the Windows clock in the corner displays the right local time, but the internal universal UTC time (which is the time used by the browser when dealing with cookies), is one hour fast. The server is doing everything right. The PunBB forum software is just being too restrictive with the cookie timeout when dealing with computers that (unwittingly) have their clocks set 1 hour too fast. (Or more precisely, any computer that has their internal UTC clocks set "Visit timeout" seconds too fast.)

Note that this problem goes away after April 5 and the PunBB 1.3 forum "Visit timeout" can be set back to 1800 seconds (or whatever) with no ill effect. However, the problem will continue to occur each year, from...

  • 2009-03-08 thru 2009-04-05

  • 2010-03-14 thru 2010-04-04

  • 2011-03-13 thru 2011-04-03

  • 2012-03-11 thru 2012-04-01

  • 2013-03-10 thru 2013-04-07

  • 2014-03-09 thru 2014-04-06

  • 2015-03-08 thru 2015-04-05

p.s. Thank you for acknowledging this as being a problem. And I can see that in response, you have already increased the "Visit timeout" for this site forum to 1 hour (3600 seconds) - Thanks. Unfortunately this is not enough. Now, with my clock set to the correct local time (minus 10 seconds - so my clock is 10 seconds slow), I can login A-Ok, but my session expires in only 10 seconds! The "Visit timeout" needs to be greater than one hour. If you set it to 1.5 hour (5400 seconds), then my session will effectively last 0.5 hour (1800 seconds).

Sadly. PunBB (1.2 and 1.3) does NOT support the [size] BBCode element.
I would like it too.

Symptoms/Prerequisites: - You live in the USA or Canada. You are running Windows XP SP2 or older. You do not have Windows Automatic Updates turned on and have not installed all the Windows update patches. You manually set the clock forward one hour (to the correct local time) since the new Daylight Savings Time date: March 8, 2009.

Have you discovered that, just recently you can no longer login to a PunBB 1.3 (or FluxBB 1.3) forum? Do you now get the following message?:

Forum message wrote:

"You appear to have logged in successfully, however a cookie has not been set. Please check your settings and if applicable, enable cookies for this website."

Did you check to see if cookies were enabled and found that they were already enabled? Is this frustrating to you? This is what I recently experienced and after a bit of research, have found a solution.

User workaround 1: - select the "Log me in automatically each time I visit." checkbox when logging in. This gives a 2-week expiration for cookies which allows you to login with no problem.

User workaround 2: - Leave the Windows local time set one hour slow and let it automatically "Spring Forward" on its pre-programmed date: the 1st Sunday of April (Apr 5, 2009).

Administrator solution: - Forum administrators should set the "Visit Timeout" value to greater than 1 hour - say 1.5 hours = 5400 seconds (default is only 1800 seconds which is too small). And the developers should set the default value higher for future 1.3 software releases.

Description of the problem: - To make a long story short, the problem is related to Daylight Savings Time (DST) and Windows XP users living in locations (such as the USA) where the government has changed the date on which the time change occurs. In the USA the date to "Spring Forward" was changed from the 1st Sunday in April to the 2nd Sunday in March. (We are in this time period right now March 24.) It turns out that Windows XP has a patch to fix this problem that is automatically installed if you have the "automatic updates" turned on. But if you (like me), do NOT have auto updates turned on, you may not have this patch installed. (You can read about this Y2K-like problem and get the DST patch here.)

The login problem only occurs when you (as a good time-keeping citizen) manually set the Windows clock to the correct local time when the time change occurs (the 2nd Sunday in March). The Windows clock becomes effectively one hour fast (with respect to UTC), and the PunBB cookie default "Visit Timeout" expiration time is set to be 1/2 hour (1800 seconds) into the future from the time of login. Thus, cookies are arriving at the browser pre-expired by 1/2 hour and login fails because the cookie is not set. (This behavior occurs with Internet Explorer (version 6 and 7) and Opera (9.x), but does not occur with Firefox (2 and 3))

After April 5, this problem should automatically disappear.

Edit 2010-03-15: - Well, its that time of year again! Same problem, different year.  (see my second post below - post 8). This problem will exist this year from March 14 until April 4, 2010.

As of 2008-12-25 the XHTML 1.0 Strict markup fails validation. It used to be ok...

Edited:
Fixed: As of 2009-02-03 the PunBB forum now passes W3C validation.

16

(8 replies, posted in PunBB 1.3 extensions)

- Textpattern Integration (shared user DB (i.e. one login), Txp comments -> forum thread)
- Textile parser

My appologies. Although I did search all forums for punnBB/Textpattern related topics, and read all the relevant threads prior to posting, I should have looked at all of the available forums before posting to the "Feature request" board. I can now see that this forum is the obvious place for this topic. I'm usually much more careful and respectful than this.

Once again, sorry! - rr

I'm old school (can you say PDP-11, RT-11 and FORTRAN?) and have always followed the K.I.S.S. principle in my 26 year software engineering career. Although relatively new to this whole new web dev tech thing, I've been doing my homework lately to catch up: (learning XHTML, CSS, DOM/JS, PHP, MySQL, Hijax, etc). However, to save me from having to re-invent the wheel, I'd like to incorporate some cream of the crop open source packages - and there seem to be many to choose from. And in my mind, the only way to fly is with simple, clean (maintainable) code that is small, fast and WC3 valid. Both punBB (forum) and Textpattern (CMS) appear to fit this criteria nicely. But it would sure be nice if they played well together and shared one common user authentication method. Also, comments to a TxP article could automatically create a new associated punBB thread topic. And the use of textile (in addition to BBCode) in punBB would be nice too. I've searched both here and on the TxP forum and read some threads showing interest in this TxP/punBB union. So what's the latest on this?

Or is Textpattern falling by the wayside?

19

(74 replies, posted in Feature requests)

Textpattern integration?

I'm old school (can you say PDP-11, RT-11 and FORTRAN?) and have always followed the K.I.S.S. principle in my software engineering career. Although relatively new to this whole new web dev tech thing, I've been doing my homework to catch up: (learning XHTML, CSS, DOM/JS, PHP, MySQL, Hijax, etc). However, to save me from having to re-invent the wheel, I'd like to incorporate some cream of the crop open source packages - and there seem to be many to choose from. And in my mind, the only way to fly is with simple, clean (maintainable) code that is small, fast and WC3 valid. Both punBB (forum) and Textpattern (CMS) appear to fit this criteria nicely. But it would sure be nice if they played well together and shared one common user authentication method. Also, comments to a TxP article could automatically create a new associated punBB thread topic. And the use of textile (in addition to BBCode) in punBB would be nice too. I've searched both here and on the TxP forum and read some threads showing interest in this TxP/punBB union. So what's the latest on this?

Or is Textpattern falling by the wayside?

20

(114 replies, posted in Programming)

Ultra-Edit32 has a word wrap mode that indents the wrapped text. (You can have the best of both worlds!) It has been my editor of choice for both text and binary files for the last 10 years. However, it runs only under Windows. IMHO it is worth ten times its price. Rock solid with tons of features.

Active State's Komodo IDE is a total solution which handles all types of front and back end code (XHTML, CSS, Javascript, PHP, Perl, Python, etc) complete with comprehensive debugging support and it runs the same on all major platforms (Windows, Linux, OSx). Although it is extremely powerful and works reliably, it can only be considered bloatware (i.e. on a Windows box, it installs no less than 24MB (2821 files in 43 folders) in the "user/Application Data/" folder and 93MB (3523 files in 312 folders) in the "Program Files/" folder - Yipes!) But as I said, it pretty much does it all, is reliable and runs cross platform. I use it for debugging Javascript and PHP and use Ultra-Edit32 for the actual editing. Note that its little brother: Komodo Edit, is freeware and shares most of its functionality (but is equally bloated).

For (X)HTML and CSS, its hard to beat TopStyle. The developer, Nick Bradbury, has recently started back working on it and a new version will be out fairly soon!

And I must confess that I use MS Visual Studio 6 when coding Win32 C code because of its built-in MSDN context sensitive help system.

p.s. Hi everybody! - I'm new to this world of web development (although my first programs were written in FORTRAN on punch cards back in the '70s), and recently decided to go with PunBB for my forums (I really agree with its: "Keep It Simple Stupid" philosophy).