Skip to content

Instantly share code, notes, and snippets.

@loulou2u
Last active August 29, 2015 14:21
Show Gist options
  • Save loulou2u/b210c5e974007074d16d to your computer and use it in GitHub Desktop.
Save loulou2u/b210c5e974007074d16d to your computer and use it in GitHub Desktop.
Resizing RSS images
<?php
$_LW->REGISTERED_APPS['resize_images'] = array( // configure this application module
'title' => 'Resize Images',
'handlers' => array('onLoad')
);
class LiveWhaleApplicationResizeImages {
public function onLoad() { // on frontend request
global $_LW, $LIVE_URL;
// if this is a LiveURL RSS request
if (!empty($LIVE_URL) && strpos($LIVE_URL['REQUEST_URI'], $_LW->CONFIG['LIVE_URL'].'/rss/')===0) {
// override the default 80x80 image thumbs. below we will resize to 400px x 400px.
// adjust the sizes below to your specifications.
$_LW->IMAGE_THUMB_WIDTH=400;
$_LW->IMAGE_THUMB_HEIGHT=400;
};
}
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment