Old Proxomitron Forums
October 31, 2014, 10:33:44 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: No activity here! This forum is read-only. Go to http://prxbx.com/forums/index.php.
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Image links to Inline  (Read 685 times)
Jor

Sr. Member
****
Posts: 421

10401286 jor otf jor_otf
View Profile WWW Email
« 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!

 
Logged

 
Jor

Sr. Member
****
Posts: 421

10401286 jor otf jor_otf
View Profile WWW Email
« 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 />"


 
Logged

 
altosax

Sr. Member
****
Posts: 328


View Profile WWW Email
« 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 Wink

regards,
altosax.

 
Logged

 
Jor

Sr. Member
****
Posts: 421

10401286 jor otf jor_otf
View Profile WWW Email
« 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.

 
Logged

 
altosax

Sr. Member
****
Posts: 328


View Profile WWW Email
« Reply #4 on: June 04, 2002, 04:58:55 PM »

hi jor,
mine comment was ironic, note the smile at the end Wink

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
Logged

 
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!