1
0
mirror of https://github.com/e107inc/e107.git synced 2025-07-31 20:00:37 +02:00

More work on the Theme and Plugin Manager download areas.

This commit is contained in:
Cameron
2013-03-04 03:39:27 -08:00
parent 474a7df566
commit ef51b62590
2 changed files with 85 additions and 74 deletions

View File

@@ -293,13 +293,13 @@ class pluginManager{
$xml = e107::getXml();
$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']));
$srch = preg_replace('/[^\w]/','', vartrue($_GET['srch']));
// $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
$xdata = $xml->loadXMLfile($file,'advanced');
@@ -380,7 +380,7 @@ class pluginManager{
continue;
}
// 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 .= "</tr>";

View File

@@ -484,10 +484,12 @@ class themeHandler
// $mes->addWarning("This area is experimental.");
$from = intval(varset($_GET['frm']));
$limit = 18;
// $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
// $xdata = $xml->loadXMLfile($file,'advanced',true);
@@ -506,6 +508,10 @@ class themeHandler
// XML data array.
$c = 1;
if(is_array($xdata['theme'] ))
{
foreach($xdata['theme'] as $r)
{
if(E107_DBG_PATH)
@@ -514,7 +520,7 @@ class themeHandler
}
$theme = array(
'name' => $r['@attributes']['name'],
'name' => stripslashes($r['@attributes']['name']),
'category' => $r['category'],
'preview' => $r['screenshots']['image'],
'date' => $r['@attributes']['date'],
@@ -569,23 +575,28 @@ class themeHandler
}
$text .= "<div class='clear'>&nbsp;</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)
{
$parms = $total.",".$amount.",".$from.",".e_SELF.'?mode='.$_GET['mode'].'&amp;frm=[FROM]';
$text .= "<div style='text-align:center;margin-top:10px'>".$tp->parseTemplate("{NEXTPREV=$parms}",TRUE)."</div>";
}
$ns->tablerender(TPVLAN_26.SEP."Available for Download", $mes->render().$text);
echo"<div class='center'>".$tp->parseTemplate("{NEXTPREV=$parms}",TRUE)."</div>";
}
}
echo "</form>\n</div>\n";