Line | |
---|
1 | <?php /* |
---|
2 | Plugin Name: Dynamic images |
---|
3 | Version: 0 |
---|
4 | */ |
---|
5 | |
---|
6 | global $conf; |
---|
7 | // 0-'auto', 1-'derivative' 2-'script' |
---|
8 | $conf['derivative_url_style']=0; |
---|
9 | |
---|
10 | defined('PWG_DERIVATIVE_DIR') or define('PWG_DERIVATIVE_DIR', PWG_LOCAL_DIR.'i/'); |
---|
11 | |
---|
12 | include_once( dirname(__FILE__) .'/include/derivative_params.inc.php'); |
---|
13 | include_once( dirname(__FILE__) .'/include/derivative_std_params.inc.php'); |
---|
14 | include_once( dirname(__FILE__) .'/include/derivative.inc.php'); |
---|
15 | |
---|
16 | ImageStdParams::load_from_db(); |
---|
17 | |
---|
18 | add_event_handler('get_thumbnail_url', 'dyn_thumb_url', 60, 2); |
---|
19 | |
---|
20 | function dyn_thumb_url($url, $infos) |
---|
21 | { |
---|
22 | $url2 = DerivativeImage::thumb_url($infos); |
---|
23 | return $url2; |
---|
24 | } |
---|
25 | |
---|
26 | ?> |
---|
Note: See
TracBrowser
for help on using the repository browser.