• 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!

[MyAAC][Plugin] Start Countdown

slaw

Software Developer
Joined
Aug 27, 2007
Messages
3,657
Solutions
125
Reaction score
1,103
Location
Germany
GitHub
slawkens
Its start countdown counter for MyAAC. Its interactive. It counts live. Its displayed on every page.

Demo: Latest News - MyAAC Demo (http://demo.my-aac.org/news)

Installation:

Go to Admin Panel, select 'Plugins', and then select start-countdown-v1.2.zip and click upload. Thats all!

Configuration - in config.local.php paste this
Code:
        $config['start-countdown'] = array(
               'date' => '30.03.2021 18:00:00' // time in your server timezone
        );

Enter the 'date' in your timezone! So if you have in your config.local.php this:

1610925600682.png

- then enter the time according to Europe/Berlin!

Changelog:
Code:
[1.2 - 18.01.2021]
   * fix incorrect timezone detection
   * fix working on Safari and iOS browsers
   * add highlight if under 10 seconds to start the server
   * new format of the config datetime (30.01.2021 23:52:00) (day.month.year hour:min:sec)
   * move js files to tools/plugins folder (ignore by myaac)

[1.1 - 03.02.2020]
   * Add uninstall option
   * Add some space between counter and other elements on the website
   * Add this CHANGELOG and LICENSE

[1.0 - 17.05.2017]
   * initial release

Screenshot:
start-countdown.jpg
When under 10 seconds: (red highlight)
1610926176236.png
After start:
1610926208445.png
 

Attachments

  • start-countdown.zip
    7.8 KB · Views: 519 · VirusTotal
  • myaac-start-countdown-v1.2.zip
    21.9 KB · Views: 257 · VirusTotal
Last edited:
great but i have a problem i use this
$config['start-countdown'] = array(
'date' => '09 09, 2018 21:00:00' // its 27 may 2017, 18:00
);

but the web send me a invalid format date message error
 
@slaw JavaScript param incorrect formula was changed.

[FIX] Change Here to time ZONE USA .
Config.php
'date_timezone' => 'Europe/Berlin', // more info at PHP: List of Supported Timezones - Manual (http://php.net/manual/en/timezones.php)

Thanks, seems the whole script was bugged, cause it was using the wrong timezone of the browser, and not the server.

I fixed it in newest version.


It is not working on SAFARI, Iphones, macbooks etc. Someone know how to fix it?
View attachment 51182

This has been also fixed.

The newest file is in the upgraded first post.

Remember to download the latest file: myaac-start-countdown-v1.2.zip !!
 
Just showing up blank for me.

Serverstart.png


Edit, Fixed it sorry I had something messed up in the config my friend had to point it out, I'm American and we don't use the same date system and I wasn't even thinking about it at the time.

PHP:
$config['start-countdown'] = array(
               'date' => '31.03.2021 18:00:00'
        );
 
Last edited:
I'm getting a blank aswell, the timezone is correct, if i set the date as shown @OT, i get an 'invalid date'-popup.
 
I'm getting a blank aswell, the timezone is correct, if i set the date as shown @OT, i get an 'invalid date'-popup.

Are you using version v1.2, and setted in config.local.php like this?

PHP:
$config['start-countdown'] = array(
               'date' => '30.03.2021 18:00:00' // time in your server timezone
        );
 
Are you using version v1.2, and setted in config.local.php like this?

PHP:
$config['start-countdown'] = array(
               'date' => '30.03.2021 18:00:00' // time in your server timezone
        );
Yes on both!
 

Attachments

Any errors in web browser console?

Right click -> Inspection

View attachment 55235
Had no clue you could get errors in that console, thanks. :D

PHP:
jquery.min.js:2 Uncaught ReferenceError: interval is not defined
    at i (jquery.countdown.min.js:38)
    at w.fn.init.e.fn.countdown (jquery.countdown.min.js:47)
    at HTMLDocument.<anonymous> ((index):203)
    at l (jquery.min.js:2)
    at c (jquery.min.js:2)
 
Had no clue you could get errors in that console, thanks. :D

PHP:
jquery.min.js:2 Uncaught ReferenceError: interval is not defined
    at i (jquery.countdown.min.js:38)
    at w.fn.init.e.fn.countdown (jquery.countdown.min.js:47)
    at HTMLDocument.<anonymous> ((index):203)
    at l (jquery.min.js:2)
    at c (jquery.min.js:2)

You probably got some conflict with some other countdown script. Do you have any other countdown script in your template html?
 
You probably got some conflict with some other countdown script. Do you have any other countdown script in your template html?
Nothing, got 4 myAAC plugins: welcome-box, start-countdown, gesior-shop-system & account-create-hint.
 
Nothing, got 4 myAAC plugins: welcome-box, start-countdown, gesior-shop-system & account-create-hint.

What template do you use then?

Go to templates/ShadowCore7/index.php and remove this:

Code:
<script src="<?php echo $template_path; ?>/js/jquery.countdown.min.js"></script>
 
Last edited:
What template do you use then?

Go to templates/ShadowCore7/index.php and remove this:

Code:
<script src="<?php echo $template_path; ?>/js/jquery.countdown.min.js"></script>
Aaaand it worked, this is cause i had an old countdown and didnt remove it properly?
 
Back
Top