00001 <?php 00002 00003 class NP_SkinFiles extends NucleusPlugin { 00004 00005 /* ========================================================================================== 00006 * Nucleus SkinFiles Plugin 00007 * 00008 * Copyright 2005-2007 by Jeff MacMichael and Niels Leenheer 00009 * 00010 * @version $Id: NP_SkinFiles.php 1116 2007-02-03 08:24:29Z kimitake $ 00011 * @version $NucleusJP: NP_SkinFiles.php,v 1.4.2.1 2007/10/24 09:35:34 kimitake Exp $ 00012 * 00013 * ========================================================================================== 00014 * This program is free software and open source software; you can redistribute 00015 * it and/or modify it under the terms of the GNU General Public License as 00016 * published by the Free Software Foundation; either version 2 of the License, 00017 * or (at your option) any later version. 00018 * 00019 * This program is distributed in the hope that it will be useful, but WITHOUT 00020 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 00021 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 00022 * more details. 00023 * 00024 * You should have received a copy of the GNU General Public License along 00025 * with this program; if not, write to the Free Software Foundation, Inc., 00026 * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA or visit 00027 * http://www.gnu.org/licenses/gpl.html 00028 * ========================================================================================== 00029 * 00030 * Changes: 00031 * v0.91 ged - added ICO, PHPx files, fixed/added some icons 00032 * - changed perms on file or folder creation or upload to 0755 from 0640 00033 * - changed 'cancel' links for delete actions to $parent dir from http_referer 00034 * - changed order of links next to files... moved 'del' over a bit. ;) 00035 * v0.92 ged - changed order of links next to dirs 00036 * $privateskins = FALSE by default 00037 * v1.0 ged - fixed security catch so it actually quits the script 00038 * "columnated" the files & dirs display for easier viewing 00039 * Made the edit cancel link more intuitive 00040 * v1.01 ged - fixed event_QuickMenu to properly skip for non-admins 00041 * lined up columns for directories & added <tr> highlights 00042 * v2.00 rakaz - Almost complete rewrite 00043 * v2.01 yama - modified form button for IE 00044 * v2.02 kimitake - multilingual support, modified form button for IE 00045 */ 00046 00047 00048 function getName() { return 'SkinFiles'; } 00049 function getAuthor() { return 'Misc authors'; } 00050 function getURL() { return 'http://www.nucleuscms.org/'; } 00051 function getVersion() { return '2.02'; } 00052 function getDescription() { return _SKINFILES_DESC; } 00053 00054 function supportsFeature($what) { 00055 switch($what) 00056 { case 'SqlTablePrefix': 00057 return 1; 00058 default: 00059 return 0; } 00060 } 00061 00062 function install() { 00063 } 00064 00065 function unInstall() { 00066 } 00067 00068 function getEventList() { 00069 return array('QuickMenu'); 00070 } 00071 00072 function hasAdminArea() { 00073 return 1; 00074 } 00075 00076 function init() 00077 { 00078 // include language file for this plugin 00079 $language = ereg_replace( '[\\|/]', '', getLanguageName()); 00080 if (file_exists($this->getDirectory().$language.'.php')) 00081 include_once($this->getDirectory().$language.'.php'); 00082 else 00083 include_once($this->getDirectory().'english.php'); 00084 } 00085 00086 function event_QuickMenu(&$data) { 00087 global $member; 00088 00089 // only show to admins 00090 if (!($member->isLoggedIn() && $member->isAdmin())) return; 00091 00092 array_push( 00093 $data['options'], 00094 array( 00095 'title' => _SKINFILES_TITLE, 00096 'url' => $this->getAdminURL(), 00097 'tooltip' => _SKINFILES_TOOLTIP 00098 ) 00099 ); 00100 } 00101 } 00102 00103 ?>