mirror of
https://github.com/e107inc/e107.git
synced 2025-08-02 12:48:26 +02:00
More work on the Theme and Plugin Manager download areas.
This commit is contained in:
@@ -293,13 +293,13 @@ class pluginManager{
|
|||||||
$xml = e107::getXml();
|
$xml = e107::getXml();
|
||||||
$mes = e107::getMessage();
|
$mes = e107::getMessage();
|
||||||
|
|
||||||
$mes->addWarning("Some older plugins may produce unpredictable results.");
|
// $mes->addWarning("Some older plugins may produce unpredictable results.");
|
||||||
|
|
||||||
$from = intval(varset($_GET['frm']));
|
$from = intval(varset($_GET['frm']));
|
||||||
$srch = preg_replace('/[^\w]/','', vartrue($_GET['srch']));
|
$srch = preg_replace('/[^\w]/','', vartrue($_GET['srch']));
|
||||||
|
|
||||||
// $file = SITEURLBASE.e_PLUGIN_ABS."release/release.php"; // temporary testing
|
// $file = SITEURLBASE.e_PLUGIN_ABS."release/release.php"; // temporary testing
|
||||||
$file = "http://e107.org/feed?type=plugin&frm=".$from."&srch=".$srch;
|
$file = "http://e107.org/feed?type=plugin&frm=".$from."&srch=".$srch."&limit=10";
|
||||||
|
|
||||||
$xml->setOptArrayTags('plugin'); // make sure 'plugin' tag always returns an array
|
$xml->setOptArrayTags('plugin'); // make sure 'plugin' tag always returns an array
|
||||||
$xdata = $xml->loadXMLfile($file,'advanced');
|
$xdata = $xml->loadXMLfile($file,'advanced');
|
||||||
@@ -380,7 +380,7 @@ class pluginManager{
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
// echo '<br />v='.$v;
|
// echo '<br />v='.$v;
|
||||||
$text .= "<td style='height: 80px' class='".vartrue($this->fields[$v]['class'],'left')."'>".$frm->renderValue($v, $val[$v], $this->fields[$v], $key)."</td>\n";
|
$text .= "<td style='height: 40px' class='".vartrue($this->fields[$v]['class'],'left')."'>".$frm->renderValue($v, $val[$v], $this->fields[$v], $key)."</td>\n";
|
||||||
}
|
}
|
||||||
$text .= "<td class='center'>".$this->options($val)."</td>";
|
$text .= "<td class='center'>".$this->options($val)."</td>";
|
||||||
$text .= "</tr>";
|
$text .= "</tr>";
|
||||||
|
@@ -484,10 +484,12 @@ class themeHandler
|
|||||||
// $mes->addWarning("This area is experimental.");
|
// $mes->addWarning("This area is experimental.");
|
||||||
|
|
||||||
$from = intval(varset($_GET['frm']));
|
$from = intval(varset($_GET['frm']));
|
||||||
|
$limit = 18;
|
||||||
// $file = SITEURLBASE.e_PLUGIN_ABS."release/release.php"; // temporary testing
|
// $file = SITEURLBASE.e_PLUGIN_ABS."release/release.php"; // temporary testing
|
||||||
|
|
||||||
$file = "http://e107.org/feed?type=theme&frm=".$from."&srch=".$srch;
|
$file = "http://e107.org/feed?type=theme&frm=".$from."&srch=".$srch."&limit=".$limit;
|
||||||
|
|
||||||
|
$mes->addDebug("File = ".$file);
|
||||||
|
|
||||||
$xml->setOptArrayTags('theme,screenshots/image'); // make sure 'theme' tag always returns an array
|
$xml->setOptArrayTags('theme,screenshots/image'); // make sure 'theme' tag always returns an array
|
||||||
// $xdata = $xml->loadXMLfile($file,'advanced',true);
|
// $xdata = $xml->loadXMLfile($file,'advanced',true);
|
||||||
@@ -506,6 +508,10 @@ class themeHandler
|
|||||||
// XML data array.
|
// XML data array.
|
||||||
$c = 1;
|
$c = 1;
|
||||||
|
|
||||||
|
|
||||||
|
if(is_array($xdata['theme'] ))
|
||||||
|
{
|
||||||
|
|
||||||
foreach($xdata['theme'] as $r)
|
foreach($xdata['theme'] as $r)
|
||||||
{
|
{
|
||||||
if(E107_DBG_PATH)
|
if(E107_DBG_PATH)
|
||||||
@@ -514,7 +520,7 @@ class themeHandler
|
|||||||
}
|
}
|
||||||
|
|
||||||
$theme = array(
|
$theme = array(
|
||||||
'name' => $r['@attributes']['name'],
|
'name' => stripslashes($r['@attributes']['name']),
|
||||||
'category' => $r['category'],
|
'category' => $r['category'],
|
||||||
'preview' => $r['screenshots']['image'],
|
'preview' => $r['screenshots']['image'],
|
||||||
'date' => $r['@attributes']['date'],
|
'date' => $r['@attributes']['date'],
|
||||||
@@ -569,23 +575,28 @@ class themeHandler
|
|||||||
}
|
}
|
||||||
|
|
||||||
$text .= "<div class='clear'> </div>";
|
$text .= "<div class='clear'> </div>";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$mes->addInfo("No Themes found which match your search criteria");
|
||||||
|
}
|
||||||
|
$amount =$limit;
|
||||||
|
|
||||||
$amount = 20;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
$ns->tablerender(TPVLAN_26.SEP."Available for Download", $text. $mes->render());
|
||||||
|
|
||||||
if($total > $amount)
|
if($total > $amount)
|
||||||
{
|
{
|
||||||
$parms = $total.",".$amount.",".$from.",".e_SELF.'?mode='.$_GET['mode'].'&frm=[FROM]';
|
$parms = $total.",".$amount.",".$from.",".e_SELF.'?mode='.$_GET['mode'].'&frm=[FROM]';
|
||||||
$text .= "<div style='text-align:center;margin-top:10px'>".$tp->parseTemplate("{NEXTPREV=$parms}",TRUE)."</div>";
|
echo"<div class='center'>".$tp->parseTemplate("{NEXTPREV=$parms}",TRUE)."</div>";
|
||||||
}
|
|
||||||
|
|
||||||
$ns->tablerender(TPVLAN_26.SEP."Available for Download", $mes->render().$text);
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
echo "</form>\n</div>\n";
|
echo "</form>\n</div>\n";
|
||||||
|
Reference in New Issue
Block a user