Compare commits

..

No commits in common. "main" and "v1.7" have entirely different histories.
main ... v1.7

16 changed files with 188 additions and 232 deletions

View File

@ -1,14 +1,5 @@
# Changelog # Changelog
## [1.7.1 - 27.06.2025]
### Changed
* Rename plugin:install:install to plugin:setup, also add alias to previous command (https://github.com/slawkens/myaac/commit/13d33822b59df349199e885a78a3d6beb0863d0b)
### Fixed
* Fix commands: setup + cache:clear (https://github.com/slawkens/myaac/commit/0da524fefe93b3028392e9014550eea3324d3a22, https://github.com/slawkens/myaac/commit/fe8281594e989f00280ba1adc734a9198c6b5cc1)
* Fix polls link in tibiacom template (https://github.com/slawkens/myaac/commit/d90fa323d7c77d81768df60feeb1c374b1650a0c)
## [1.7 - 22.06.2025] ## [1.7 - 22.06.2025]
### Added ### Added

View File

@ -27,13 +27,6 @@ $nameOrNumberColumn = getAccountIdentityColumn();
$hasSecretColumn = $db->hasColumn('accounts', 'secret'); $hasSecretColumn = $db->hasColumn('accounts', 'secret');
$hasCoinsColumn = $db->hasColumn('accounts', 'coins'); $hasCoinsColumn = $db->hasColumn('accounts', 'coins');
$hasCoinsTransferableColumn = $db->hasColumn('accounts', 'coins_transferable');
$hasTransferableCoinsColumn = $db->hasColumn('accounts', 'transferable_coins');
$coinsTransferableColumn =
$hasTransferableCoinsColumn ?
'transferable_coins' : 'coins_transferable';
$hasPointsColumn = $db->hasColumn('accounts', 'premium_points'); $hasPointsColumn = $db->hasColumn('accounts', 'premium_points');
$hasTypeColumn = $db->hasColumn('accounts', 'type'); $hasTypeColumn = $db->hasColumn('accounts', 'type');
$hasGroupColumn = $db->hasColumn('accounts', 'group_id'); $hasGroupColumn = $db->hasColumn('accounts', 'group_id');
@ -143,18 +136,11 @@ else if (isset($_REQUEST['search'])) {
if (!Validator::email($email)) if (!Validator::email($email))
$errors['email'] = Validator::getLastError(); $errors['email'] = Validator::getLastError();
// tibia coins //tibia coins
if ($hasCoinsColumn) { if ($hasCoinsColumn) {
$t_coins = $_POST['t_coins']; $t_coins = $_POST['t_coins'];
verify_number($t_coins, 'Tibia coins', 12); verify_number($t_coins, 'Tibia coins', 12);
} }
// transferable tibia coins
if ($hasCoinsTransferableColumn || $hasTransferableCoinsColumn) {
$t_coins_transferable = $_POST['t_coins_transferable'];
verify_number($t_coins_transferable, 'Transferable Tibia coins', 12);
}
// prem days // prem days
$p_days = (int)$_POST['p_days']; $p_days = (int)$_POST['p_days'];
verify_number($p_days, 'Prem days', 11); verify_number($p_days, 'Prem days', 11);
@ -199,18 +185,12 @@ else if (isset($_REQUEST['search'])) {
if ($hasSecretColumn) { if ($hasSecretColumn) {
$account->setCustomField('secret', $secret); $account->setCustomField('secret', $secret);
} }
$account->setCustomField('key', $key); $account->setCustomField('key', $key);
$account->setEMail($email); $account->setEMail($email);
if ($hasCoinsColumn) { if ($hasCoinsColumn) {
$account->setCustomField('coins', $t_coins); $account->setCustomField('coins', $t_coins);
} }
if ($hasCoinsTransferableColumn || $hasTransferableCoinsColumn) {
$account->setCustomField($coinsTransferableColumn, $t_coins_transferable);
}
$lastDay = 0; $lastDay = 0;
if($p_days != 0 && $p_days != OTS_Account::GRATIS_PREMIUM_DAYS) { if($p_days != 0 && $p_days != OTS_Account::GRATIS_PREMIUM_DAYS) {
$lastDay = time(); $lastDay = time();
@ -421,12 +401,6 @@ else if (isset($_REQUEST['search'])) {
<input type="text" class="form-control" id="t_coins" name="t_coins" autocomplete="off" maxlength="11" value="<?php echo $account->getCustomField('coins') ?>"/> <input type="text" class="form-control" id="t_coins" name="t_coins" autocomplete="off" maxlength="11" value="<?php echo $account->getCustomField('coins') ?>"/>
</div> </div>
<?php endif; ?> <?php endif; ?>
<?php if ($hasCoinsTransferableColumn || $hasTransferableCoinsColumn): ?>
<div class="col-12 col-sm-12 col-lg-6">
<label for="t_coins_transferable">Transferable Tibia Coins:</label>
<input type="text" class="form-control" id="t_coins_transferable" name="t_coins_transferable" autocomplete="off" maxlength="11" value="<?php echo $account->getCustomField($coinsTransferableColumn) ?>"/>
</div>
<?php endif; ?>
<div class="col-12 col-sm-12 col-lg-6"> <div class="col-12 col-sm-12 col-lg-6">
<label for="p_days">Premium Days:</label> <label for="p_days">Premium Days:</label>
<input type="text" class="form-control" id="p_days" name="p_days" autocomplete="off" maxlength="11" value="<?php echo $account->getPremDays(); ?>"/> <input type="text" class="form-control" id="p_days" name="p_days" autocomplete="off" maxlength="11" value="<?php echo $account->getPremDays(); ?>"/>

View File

@ -26,7 +26,7 @@
if (version_compare(phpversion(), '8.1', '<')) die('PHP version 8.1 or higher is required.'); if (version_compare(phpversion(), '8.1', '<')) die('PHP version 8.1 or higher is required.');
const MYAAC = true; const MYAAC = true;
const MYAAC_VERSION = '1.7.2-dev'; const MYAAC_VERSION = '1.7';
const DATABASE_VERSION = 45; const DATABASE_VERSION = 45;
const TABLE_PREFIX = 'myaac_'; const TABLE_PREFIX = 'myaac_';
define('START_TIME', microtime(true)); define('START_TIME', microtime(true));

View File

@ -162,6 +162,15 @@ if(setting('core.anonymous_usage_statistics')) {
} }
} }
/**
* @var OTS_Account $account_logged
*/
if ($logged && admin()) {
$content .= $twig->render('admin-bar.html.twig', [
'username' => USE_ACCOUNT_NAME ? $account_logged->getName() : $account_logged->getId()
]);
}
$title_full = (isset($title) ? $title . ' - ' : '') . $config['lua']['serverName']; $title_full = (isset($title) ? $title . ' - ' : '') . $config['lua']['serverName'];
require $template_path . '/' . $template_index; require $template_path . '/' . $template_index;

View File

@ -512,13 +512,6 @@ function template_place_holder($type): string
} }
elseif ($type === 'body_start') { elseif ($type === 'body_start') {
$ret .= $twig->render('browsehappy.html.twig'); $ret .= $twig->render('browsehappy.html.twig');
if (admin()) {
global $account_logged;
$ret .= $twig->render('admin-bar.html.twig', [
'username' => USE_ACCOUNT_NAME ? $account_logged->getName() : $account_logged->getId()
]);
}
} }
elseif($type === 'body_end') { elseif($type === 'body_end') {
$ret .= template_ga_code(); $ret .= template_ga_code();
@ -989,12 +982,11 @@ function load_config_lua($filename)
foreach($lines as $ln => $line) foreach($lines as $ln => $line)
{ {
$line = trim($line); $line = trim($line);
if(isset($line[0]) && ($line[0] === '{' || $line[0] === '}')) { if(@$line[0] === '{' || @$line[0] === '}') {
// arrays are not supported yet // arrays are not supported yet
// just ignore the error // just ignore the error
continue; continue;
} }
$tmp_exp = explode('=', $line, 2); $tmp_exp = explode('=', $line, 2);
if(str_contains($line, 'dofile')) { if(str_contains($line, 'dofile')) {
$delimiter = '"'; $delimiter = '"';
@ -1282,6 +1274,9 @@ function clearCache()
deleteDirectory(CACHE . 'plugins', ['index.html'], true); deleteDirectory(CACHE . 'plugins', ['index.html'], true);
deleteDirectory(CACHE, ['signatures', 'twig', 'plugins', 'index.html', 'persistent'], true); deleteDirectory(CACHE, ['signatures', 'twig', 'plugins', 'index.html', 'persistent'], true);
// routes cache
clearRouteCache();
global $hooks; global $hooks;
$hooks->trigger(HOOK_CACHE_CLEAR, ['cache' => Cache::getInstance()]); $hooks->trigger(HOOK_CACHE_CLEAR, ['cache' => Cache::getInstance()]);

View File

@ -8,7 +8,7 @@
* @link https://my-aac.org * @link https://my-aac.org
*/ */
defined('MYAAC') or die('Direct access not allowed!'); defined('MYAAC') or die('Direct access not allowed!');
$title = 'Not Found'; $title = '404 Not Found';
header('HTTP/1.0 404 Not Found'); header('HTTP/1.0 404 Not Found');
?> ?>

View File

@ -8,7 +8,7 @@
* @link https://my-aac.org * @link https://my-aac.org
*/ */
defined('MYAAC') or die('Direct access not allowed!'); defined('MYAAC') or die('Direct access not allowed!');
$title = 'Method Not Allowed'; $title = '405 Method Not Allowed';
header('HTTP/1.0 405 Method Not Allowed'); header('HTTP/1.0 405 Method Not Allowed');
?> ?>

View File

@ -1062,12 +1062,6 @@ Sent by MyAAC,<br/>
'desc' => 'How often to update highscores from database in minutes. Too low may slow down your website.<br/>0 to disable.', 'desc' => 'How often to update highscores from database in minutes. Too low may slow down your website.<br/>0 to disable.',
'default' => 15, 'default' => 15,
], ],
'highscores_skills_box' => [
'name' => 'Display Skills Box',
'type' => 'boolean',
'desc' => 'show "Choose a skill" box on the highscores (allowing peoples to sort highscores by skill)?',
'default' => true,
],
'highscores_vocation_box' => [ 'highscores_vocation_box' => [
'name' => 'Display Vocation Box', 'name' => 'Display Vocation Box',
'type' => 'boolean', 'type' => 'boolean',

View File

@ -17,7 +17,10 @@ class CacheClearCommand extends Command
protected function execute(InputInterface $input, OutputInterface $output): int protected function execute(InputInterface $input, OutputInterface $output): int
{ {
require SYSTEM . 'init.php'; global $hooks;
$hooks = new Hooks();
$hooks->load();
$hooks->trigger(HOOK_INIT);
$io = new SymfonyStyle($input, $output); $io = new SymfonyStyle($input, $output);

View File

@ -12,10 +12,9 @@ class MailSendCommand extends Command
{ {
protected function configure(): void protected function configure(): void
{ {
$this->setName('email:send') $this->setName('mail:send')
->setAliases(['mail:send'])
->setDescription('This command sends E-Mail to single user. Message can be provided as follows: ' . PHP_EOL ->setDescription('This command sends E-Mail to single user. Message can be provided as follows: ' . PHP_EOL
. ' echo "Hello World" | php aac email:send --subject="This is the subject" test@test.com') . ' echo "Hello World" | php sa email:send --subject="This is the subject" test@test.com')
->addArgument('recipient', InputArgument::REQUIRED, 'Email, Account Name, Account id or Player Name') ->addArgument('recipient', InputArgument::REQUIRED, 'Email, Account Name, Account id or Player Name')
->addOption('subject', 's', InputOption::VALUE_REQUIRED, 'Subject'); ->addOption('subject', 's', InputOption::VALUE_REQUIRED, 'Subject');
} }

View File

@ -12,8 +12,7 @@ class PluginInstallInstallCommand extends Command
{ {
protected function configure(): void protected function configure(): void
{ {
$this->setName('plugin:setup') $this->setName('plugin:install:install')
->setAliases(['plugin:install:install'])
->setDescription('This command executes the "install" part of the plugin') ->setDescription('This command executes the "install" part of the plugin')
->addArgument('plugin', InputArgument::REQUIRED, 'Plugin name'); ->addArgument('plugin', InputArgument::REQUIRED, 'Plugin name');
} }

View File

@ -532,192 +532,193 @@ class Plugins {
self::$plugin_json = $plugin_json; self::$plugin_json = $plugin_json;
if ($plugin_json == null) { if ($plugin_json == null) {
self::$warnings[] = 'Cannot load ' . $file_name . '. File might be not a valid json code.'; self::$warnings[] = 'Cannot load ' . $file_name . '. File might be not a valid json code.';
return false;
} }
else {
$continue = true;
$continue = true; if(!isset($plugin_json['name']) || empty(trim($plugin_json['name']))) {
self::$error = 'Plugin "name" tag is not set.';
if(!isset($plugin_json['name']) || empty(trim($plugin_json['name']))) {
self::$error = 'Plugin "name" tag is not set.';
return false;
}
if(!isset($plugin_json['version']) || empty(trim($plugin_json['version']))) {
self::$warnings[] = 'Plugin "version" tag is not set.';
}
if(isset($plugin_json['require'])) {
$require = $plugin_json['require'];
$myaac_satified = true;
if(isset($require['myaac_'])) {
$require_myaac = $require['myaac_'];
if(!Semver::satisfies(MYAAC_VERSION, $require_myaac)) {
$myaac_satified = false;
}
}
else if(isset($require['myaac'])) {
$require_myaac = $require['myaac'];
if(version_compare(MYAAC_VERSION, $require_myaac, '<')) {
$myaac_satified = false;
}
}
if(!$myaac_satified) {
self::$error = "Your AAC version doesn't meet the requirement of this plugin. Required version is: " . $require_myaac . ", and you're using version " . MYAAC_VERSION . ".";
return false; return false;
} }
$php_satisfied = true; if(!isset($plugin_json['version']) || empty(trim($plugin_json['version']))) {
if(isset($require['php_'])) { self::$warnings[] = 'Plugin "version" tag is not set.';
$require_php = $require['php_'];
if(!Semver::satisfies(phpversion(), $require_php)) {
$php_satisfied = false;
}
}
else if(isset($require['php'])) {
$require_php = $require['php'];
if(version_compare(phpversion(), $require_php, '<')) {
$php_satisfied = false;
}
} }
if(!$php_satisfied) { if(isset($plugin_json['require'])) {
self::$error = "Your PHP version doesn't meet the requirement of this plugin. Required version is: " . $require_php . ", and you're using version " . phpversion() . "."; $require = $plugin_json['require'];
$continue = false;
}
$database_satisfied = true; $myaac_satified = true;
if(isset($require['database_'])) { if(isset($require['myaac_'])) {
$require_database = $require['database_']; $require_myaac = $require['myaac_'];
if(!Semver::satisfies(DATABASE_VERSION, $require_database)) { if(!Semver::satisfies(MYAAC_VERSION, $require_myaac)) {
$database_satisfied = false; $myaac_satified = false;
}
}
else if(isset($require['database'])) {
$require_database = $require['database'];
if(version_compare(DATABASE_VERSION, $require_database, '<')) {
$database_satisfied = false;
}
}
if(!$database_satisfied) {
self::$error = "Your database version doesn't meet the requirement of this plugin. Required version is: " . $require_database . ", and you're using version " . DATABASE_VERSION . ".";
$continue = false;
}
if($continue) {
foreach($require as $req => $version) {
$req = strtolower(trim($req));
$version = trim($version);
if(in_array($req, array('myaac', 'myaac_', 'php', 'php_', 'database', 'database_'))) {
continue;
} }
}
if(in_array($req, array('php-ext', 'php-extension'))) { // require php extension else if(isset($require['myaac'])) {
$tmpDisplayError = false; $require_myaac = $require['myaac'];
$explode = explode(',', $version); if(version_compare(MYAAC_VERSION, $require_myaac, '<')) {
$myaac_satified = false;
foreach ($explode as $item) {
if(!extension_loaded($item)) {
$errors[] = "This plugin requires php extension: " . $item . " to be installed.";
$tmpDisplayError = true;
}
}
if ($tmpDisplayError) {
self::$error = implode('<br/>', $errors);
$continue = false;
break;
}
} }
else if($req == 'table') { }
$tmpDisplayError = false;
$explode = explode(',', $version);
foreach ($explode as $item) {
if(!$db->hasTable($item)) {
$errors[] = "This plugin requires table: " . $item . " to exist in the database.";
$tmpDisplayError = true;
}
}
if ($tmpDisplayError) { if(!$myaac_satified) {
self::$error = implode('<br/>', $errors); self::$error = "Your AAC version doesn't meet the requirement of this plugin. Required version is: " . $require_myaac . ", and you're using version " . MYAAC_VERSION . ".";
$continue = false; return false;
break; }
}
$php_satisfied = true;
if(isset($require['php_'])) {
$require_php = $require['php_'];
if(!Semver::satisfies(phpversion(), $require_php)) {
$php_satisfied = false;
} }
else if($req == 'column') { }
$tmpDisplayError = false; else if(isset($require['php'])) {
$explode = explode(',', $version); $require_php = $require['php'];
foreach ($explode as $item) { if(version_compare(phpversion(), $require_php, '<')) {
$tmp = explode('.', $item); $php_satisfied = false;
}
}
if(count($tmp) == 2) { if(!$php_satisfied) {
if(!$db->hasColumn($tmp[0], $tmp[1])) { self::$error = "Your PHP version doesn't meet the requirement of this plugin. Required version is: " . $require_php . ", and you're using version " . phpversion() . ".";
$errors[] = "This plugin requires database column: " . $tmp[0] . "." . $tmp[1] . " to exist in database."; $continue = false;
}
$database_satisfied = true;
if(isset($require['database_'])) {
$require_database = $require['database_'];
if(!Semver::satisfies(DATABASE_VERSION, $require_database)) {
$database_satisfied = false;
}
}
else if(isset($require['database'])) {
$require_database = $require['database'];
if(version_compare(DATABASE_VERSION, $require_database, '<')) {
$database_satisfied = false;
}
}
if(!$database_satisfied) {
self::$error = "Your database version doesn't meet the requirement of this plugin. Required version is: " . $require_database . ", and you're using version " . DATABASE_VERSION . ".";
$continue = false;
}
if($continue) {
foreach($require as $req => $version) {
$req = strtolower(trim($req));
$version = trim($version);
if(in_array($req, array('myaac', 'myaac_', 'php', 'php_', 'database', 'database_'))) {
continue;
}
if(in_array($req, array('php-ext', 'php-extension'))) { // require php extension
$tmpDisplayError = false;
$explode = explode(',', $version);
foreach ($explode as $item) {
if(!extension_loaded($item)) {
$errors[] = "This plugin requires php extension: " . $item . " to be installed.";
$tmpDisplayError = true; $tmpDisplayError = true;
} }
} }
else {
self::$warnings[] = "Invalid plugin require column: " . $item;
}
}
if ($tmpDisplayError) { if ($tmpDisplayError) {
self::$error = implode('<br/>', $errors); self::$error = implode('<br/>', $errors);
$continue = false;
break;
}
}
else if(strpos($req, 'ext-') !== false) {
$tmp = explode('-', $req);
if(count($tmp) == 2) {
if(!extension_loaded($tmp[1]) || !Semver::satisfies(phpversion($tmp[1]), $version)) {
self::$error = "This plugin requires php extension: " . $tmp[1] . ", version " . $version . " to be installed.";
$continue = false; $continue = false;
break; break;
} }
} }
} else if($req == 'table') {
else if(!self::is_installed($req, $version)) { $tmpDisplayError = false;
self::$error = "This plugin requires another plugin to run correctly. The another plugin is: " . $req . ", with version " . $version . "."; $explode = explode(',', $version);
$continue = false; foreach ($explode as $item) {
break; if(!$db->hasTable($item)) {
$errors[] = "This plugin requires table: " . $item . " to exist in the database.";
$tmpDisplayError = true;
}
}
if ($tmpDisplayError) {
self::$error = implode('<br/>', $errors);
$continue = false;
break;
}
}
else if($req == 'column') {
$tmpDisplayError = false;
$explode = explode(',', $version);
foreach ($explode as $item) {
$tmp = explode('.', $item);
if(count($tmp) == 2) {
if(!$db->hasColumn($tmp[0], $tmp[1])) {
$errors[] = "This plugin requires database column: " . $tmp[0] . "." . $tmp[1] . " to exist in database.";
$tmpDisplayError = true;
}
}
else {
self::$warnings[] = "Invalid plugin require column: " . $item;
}
}
if ($tmpDisplayError) {
self::$error = implode('<br/>', $errors);
$continue = false;
break;
}
}
else if(strpos($req, 'ext-') !== false) {
$tmp = explode('-', $req);
if(count($tmp) == 2) {
if(!extension_loaded($tmp[1]) || !Semver::satisfies(phpversion($tmp[1]), $version)) {
self::$error = "This plugin requires php extension: " . $tmp[1] . ", version " . $version . " to be installed.";
$continue = false;
break;
}
}
}
else if(!self::is_installed($req, $version)) {
self::$error = "This plugin requires another plugin to run correctly. The another plugin is: " . $req . ", with version " . $version . ".";
$continue = false;
break;
}
} }
} }
} }
}
if(!$continue) { if($continue) {
return false; if(!$zip->extractTo(BASE)) { // "Real" Install
} self::$error = 'There was a problem with extracting zip archive to base directory.';
$zip->close();
return false;
}
if(!$zip->extractTo(BASE)) { // "Real" Install $install = $plugin_json['install'] ?? '';
self::$error = 'There was a problem with extracting zip archive to base directory.'; if (self::getAutoLoadOption($plugin_json, 'install', true) && is_file(PLUGINS . $pluginFilename . '/install.php')) {
$zip->close(); $install = 'plugins/' . $pluginFilename . '/install.php';
return false; }
}
$install = $plugin_json['install'] ?? ''; if (!empty($install)) {
if (self::getAutoLoadOption($plugin_json, 'install', true) && is_file(PLUGINS . $pluginFilename . '/install.php')) { if (file_exists(BASE . $install)) {
$install = 'plugins/' . $pluginFilename . '/install.php'; $db->revalidateCache();
} require BASE . $install;
$db->revalidateCache();
}
else {
self::$warnings[] = 'Cannot load install script. Your plugin might be not working correctly.';
}
}
if (!empty($install)) { clearCache();
if (file_exists(BASE . $install)) {
$db->revalidateCache(); return true;
require BASE . $install;
$db->revalidateCache();
}
else {
self::$warnings[] = 'Cannot load install script. Your plugin might be not working correctly.';
} }
} }
clearCache(); return false;
return true;
} }
public static function isEnabled($pluginFileName): bool public static function isEnabled($pluginFileName): bool
@ -780,20 +781,15 @@ class Plugins {
return false; return false;
} }
$install = $plugin_json['install'] ?? ''; if(!isset($plugin_json['install'])) {
if (self::getAutoLoadOption($plugin_json, 'install', true) && is_file(PLUGINS . $plugin_name . '/install.php')) { self::$error = "Plugin doesn't have install options defined. Skipping...";
$install = 'plugins/' . $plugin_name . '/install.php';
}
if (empty($install)) {
self::$error = "This plugin doesn't seem to have install script defined.";
return false; return false;
} }
global $db; global $db;
if (file_exists(BASE . $install)) { if (file_exists(BASE . $plugin_json['install'])) {
$db->revalidateCache(); $db->revalidateCache();
require BASE . $install; require BASE . $plugin_json['install'];
$db->revalidateCache(); $db->revalidateCache();
} }
else { else {

View File

@ -91,7 +91,7 @@ else {
$file = BASE . $template_path . '/layout_config.ini'; $file = BASE . $template_path . '/layout_config.ini';
} }
$template_ini = parse_ini_file($file, true); $template_ini = parse_ini_file($file);
unset($file); unset($file);
if ($cache->enabled()) { if ($cache->enabled()) {

View File

@ -94,10 +94,8 @@
{% endif %} {% endif %}
</table> </table>
</td> </td>
{% if setting('core.highscores_skills_box') or setting('core.highscores_vocation_box') %}
<td width="5%"></td> <td width="5%"></td>
<td width="15%" valign="top" align="right"> <td width="15%" valign="top" align="right">
{% if setting('core.highscores_skills_box') %}
<table style="border: 0; width: 100%" cellpadding="4" cellspacing="1"> <table style="border: 0; width: 100%" cellpadding="4" cellspacing="1">
<tr bgcolor="{{ config.vdarkborder }}"> <tr bgcolor="{{ config.vdarkborder }}">
<td class="white"><B>Choose a skill</B></TD> <td class="white"><B>Choose a skill</B></TD>
@ -111,8 +109,7 @@
</tr> </tr>
</table> </table>
<br/> <br/>
{% endif %} {% if config.highscores_vocation_box %}
{% if setting('core.highscores_vocation_box') %}
<table border="0" width="100%" cellpadding="4" cellspacing="1"> <table border="0" width="100%" cellpadding="4" cellspacing="1">
<tr bgcolor="{{ config.vdarkborder }}"> <tr bgcolor="{{ config.vdarkborder }}">
<td class="white"><b>Choose a vocation</b></td> <td class="white"><b>Choose a vocation</b></td>
@ -129,6 +126,5 @@
{% endif %} {% endif %}
</td> </td>
<td style="width: 18px"></td> <td style="width: 18px"></td>
{% endif %}
</tr> </tr>
</table> </table>

View File

@ -1,6 +1,6 @@
<div id="CurrentPollBox" class="Themebox" style="background-image:url({{ template_path }}/images/themeboxes/current-poll/currentpollbox.gif);"> <div id="CurrentPollBox" class="Themebox" style="background-image:url({{ template_path }}/images/themeboxes/current-poll/currentpollbox.gif);">
<div id="CurrentPollText">{{ poll.question }}</div> <div id="CurrentPollText">{{ poll.question }}</div>
<a class="ThemeboxButton" href="{{ getLink('polls') }}?ìd={{ poll.id }}" onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" style="background-image:url({{ template_path }}/images/global/buttons/sbutton.gif);"><div class="BigButtonOver" style="background-image:url({{ template_path }}/images/global/buttons/sbutton_over.gif);"></div><div class="ButtonText" style="background-image:url({{ template_path }}/images/global/buttons/_sbutton_votenow.gif);"></div> <a class="ThemeboxButton" href="{{ getLink('polls') }}/{{ poll.id }}" onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" style="background-image:url({{ template_path }}/images/global/buttons/sbutton.gif);"><div class="BigButtonOver" style="background-image:url({{ template_path }}/images/global/buttons/sbutton_over.gif);"></div><div class="ButtonText" style="background-image:url({{ template_path }}/images/global/buttons/_sbutton_votenow.gif);"></div>
</a> </a>
<div class="Bottom" style="background-image:url({{ template_path }}/images/general/box-bottom.gif);"></div> <div class="Bottom" style="background-image:url({{ template_path }}/images/general/box-bottom.gif);"></div>
</div> </div>

View File

@ -454,7 +454,7 @@ foreach($config['menu_categories'] as $id => $cat) {
foreach($config['boxes'] as $box) { foreach($config['boxes'] as $box) {
/** @var string $template_name */ /** @var string $template_name */
$file = __DIR__ . '/boxes/' . $box . '.php'; $file = TEMPLATES . $template_name . '/boxes/' . $box . '.php';
if(file_exists($file)) { if(file_exists($file)) {
include($file); ?> include($file); ?>
<?php <?php