Skip to main content
Recent Posts
1
Addons / [ADDON] Magnet link bbcode
Last post by inter -
Links:
GitHub | Download

Description:
"Magnet is a URI scheme that defines the format of magnet links, a de facto standard for identifying files (URN) by their content, via cryptographic hash value rather than by their location."

Examples:
[magnet]B111813CE60F42919734823DF5EC20BD1E04E7F7[/magnet]
[magnet=B111813CE60F42919734823DF5EC20BD1E04E7F7]Debian CD from cdimage.debian.org[/magnet]
2
Theme development / Re: Click to expand quote
Last post by Antechinus -
Fair enough. No point turning such an edge case into a major bunfight. Any time I really need to post something like that in a code box I can easily do [ /code] for the example (with a note about the extra space). Anyone messing with regex will know enough to be able to figure that out. ;)
3
Theme development / Re: HTML main tag and a11y
Last post by Antechinus -
Ok, if WAVE can still see the main tag where it was, it may be that screen readers have improved since WebAIM wrote their article. Not sure. It's just something I noticed when reading their site. :)
4
Theme development / Re: Click to expand quote
Last post by Spuds -
After taking a quick look at that, I'm going to agree with not a:bug::D

I thought there may be a way in preparse to catch/fix the issue but there really is no great or even good way to do that.  Its even worse as the open/close tags are not balanced in the example which just makes it even worse as its already nested inside another parent tag. 

There may be potential to catch it in the editor, but that will be very specific use case.  I'm thinking you use the toolbar to open a set of code tags, then one could capture all the items added between those markers and protect them, but there are others ways to add stuff that will cause that to fail.
5
Theme development / Re: HTML main tag and a11y
Last post by Spuds -
Well that kind of stinks:nose:

It not flagging that issue when I run the wave analyzer, not that it is infallible, (much like the html validator).  I'll move it around and see what breaks when I do that. 

I've been cleaning up some of the other low hanging fruit that the validator spits out, some of it is a bit of a circle jerk, but some is just easy.
6
Theme development / Re: Click to expand quote
Last post by Arantor -
I’d argue not a bug… how could it possibly know that [/code] is on this one occasion is different to [/code] to indicate “I’m done with the code now”?

The only way around this would be to assume that the end of a code block must start on a new line which will play hell with converters, not to mention making the code tag even more of a special case than it already is (and behave differently to everything else, e.g. quote where the end tag doesn’t have to be the only thing on the line)
7
Theme development / HTML main tag and a11y
Last post by Antechinus -
I noticed that your < main > tag is  nested inside #wrapper and #main_content_section. This is "hierarchically-correct" according to W3 specs, but WebAIM says:
Quote< header >, < main >, and < footer > must be direct children of < body > to be exposed to screen readers. They cannot be nested within other container elements.
Which is a bit of a nuisance. With a forum it more or less means you either bung the news and linktree into < main >, or you find somewhere else for them.

I've gone with just bunging the news and linktree in. I figure that, in practice, the lower linktree and all sorts of minor shiznit (post buttons, etc, etc) are going to have to end up in there anyway, so no point getting too persnickety about the top linktree and the news being in there either. The skipnav link can still go straight to #main_content_section, so no dramas there.
9
Theme development / Re: Click to expand quote
Last post by Antechinus -
Test quoting my earlier post...

Quote from: Antechinus  -  Ok, example:

Quote from: Third reply* lol *
Quote from: Second reply* the entire text of War & Peace here *

In this example (which accurately represents an average internet discussion) if the admin setting was 1 level of nested quotes, you would see this...

Quote from: Third reply* lol *
Quote from: Second reply* the entire text of War & Peace here *

If the admin setting was 2 level of nested quotes, you would see this...

Quote from: Third reply* lol *
Quote from: Second reply* the entire text of War & Peace here *

ETA: Seems to do what it says on the tin. :) Now to try it with something else...

Quote from: Third reply* lol *
Quote from: Second reply* the entire text of War & Peace here *
Code: [Select]
		/*--- Quote tag variations. ---*/
'~<QUOTE author=\\"(.+?)\\" post_id=\\"(.+?)\\" time=\\"(.+?)\\" user_id=\\"(.+?)\\"><s>(.+?)</s>~s',
'~<QUOTE author=\\"(.+?)\\"><s>(.+?)</s>~s',
'~<QUOTE><s>\[quote]</s>~s',
'~<e>\[/quote]</e></QUOTE>~s',
/*--- Code boxes: first case is an odd one. ---*/
'~<CODE><s>\[code]</s><i>\\n</i>~s',
'~<CODE><s>\[code]</s>~s',
'~<e>\
</e></CODE>~s',
      /*--- List types: decimal, lower-alpha, upper-alpha, lower-roman, upper-roman... ---*/
      '~<LIST type="(.+?)">(.+?)~s',
      '~<LIST>\
    ~s',
          '~<e>\
</e></LIST>~s',
      '~<LI>\[\*]~s',
      '~</LI>~s',[/code]

Ok, here's a bug for you. When I test post a code box containing regex*,  it breaks at one of the code tags nested in the regex.

IOW, it can't recognise that anything inside a code tag is code, even if it's another BBC tag.

This may be a general Elk bug, not specifically a bug in handling nested quotes. Not sure yet. I grabbed this example regex at random, just noticed the result, and haven't yet done any further testing. :)

Admittedly this is a particularly nasty edge case. Not sure it is worth attempting a bulletproof fix. Check it out in the BBC editor mode to see what is happening. ;)

*(example is from an updated phpBB > SMF/Elk converter I'm working on)