• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

changelog myacc

What version of MyAAC? You can see this in Admin Panel or in file: common.php in the main folder.

Anyway, the process is simple: you need to export the table myaac_changelogs in mysql (phpmyadmin), and then rename some fields and import it back into myaac_news table
 
Last edited:
Oh, thanks.

sytem/pages/changelog.html

PHP:
<?php
/**
 * Changelog
 *
 * @package   MyAAC
 * @author    Slawkens <[email protected]>
 * @copyright 2019 MyAAC
 * @link      https://my-aac.org
 */
defined('MYAAC') or die('Direct access not allowed!');
$title = 'Changelog';

$_page = isset($_GET['page']) ? $_GET['page'] : 0;
$id = isset($_GET['id']) ? $_GET['id'] : 0;
$limit = 30;
$offset = $_page * $limit;
$next_page = false;

$changelogs = $db->query('SELECT * FROM `' . TABLE_PREFIX . 'news' . '` WHERE `type` = 2 ORDER BY `id` DESC LIMIT ' . ($limit + 1) . ' OFFSET ' . $offset)->fetchAll();

$i = 0;
foreach($changelogs as $key => &$log)
{
    if($i < $limit) {
        $log['type'] = getChangelogType($log['type']);
        $log['where'] = getChangelogWhere($log['where']);
    }
    else {
        unset($changelogs[$key]);
    }

    if ($i >= $limit)
        $next_page = true;

    $i++;
}

$twig->display('changelog.html.twig', array(
    'changelogs' => $changelogs,
    'page' => $_page,
    'next_page' => $next_page,
));

function getChangelogType($v)
{
    switch($v) {
        case 1:
            return 'added';
        case 2:
            return 'removed';
        case 3:
            return 'changed';
        case 4:
            return 'fixed';
    }

    return 'unknown';
}

function getChangelogWhere($v)
{
    switch($v) {
        case 1:
            return 'server';
        case 2:
            return 'website';
    }

    return 'unknown';
}
?>
 
If you can't understand such a simple thing I posted, then please, leave the board.

I didn't asked for any files, BTW.
 
Back
Top