Bratislava: Broken clouds, -5 °C
Piclens once again - Greasemonkey + PHP script for any gallery!
I mentioned the Piclens extension and it's website integration in the previos post this week. Today I was sitting at work and I got this idea - why shouldn't it be possible to use Greasemonkey to utilize the Piclens Lite javascript functions to run Piclens on any site?
Firstly, I needed a site that I would like to see Piclensed so I could experiment. Well, I chose a famous imageboard which I frequently read, and so I started working on it. My first idea was to use the PicLensLite.start() function with the feedData parameter, which would be an awesome thing if it actually could be sent to the Piclens extension itself. But unfortunately, this approach is only possible with the Piclens Lite javascript slideshow. The extension itself only accepts the RSS URL, from where it loads the data. This was an obstacle, but nothing drastic. It only required a HTML parser in PHP and voila, it's working. The only drawback is that not everyone can host their own parser/RSS generator on some server. I would be best if the feedData parameter could be sent to the Piclens extension directly.
Anyway, I give the script out for free usage and modification. It's a working proof-of-concept, and it's easily modifiable to suit any gallery site you would like to see in Piclens. All you need to do is change the Greasemonkey script to load the button in some div that is present on the site, and alter the RSS generator to parse the gallery according to the given site pattern.
I have to give credit to PHP Simple HTML DOM Parser which I used to parse the sites. And also to the creators of Piclens and Greasemonkey, awesome extensions indeed.
Download the script package here - upload the threadparser.php and simple_html_dom.php to your server, check and alter the 4chan2piclens.user.js and it's PARSER variable, and install into Greasemonkey. Every thread on the mentioned imageboard will then have a nice Piclens icon in the top right corner, which will activate Piclens uppon clicking.
- Add new comment
- 433 reads



ever thought about submitting
ever thought about submitting this script to cooliris or speaking about it on the firefox addon site... so that cooliris can add its functionality to their extension.
I actually did post on
I actually did post on cooliris development forums right when I made this script, asking for better support. But, no response. http://developer.cooliris.com/dev_forum/comments.php?DiscussionID=30
how do I use this to display
how do I use this to display images in the background of 4chan? I don't know how to install it. I have GM and I downloaded the zip, what else do I do?
It's written in the last
It's written in the last paragraph. The point is, that you need a webserver where you can host the parser php. After that, you edit the greasemonkey userscript and put the URL of your parser to the PARSER variable. Then just install it as every other greasemonkey userscript.
Maybe it's a bit too much for the average user. I might get some freehosting service for the parser and put out just the userscript that doesn't need any editing.
would be nice....
would be nice....