I've modified this module to work with Shrink the Web since Websnapr is a paid service after an initial number of images have been served. Shrink the Web also allows local caching, athough I haven't worked that out yet.

To use it with Shrink the Web, put your StW access code in the Websnapr access code form, then change

websnapr_field.module
line 104 to:

$websnapr_url = 'http://www.shrinktheweb.com/xino.php?embed=1&stwsize='. $size .'&STWAccessKeyId='. $key .
'&stwUrl='. urlencode($item['query']? $url.'?'.$item['query']: $url);

I haven't tested it with all sizes and whatnot but so far it works with thumbnails so I thought I would share.

HTH

Comments

webwriter’s picture

I also made the following changes to lines 88-100

function websnapr_field_field_formatter($field, $item, $formatter, $url, $title) {
switch ($formatter) {
default:
case 'small':
$size = 'lg';
$height = 150;
$width = 200;
break;
case 'thumbnail':
$size = 'sm';
$height = 90;
$width = 120;
break;

This matches StW's image sizes for the formatter. :-)

puravida’s picture

Hi Webwriter,

One of our team members stumbled across this module and I thought I'd point out a best practice for the request you're using (for max compatibility):

Change this:

'http://www.shrinktheweb.com/xino.php?embed=1&stwsize='. $size .'&STWAccessKeyId='. $key .
'&stwUrl='. urlencode($item['query']? $url.'?'.$item['query']: $url);

To this:

'http://images.shrinktheweb.com/xino.php?stwembed=1&stwsize='. $size .'&stwaccesskeyid='. $key .
'&stwurl='. urlencode($item['query']? $url.'?'.$item['query']: $url);

This will account for some changes we're planning to make way down the road but will keep you having to update all the installs later. ;)

Great job and thanks for checking ShrinkTheWeb out!

Cheers,

Brandon

webwriter’s picture

Hi Brandon-

I just got the email about the new code and was getting ready to update this thread. Thanks for handling it!

geobaev’s picture

I created a new ShrinkTheWeb thumbnails module, http://drupal.org/project/shrinktheweb . The module is for Drupal 7.

George Baev
Drupal Developer

Visit my site: http://drupalin.eu
My Skype Id: geo_baev
My LinkedIn profile: http://bg.linkedin.com/in/georgebaev

alifdalya’s picture

Thanks to webwriter and puravida for sharing. its work for me
http://nesturl.com/added

geobaev’s picture

There is a Drupal 6 version of the ShrinkTheWeb module at http://drupal.org/project/shrinktheweb .

alifdalya’s picture

Issue summary: View changes
Status: Active » Closed (fixed)