<?php
- define('DEFAULT_PLUGINS_DIR', 'https://api.dalek.services/plugins.list');
+ define('DEFAULT_PLUGINS_DIR', 'https://api.valware.uk/plugins.list');
class PluginRepo
{
<?php }
else
{ ?>
- <div style="margin-left:40px;" class="badge rounded-pill badge-danger">Inompatible</div>
+ <div style="margin-left:40px;" class="badge rounded-pill badge-danger">Incompatible</div>
<?php }
}
if ($this->err)
die("Could not fetch list.\n");
- global $config;
?>
<div class="row">
- <?php
- $counter = 0;
-
-
+ <?php
foreach($this->data->list as $p)
{
+ $tok = split(WEBPANEL_VERSION,"-");
+ $upgradeRequired = false;
+ $wpversion = $tok[0];
+ if ($p->minver > $wpversion)
+ $upgradeRequired = true;
$installed = in_array($p->name, $config['plugins']) ? true : false;
if (is_string($p))
continue;
<div id="justALonelyEmptyDivCryEmoji"></div>
<div>
<div id="<?php echo $p->name ?>" class="more-info btn btn-info">More Info</div>
- <div id="<?php echo $p->name ?>install" class="btn-install-plugin btn btn-primary">Install</div>
+ <?php if ($upgradeRequired){
+ ?>
+ <div id="<?php echo $p->name ?>coming-soon" class="btn-coming-soon btn btn-dark disabled">Panel Upgrade Required</div>
+ <?php
+ }
+ ?>
+ <div id="<?php echo $p->name ?>install" <?php if ($upgradeRequired) echo 'style="display:none" '; ?> class="btn-install-plugin btn btn-primary">Install</div>
</div>
</div>
</div>
<?php
- /** only do three per row.
- * WARNING: untested due to not having more than 2 plugins atm...
- */
- if ($counter >= 3)
- {
- ?><!-- New row please mr html -->
- </div>
- <div class="row">
- <?php
- $counter = 0;
- }
- $counter++;
}