Last change
on this file since 6199 was
5962,
checked in by patdenice, 15 years ago
|
Square option is available for thumbnail creation page and upload form.
|
File size:
1.2 KB
|
Line | |
---|
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 | |
---|
15 | if (defined('IN_ADMIN')) |
---|
16 | { |
---|
17 | add_event_handler('init', 'square_thumbnails_init'); |
---|
18 | |
---|
19 | function square_thumbnails_init() |
---|
20 | { |
---|
21 | global $conf; |
---|
22 | |
---|
23 | // Thumbnail creation page |
---|
24 | if (isset($_GET['page']) and $_GET['page'] == 'thumbnail') |
---|
25 | { |
---|
26 | include(SQUARE_THUMB_PATH.'thumbnail.php'); |
---|
27 | } |
---|
28 | |
---|
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 | } |
---|
36 | |
---|
37 | if (isset($_GET['section']) and $_GET['section'] == 'settings') |
---|
38 | { |
---|
39 | include(SQUARE_THUMB_PATH.'photo_add_settings.php'); |
---|
40 | } |
---|
41 | } |
---|
42 | |
---|
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 | |
---|
51 | ?> |
---|
Note: See
TracBrowser
for help on using the repository browser.