Last change
on this file since 20299 was
9768,
checked in by patdenice, 14 years ago
|
Compatible with addSimple method.
|
File size:
1.3 KB
|
Rev | Line | |
---|
[5943] | 1 | <?php |
---|
| 2 | /* |
---|
| 3 | Plugin Name: Square Thumbnails |
---|
| 4 | Version: auto |
---|
| 5 | Description: Add an option to make square thumbnails |
---|
| 6 | Plugin URI: auto |
---|
| 7 | Author: P@t |
---|
| 8 | Author URI: http://www.gauchon.com |
---|
| 9 | */ |
---|
| 10 | |
---|
| 11 | if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!'); |
---|
| 12 | |
---|
| 13 | define('SQUARE_THUMB_PATH' , PHPWG_PLUGINS_PATH . basename(dirname(__FILE__)) . '/'); |
---|
| 14 | |
---|
[5962] | 15 | if (defined('IN_ADMIN')) |
---|
[5943] | 16 | { |
---|
[5962] | 17 | add_event_handler('init', 'square_thumbnails_init'); |
---|
[5943] | 18 | |
---|
[5962] | 19 | function square_thumbnails_init() |
---|
| 20 | { |
---|
| 21 | global $conf; |
---|
[5943] | 22 | |
---|
[5962] | 23 | // Thumbnail creation page |
---|
| 24 | if (isset($_GET['page']) and $_GET['page'] == 'thumbnail') |
---|
| 25 | { |
---|
| 26 | include(SQUARE_THUMB_PATH.'thumbnail.php'); |
---|
| 27 | } |
---|
[5943] | 28 | |
---|
[5962] | 29 | // Upload Form |
---|
| 30 | if (isset($_GET['page']) and $_GET['page'] == 'photos_add') |
---|
| 31 | { |
---|
| 32 | if (isset($_POST['submit_upload']) and @$conf['upload_form_thumb_square']) |
---|
| 33 | { |
---|
| 34 | include(SQUARE_THUMB_PATH.'functions.inc.php'); |
---|
| 35 | } |
---|
[5943] | 36 | |
---|
[5962] | 37 | if (isset($_GET['section']) and $_GET['section'] == 'settings') |
---|
| 38 | { |
---|
| 39 | include(SQUARE_THUMB_PATH.'photo_add_settings.php'); |
---|
| 40 | } |
---|
| 41 | } |
---|
[5943] | 42 | |
---|
[5962] | 43 | // Uploadify |
---|
| 44 | if (script_basename() == 'uploadify' and @$conf['upload_form_thumb_square']) |
---|
| 45 | { |
---|
| 46 | include(SQUARE_THUMB_PATH.'functions.inc.php'); |
---|
| 47 | } |
---|
| 48 | } |
---|
| 49 | } |
---|
| 50 | |
---|
[9768] | 51 | add_event_handler('ws_add_methods', 'ws_add_method_load_square_functions'); |
---|
| 52 | |
---|
| 53 | function ws_add_method_load_square_functions() |
---|
| 54 | { |
---|
| 55 | include(SQUARE_THUMB_PATH.'functions.inc.php'); |
---|
| 56 | } |
---|
| 57 | |
---|
[5943] | 58 | ?> |
---|
Note: See
TracBrowser
for help on using the repository browser.