Author Topic: Image links to Inline  (Read 3000 times)

Jor

  • Sr. Member
  • ****
  • Posts: 421
    • ICQ Messenger - 10401286
    • AOL Instant Messenger - jor otf
    • Yahoo Instant Messenger - jor_otf
    • View Profile
    • http://members.outpost10f.com/~jor/
    • Email
Image links to Inline
« 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!

 
 

Jor

  • Sr. Member
  • ****
  • Posts: 421
    • ICQ Messenger - 10401286
    • AOL Instant Messenger - jor otf
    • Yahoo Instant Messenger - jor_otf
    • View Profile
    • http://members.outpost10f.com/~jor/
    • Email
Image links to Inline
« Reply #1 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 />"


 
 

altosax

  • Sr. Member
  • ****
  • Posts: 328
    • ICQ Messenger -
    • AOL Instant Messenger -
    • Yahoo Instant Messenger -
    • View Profile
    • http://
    • Email
Image links to Inline
« Reply #2 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.

 
 

Jor

  • Sr. Member
  • ****
  • Posts: 421
    • ICQ Messenger - 10401286
    • AOL Instant Messenger - jor otf
    • Yahoo Instant Messenger - jor_otf
    • View Profile
    • http://members.outpost10f.com/~jor/
    • Email
Image links to Inline
« Reply #3 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.

 
 

altosax

  • Sr. Member
  • ****
  • Posts: 328
    • ICQ Messenger -
    • AOL Instant Messenger -
    • Yahoo Instant Messenger -
    • View Profile
    • http://
    • Email
Image links to Inline
« Reply #4 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