[Pmwiki-users] Re: Show image whose URI doesn't end in e.g. 'jpg'

chr@home.se chr
Tue Aug 31 14:17:41 CDT 2004


On Tue, 31 Aug 2004, Patrick R. Michaud wrote:

> > Doesn't seem very intuitive for a normal user... nor very robust. To be
> > honest, I might *almost* consider this a bug in the treatment of links. 
> > For example, let's say an unsuspecting user enters:
> > 
> >   Go to this page to see the effect of image
> >   [[http://uri.org/effects.php?arg=blur&src=rose.jpg blurring]].
> > 
> > I'm not sure how obvious it is that you should permutate the arguments in 
> > order to make it work.
> 
> Umm, how does this not work? The above example displays the word
> "blurring" that is linked to the given url--i.e., exactly what I would
> expect.  Permuting the arguments doesn't make a difference here--or am I
> misreading something?

Oops.. sorry for the confusion. My brain is fuzzy today. I was actually 
thinking of simply writing the URI, and then I thought I'd make it more 
'elegant'... i.e. the example should have been:

   The following URI demonstrates blurring:
	http://uri.org/effects.php?arg=blur&src=rose.jpg

> PmWiki only generates an image when the *text* to be displayed (not the
> target) is both a URL and ends in .jpg, .gif, or .png.

You're right of course.

> You're probably worrying about the case
> 
>   [[ImageBlurring http://uri.org/effects.php?src=rose.jpg&arg=blur]]
> 
> which doesn't produce an image, but (I think) it's fairly easy to detect
> what is happening and fix it (i.e., "the url has to end in .jpg to be
> treated as an image).  And so far I still prefer "swap the arguments" to
> the alternative:
> 
>   [[ImageBlurring [[image src=http://uri.org/effects.php?src=rose.jpg&arg=blur alt='alt text']]]]

No, not so nice (although I don't see why you put 'src=' there). 

/Christian

-- 
Christian Ridderstr?m, +46-8-768 39 44               http://www.md.kth.se/~chr




More information about the pmwiki-users mailing list