[pmwiki-users] improved markup for floating images...?

Ed W lists at wildgooses.com
Tue Jul 26 09:01:21 CDT 2005


Apologies.  My previous email sounded more like a winge than it was 
meant to be...

>>Why don't we just introduce an img:xxx tag and use that?  Have a look at 
>>the way media-wiki does it - I quite like their syntax (It's on my todo 
>>list to have a bash at this img tag actually)
>>    
>>
>
>We can do img:xxx for images, but it ends up looking an awful lot 
>like an InterMap link, and seems as though it would end up being
>treated a lot differently.
>  
>

I'm about to have a bash at some code on this and I'm not quite sure 
what you mean?

Just talking use case for a moment, I think what I am after is something 
a bit like the attach: syntax, but with knobs on.  Referencing the 
mediawiki image: tag for a moment I would like to be able to do all the 
following

A picture: [[Image:Wiki.png]]

or, with alternative text:
[[Image:Wiki.png|jigsaw globe]]

or, floating to the right side of the page and with a caption (and CSS 
frame):
[[Image:Wiki.png|frame|Wikipedia Encyclopedia]]

or, floating to the right side of the page ''without'' a caption or frame:
[[Image:Wiki.png|right]]

Basically the following options are supported: right, left, center, 
none, sizepx, thumbnail (thumb), frame, and alternate (caption) text.

I propose to support the resizing by making it mangle the image name to 
encode the resized file size.  Something like Wiki.png.500px or 
similar.  Then we can simply test for the existence of a given resized 
picture at delivery - create and store it if it doesn't exist, otherwise 
just serve it straight up.

How does this sound?  Notice how wikipedia use [[image:xxx]] in square 
brackets, do you want the syntax for pm to loose the [[..]]?
http://en.wikipedia.org/wiki/Image_markup

Notice also (rather interestingly) that they tend to float an image by 
default and you have to use a style="clear:both" to prevent it (which is 
actually easier I think than having a bunch of different ways to float 
it or not, just make the break explicit?)


Other syntax not discussed, but it should be possible is to use the 
image as the display item of a link, ie something like this should be 
valid.:

[[Topic|image:somepicture.jpg]]

Any comments so far?

Ed W
-------------- next part --------------
An HTML attachment was scrubbed...
URL: /pipermail/pmwiki-users/attachments/20050726/0a93e5e0/attachment.html 


More information about the pmwiki-users mailing list