mirror of
https://github.com/e107inc/e107.git
synced 2025-07-28 10:20:45 +02:00
Plugin Manager rework.
This commit is contained in:
@@ -11,9 +11,9 @@
|
|||||||
| GNU General Public License (http://gnu.org).
|
| GNU General Public License (http://gnu.org).
|
||||||
|
|
|
|
||||||
| $Source: /cvs_backup/e107_0.8/e107_admin/plugin.php,v $
|
| $Source: /cvs_backup/e107_0.8/e107_admin/plugin.php,v $
|
||||||
| $Revision: 1.23 $
|
| $Revision: 1.24 $
|
||||||
| $Date: 2008-12-30 19:01:09 $
|
| $Date: 2009-07-07 02:22:57 $
|
||||||
| $Author: e107steved $
|
| $Author: e107coders $
|
||||||
+----------------------------------------------------------------------------+
|
+----------------------------------------------------------------------------+
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -24,20 +24,259 @@ if (!getperms("Z"))
|
|||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
$e_sub_cat = 'plug_manage';
|
$e_sub_cat = 'plug_manage';
|
||||||
require_once("auth.php");
|
|
||||||
require_once(e_HANDLER.'plugin_class.php');
|
|
||||||
require_once(e_HANDLER.'file_class.php');
|
|
||||||
$plugin = new e107plugin;
|
|
||||||
|
|
||||||
$tmp = explode('.', e_QUERY);
|
|
||||||
$action = $tmp[0];
|
|
||||||
$id = intval($tmp[1]);
|
|
||||||
|
|
||||||
define('PLUGIN_SHOW_REFRESH', FALSE);
|
define('PLUGIN_SHOW_REFRESH', FALSE);
|
||||||
|
|
||||||
|
global $user_pref;
|
||||||
|
|
||||||
if (isset($_POST['upload']))
|
require_once("auth.php");
|
||||||
{
|
require_once(e_HANDLER.'plugin_class.php');
|
||||||
|
require_once(e_HANDLER.'file_class.php');
|
||||||
|
require_once(e_HANDLER."form_handler.php");
|
||||||
|
|
||||||
|
|
||||||
|
$plugin = new e107plugin;
|
||||||
|
$frm = new e_form();
|
||||||
|
$pman = new pluginManager;
|
||||||
|
|
||||||
|
require_once("footer.php");
|
||||||
|
exit;
|
||||||
|
|
||||||
|
class pluginManager{
|
||||||
|
|
||||||
|
var $plugArray;
|
||||||
|
var $action;
|
||||||
|
var $id;
|
||||||
|
var $frm;
|
||||||
|
var $fields;
|
||||||
|
var $fieldpref;
|
||||||
|
|
||||||
|
function pluginManager()
|
||||||
|
{
|
||||||
|
global $user_pref,$admin_log;
|
||||||
|
|
||||||
|
$tmp = explode('.', e_QUERY);
|
||||||
|
$this -> action = $tmp[0];
|
||||||
|
$this -> id = intval($tmp[1]);
|
||||||
|
|
||||||
|
$this-> fields = array(
|
||||||
|
// "plugin_status" => array("title" => "Status", "type"=>"image", "width" => "5%", "thclass" => "center", "url" => ""),
|
||||||
|
"plugin_icon" => array("title" => EPL_ADLAN_82, "type"=>"image", "width" => "5%", "thclass" => "center", "url" => ""),
|
||||||
|
"plugin_name" => array("title" => EPL_ADLAN_10, "type"=>"text", "width" => "30", "thclass" => "", "url" => ""),
|
||||||
|
"plugin_version" => array("title" => EPL_ADLAN_11, "type"=>"numeric", "width" => "5%", "thclass" => "", "url" => ""),
|
||||||
|
"plugin_folder" => array("title" => EPL_ADLAN_64, "type"=>"text", "width" => "10%", "thclass" => "", "url" => ""),
|
||||||
|
"plugin_author" => array("title" => EPL_ADLAN_12, "type"=>"text", "width" => "auto", "thclass" => "", "url" => ""),
|
||||||
|
"plugin_website" => array("title" => EPL_WEBSITE, "type"=>"url", "width" => "5%", "thclass" => "center", "url" => ""),
|
||||||
|
"plugin_notes" => array("title" => EPL_ADLAN_83, "type"=>"url", "width" => "5%", "thclass" => "center", "url" => ""),
|
||||||
|
"plugin_description" => array("title" => EPL_ADLAN_14, "type"=>"text", "width" => "auto", "thclass" => "center", "url" => ""),
|
||||||
|
"plugin_compatible" => array("title" => EPL_ADLAN_13, "type"=>"text", "width" => "auto", "thclass" => "", "url" => ""),
|
||||||
|
"plugin_compliant" => array("title" => EPL_ADLAN_81, "type"=>"text", "width" => "5%", "thclass" => "center", "url" => ""),
|
||||||
|
"options" => array("title" => LAN_OPTIONS, "width" => "15%", "thclass" => "center last", "url" => "")
|
||||||
|
);
|
||||||
|
|
||||||
|
if (isset($_POST['upload']))
|
||||||
|
{
|
||||||
|
$this -> pluginProcessUpload();
|
||||||
|
}
|
||||||
|
|
||||||
|
if(isset($_POST['submit-e-columns']))
|
||||||
|
{
|
||||||
|
$user_pref['admin_pluginmanager_columns'] = $_POST['e-columns'];
|
||||||
|
save_prefs('user');
|
||||||
|
}
|
||||||
|
|
||||||
|
$this -> fieldpref = (is_array($user_pref['admin_pluginmanager_columns'])) ? $user_pref['admin_pluginmanager_columns'] : array("plugin_icon","plugin_name","plugin_version","plugin_description","plugin_author","plugin_website","plugin_notes");
|
||||||
|
|
||||||
|
if($this->action == "" || $this->action == "installed" || $this->action == "avail")
|
||||||
|
{
|
||||||
|
$this -> pluginRenderList();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if($this->action == "uninstall")
|
||||||
|
{
|
||||||
|
$this -> pluginUninstall();
|
||||||
|
$this -> action = "installed";
|
||||||
|
$this -> pluginRenderList();
|
||||||
|
}
|
||||||
|
|
||||||
|
if($this->action == "install")
|
||||||
|
{
|
||||||
|
$this -> pluginInstall();
|
||||||
|
$this -> action = "installed";
|
||||||
|
$this -> pluginRenderList();
|
||||||
|
}
|
||||||
|
|
||||||
|
if($this->action == "upgrade")
|
||||||
|
{
|
||||||
|
$this -> pluginUpgrade();
|
||||||
|
$this -> action = "installed";
|
||||||
|
$this -> pluginRenderList();
|
||||||
|
}
|
||||||
|
|
||||||
|
if($this->action == "refresh")
|
||||||
|
{
|
||||||
|
$this -> pluginRefresh();
|
||||||
|
}
|
||||||
|
if($this->action == "upload")
|
||||||
|
{
|
||||||
|
$this -> pluginUpload();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
function pluginUninstall()
|
||||||
|
{
|
||||||
|
global $plugin,$ns,$admin_log,$pref,$tp;
|
||||||
|
|
||||||
|
if(!isset($_POST['uninstall_confirm']))
|
||||||
|
{ // $id is already an integer
|
||||||
|
$this->pluginConfirmUninstall($this->id);
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
$plug = $plugin->getinfo($this->id);
|
||||||
|
$text = '';
|
||||||
|
//Uninstall Plugin
|
||||||
|
if ($plug['plugin_installflag'] == TRUE )
|
||||||
|
{
|
||||||
|
$_path = e_PLUGIN.$plug['plugin_path'].'/';
|
||||||
|
if(file_exists($_path.'plugin.xml'))
|
||||||
|
{
|
||||||
|
$options = array(
|
||||||
|
'del_tables' => varset($_POST['delete_tables'],FALSE),
|
||||||
|
'del_userclasses' => varset($_POST['delete_userclasses'],FALSE),
|
||||||
|
'del_extended' => varset($_POST['delete_xfields'],FALSE)
|
||||||
|
);
|
||||||
|
$text .= $plugin->manage_plugin_xml($this->id, 'uninstall', $options);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
include(e_PLUGIN.$plug['plugin_path'].'/plugin.php');
|
||||||
|
|
||||||
|
$func = $eplug_folder.'_uninstall';
|
||||||
|
if (function_exists($func))
|
||||||
|
{
|
||||||
|
$text .= call_user_func($func);
|
||||||
|
}
|
||||||
|
|
||||||
|
if($_POST['delete_tables'])
|
||||||
|
{
|
||||||
|
if (is_array($eplug_table_names))
|
||||||
|
{
|
||||||
|
$result = $plugin->manage_tables('remove', $eplug_table_names);
|
||||||
|
if ($result !== TRUE)
|
||||||
|
{
|
||||||
|
$text .= EPL_ADLAN_27.' <b>'.$mySQLprefix.$result.'</b> - '.EPL_ADLAN_30.'<br />';
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$text .= EPL_ADLAN_28."<br />";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$text .= EPL_ADLAN_49."<br />";
|
||||||
|
}
|
||||||
|
|
||||||
|
if (is_array($eplug_prefs))
|
||||||
|
{
|
||||||
|
$plugin->manage_prefs('remove', $eplug_prefs);
|
||||||
|
$text .= EPL_ADLAN_29."<br />";
|
||||||
|
}
|
||||||
|
|
||||||
|
if (is_array($eplug_comment_ids))
|
||||||
|
{
|
||||||
|
$text .= ($plugin->manage_comments('remove', $eplug_comment_ids)) ? EPL_ADLAN_50."<br />" : "";
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Not used in 0.8
|
||||||
|
if ($eplug_module)
|
||||||
|
{
|
||||||
|
$plugin->manage_plugin_prefs('remove', 'modules', $eplug_folder);
|
||||||
|
}
|
||||||
|
if ($eplug_status)
|
||||||
|
{
|
||||||
|
$plugin->manage_plugin_prefs('remove', 'plug_status', $eplug_folder);
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($eplug_latest)
|
||||||
|
{
|
||||||
|
$plugin->manage_plugin_prefs('remove', 'plug_latest', $eplug_folder);
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
if (is_array($eplug_array_pref))
|
||||||
|
{
|
||||||
|
foreach($eplug_array_pref as $key => $val)
|
||||||
|
{
|
||||||
|
$plugin->manage_plugin_prefs('remove', $key, $eplug_folder, $val);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Not used in 0.8
|
||||||
|
if (is_array($eplug_sc))
|
||||||
|
{
|
||||||
|
$plugin->manage_plugin_prefs('remove', 'plug_sc', $eplug_folder, $eplug_sc);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (is_array($eplug_bb))
|
||||||
|
{
|
||||||
|
$plugin->manage_plugin_prefs('remove', 'plug_bb', $eplug_folder, $eplug_bb);
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
if ($eplug_menu_name)
|
||||||
|
{
|
||||||
|
$sql->db_Delete('menus', "menu_name='$eplug_menu_name' ");
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($eplug_link)
|
||||||
|
{
|
||||||
|
$plugin->manage_link('remove', $eplug_link_url, $eplug_link_name);
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($eplug_userclass)
|
||||||
|
{
|
||||||
|
$plugin->manage_userclass('remove', $eplug_userclass);
|
||||||
|
}
|
||||||
|
|
||||||
|
$sql->db_Update('plugin', "plugin_installflag=0, plugin_version='{$eplug_version}' WHERE plugin_id='{$this->id}' ");
|
||||||
|
$plugin->manage_search('remove', $eplug_folder);
|
||||||
|
|
||||||
|
$plugin->manage_notify('remove', $eplug_folder);
|
||||||
|
}
|
||||||
|
|
||||||
|
$admin_log->log_event('PLUGMAN_03', $plug['plugin_path'], E_LOG_INFORMATIVE, '');
|
||||||
|
|
||||||
|
if (isset($pref['plug_installed'][$plug['plugin_path']]))
|
||||||
|
{
|
||||||
|
unset($pref['plug_installed'][$plug['plugin_path']]);
|
||||||
|
save_prefs();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if($_POST['delete_files'])
|
||||||
|
{
|
||||||
|
include_once(e_HANDLER."file_class.php");
|
||||||
|
$fi = new e_file;
|
||||||
|
$result = $fi->rmtree(e_PLUGIN.$eplug_folder);
|
||||||
|
$text .= ($result ? "<br />All files removed from ".e_PLUGIN.$eplug_folder : '<br />File deletion failed<br />'.EPL_ADLAN_31.' <b>'.e_PLUGIN.$eplug_folder.'</b> '.EPL_ADLAN_32);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$text .= '<br />'.EPL_ADLAN_31.' <b>'.e_PLUGIN.$eplug_folder.'</b> '.EPL_ADLAN_32;
|
||||||
|
}
|
||||||
|
|
||||||
|
$plugin->save_addon_prefs();
|
||||||
|
$ns->tablerender(EPL_ADLAN_1.' '.$tp->toHtml($plug['plugin_name'], "", "defs,emotes_off,no_make_clickable"), $text);
|
||||||
|
$text = '';
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function pluginProcessUpload()
|
||||||
|
{
|
||||||
|
global $ns;
|
||||||
if (!$_POST['ac'] == md5(ADMINPWCHANGE))
|
if (!$_POST['ac'] == md5(ADMINPWCHANGE))
|
||||||
{
|
{
|
||||||
exit;
|
exit;
|
||||||
@@ -135,158 +374,16 @@ if (isset($_POST['upload']))
|
|||||||
@unlink(e_PLUGIN.$archiveName);
|
@unlink(e_PLUGIN.$archiveName);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
if ($action == 'uninstall')
|
|
||||||
{
|
|
||||||
if(!isset($_POST['uninstall_confirm']))
|
|
||||||
{ // $id is already an integer
|
|
||||||
show_uninstall_confirm($id);
|
|
||||||
exit;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$plug = $plugin->getinfo($id);
|
|
||||||
$text = '';
|
|
||||||
//Uninstall Plugin
|
|
||||||
if ($plug['plugin_installflag'] == TRUE )
|
|
||||||
{
|
|
||||||
$_path = e_PLUGIN.$plug['plugin_path'].'/';
|
|
||||||
if(file_exists($_path.'plugin.xml'))
|
|
||||||
{
|
|
||||||
$options = array(
|
|
||||||
'del_tables' => varset($_POST['delete_tables'],FALSE),
|
|
||||||
'del_userclasses' => varset($_POST['delete_userclasses'],FALSE),
|
|
||||||
'del_extended' => varset($_POST['delete_xfields'],FALSE)
|
|
||||||
);
|
|
||||||
$text .= $plugin->manage_plugin_xml($id, 'uninstall', $options);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
include(e_PLUGIN.$plug['plugin_path'].'/plugin.php');
|
|
||||||
|
|
||||||
$func = $eplug_folder.'_uninstall';
|
// -----------------------------------------------------------------------------
|
||||||
if (function_exists($func))
|
|
||||||
{
|
|
||||||
$text .= call_user_func($func);
|
|
||||||
}
|
|
||||||
|
|
||||||
if($_POST['delete_tables'])
|
function pluginInstall()
|
||||||
{
|
{
|
||||||
if (is_array($eplug_table_names))
|
global $ns,$plugin,$admin_log;
|
||||||
{
|
|
||||||
$result = $plugin->manage_tables('remove', $eplug_table_names);
|
|
||||||
if ($result !== TRUE)
|
|
||||||
{
|
|
||||||
$text .= EPL_ADLAN_27.' <b>'.$mySQLprefix.$result.'</b> - '.EPL_ADLAN_30.'<br />';
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$text .= EPL_ADLAN_28."<br />";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$text .= EPL_ADLAN_49."<br />";
|
|
||||||
}
|
|
||||||
|
|
||||||
if (is_array($eplug_prefs))
|
$text = $plugin->install_plugin($this->id);
|
||||||
{
|
|
||||||
$plugin->manage_prefs('remove', $eplug_prefs);
|
|
||||||
$text .= EPL_ADLAN_29."<br />";
|
|
||||||
}
|
|
||||||
|
|
||||||
if (is_array($eplug_comment_ids))
|
|
||||||
{
|
|
||||||
$text .= ($plugin->manage_comments('remove', $eplug_comment_ids)) ? EPL_ADLAN_50."<br />" : "";
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Not used in 0.8
|
|
||||||
if ($eplug_module)
|
|
||||||
{
|
|
||||||
$plugin->manage_plugin_prefs('remove', 'modules', $eplug_folder);
|
|
||||||
}
|
|
||||||
if ($eplug_status)
|
|
||||||
{
|
|
||||||
$plugin->manage_plugin_prefs('remove', 'plug_status', $eplug_folder);
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($eplug_latest)
|
|
||||||
{
|
|
||||||
$plugin->manage_plugin_prefs('remove', 'plug_latest', $eplug_folder);
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
if (is_array($eplug_array_pref))
|
|
||||||
{
|
|
||||||
foreach($eplug_array_pref as $key => $val)
|
|
||||||
{
|
|
||||||
$plugin->manage_plugin_prefs('remove', $key, $eplug_folder, $val);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Not used in 0.8
|
|
||||||
if (is_array($eplug_sc))
|
|
||||||
{
|
|
||||||
$plugin->manage_plugin_prefs('remove', 'plug_sc', $eplug_folder, $eplug_sc);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (is_array($eplug_bb))
|
|
||||||
{
|
|
||||||
$plugin->manage_plugin_prefs('remove', 'plug_bb', $eplug_folder, $eplug_bb);
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
if ($eplug_menu_name)
|
|
||||||
{
|
|
||||||
$sql->db_Delete('menus', "menu_name='$eplug_menu_name' ");
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($eplug_link)
|
|
||||||
{
|
|
||||||
$plugin->manage_link('remove', $eplug_link_url, $eplug_link_name);
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($eplug_userclass)
|
|
||||||
{
|
|
||||||
$plugin->manage_userclass('remove', $eplug_userclass);
|
|
||||||
}
|
|
||||||
|
|
||||||
$sql->db_Update('plugin', "plugin_installflag=0, plugin_version='{$eplug_version}' WHERE plugin_id='{$id}' ");
|
|
||||||
$plugin->manage_search('remove', $eplug_folder);
|
|
||||||
|
|
||||||
$plugin->manage_notify('remove', $eplug_folder);
|
|
||||||
}
|
|
||||||
|
|
||||||
$admin_log->log_event('PLUGMAN_03', $plug['plugin_path'], E_LOG_INFORMATIVE, '');
|
|
||||||
|
|
||||||
if (isset($pref['plug_installed'][$plug['plugin_path']]))
|
|
||||||
{
|
|
||||||
unset($pref['plug_installed'][$plug['plugin_path']]);
|
|
||||||
save_prefs();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if($_POST['delete_files'])
|
|
||||||
{
|
|
||||||
include_once(e_HANDLER."file_class.php");
|
|
||||||
$fi = new e_file;
|
|
||||||
$result = $fi->rmtree(e_PLUGIN.$eplug_folder);
|
|
||||||
$text .= ($result ? "<br />All files removed from ".e_PLUGIN.$eplug_folder : '<br />File deletion failed<br />'.EPL_ADLAN_31.' <b>'.e_PLUGIN.$eplug_folder.'</b> '.EPL_ADLAN_32);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$text .= '<br />'.EPL_ADLAN_31.' <b>'.e_PLUGIN.$eplug_folder.'</b> '.EPL_ADLAN_32;
|
|
||||||
}
|
|
||||||
|
|
||||||
$plugin->save_addon_prefs();
|
|
||||||
$ns->tablerender(EPL_ADLAN_1.' '.$tp->toHtml($plug['plugin_name'], "", "defs,emotes_off,no_make_clickable"), $text);
|
|
||||||
$text = '';
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
if ($action == 'install')
|
|
||||||
{
|
|
||||||
$text = $plugin->install_plugin($id);
|
|
||||||
if ($text === FALSE)
|
if ($text === FALSE)
|
||||||
{ // Tidy this up
|
{ // Tidy this up
|
||||||
$ns->tablerender(LAN_INSTALL_FAIL, "Error messages above this line");
|
$ns->tablerender(LAN_INSTALL_FAIL, "Error messages above this line");
|
||||||
@@ -294,20 +391,26 @@ if ($action == 'install')
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
$plugin ->save_addon_prefs();
|
$plugin ->save_addon_prefs();
|
||||||
// if($eplug_conffile){ $text .= " <a href='".e_PLUGIN."$eplug_folder/$eplug_conffile'>[".LAN_CONFIGURE."]</a>"; }
|
// if($eplug_conffile){ $text .= " <a href='".e_PLUGIN."$eplug_folder/$eplug_conffile'>[".LAN_CONFIGURE."]</a>"; }
|
||||||
$admin_log->log_event('PLUGMAN_01', $id.':'.$eplug_folder, E_LOG_INFORMATIVE, '');
|
$admin_log->log_event('PLUGMAN_01', $this->id.':'.$eplug_folder, E_LOG_INFORMATIVE, '');
|
||||||
$ns->tablerender(EPL_ADLAN_33, $text);
|
$ns->tablerender(EPL_ADLAN_33, $text);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if ($action == 'upgrade')
|
}
|
||||||
{
|
|
||||||
$plug = $plugin->getinfo($id);
|
|
||||||
|
// -----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
function pluginUpgrade()
|
||||||
|
{
|
||||||
|
global $plugin,$ns,$pref;
|
||||||
|
|
||||||
|
$plug = $plugin->getinfo($this->id);
|
||||||
|
|
||||||
$_path = e_PLUGIN.$plug['plugin_path'].'/';
|
$_path = e_PLUGIN.$plug['plugin_path'].'/';
|
||||||
if(file_exists($_path.'plugin.xml'))
|
if(file_exists($_path.'plugin.xml'))
|
||||||
{
|
{
|
||||||
$text .= $plugin->manage_plugin_xml($id, 'upgrade');
|
$text .= $plugin->manage_plugin_xml($this->id, 'upgrade');
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -332,7 +435,7 @@ if ($action == 'upgrade')
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Not used in 0.8
|
/* Not used in 0.8
|
||||||
if ($eplug_module)
|
if ($eplug_module)
|
||||||
{
|
{
|
||||||
$plugin->manage_plugin_prefs('add', 'modules', $eplug_folder);
|
$plugin->manage_plugin_prefs('add', 'modules', $eplug_folder);
|
||||||
@@ -379,7 +482,7 @@ if ($action == 'upgrade')
|
|||||||
{
|
{
|
||||||
$plugin->manage_plugin_prefs('remove', 'plug_bb', $eplug_folder, $eplug_bb);
|
$plugin->manage_plugin_prefs('remove', 'plug_bb', $eplug_folder, $eplug_bb);
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
if (is_array($upgrade_add_prefs))
|
if (is_array($upgrade_add_prefs))
|
||||||
{
|
{
|
||||||
$plugin->manage_prefs('add', $upgrade_add_prefs);
|
$plugin->manage_prefs('add', $upgrade_add_prefs);
|
||||||
@@ -414,81 +517,138 @@ if ($action == 'upgrade')
|
|||||||
|
|
||||||
$admin_log->log_event('PLUGMAN_02', $eplug_folder, E_LOG_INFORMATIVE, '');
|
$admin_log->log_event('PLUGMAN_02', $eplug_folder, E_LOG_INFORMATIVE, '');
|
||||||
$text .= (isset($eplug_upgrade_done)) ? '<br />'.$eplug_upgrade_done : "<br />".LAN_UPGRADE_SUCCESSFUL;
|
$text .= (isset($eplug_upgrade_done)) ? '<br />'.$eplug_upgrade_done : "<br />".LAN_UPGRADE_SUCCESSFUL;
|
||||||
$sql->db_Update('plugin', "plugin_version ='{$eplug_version}', plugin_addons='{$eplug_addons}' WHERE plugin_id='$id' ");
|
$sql->db_Update('plugin', "plugin_version ='{$eplug_version}', plugin_addons='{$eplug_addons}' WHERE plugin_id='$this->id' ");
|
||||||
$pref['plug_installed'][$plug['plugin_path']] = $eplug_version; // Update the version
|
$pref['plug_installed'][$plug['plugin_path']] = $eplug_version; // Update the version
|
||||||
save_prefs();
|
save_prefs();
|
||||||
}
|
}
|
||||||
$ns->tablerender(EPL_ADLAN_34, $text);
|
$ns->tablerender(EPL_ADLAN_34, $text);
|
||||||
|
|
||||||
$plugin->save_addon_prefs();
|
$plugin->save_addon_prefs();
|
||||||
}
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
if ($action == 'refresh')
|
// -----------------------------------------------------------------------------
|
||||||
{
|
|
||||||
$plug = $plugin->getinfo($id);
|
function pluginRefresh()
|
||||||
|
{
|
||||||
|
global $plug;
|
||||||
|
|
||||||
|
$plug = $plugin->getinfo($this->id);
|
||||||
|
|
||||||
$_path = e_PLUGIN.$plug['plugin_path'].'/';
|
$_path = e_PLUGIN.$plug['plugin_path'].'/';
|
||||||
if(file_exists($_path.'plugin.xml'))
|
if(file_exists($_path.'plugin.xml'))
|
||||||
{
|
{
|
||||||
$text .= $plugin->manage_plugin_xml($id, 'refresh');
|
$text .= $plugin->manage_plugin_xml($this->id, 'refresh');
|
||||||
$admin_log->log_event('PLUGMAN_04', $id.':'.$plug['plugin_path'], E_LOG_INFORMATIVE, '');
|
$admin_log->log_event('PLUGMAN_04', $this->id.':'.$plug['plugin_path'], E_LOG_INFORMATIVE, '');
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// -----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
// Check for new plugins, create entry in plugin table ...
|
||||||
|
function pluginCheck()
|
||||||
|
{
|
||||||
|
global $plugin;
|
||||||
|
$plugin->update_plugins_table();
|
||||||
|
}
|
||||||
|
// ----------------------------------------------------------
|
||||||
|
// render plugin information ...
|
||||||
|
|
||||||
|
|
||||||
// Check for new plugins, create entry in plugin table ...
|
// -----------------------------------------------------------------------------
|
||||||
|
|
||||||
$plugin->update_plugins_table();
|
|
||||||
|
|
||||||
// ----------------------------------------------------------
|
function pluginUpload()
|
||||||
// render plugin information ...
|
{
|
||||||
|
global $plugin,$ns,$frm;
|
||||||
|
|
||||||
/* plugin upload form */
|
/* plugin upload form */
|
||||||
|
|
||||||
if(!is_writable(e_PLUGIN))
|
if(!is_writable(e_PLUGIN))
|
||||||
{
|
{
|
||||||
$ns->tablerender(EPL_ADLAN_40, EPL_ADLAN_44);
|
$ns->tablerender(EPL_ADLAN_40, EPL_ADLAN_44);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Get largest allowable file upload
|
// Get largest allowable file upload
|
||||||
require_once(e_HANDLER.'upload_handler.php');
|
require_once(e_HANDLER.'upload_handler.php');
|
||||||
$max_file_size = get_user_max_upload();
|
$max_file_size = get_user_max_upload();
|
||||||
|
|
||||||
$text = "<div style='text-align:center'>
|
$text = "
|
||||||
<form enctype='multipart/form-data' method='post' action='".e_SELF."'>
|
<form enctype='multipart/form-data' method='post' action='".e_SELF."'>
|
||||||
<table style='".ADMIN_WIDTH."' class='fborder'>
|
<table class='adminlist' cellpadding='0' cellspacing='0'>
|
||||||
<tr>
|
<tr>
|
||||||
<td class='forumheader3' style='width: 50%;'>".EPL_ADLAN_37."</td>
|
<td style='width: 50%;'>".EPL_ADLAN_37."</td>
|
||||||
<td class='forumheader3' style='width: 50%;'>
|
<td style='width: 50%;'>
|
||||||
<input type='hidden' name='MAX_FILE_SIZE' value='{$max_file_size}' />
|
<input type='hidden' name='MAX_FILE_SIZE' value='{$max_file_size}' />
|
||||||
<input type='hidden' name='ac' value='".md5(ADMINPWCHANGE)."' />
|
<input type='hidden' name='ac' value='".md5(ADMINPWCHANGE)."' />
|
||||||
<input class='tbox' type='file' name='file_userfile[]' size='50' />
|
<input class='tbox' type='file' name='file_userfile[]' size='50' />
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan='2' style='text-align:center' class='forumheader'>
|
<td colspan='2' class='center buttons-bar'>";
|
||||||
<input class='button' type='submit' name='upload' value='".EPL_ADLAN_38."' />
|
$text .= $frm->admin_button('upload', EPL_ADLAN_38, 'submit', EPL_ADLAN_38);
|
||||||
|
|
||||||
|
$text .= "
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</form>
|
</form>
|
||||||
<br />\n";
|
<br />\n";
|
||||||
}
|
}
|
||||||
// Uninstall and Install sorting should be fixed once and for all now !
|
|
||||||
$installed = $plugin->getall(1);
|
|
||||||
$uninstalled = $plugin->getall(0);
|
|
||||||
|
|
||||||
$text .= "<table style='".ADMIN_WIDTH."' class='fborder'>";
|
$ns->tablerender(EPL_ADLAN_16, $text);
|
||||||
$text .= "<tr><td class='fcaption' colspan='3'>".EPL_ADLAN_22."</td></tr>";
|
}
|
||||||
$text .= render_plugs($installed);
|
|
||||||
$text .= "<tr><td class='fcaption' colspan='3'>".EPL_ADLAN_23."</td></tr>";
|
// -----------------------------------------------------------------------------
|
||||||
$text .= render_plugs($uninstalled);
|
|
||||||
|
function pluginRenderList() // Uninstall and Install sorting should be fixed once and for all now !
|
||||||
|
{
|
||||||
|
|
||||||
|
global $plugin,$ns,$frm;
|
||||||
|
|
||||||
|
$text .= "
|
||||||
|
<form action='".e_SELF."?".e_QUERY."' id='pluginmanager_list' method='post'>
|
||||||
|
<fieldset id='core-newspost-list'>
|
||||||
|
<legend class='e-hideme'>".NWSLAN_4."</legend>
|
||||||
|
<table cellpadding='0' cellspacing='0' class='adminlist'>
|
||||||
|
<colgroup span='".count($this->fieldpref)."'>".$frm->colGroup($this->fields,$this->fieldpref)."</colgroup>
|
||||||
|
<thead>
|
||||||
|
<tr>".$frm->thead($this->fields,$this->fieldpref)."</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
";
|
||||||
|
|
||||||
|
if($this->action == "" || $this->action == "installed")
|
||||||
|
{
|
||||||
|
$installed = $plugin->getall(1);
|
||||||
|
$caption = EPL_ADLAN_22;
|
||||||
|
$text .= $this->pluginRenderPlugin($installed);
|
||||||
|
}
|
||||||
|
if($this->action == "avail")
|
||||||
|
{
|
||||||
|
$uninstalled = $plugin->getall(0);
|
||||||
|
$caption = EPL_ADLAN_23;
|
||||||
|
$text .= $this->pluginRenderPlugin($uninstalled);
|
||||||
|
}
|
||||||
|
|
||||||
|
$text .= "
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</fieldset>
|
||||||
|
</form>
|
||||||
|
";
|
||||||
|
|
||||||
|
$ns->tablerender(EPL_ADLAN_16." : ".$caption, $text);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
function render_plugs($pluginList)
|
// -----------------------------------------------------------------------------
|
||||||
{
|
|
||||||
|
function pluginRenderPlugin($pluginList)
|
||||||
|
{
|
||||||
global $tp, $imode, $plugin;
|
global $tp, $imode, $plugin;
|
||||||
|
|
||||||
if (empty($pluginList)) return '';
|
if (empty($pluginList)) return '';
|
||||||
@@ -497,7 +657,7 @@ function render_plugs($pluginList)
|
|||||||
{
|
{
|
||||||
$_path = e_PLUGIN.$plug['plugin_path'].'/';
|
$_path = e_PLUGIN.$plug['plugin_path'].'/';
|
||||||
$plug_vars = false;
|
$plug_vars = false;
|
||||||
// if($plugin->parse_plugin($_path))
|
|
||||||
if($plugin->parse_plugin($plug['plugin_path']))
|
if($plugin->parse_plugin($plug['plugin_path']))
|
||||||
{
|
{
|
||||||
$plug_vars = $plugin->plug_vars;
|
$plug_vars = $plugin->plug_vars;
|
||||||
@@ -505,20 +665,6 @@ function render_plugs($pluginList)
|
|||||||
if($plug_vars)
|
if($plug_vars)
|
||||||
{
|
{
|
||||||
|
|
||||||
if ($plug_vars['@attributes']['installRequired'])
|
|
||||||
{
|
|
||||||
$img = (!$plug['plugin_installflag'] ? "<img src='".e_IMAGE."packs/".$imode."/admin_images/uninstalled.png' alt='' />" : "<img src='".e_IMAGE."packs/".$imode."/admin_images/installed.png' alt='' />");
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$img = "<img src='".e_IMAGE."packs/".$imode."/admin_images/noinstall.png' alt='' />";
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($plug['plugin_version'] != $plug_vars['@attributes']['version'] && $plug['plugin_installflag'])
|
|
||||||
{
|
|
||||||
$img = "<img src='".e_IMAGE."packs/".$imode."/admin_images/upgrade.png' alt='' />";
|
|
||||||
}
|
|
||||||
|
|
||||||
$icon_src = (isset($plug_vars['plugin_php']) ? e_PLUGIN : $_path).$plug_vars['administration']['icon'];
|
$icon_src = (isset($plug_vars['plugin_php']) ? e_PLUGIN : $_path).$plug_vars['administration']['icon'];
|
||||||
$plugin_icon = $plug_vars['administration']['icon'] ? "<img src='{$icon_src}' alt='' style='border:0px;vertical-align: bottom; width: 32px; height: 32px' />" : E_32_CAT_PLUG;
|
$plugin_icon = $plug_vars['administration']['icon'] ? "<img src='{$icon_src}' alt='' style='border:0px;vertical-align: bottom; width: 32px; height: 32px' />" : E_32_CAT_PLUG;
|
||||||
|
|
||||||
@@ -531,51 +677,42 @@ function render_plugs($pluginList)
|
|||||||
$plugEmail = varset($plug_vars['author']['@attributes']['email'],'');
|
$plugEmail = varset($plug_vars['author']['@attributes']['email'],'');
|
||||||
$plugAuthor = varset($plug_vars['author']['@attributes']['name'],'');
|
$plugAuthor = varset($plug_vars['author']['@attributes']['name'],'');
|
||||||
$plugURL = varset($plug_vars['author']['@attributes']['url'],'');
|
$plugURL = varset($plug_vars['author']['@attributes']['url'],'');
|
||||||
$text .= "
|
$plugReadme = "";
|
||||||
<tr>
|
|
||||||
<td class='forumheader3' style='width:160px; text-align:center; vertical-align:top'>
|
if($plug_vars['readme']) // 0.7 plugin.php
|
||||||
<table style='width:100%'><tr><td style='text-align:left;width:40px;vertical-align:top'>
|
|
||||||
".$plugin_icon."
|
|
||||||
</td><td>
|
|
||||||
{$img} <b>".$tp->toHTML($plug['plugin_name'], false, "defs,emotes_off, no_make_clickable")."</b><br /><b>".EPL_ADLAN_11."</b> {$plug['plugin_version']}
|
|
||||||
<br /><br />
|
|
||||||
<b>".EPL_ADLAN_64."</b> ".$plug['plugin_path']."
|
|
||||||
<br />
|
|
||||||
</td>
|
|
||||||
</tr></table>
|
|
||||||
</td>
|
|
||||||
<td class='forumheader3' style='vertical-align:top'>
|
|
||||||
<table cellspacing='3' style='width:98%'>
|
|
||||||
<tr><td style='vertical-align:top;width:15%'><b>".EPL_ADLAN_12."</b>:</td>
|
|
||||||
<td style='vertical-align:top'><a href='mailto:{$plugEmail}' title='{$plugEmail}'>{$plugAuthor}</a> ";
|
|
||||||
if($plugURL)
|
|
||||||
{
|
{
|
||||||
$text .= " [ <a href='{$plugURL}' title='{$plugURL}' >".EPL_WEBSITE."</a> ] ";
|
$plugReadme = $plug_vars['readme'];
|
||||||
}
|
}
|
||||||
$text .="</td></tr>
|
if($plug_vars['readMe']) // 0.8 plugin.xml
|
||||||
<tr><td style='vertical-align:top'><b>".EPL_ADLAN_14."</b>:</td><td style='vertical-align:top'> ".$tp->toHTML($plug_vars['description'], false, "defs,emotes_off, no_make_clickable")." ";
|
|
||||||
if ($plug_vars['readme'])
|
|
||||||
{
|
{
|
||||||
$text .= "[ <a href='".e_PLUGIN.$plug['plugin_path']."/".$plug_vars['readme']."'>".$plug_vars['readme']."</a> ]";
|
$plugReadme = $plug_vars['readMe'];
|
||||||
}
|
}
|
||||||
|
|
||||||
$text .="</td></tr>
|
$text .= "<tr>";
|
||||||
<tr><td style='vertical-align:top'><b>".EPL_ADLAN_13."</b>:</td><td style='vertical-align:top'><span style='vertical-align:top'> ".varset($plug_vars['@attributes']['compatibility'],'')." </span>";
|
// $text .= (in_array("plugin_status",$this->fieldpref)) ? "<td class='center'>".$img."</td>" : "";
|
||||||
|
$text .= (in_array("plugin_icon",$this->fieldpref)) ? "<td class='center middle'>".$plugin_icon."</td>" : "";
|
||||||
|
$text .= (in_array("plugin_name",$this->fieldpref)) ? "<td class='middle'>".$tp->toHTML($plug['plugin_name'], false, "defs,emotes_off, no_make_clickable")."</td>" : "";
|
||||||
|
$text .= (in_array("plugin_version",$this->fieldpref)) ? "<td class='middle'>".$plug['plugin_version']."</td>" : "";
|
||||||
|
$text .= (in_array("plugin_folder",$this->fieldpref)) ? "<td class='middle'>".$plug['plugin_path']."</td>" : "";
|
||||||
|
$text .= (in_array("plugin_author",$this->fieldpref)) ? "<td class='middle'><a href='mailto:".$plugEmail."' title='".$plugEmail."'>".$plugAuthor."</a> </td>" : "";
|
||||||
|
$text .= (in_array("plugin_website",$this->fieldpref)) ? "<td class='center middle'>".($plugURL ? "<a href='{$plugURL}' title='{$plugURL}' ><img src='".e_IMAGE_ABS."admin_images/forums_16.png' alt='' style='border:0px' /></a>" : "")."</td>" : "";
|
||||||
|
$text .= (in_array("plugin_notes",$this->fieldpref)) ? "<td class='center middle'>".($plugReadme ? "<a href='".e_PLUGIN.$plug['plugin_path']."/".$plugReadme."' title='".$plugReadme."'><img src='".e_IMAGE_ABS."admin_images/info_16.png' alt='' style='border:0px' /></a>" : " ")."</td>" : "";
|
||||||
|
$text .= (in_array("plugin_description",$this->fieldpref)) ? "<td class='middle'>".$tp->toHTML($plug_vars['description'], false, "defs,emotes_off, no_make_clickable")."</td>" : "";
|
||||||
|
$text .= (in_array("plugin_compatible",$this->fieldpref)) ? "<td class='center middle'>".varset($plug_vars['@attributes']['compatibility'],'')."</td>" : "";
|
||||||
|
$text .= (in_array("plugin_compliant",$this->fieldpref)) ? "<td class='center middle'>".(($plug_vars['compliant'] || $plug_vars['@attributes']['xhtmlcompliant']=="true") ? ADMIN_TRUE_ICON : " ")."</td>" : "";
|
||||||
|
|
||||||
if ($plug_vars['compliant'])
|
|
||||||
{
|
|
||||||
$text .= " <img src='".e_IMAGE."generic/valid-xhtml11_small.png' alt='' style='margin-top:0px' />";
|
|
||||||
}
|
|
||||||
$text .="</td></tr>\n";
|
|
||||||
|
|
||||||
$text .= "</table></td>";
|
// Plugin options Column --------------
|
||||||
$text .= "<td class='forumheader3' style='width:70px;text-align:center'>";
|
|
||||||
|
$text .= "<td class='center middle'>";
|
||||||
|
|
||||||
if ($plug_vars['@attributes']['installRequired'])
|
if ($plug_vars['@attributes']['installRequired'])
|
||||||
{
|
{
|
||||||
if ($plug['plugin_installflag'])
|
if ($plug['plugin_installflag'])
|
||||||
{
|
{
|
||||||
$text .= ($plug['plugin_installflag'] ? "<input type='button' class='button' onclick=\"location.href='".e_SELF."?uninstall.{$plug['plugin_id']}'\" title='".EPL_ADLAN_1."' value='".EPL_ADLAN_1."' /> " : "<input type='button' class='button' onclick=\"location.href='".e_SELF."?install.{$plug['plugin_id']}'\" title='".EPL_ADLAN_0."' value='".EPL_ADLAN_0."' />");
|
$text .= ($plug['plugin_installflag'] ? "<a href=\"".e_SELF."?uninstall.{$plug['plugin_id']}'\" title='".EPL_ADLAN_1."' >".ADMIN_DELETE_ICON."</a>" : "<a href=\"".e_SELF."?install.{$plug['plugin_id']}\" title='".EPL_ADLAN_0."' ><img class='middle' src='".e_IMAGE_ABS."admin_images/plugins_16.png' alt=\"".EPL_ADLAN_0."\" style='border:0px' /></a>");
|
||||||
|
|
||||||
|
// $text .= ($plug['plugin_installflag'] ? "<button type='button' class='delete' value='".EPL_ADLAN_1."' onclick=\"location.href='".e_SELF."?uninstall.{$plug['plugin_id']}'\"><span>".EPL_ADLAN_1."</span></button>" : "<button type='button' class='update' value='".EPL_ADLAN_0."' onclick=\"location.href='".e_SELF."?install.{$plug['plugin_id']}'\"><span>".EPL_ADLAN_0."</span></button>");
|
||||||
if (PLUGIN_SHOW_REFRESH && !varsettrue($plug_vars['plugin_php']))
|
if (PLUGIN_SHOW_REFRESH && !varsettrue($plug_vars['plugin_php']))
|
||||||
{
|
{
|
||||||
$text .= "<br /><br /><input type='button' class='button' onclick=\"location.href='".e_SELF."?refresh.{$plug['plugin_id']}'\" title='".'Refresh plugin settings'."' value='".'Refresh plugin settings'."' /> ";
|
$text .= "<br /><br /><input type='button' class='button' onclick=\"location.href='".e_SELF."?refresh.{$plug['plugin_id']}'\" title='".'Refresh plugin settings'."' value='".'Refresh plugin settings'."' /> ";
|
||||||
@@ -583,7 +720,9 @@ function render_plugs($pluginList)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$text .= "<input type='button' class='button' onclick=\"location.href='".e_SELF."?install.{$plug['plugin_id']}'\" title='".EPL_ADLAN_0."' value='".EPL_ADLAN_0."' />";
|
// $text .= "<input type='button' class='button' onclick=\"location.href='".e_SELF."?install.{$plug['plugin_id']}'\" title='".EPL_ADLAN_0."' value='".EPL_ADLAN_0."' />";
|
||||||
|
// $text .= "<button type='button' class='update' value='".EPL_ADLAN_0."' onclick=\"location.href='".e_SELF."?install.{$plug['plugin_id']}'\"><span>".EPL_ADLAN_0."</span></button>";
|
||||||
|
$text .= "<a href=\"".e_SELF."?install.{$plug['plugin_id']}\" title='".EPL_ADLAN_0."' ><img class='middle' src='".e_IMAGE_ABS."admin_images/plugins_16.png' alt=\"".EPL_ADLAN_0."\" style='border:0px' /></a>";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -603,34 +742,29 @@ function render_plugs($pluginList)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($plug['plugin_version'] != $plug_vars['@attributes']['version'] && $plug['plugin_installflag']) {
|
if ($plug['plugin_version'] != $plug_vars['@attributes']['version'] && $plug['plugin_installflag'])
|
||||||
$text .= "<br /><input type='button' class='button' onclick=\"location.href='".e_SELF."?upgrade.{$plug['plugin_id']}'\" title='".EPL_UPGRADE." to v".$plug_vars['@attributes']['version']."' value='".EPL_UPGRADE."' />";
|
{
|
||||||
|
// $text .= "<br /><input type='button' class='button' onclick=\"location.href='".e_SELF."?upgrade.{$plug['plugin_id']}'\" title='".EPL_UPGRADE." to v".$plug_vars['@attributes']['version']."' value='".EPL_UPGRADE."' />";
|
||||||
|
$text .= "<a href='".e_SELF."?upgrade.{$plug['plugin_id']}' title=\"".EPL_UPGRADE." to v".$plug_vars['@attributes']['version']."\" ><img class='middle' src='".e_IMAGE_ABS."admin_images/up_16.png' alt=\"".EPL_UPGRADE."\" style='border:0px' /></a>";
|
||||||
}
|
}
|
||||||
|
|
||||||
$text .="</td>";
|
$text .="</td>";
|
||||||
$text .= "</tr>";
|
$text .= "</tr>";
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return $text;
|
return $text;
|
||||||
}
|
}
|
||||||
|
|
||||||
$text .= "</table>
|
|
||||||
<div style='text-align:center'><br />
|
|
||||||
<img src='".e_IMAGE."packs/".$imode."/admin_images/uninstalled.png' alt='' /> ".EPL_ADLAN_23."
|
|
||||||
<img src='".e_IMAGE."packs/".$imode."/admin_images/installed.png' alt='' /> ".EPL_ADLAN_22."
|
|
||||||
<img src='".e_IMAGE."packs/".$imode."/admin_images/upgrade.png' alt='' /> ".EPL_ADLAN_24."
|
|
||||||
<img src='".e_IMAGE."packs/".$imode."/admin_images/noinstall.png' alt='' /> ".EPL_ADLAN_25."</div></div>";
|
|
||||||
|
|
||||||
$ns->tablerender(EPL_ADLAN_16, $text);
|
// -----------------------------------------------------------------------------
|
||||||
// ----------------------------------------------------------
|
|
||||||
|
|
||||||
require_once("footer.php");
|
|
||||||
exit;
|
|
||||||
|
|
||||||
function show_uninstall_confirm($id)
|
|
||||||
{
|
function pluginConfirmUninstall()
|
||||||
|
{
|
||||||
global $plugin, $tp, $ns;
|
global $plugin, $tp, $ns;
|
||||||
$plug = $plugin->getinfo($id);
|
$plug = $plugin->getinfo($this->id);
|
||||||
|
|
||||||
if ($plug['plugin_installflag'] == true )
|
if ($plug['plugin_installflag'] == true )
|
||||||
{
|
{
|
||||||
@@ -764,6 +898,33 @@ function show_uninstall_confirm($id)
|
|||||||
$ns->tablerender(EPL_ADLAN_63." ".$tp->toHtml($plug_vars['name'], "", "defs,emotes_off, no_make_clickable"), $text);
|
$ns->tablerender(EPL_ADLAN_63." ".$tp->toHtml($plug_vars['name'], "", "defs,emotes_off, no_make_clickable"), $text);
|
||||||
require_once(e_ADMIN."footer.php");
|
require_once(e_ADMIN."footer.php");
|
||||||
exit;
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
} // end of Class.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
function plugin_adminmenu()
|
||||||
|
{
|
||||||
|
// $e107 = &e107::getInstance();
|
||||||
|
|
||||||
|
$var['installed']['text'] = EPL_ADLAN_22;
|
||||||
|
$var['installed']['link'] = e_SELF;
|
||||||
|
|
||||||
|
$var['avail']['text'] = EPL_ADLAN_23;
|
||||||
|
$var['avail']['link'] = e_SELF."?avail";
|
||||||
|
|
||||||
|
/* $var['choose']['text'] = TPVLAN_51;
|
||||||
|
$var['choose']['link'] = e_SELF."?choose";*/
|
||||||
|
|
||||||
|
$var['upload']['text'] = EPL_ADLAN_38;
|
||||||
|
$var['upload']['link'] = e_SELF."?upload";
|
||||||
|
|
||||||
|
$selected = (e_QUERY) ? e_QUERY : "installed";
|
||||||
|
|
||||||
|
|
||||||
|
e_admin_menu(ADLAN_98, $selected, $var);
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
@@ -4,9 +4,9 @@
|
|||||||
| e107 website system - Language File.
|
| e107 website system - Language File.
|
||||||
|
|
|
|
||||||
| $Source: /cvs_backup/e107_0.8/e107_languages/English/admin/lan_plugin.php,v $
|
| $Source: /cvs_backup/e107_0.8/e107_languages/English/admin/lan_plugin.php,v $
|
||||||
| $Revision: 1.8 $
|
| $Revision: 1.9 $
|
||||||
| $Date: 2008-12-30 19:01:17 $
|
| $Date: 2009-07-07 02:22:57 $
|
||||||
| $Author: e107steved $
|
| $Author: e107coders $
|
||||||
+----------------------------------------------------------------------------+
|
+----------------------------------------------------------------------------+
|
||||||
*/
|
*/
|
||||||
define("EPL_ADLAN_0", "Install");
|
define("EPL_ADLAN_0", "Install");
|
||||||
@@ -84,7 +84,7 @@ define("EPL_ADLAN_60", "e107 will attempt to remove all plugin related files.");
|
|||||||
// define("EPL_ADLAN_61", "Confirm uninstall"); // duplicated. can be deleted.
|
// define("EPL_ADLAN_61", "Confirm uninstall"); // duplicated. can be deleted.
|
||||||
define("EPL_ADLAN_62", "Cancel uninstall");
|
define("EPL_ADLAN_62", "Cancel uninstall");
|
||||||
define("EPL_ADLAN_63", "Uninstall:");
|
define("EPL_ADLAN_63", "Uninstall:");
|
||||||
define("EPL_ADLAN_64", "Folder:");
|
define("EPL_ADLAN_64", "Folder");
|
||||||
|
|
||||||
define ('EPL_ADLAN_70','Required plugin not installed: ');
|
define ('EPL_ADLAN_70','Required plugin not installed: ');
|
||||||
define ('EPL_ADLAN_71','Newer plugin version required: ');
|
define ('EPL_ADLAN_71','Newer plugin version required: ');
|
||||||
@@ -97,9 +97,9 @@ define ('EPL_ADLAN_77','Cannot find plugin.xml');
|
|||||||
define ('EPL_ADLAN_78','Delete User Classes created by plugin:');
|
define ('EPL_ADLAN_78','Delete User Classes created by plugin:');
|
||||||
define ('EPL_ADLAN_79','Only delete these if you have not used them for other purposes.');
|
define ('EPL_ADLAN_79','Only delete these if you have not used them for other purposes.');
|
||||||
define ('EPL_ADLAN_80','Delete extended user fields created by plugin:');
|
define ('EPL_ADLAN_80','Delete extended user fields created by plugin:');
|
||||||
define ('EPL_ADLAN_81','');
|
define ('EPL_ADLAN_81','Xhtml');
|
||||||
define ('EPL_ADLAN_82','');
|
define ('EPL_ADLAN_82','Icon');
|
||||||
define ('EPL_ADLAN_83','');
|
define ('EPL_ADLAN_83','Notes');
|
||||||
define ('EPL_ADLAN_84','');
|
define ('EPL_ADLAN_84','');
|
||||||
define ('EPL_ADLAN_85','');
|
define ('EPL_ADLAN_85','');
|
||||||
|
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||||
<!-- $Id: plugin.xml,v 1.18 2009-01-10 13:17:44 secretr Exp $ -->
|
<!-- $Id: plugin.xml,v 1.19 2009-07-07 02:22:57 e107coders Exp $ -->
|
||||||
<e107Plugin name="Forum" version="2.0" compatibility="0.8" installRequired="true">
|
<e107Plugin name="Forum" version="2.0" compatibility="0.8" installRequired="true" xhtmlcompliant="true" >
|
||||||
<author name="e107dev" url="http://e107.org"/>
|
<author name="e107dev" url="http://e107.org"/>
|
||||||
<description>This plugin is a fully featured Forum system</description>
|
<description>This plugin is a fully featured Forum system</description>
|
||||||
<folder>forum</folder>
|
<folder>forum</folder>
|
||||||
|
Reference in New Issue
Block a user