Not signed in ( Sign In)

Categories

Welcome, Guest

Want to take part in these discussions? Sign in if you have an account, or apply for one below

Vanilla 1.1.10 is a product of Lussumo. More Information: Documentation, Community Support.

    •  
      CommentAuthortombarr
    • CommentTimeAug 23rd 2010
     permalink
    After reading this, http://www.esuli.it/2008/10/11/modifying-the-bbcode-plugin-in-flatpress/ , why is this not included in Flatpress default BBCode plugin? Adding the alt attribute is the least you can do for accessibility.
    •  
      CommentAuthorNoWhereMan
    • CommentTimeAug 23rd 2010 edited
     permalink
    Well, first of all I'd that the "least" I could do for accessibility is doing nothing at all ;)

    Then consider
    1) At the time of the adoption I was not aware BBCode_StringParser (the underlying library) allowed for attributes containing spaces
    2) Very little people do care about accessibility and just leave the alt= field empty (which is in fact allowed by the standard IIRC); FlatPress tries to do a best-effort auto-fill-in by looking for IPTC fields and trying to use those, falling back to the filename if those are empty/unavailable.
    3) If you need full control on how your <img /> will look like, you can enable inline html from the plugin config panel
    4) There is an extendedimg plugin

    btw, I have now committed a change to SVN, so everybody's happy ;)

    it will let you specify either alt, title or both. Remember they are independent (they are not supposed to be the same!); also, if left blank, the plugin will fall back to the old method (img filename, or IPTC value)
    •  
      CommentAuthortombarr
    • CommentTimeAug 25th 2010
     permalink
    I noticed the default, which I was at least glad to see. The title and the alt should not be the same, but I would rather see that than no alt attribute, or setting both the alt and title to the image filename.
    As far as inline HTML, that would not suffice because then I would have to specify the absolute path of the image as opposed to the BBCode parser which does a lookup for me.
    I didn't know the extendedimg plugin existed, but thats perfect because now I can see changing that a little to support HTML5 figure and figure captions. I'll have to look into that.
    •  
      CommentAuthorNoWhereMan
    • CommentTimeAug 25th 2010
     permalink
    As far as inline HTML, that would not suffice because then I would have to specify the absolute path of the image as opposed to the BBCode parser which does a lookup for me.


    I thought for a while about a simple plugin which would look for simple 'variables' in your post (e.g. $images/) and replace it automatically with the correct path. It would be trivial to implement, since the function is there, ready to be copypasted/customized, in plugin.bbcode.php ( bbcode_remap_url() )

    feel free to have a look, if you want ;)