mirror of
https://github.com/e107inc/e107.git
synced 2025-04-19 20:21:51 +02:00
Change to plugin.xml spec.
This commit is contained in:
parent
2ad79d7cdd
commit
deb537d8a3
@ -899,12 +899,11 @@ class pluginManager{
|
||||
function pluginRenderPlugin($pluginList)
|
||||
{
|
||||
global $plugin;
|
||||
$frm = e107::getForm();
|
||||
|
||||
|
||||
if (empty($pluginList)) return '';
|
||||
|
||||
$tp = e107::getParser();
|
||||
|
||||
$frm = e107::getForm();
|
||||
|
||||
$text = "";
|
||||
|
||||
@ -948,6 +947,8 @@ class pluginManager{
|
||||
$plugURL = varset($plug_vars['author']['@attributes']['url'],'');
|
||||
$plugDate = varset($plug_vars['@attributes']['date'],'');
|
||||
|
||||
$description = varset($plug_vars['description']['@attributes']['lang']) ? $tp->toHTML($plug_vars['description']['@attributes']['lang'], false, "defs,emotes_off, no_make_clickable") : $tp->toHTML($plug_vars['description']['@value'], false, "emotes_off, no_make_clickable") ;
|
||||
|
||||
$plugReadme = "";
|
||||
if(varset($plug['plugin_installflag']))
|
||||
{
|
||||
@ -985,7 +986,7 @@ class pluginManager{
|
||||
$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}' >".ADMIN_URL_ICON."</a>" : "")."</td>" : "";
|
||||
$text .= (in_array("plugin_notes",$this->fieldpref)) ? "<td class='center middle'>".($plugReadme ? "<a href='".e_PLUGIN.$plug['plugin_path']."/".$plugReadme."' title='".$plugReadme."'>".ADMIN_INFO_ICON."</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_description",$this->fieldpref)) ? "<td class='middle'>".$description."</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'>".((varset($plug_vars['compliant']) || varsettrue($plug_vars['@attributes']['xhtmlcompliant'])) ? ADMIN_TRUE_ICON : " ")."</td>" : "";
|
||||
|
||||
|
@ -2099,7 +2099,7 @@ class e_form
|
||||
$ret = $this->iconpicker($key, $value, defset($label, $label), $parms, $ajax);
|
||||
break;
|
||||
|
||||
|
||||
case 'date': // date will show the datepicker but won't convert the value to unix. ie. string value will be saved. (or may be processed manually with beforeCreate() etc. Format may be determined by $parm.
|
||||
case 'datestamp':
|
||||
// If hidden, value is updated regardless. eg. a 'last updated' field.
|
||||
// If not hidden, and there is a value, it is retained. eg. during the update of an existing record.
|
||||
|
@ -162,7 +162,6 @@ class e107plugin
|
||||
|
||||
$plugList = $fl->get_files(e_PLUGIN, "^plugin\.(php|xml)$", "standard", 1);
|
||||
foreach ($plugList as $num => $val) // Remove Duplicates caused by having both plugin.php AND plugin.xml.
|
||||
|
||||
{
|
||||
$key = basename($val['path']);
|
||||
$pluginList[$key] = $val;
|
||||
@ -189,7 +188,7 @@ class e107plugin
|
||||
//parsing of plugin.php/plugin.xml failed.
|
||||
$mes->add("Parsing failed - file format error: {$p['path']}", E_MESSAGE_ERROR);
|
||||
continue; // Carry on and do any others that are OK
|
||||
}
|
||||
}
|
||||
|
||||
$plug_info = $this->plug_vars;
|
||||
$eplug_addons = $this->getAddons($plugin_path);
|
||||
@ -243,16 +242,18 @@ class e107plugin
|
||||
else // New plugin - not in table yet, so add it. If no install needed, mark it as 'installed'
|
||||
{
|
||||
if ($plug_info['@attributes']['name'])
|
||||
{
|
||||
|
||||
{
|
||||
$pName = vartrue($plug_info['@attributes']['lang']) ? $plug_info['@attributes']['lang'] : $plug_info['@attributes']['name'] ;
|
||||
|
||||
$_installed = ($plug_info['@attributes']['installRequired'] == 'true' || $plug_info['@attributes']['installRequired'] == 1 ? 0 : 1);
|
||||
if (e107::getDb()->db_Insert("plugin", "0, '".$tp->toDB($plug_info['@attributes']['name'], true)."', '".$tp->toDB($plug_info['@attributes']['version'], true)."', '".$tp->toDB($plugin_path, true)."',{$_installed}, '{$eplug_addons}', '".$this->manage_category($plug_info['category'])."', '".varset($plug_info['@attributes']['releaseUrl'])."' "))
|
||||
|
||||
if (e107::getDb()->db_Insert("plugin", "0, '".$tp->toDB($pName, true)."', '".$tp->toDB($plug_info['@attributes']['version'], true)."', '".$tp->toDB($plugin_path, true)."',{$_installed}, '{$eplug_addons}', '".$this->manage_category($plug_info['category'])."', '".varset($plug_info['@attributes']['releaseUrl'])."' "))
|
||||
{
|
||||
$mes->add("Added <b>".$plug_info['@attributes']['name']."</b> to the plugin table.", E_MESSAGE_DEBUG);
|
||||
$mes->add("Added <b>".$tp->toHTML($pName,false,"defs")."</b> to the plugin table.", E_MESSAGE_DEBUG);
|
||||
}
|
||||
else
|
||||
{
|
||||
$mes->add("Failed to add ".$plug_info['@attributes']['name']." to the plugin table.", E_MESSAGE_DEBUG);
|
||||
$mes->add("Failed to add ".$tp->toHTML($pName,false,"defs")." to the plugin table.", E_MESSAGE_DEBUG);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -2342,6 +2343,7 @@ class e107plugin
|
||||
// $ret['installRequired'] = ($eplug_conffile || is_array($eplug_table_names) || is_array($eplug_prefs) || is_array($eplug_sc) || is_array($eplug_bb) || $eplug_module || $eplug_userclass || $eplug_status || $eplug_latest);
|
||||
|
||||
$ret['@attributes']['name'] = varset($eplug_name);
|
||||
$ret['@attributes']['lang'] = varset($eplug_name);
|
||||
$ret['@attributes']['version'] = varset($eplug_version);
|
||||
$ret['@attributes']['date'] = varset($eplug_date);
|
||||
$ret['@attributes']['compatibility'] = varset($eplug_compatible);
|
||||
@ -2352,7 +2354,8 @@ class e107plugin
|
||||
$ret['author']['@attributes']['name'] = varset($eplug_author);
|
||||
$ret['author']['@attributes']['url'] = varset($eplug_url);
|
||||
$ret['author']['@attributes']['email'] = varset($eplug_email);
|
||||
$ret['description'] = varset($eplug_description);
|
||||
$ret['description']['@value'] = varset($eplug_description);
|
||||
$ret['description']['@attributes']['lang'] = varset($eplug_description);
|
||||
|
||||
$ret['category'] = varset($eplug_category) ? $this->manage_category($eplug_category) : "misc";
|
||||
$ret['readme'] = varset($eplug_readme);
|
||||
@ -2411,15 +2414,15 @@ class e107plugin
|
||||
$tp = e107::getParser();
|
||||
// loadLanFiles($plugName, 'admin'); // Look for LAN files on default paths
|
||||
$xml = e107::getXml();
|
||||
$mes = e107::getMessage();
|
||||
|
||||
// $xml->setOptArrayTags('extendedField,userclass,menuLink,commentID'); // always arrays for these tags.
|
||||
// $xml->setOptStringTags('install,uninstall,upgrade');
|
||||
|
||||
$this->plug_vars = $xml->loadXMLfile(e_PLUGIN.$plugName.'/plugin.xml', 'advanced');
|
||||
|
||||
if ($this->plug_vars === FALSE)
|
||||
{
|
||||
require_once(e_HANDLER."message_handler.php");
|
||||
$mes = e107::getMessage();
|
||||
$mes->add("Error reading {$plugName}/plugin.xml", E_MESSAGE_ERROR);
|
||||
return FALSE;
|
||||
}
|
||||
@ -2427,8 +2430,16 @@ class e107plugin
|
||||
$this->plug_vars['category'] = (isset($this->plug_vars['category'])) ? $this->manage_category($this->plug_vars['category']) : "misc";
|
||||
$this->plug_vars['folder'] = $plugName; // remove the need for <folder> tag in plugin.xml.
|
||||
|
||||
/*
|
||||
if(!is_array($this->plug_vars['description']))
|
||||
{
|
||||
$diz = $this->plug_vars['description'];
|
||||
unset($this->plug_vars['description']);
|
||||
|
||||
$this->plug_vars['description']['@value'] = $diz;
|
||||
}
|
||||
|
||||
// Very useful debug code.to compare plugin.php vs plugin.xml
|
||||
/*
|
||||
$testplug = 'forum';
|
||||
if($plugName == $testplug)
|
||||
{
|
||||
@ -2445,8 +2456,8 @@ class e107plugin
|
||||
print_a($plug_vars1);
|
||||
echo "</table>";
|
||||
}
|
||||
|
||||
*/
|
||||
*/
|
||||
|
||||
|
||||
// TODO search for $this->plug_vars['adminLinks']['link'][0]['@attributes']['primary']==true.
|
||||
$this->plug_vars['administration']['icon'] = varset($this->plug_vars['adminLinks']['link'][0]['@attributes']['icon']);
|
||||
|
@ -1,8 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Id: plugin.xml,v 1.1 2009-10-30 09:11:01 e107coders Exp $ -->
|
||||
<e107Plugin name="Blank Plugin" version="2.0" date="2012-08-01" compatibility="0.8" installRequired="true" xhtmlcompliant="true" >
|
||||
<e107Plugin name="Blank Plugin" version="2.0" date="2012-08-01" compatibility="2.0" installRequired="true" >
|
||||
<author name="e107 Inc." url="http://e107.org" />
|
||||
<description>A Blank Plugin to help you get started in plugin development</description>
|
||||
<description lang="">A Blank Plugin to help you get started in plugin development</description>
|
||||
<category>misc</category>
|
||||
<adminLinks>
|
||||
<link url='admin_config.php' description='Configure Blank Plugin' icon='images/blank_32.png' iconSmall='images/blank_16.png' primary='true' >Configure Blank</link>
|
||||
|
@ -2,16 +2,16 @@
|
||||
|
||||
<!-- $Id: plugin.xml,v 1.8 2009-11-08 10:34:23 e107steved Exp $ -->
|
||||
|
||||
<e107Plugin name="LAN_ALT_65" version="0.4" date="2012-08-01" compatibility="0.8" installRequired="true" >
|
||||
<author name="e107 Inc." url="e107.org" email="mcfly@e107.org" />
|
||||
<description>LAN_ALT_66</description>
|
||||
<e107Plugin name="Alternate Authentication" lang="LAN_ALT_65" version="0.4" date="2012-08-01" compatibility="2.0" installRequired="true" >
|
||||
<author name="e107 Inc." url="e107.org" email="security@e107.org" />
|
||||
<description lang="LAN_ALT_66">This plugin allows for alternate authentication methods.</description>
|
||||
<category>users</category>
|
||||
<copyright>Copyright e107 Inc e107.org, Licensed under GPL (http://www.gnu.org/licenses/gpl.txt)</copyright>
|
||||
<languageFiles>
|
||||
<file type='log' path='languages/--LAN--/--LAN--_log.php' />
|
||||
</languageFiles>
|
||||
<adminLinks>
|
||||
<link url='alt_auth_conf.php' description='LAN_ALT_67' icon='images/alt_auth_32.png' iconSmall='images/alt_auth_16.png' primary='true' >LAN_ALT_67</link>
|
||||
<link url='alt_auth_conf.php' description='LAN_ALT_67' icon='images/alt_auth_32.png' iconSmall='images/alt_auth_16.png' primary='true' />
|
||||
</adminLinks>
|
||||
<mainPrefs>
|
||||
<pref name="auth_noconn">0</pref>
|
||||
|
@ -79,5 +79,5 @@ define("BNRLAN_67", "No campaigns yet.");
|
||||
define("BNRLAN_68", "Banner Menu Configuration");
|
||||
|
||||
// Plugin manager
|
||||
define("BNRLAN_100", "Banner Plugin Description TODO");
|
||||
define("BNRLAN_100", "Add advertising banners to your e107 website");
|
||||
?>
|
@ -1,10 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<!-- $Id: plugin.xml,v 1.5 2009-12-08 17:21:34 secretr Exp $ -->
|
||||
|
||||
<e107Plugin name="Banners" version="1.0" date="2012-08-01" compatibility="0.8" installRequired="true" releaseUrl=''>
|
||||
<e107Plugin name="Banners" version="1.0" date="2012-08-01" compatibility="0.8" installRequired="true" releaseUrl=''>
|
||||
<author name="e107 Inc." url="http://e107.org" email="jalist@e107.org" />
|
||||
<description>BNRLAN_100</description>
|
||||
<description lang="BNRLAN_100">Add advertising banners to your e107 website</description>
|
||||
<languageFiles>
|
||||
<file type='log' path='languages/--LAN--_admin_banner.php' />
|
||||
<file type='install' path='languages/--LAN--_admin_banner.php' />
|
||||
|
@ -2,9 +2,9 @@
|
||||
|
||||
<!-- $Id: plugin.xml,v 1.13 2009-10-22 04:14:45 e107coders Exp $ -->
|
||||
|
||||
<e107Plugin name="EC_ADLAN_1" version="3.70" date="2012-08-01" compatibility="0.8" installRequired="true" setupFile='calendar_setup.php'>
|
||||
<e107Plugin name="Event Calendar" lang="EC_ADLAN_1" version="3.70" date="2012-08-01" compatibility="0.8" installRequired="true" setupFile='calendar_setup.php'>
|
||||
<author name="e107 Inc. + Barry" url="http://e107.org" />
|
||||
<description>EC_ADLAN_A206</description>
|
||||
<description lang="EC_ADLAN_A206">This plugin is a fully featured event calendar with calendar menu.</description>
|
||||
<readMe>readme.pdf</readMe>
|
||||
<category>content</category>
|
||||
<languageFiles>
|
||||
|
@ -1,12 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<!-- $Id: plugin.xml,v 1.8 2009-10-20 03:49:22 e107coders Exp $ -->
|
||||
|
||||
<e107Plugin name="CHBLAN_40" version="1.0" date="2012-08-01" compatibility="2.0" installRequired="true">
|
||||
<e107Plugin name="Chatbox" lang="CHBLAN_40" version="1.0" date="2012-08-01" compatibility="2.0" installRequired="true">
|
||||
<author name="e107 Inc." url="http://e107.org" email="jalist@e107.org" />
|
||||
<description>CHBLAN_41</description>
|
||||
<description lang="CHBLAN_41">Chatbox Menu</description>
|
||||
<category>content</category>
|
||||
|
||||
<copyright>Copyright e107 Inc e107.org, Licensed under GPL (http://www.gnu.org/licenses/gpl.txt)</copyright>
|
||||
<languageFiles>
|
||||
<file type='log' path='languages/--LAN--/--LAN--_config.php' />
|
||||
|
@ -1,8 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Id: plugin.xml,v 1.15 2009-10-22 04:14:45 e107coders Exp $ -->
|
||||
<e107Plugin name="Download" version="1.0" date="2012-08-01" compatibility="2.0" installRequired="true" releaseUrl=''>
|
||||
<e107Plugin name="Downloads" lang="Downloads" version="1.0" date="2012-08-01" compatibility="2.0" installRequired="true">
|
||||
<author name="e107 Inc." url="http://e107.org" />
|
||||
<description>DOWLAN_DESCRIPTION</description>
|
||||
<description lang="DOWLAN_DESCRIPTION">This plugin is a fully featured File-download system</description>
|
||||
<category>content</category>
|
||||
<languageFiles>
|
||||
<file type='install' path='languages/--LAN--/admin_download.php' />
|
||||
|
@ -1,4 +1,9 @@
|
||||
<?php
|
||||
|
||||
define("_FAQS_NAME_","FAQs");
|
||||
define("_FAQS_DESCRIPTION_","Description");
|
||||
|
||||
|
||||
define(FAQ_ADLAN_22, "Category deleted.");
|
||||
define(FAQ_ADLAN_23, "Please confirm you wish to delete this FAQ Item ");
|
||||
define(FAQ_ADLAN_24, "once deleted it cannot be retrieved.");
|
||||
|
@ -1,10 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<!-- $Id: plugin.xml,v 1.1 2009-11-09 12:57:34 e107coders Exp $ -->
|
||||
|
||||
<e107Plugin name="FAQs" version="1.0" date="2012-08-01" compatibility="2.0" installRequired="true">
|
||||
<e107Plugin name="FAQs" lang="FAQs" version="1.0" date="2012-08-01" compatibility="2.0" installRequired="true">
|
||||
<author name="e107 Inc" url="http://www.e107.org" email="security@e107.org" />
|
||||
<description>Based on the original FAQ plugin by Cameron @ e107 Inc.</description>
|
||||
<description lang="A simple plugin to add Frequently Asked Questions to your website.">A simple plugin to add Frequently Asked Questions to your website.</description>
|
||||
<copyright>Copyright e107 Inc e107.org, Licensed under GPL (http://www.gnu.org/licenses/gpl.txt)</copyright>
|
||||
<bbcodes imgResize="true" />
|
||||
<category>content</category>
|
||||
|
@ -1,10 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<!-- $Id: plugin.xml,v 1.9 2009-12-08 17:21:31 secretr Exp $ -->
|
||||
|
||||
<e107Plugin name="FBLAN_01" version="1.0" date="2012-08-01" compatibility="2.0" installRequired="true">
|
||||
<e107Plugin name="Featurebox" lang="FBLAN_01" version="1.0" date="2012-08-01" compatibility="2.0" installRequired="true">
|
||||
<author name="e107 Inc." url="http://e107.org" email="cameron@e107.org" />
|
||||
<description>FBLAN_02</description>
|
||||
<description lang="FBLAN_02">Displays an animated area on the top of your page with news-items and other content you would like to feature.</description>
|
||||
<category>content</category>
|
||||
<adminLinks>
|
||||
<link url='admin_config.php' description='Configure feature box' icon='images/featurebox_32.png' iconSmall='images/featurebox_16.png' primary='true' >Configure feature box</link>
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Id: plugin.xml,v 1.27 2009-10-22 04:14:45 e107coders Exp $ -->
|
||||
<e107Plugin name="Forum" version="2.0" date="2012-08-01" compatibility="2.0" installRequired="true" xhtmlcompliant="true" >
|
||||
<e107Plugin name="Forum" version="2.0" date="2012-08-01" compatibility="2.0" installRequired="true">
|
||||
<author name="e107 Inc." url="http://e107.org" />
|
||||
<description>This plugin is a fully featured Forum system</description>
|
||||
<category>content</category>
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Id: plugin.xml,v 1.15 2009-10-22 04:14:45 e107coders Exp $ -->
|
||||
<e107Plugin name="Gallery" version="1.0" date="2012-08-01" compatibility="2.0" installRequired="true" releaseUrl=''>
|
||||
<e107Plugin name="Gallery" lang="Gallery" version="1.0" date="2012-08-01" compatibility="2.0" installRequired="true">
|
||||
<author name="e107 Inc." url="http://e107.org" />
|
||||
<description>Gallery</description>
|
||||
<category>content</category>
|
||||
|
@ -1,8 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Id: plugin.xml,v 1.7 2009-10-22 04:14:45 e107coders Exp $ -->
|
||||
<e107Plugin name="GSLAN_19" version="1.0" date="2012-08-01" compatibility="2.0" installRequired="true" releaseUrl=''>
|
||||
<author name="e107 Inc." url="http://e107coders.org" email="cameron@e107coders.org" />
|
||||
<description>GSLAN_41</description>
|
||||
<e107Plugin name="Google Sitemap" lang="GSLAN_19" version="1.0" date="2012-08-01" compatibility="2.0" installRequired="true">
|
||||
<author name="e107 Inc." url="http://e107.org" email="security@e107.org" />
|
||||
<description lang="GSLAN_41">Generates a Google Sitemap</description>
|
||||
<copyright>Copyright e107 Inc e107.org, Licensed under GPL (http://www.gnu.org/licenses/gpl.txt)</copyright>
|
||||
<languageFiles>
|
||||
<file type='log' path='languages/--LAN--_admin_gsitemap.php' />
|
||||
@ -11,7 +11,7 @@
|
||||
<link url='admin_config.php' description='Configure feature box' icon='images/icon.png' iconSmall='images/icon_16.png' primary='true' >Configure Sitemap</link>
|
||||
</adminLinks>
|
||||
<siteLinks>
|
||||
<link name="" url="gsitemap.php?show" >Sitemap</link>
|
||||
<link name="" url="gsitemap.php?show" lang="GSLAN_Name">Sitemap</link>
|
||||
</siteLinks>
|
||||
<pluginPrefs>
|
||||
</pluginPrefs>
|
||||
|
@ -28,7 +28,7 @@ if (!defined('e107_INIT')) { exit; }
|
||||
//define('LAN_CONTINUE','Continue'); Now global definition
|
||||
|
||||
define('LAN_CONVERT_01','Import into e107');
|
||||
define('LAN_CONVERT_02','This module allows you to import various data into E107');
|
||||
define('LAN_CONVERT_02','Import data from Wordpress, Joomla, Drupal, Blogspot, RSS and other formats.');
|
||||
define('LAN_CONVERT_03','You must start with a clean E107 database, other than the main admin user (ID=1)');
|
||||
define('LAN_CONVERT_04','Field(s) left blank, please go back and re-enter values.');
|
||||
define('LAN_CONVERT_05','Running this script may empty many of your E107 tables - make sure you have a full backup before continuing!');
|
||||
|
@ -1,10 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<!-- $Id: plugin.xml,v 1.2 2009-09-24 00:11:20 e107coders Exp $ -->
|
||||
|
||||
<e107Plugin name="LAN_CONVERT_01" version="1.0" date="2012-08-01" compatibility="2.0" installRequired="true">
|
||||
<e107Plugin name="Import into e107" lang="LAN_CONVERT_01" version="1.0" date="2012-08-01" compatibility="2.0" installRequired="true">
|
||||
<author name="e107 Inc." url="http://e107.org" email="devs@e107.org" />
|
||||
<description>Import into e107</description>
|
||||
<description lang="LAN_CONVERT_02">Import data from Wordpress, Joomla, Drupal, Blogpost, RSS and other formats.</description>
|
||||
<category>tools</category>
|
||||
<copyright>Copyright e107 Inc e107.org, Licensed under GPL (http://www.gnu.org/licenses/gpl.txt)</copyright>
|
||||
<adminLinks>
|
||||
|
Loading…
x
Reference in New Issue
Block a user