Last active
August 29, 2015 14:21
-
-
Save loulou2u/b210c5e974007074d16d to your computer and use it in GitHub Desktop.
Resizing RSS images
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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