Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Replace "Unsupported version" text with icon at the modification list

  • Loading branch information...
commit 068ead572fc9b18e3fd92c779a97a36a5aec748f 1 parent b0542c6
@daris authored
View
BIN  img/patcher/bullet_green.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  img/patcher/bullet_red.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
24 plugins/AP_Patcher.php
@@ -18,6 +18,9 @@
if (!defined('PATCHER_ROOT'))
define('PATCHER_ROOT', PUN_ROOT.'plugins/patcher/');
+if (!defined('PATCHER_ROOT_URL'))
+ define('PATCHER_ROOT_URL', $pun_config['o_base_url'].'/'.substr(realpath(PATCHER_ROOT.'../../'), strlen(PUN_ROOT)));
+
// Enable debug mode for now (remove when releasing stable version)
if (!defined('PUN_DEBUG'))
define('PUN_DEBUG', 1);
@@ -931,20 +934,12 @@
<?php endif; ?>
<legend><?php echo $langPatcher[$section] ?></legend>
<div class="infldset">
-<?php
- if (empty($mods))
- {
-?>
- <p><?php echo $langPatcher['No '.strtolower($section)] ?></p>
-<?php
- }
- else
- {
-?>
+<?php if (empty($mods)) : ?> <p><?php echo $langPatcher['No '.strtolower($section)] ?></p>
+<?php else : ?>
<table>
<thead>
<tr>
- <th class="tcl"><?php echo $langPatcher['Mod title'] ?></th>
+ <th class="tcl" colspan="2"><?php echo $langPatcher['Mod title'] ?></th>
<th class="tcr" style="width: 25%"><?php echo $langPatcher['Action'] ?></th>
<?php if ($section != 'Mods to download') : ?> <th style="width: 10px"><?php echo $langPatcher['Select'] ?></th>
<?php endif; ?> </tr>
@@ -978,10 +973,6 @@
$info[] = '<br />'.pun_htmlspecialchars($curMod->description);
}
- // Is the mod compatible with FluxBB version
- if (!$curMod->isCompatible())
- $info[] = '<br /><span style="color: #a00; display: inline">'.$langPatcher['Unsupported version info'].'</span>';
-
if (isset($curMod->important))
$info[] = '<br /><span style="color: #a00"><strong>'.$langPatcher['Important'].'</strong>: '.pun_htmlspecialchars($curMod->important).'</span>';
@@ -1053,6 +1044,7 @@
?>
<tr class="mod-info <?php echo ($i % 2 == 0) ? 'roweven' : 'rowodd' ?>">
+ <td style="width: 20px; background-repeat: no-repeat; background-position: center center; background-image: url(<?php echo PATCHER_ROOT_URL ?>/img/patcher/bullet_<?php echo $curMod->isCompatible() ? 'green' : 'red' ?>.png)"<?php echo $curMod->isCompatible() ? '' : ' title="'.$langPatcher['Unsupported version info'].'"' ?>>&nbsp;</td>
<td><?php echo implode("\n", $info) ?></td>
<td class="tcr">
<?php echo ($status != '') ? $status.'<br />' : '' ?>
@@ -1063,7 +1055,7 @@
<?php
$i++;
}
- }
+endif;
?>
</tbody>
Please sign in to comment.
Something went wrong with that request. Please try again.