source: extensions/piwishack/admin/piwishack_admin.php @ 23724

Last change on this file since 23724 was 23724, checked in by gil, 11 years ago
File size: 4.4 KB
Line 
1<?php
2if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
3 
4//include_once(dirname(__FILE__).'/../initialize.inc.php');
5//URLSHACK_init();
6$me = get_plugin_data('piwishack');
7load_language('plugin.lang', $me->plugin_path);
8 
9//$me->config['URLShackRight'] = 'BBcode';
10if (isset($_POST['submit']))
11{
12  $me->config['URLShackRight'] =            $_POST['URLSHACK_RIGHT'];
13  $me->config['DefaultHtmlBBcode'] =        $_POST['URLSHACK_DEFAULTCODE'];
14  $me->config['WebLinkOpenOnOtherWindow'] = $_POST['URLSHACK_BLANK'];
15  $me->config['ImageNameBeforeCode'] =      $_POST['URLSHACK_IMG_NAME'];
16 
17  $me->config['Display']['Thumbnail'] =         $_POST['URLSHACK_THUMB'];
18  $me->config['Display']['ThumbnailToGallery'] = $_POST['URLSHACK_THUMB_TO_GAL'];
19  $me->config['Display']['ThumbnailToImage'] =   $_POST['URLSHACK_THUMB_TO_IMG'];
20  $me->config['Display']['Image'] =             $_POST['URLSHACK_IMG'];
21  $me->config['Display']['ImageToGallery'] =     $_POST['URLSHACK_IMG_TO_GAL'];
22  $me->config['Display']['NameToImage']  =       $_POST['URLSHACK_URL_IMG'];
23  $me->config['Display']['NameToGallery'] =      $_POST['URLSHACK_URL_GAL'];
24 
25  $me->config['ExtendedDisplay'][0] = stripslashes($_POST['URLSHACK_PERSO1']);
26  $me->config['ExtendedDisplay'][1] = stripslashes($_POST['URLSHACK_PERSO2']);
27  $me->config['ExtendedDisplay'][2] = stripslashes($_POST['URLSHACK_PERSO3']);
28  $me->config['ExtendedDisplay'][3] = stripslashes($_POST['URLSHACK_PERSO4']);
29  $me->config['ExtendedDisplay'][4] = stripslashes($_POST['URLSHACK_PERSO5']); 
30  $me->config['ExtendedDisplay'][5] = stripslashes($_POST['URLSHACK_PERSO6']); 
31  $me->config['ExtendedDisplay'][6] = stripslashes($_POST['URLSHACK_PERSO7']); 
32  $me->config['ExtendedLabel'][0] = stripslashes($_POST['URLSHACK_PLABEL1']);
33  $me->config['ExtendedLabel'][1] = stripslashes($_POST['URLSHACK_PLABEL2']);
34  $me->config['ExtendedLabel'][2] = stripslashes($_POST['URLSHACK_PLABEL3']);
35  $me->config['ExtendedLabel'][3] = stripslashes($_POST['URLSHACK_PLABEL4']);
36  $me->config['ExtendedLabel'][4] = stripslashes($_POST['URLSHACK_PLABEL5']); 
37  $me->config['ExtendedLabel'][5] = stripslashes($_POST['URLSHACK_PLABEL6']); 
38  $me->config['ExtendedLabel'][6] = stripslashes($_POST['URLSHACK_PLABEL7']); 
39  $me->save_config();
40}
41 
42global $template;
43$template->set_filenames( array('plugin_admin_content' => dirname(__FILE__).'/piwishack_admin.tpl') );
44 
45$template->assign('URLSHACK_RIGHT',       $me->config['URLShackRight']);
46$template->assign('URLSHACK_DEFAULTCODE', $me->config['DefaultHtmlBBcode']);
47$template->assign('URLSHACK_BLANK',       $me->config['WebLinkOpenOnOtherWindow']);
48$template->assign('URLSHACK_IMG_NAME',    $me->config['ImageNameBeforeCode']);
49 
50$template->assign('URLSHACK_THUMB',        $me->config['Display']['Thumbnail']);
51$template->assign('URLSHACK_THUMB_TO_GAL', $me->config['Display']['ThumbnailToGallery']);
52$template->assign('URLSHACK_THUMB_TO_IMG', $me->config['Display']['ThumbnailToImage']);
53$template->assign('URLSHACK_IMG',          $me->config['Display']['Image']);
54$template->assign('URLSHACK_IMG_TO_GAL',   $me->config['Display']['ImageToGallery']);
55$template->assign('URLSHACK_URL_IMG',      $me->config['Display']['NameToImage']);
56$template->assign('URLSHACK_URL_GAL',      $me->config['Display']['NameToGallery']);
57 
58$template->assign('URLSHACK_PERSO1', $me->config['ExtendedDisplay'][0]);
59$template->assign('URLSHACK_PERSO2', $me->config['ExtendedDisplay'][1]);
60$template->assign('URLSHACK_PERSO3', $me->config['ExtendedDisplay'][2]);
61$template->assign('URLSHACK_PERSO4', $me->config['ExtendedDisplay'][3]);
62$template->assign('URLSHACK_PERSO5', $me->config['ExtendedDisplay'][4]);
63$template->assign('URLSHACK_PERSO6', $me->config['ExtendedDisplay'][5]);
64$template->assign('URLSHACK_PERSO7', $me->config['ExtendedDisplay'][6]);
65$template->assign('URLSHACK_PLABEL1', $me->config['ExtendedLabel'][0]);
66$template->assign('URLSHACK_PLABEL2', $me->config['ExtendedLabel'][1]);
67$template->assign('URLSHACK_PLABEL3', $me->config['ExtendedLabel'][2]);
68$template->assign('URLSHACK_PLABEL4', $me->config['ExtendedLabel'][3]);
69$template->assign('URLSHACK_PLABEL5', $me->config['ExtendedLabel'][4]);
70$template->assign('URLSHACK_PLABEL6', $me->config['ExtendedLabel'][5]);
71$template->assign('URLSHACK_PLABEL7', $me->config['ExtendedLabel'][6]);
72 
73$template->assign_var_from_handle( 'ADMIN_CONTENT', 'plugin_admin_content');
74?>
Note: See TracBrowser for help on using the repository browser.