Old Proxomitron Forums

Proxomitron Filters - Discussions welcome => Other => Topic started by: Jor on April 25, 2002, 02:15:48 AM

Title: Image links to Inline
Post by: Jor on April 25, 2002, 02:15:48 AM
Don't think I posted this filter yet:
Name = "Image links to Inline (Not for normal use!)"
Active = FALSE
Multi = TRUE
Limit = 256
Match = "<a href=$AV((*.(jp(e|)g|gif|png)*)1) >2</a>"
Replace = "<img src="1" alt="2"><br />"

It's mainly for use with image galleries, when activated, instead of link after link you will now see all images in-line.
Do not activate this filter for normal webbrowsing!

 
Title: Image links to Inline
Post by: Jor on June 03, 2002, 12:17:30 PM
Current version, this will "get" more images, and also add the link text as an alt attribute. It's been sped up some by using correct bounds.

Name = "Image links to Inline (Not for normal use!)"
Active = FALSE
URL = "$TYPE(htm)"
Bounds = "$NEST(<a,</a>)"
Limit = 512
Match = "<a href=$AV((*.(gif|png|jpg|jpeg|jpe|bmp|xbm)*)1) >2</a>"
Replace = "<img src="1" class="image" alt="2"><br />"


 
Title: Image links to Inline
Post by: altosax on June 03, 2002, 02:26:04 PM
because of the use of bounds, this could be safer to take care of something like:
<a target=_blank href="..." alt="...">

Name = "Image links to Inline (Not for normal use!)"
Active = FALSE
URL = "$TYPE(htm)"
Bounds = "$NEST(<a,</a>)"
Limit = 512
Match = "* href=$AV((*.(gif|png|jpg|jpeg|jpe|bmp|xbm)*)1)>2</a>"
Replace = "<img src="1" class="image" alt="2"><br />"

also, you don't need <br /> instead of <br>, btw this could help in the next years ;)

regards,
altosax.

 
Title: Image links to Inline
Post by: Jor on June 03, 2002, 03:12:13 PM
Not too sure what you mean with the <br /> comment... I always use XHTML where possible, never encountered any problems

Alterations to the filter are good of course, taken them up. I hadn't really thought this filter through it seems... only found simple links. But you're right they may also use targets.

 
Title: Image links to Inline
Post by: altosax on June 04, 2002, 04:58:55 PM
hi jor,
mine comment was ironic, note the smile at the end ;)

simply, i was saying that xhtml is used by very few sites actually (and probably for a long time) and all the browser still support html. btw, excuse me if mine seemed a criticism.

<added after editing>: <img ... />

best regards,
altosax.



Edited by - altosax on 04 Jun 2002  18:01:09