![]() |
|
"Image Like opera" with black and white list? - Printable Version +- The Un-Official Proxomitron Forum (https://www.prxbx.com/forums) +-- Forum: Proxomitron Filters (/forumdisplay.php?fid=38) +--- Forum: Filter Help/Request (/forumdisplay.php?fid=31) +--- Thread: "Image Like opera" with black and white list? (/showthread.php?tid=1085) |
"Image Like opera" with black and white list? - Guest - Aug. 31, 2008 04:10 PM Name = "$LST(NoImages): Image to Link" Active = TRUE Multi = TRUE URL = "$LST(NoImages)" Bounds = "<img\s*.(jpg|png|bmp)*>" Limit = 512 Match = "<img*src=\"\2\"[^>]+>" Replace = "<a href=\"\2\" target=\"_blank\">[I]</a>" Hi, I've been using this filter for some time but I have some questions I'd like to replace the link with the "alt" text in images. But sometimes there is no alt text and sometimes the texts are too long. Is there a better way to deal with the alt text replacement? For example, if there is no alt, replace it with text "image" . And if text too long, trim it to 10 characters... I'm using the list $LST(NoImages) for sites that I want to block images now. Can I use a URL white list and a black list together. If yes, how should it be? Thanks RE: "Image Like opera" with black and white list? - Kye-U - Aug. 31, 2008 05:42 PM Here you are ![]() Code: [Patterns]If there is no ALT or TITLE attribute, it will simply set the link text to I, in square brackets. It will also trim the ALT/TITLE text to 10 characters. If you want it to display "Image", just change: Code: ((^$TST(\3=*))$SET(3=[I])|)To: Code: ((^$TST(\3=*))$SET(3=Image)|)As for using a white and blacklist together, I think you'll have to choose only one since using both at the same time would conflict. RE: "Image Like opera" with black and white list? - Guest - Aug. 31, 2008 08:50 PM Got it! Working great Thanks a lot RE: "Image Like opera" with black and white list? - ProxRocks - Sep. 01, 2008 12:18 AM cool!... i'm having a problem getting it to convert images to links for "cursed" sites that fill their <img> tags with 'white space'... Code: <imgCode: <img src="/br_static/generic-billfinder/images/emp_v3.gif" alt="Emergency Payments"both from here - (half-SSL'ed link), http://https-px-.mycheckfree.com/br/wps can the above work for those two .gif's? RE: "Image Like opera" with black and white list? - Kye-U - Sep. 01, 2008 06:01 AM The filter only worked for jpg, bmp and png files; I've made it so it supports jpeg and gif files as well, and also added "..." to truncated alt/title attributes: Code: [Patterns]RE: "Image Like opera" with black and white list? - ProxRocks - Sep. 01, 2008 12:58 PM doh! sorry 'bout that, i should have caught the .gif-bit, lol... thanks again... |