Adblock for Leed ================ This is a plugin for Leed written by Phyks (phyks@phyks.me) to allow a leed user to : * Mask all embedded flash contents in the feeds (and allow him to play this content in a click to play way) * Mask all the images in the feeds to load the pages faster This behavior can be fully customized in a per feed way (with either a blacklist or a whitelist). You can also choose to disable images only on mobile browsers. **Important note :** To install the plugin, just do as usual with leed plugins. The adblock folder goes in the plugins directory of your leed installation. **Don't rename** the adblock directory unless you know what you do (you will need to change some paths values in the script itself). For an elegant degradation, _ie_ replacement of the deleted content by neutral content of the same size, you will need the getimagesize available in PHP and the directive _allow_url_fopen_ set to _On_ in your php.ini config file (the plugin will verify this for you). **Note :** This will replace all images (found by searching for <img> tags) and all embedded objects (found by searching for <object> tags). This will only mask them when you display the page (and not load them) on a server side. If you click on the replacement content, it will load the masked content. So, the content is always downloaded from the external server to your running leed instance, but is only downloaded on-demand from to your device. ## Constants (_adblock_constants.php_ file)
Parameter | Possible values |
---|---|
_flash_enabled_ | _0_ to disable flash blocking, _1_ to enable |
_flash_block_ | _1_ to block all flash content by default, _0_ to allow flash and block with a blacklist (per feed) |
_flash_list_ | Comma-separated list of feeds to allow (if _flash_block_ is _1_) or to block (if _flash_block_ is _0_) |
_img_enabled_ | _1_ to enable image blocking, _0_ to disable |
_img_block_ | _1_ to blockall images by default, _0_ to allow images and block selectively with a blacklist (per feed) |
_img_only_mobiles_ | _1_ to make all the rules relative to images work only on mobiles, _0_ else |
_img_list_ | Comma-separated list of feeds to allow (if _img_block_ is _1_) or to block (if _img_block_ is _0_) |