diff --git a/e107_admin/plugin.php b/e107_admin/plugin.php
index 2f9c6916f..2abcabe73 100644
--- a/e107_admin/plugin.php
+++ b/e107_admin/plugin.php
@@ -1305,6 +1305,7 @@ class pluginBuilder
var $table = '';
var $pluginName = '';
var $special = array();
+ var $tableCount = 0;
function __construct()
{
@@ -1449,14 +1450,16 @@ class pluginBuilder
$text = $frm->open('newplugin-step3','post', e_SELF.'?mode=create&newplugin='.$newplug.'&step=3');
$text .= "
\n";
$text .= "
";
foreach($ret['tables'] as $key=>$table)
@@ -1489,11 +1492,9 @@ class pluginBuilder
$text .= $frm->close();
$mes->addInfo("Review all fields and modify if necessary.");
-
- if(count($ret['tables']) > 1)
- {
- $mes->addInfo("Review ALL tables before clicking 'Generate'.");
- }
+
+ $mes->addInfo("Review ALL tabs before clicking 'Generate'.");
+
$ns->tablerender("Plugin Builder", $mes->render() . $text);
}
@@ -1513,9 +1514,11 @@ class pluginBuilder
//TODO Plugin.xml Form Fields. .
$data = array(
- 'main' => array('name','lang','version','date', 'compatibility','installRequired'),
+ 'main' => array('name','lang','version','date', 'compatibility'),
'author' => array('name','url'),
+ 'summary' => array('summary'),
'description' => array('description'),
+ 'keywords' => array('one','two'),
'category' => array('category'),
'copyright' => array('copyright'),
// 'languageFile' => array('type','path'),
@@ -1600,12 +1603,28 @@ class pluginBuilder
case 'main-installRequired':
return "Installation required: ".$frm->radio_switch($name,'',LAN_YES, LAN_NO);
- break;
+ break;
- case 'description-description':
- $help = "A short description of the plugin
(Must be written in English)";
+ case 'summary-summary':
+ $help = "A short one-line description of the plugin
(Must be written in English)";
$required = true;
$size = 100;
+ $placeholder= " ";
+ break;
+
+ case 'keywords-one':
+ case 'keywords-two':
+ $help = "Keyword/Tag for this plugin
(Must be written in English)";
+ $required = true;
+ $size = 20;
+ $placeholder= " ";
+ break;
+
+ case 'description-description':
+ $help = "A full description of the plugin
(Must be written in English)";
+ $required = true;
+ $size = 100;
+ $placeholder = " ";
break;
@@ -1621,14 +1640,20 @@ class pluginBuilder
}
$req = ($required == true) ? "&required=1" : "";
+ $placeholder = (varset($placeholder)) ? $placeholder : $type;
- if($type == 'date')
+ switch ($type)
{
- $text = $frm->datepicker($name,time(),'dateformat=yy-mm-dd'.$req);
- }
- elseif($type == 'category')
- {
- $options = array(
+ case 'date':
+ $text = $frm->datepicker($name,time(),'dateformat=yy-mm-dd'.$req);
+ break;
+
+ case 'description':
+ $text = $frm->textarea($name,$default, 3, 80, $req);
+ break;
+
+ case 'category':
+ $options = array(
'settings' => 'settings',
'users' => 'users',
'content' => 'content',
@@ -1637,23 +1662,26 @@ class pluginBuilder
'misc' => 'misc',
'menu' => 'menu',
'about' => 'about'
- );
+ );
- $text = $frm->selectbox($name, $options,'','required=1', true);
- }
- else
- {
- $text = $frm->text($name, $default, $size, 'placeholder='.$type.$req);
+ $text = $frm->selectbox($name, $options,'','required=1', true);
+ break;
+
+
+ default:
+ $text = $frm->text($name, $default, $size, 'placeholder='.$placeholder . $req);
+ break;
}
+
$text .= ($help) ? "
".$help."" : "";
return $text;
}
- function processXml($data)
+ function createXml($data)
{
-
+ //print_a($_POST);
$ns = e107::getRender();
$mes = e107::getMessage();
@@ -1669,9 +1697,14 @@ class pluginBuilder
$template = <<
-
+
- {DESCRIPTION_DESCRIPTION}
+ {SUMMARY_SUMMARY}
+ {DESCRIPTION_DESCRIPTION}
+
+ {KEYWORDS_ONE}
+ {KEYWORDS_TWO}
+
{CATEGORY_CATEGORY}
{COPYRIGHT_COPYRIGHT}
@@ -1724,26 +1757,31 @@ TEMPLATE;
$modes = array("main"=>"Main Area","cat"=>"Categories");
+ // echo "TABLE COUNT= ".$this->tableCount ;
+
+
$this->table = $table."_ui";
- $text .= "