Difference between revisions of "Extensions:LiveClock"

From Lorekeeper Wiki
Jump to navigation Jump to search
Tag: 2017 source edit
m (→‎Images: Text addition)
Tag: 2017 source edit
 
(14 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{Extensioninfobox|title=LiveClock|desc=Adds a working clock to the site!|auth=[[User:Speedy|Speedy]]|status=stable|github={{Github|user=SpeedyD|branch=extension/LiveClock}}|LKVer=2.0.0|migration=no|package=no}}
+
{{Extensioninfobox|title=LiveClock [LK v3.0.0+]|desc=Adds a working clock to the site!|auth=[[User:Speedy|Speedy]]|status=stable|github={{Github|user=SpeedyD|branch=extension/LiveClock}}|LKVer=3.0.0 (pre-1)|migration=no|package=no}}
 +
{{Extensioninfobox|title=LiveClock [LK v2.1.x]|desc=Adds a working clock to the site!|auth=[[User:Speedy|Speedy]]|status=stable|github={{Github|user=SpeedyD|branch=extension/LiveClock-2.1}}|LKVer=2.1.0|migration=no|package=no}}
 +
 
 +
{| style="margin: 4px auto; width: 80%; border: 1px solid #940a0a; background: #C8D945;"
 +
|-
 +
| '''<u>Release branches have been renamed!</u>'''
 +
|-
 +
| Please make sure that if you're on LK v2.1, that you use the LiveClock-2.1 branch.
 +
|}
  
 
Adds a working clock to the site!
 
Adds a working clock to the site!
 +
 
By default, this will ONLY replace the static clock on the dashboard..
 
By default, this will ONLY replace the static clock on the dashboard..
  
Line 8: Line 17:
 
This extension uses Javascript and JQuery for it's live updates.
 
This extension uses Javascript and JQuery for it's live updates.
  
Thanks, as always, to [[User:Mercury|Mercury]]!
+
Thanks, as always, to [[User:Mercury]]!
  
 
== Installation ==
 
== Installation ==
Pull the extension branch and push to your site.
+
Pull the extension branch and push to your site. Will replace the default clock on the dashboard, so be wary of conflicts if your dashboard is modified.
Will replace the default clock on the dashboard, so be wary of conflicts if your dashboard is modified.
+
 
 
Don't forget to run <code>php artisan update-extension-tracker</code>!
 
Don't forget to run <code>php artisan update-extension-tracker</code>!
  
 
== Configuration ==
 
== Configuration ==
No configuration necessary. LiveClock bases the time on your Lorekeeper timezone.
+
No configuration necessary.
  
== Usage ==
+
== Usage ==
Simply put the following in any location you want a clock: <code>{!! LiveClock() !!}</code>
+
Simply put the Basic Clock code in any location you want a clock.
  
 
Optionally, add the following in front of the LiveClock line to get a little clock icon in front:
 
Optionally, add the following in front of the LiveClock line to get a little clock icon in front:
 
<syntaxhighlight lang="html"><i class="far fa-clock"></i></syntaxhighlight>
 
<syntaxhighlight lang="html"><i class="far fa-clock"></i></syntaxhighlight>
 +
 +
=== Code for Pages ===
 +
Basic Clock: <code>[liveclock]</code>
 +
 +
To add a clock with a different timezone, simply add an = and the timezone to the basic code, for example: <code>[liveclock=Europe/Amsterdam]</code>
 +
 +
=== Code for Blades ===
 +
Basic Clock: <code>{!! LiveClock() !!}</code>
 +
 +
To add a clock with a different timezone, simply add one in between the brackets, for example: <code>{!! LiveClock("Europe/Amsterdam") !!}</code>
 +
 +
=== Usable Timezones ===
 +
Make sure to only use Timezones supported by PHP, as per the [https://www.php.net/manual/en/timezones.php List of Supported Timezones] from the PHP manual.
 +
 +
By default, LiveClock bases the time on your Lorekeeper timezone, found in the <code>/config/app.php</code> file.
  
 
== Troubleshooting ==
 
== Troubleshooting ==
I'm Speedy#4060 on Discord, but please do not contact me directly.
+
Create a new thread in the #general-help channel of the Discord!
Instead, please tag me in the Lorekeeper server if you need my help.
+
 
I am not a regular there, so asking something without a tag might not get a response.
+
You can always try tagging me (see my [[User:Speedy|user page]]), as I'm semi-active on the server, but a new thread is your best bet.
  
 
== Images ==
 
== Images ==
<!-- Note to self: add GIF of it working sometime soon -->
+
<gallery>
 +
File:LiveClock on Dashboard Animated.gif|LiveClock on a Dashboard.
 +
File:LiveClock Input Examples.png||Code for Pages, code examples.
 +
File:LiveClock Input Examples Animated.gif|Code for Pages, working on a page.
 +
</gallery>
 +
All images are sourced from [https://www.mhoats.com/ Realm of Mynros], where the extension is already running.
 +
 
 +
== Version History ==
 +
* '''1.0.0:''' Initial creation. Used to only change the frontpage.
 +
* '''1.0.1:''' Converted to become a helper, so that the snippet above can be used.
 +
* '''1.0.2:''' First official upload. This is when it was fully stable.
 +
* '''1.0.2*1:''' Extra commit to quickly remove a very dumb mistake.
 +
* '''1.0.2*2:''' Latest commit to ensure compatibility with LK v2.1.0. No changes made otherwise.
 +
* '''1.1.0:''' Pre-sorted for LK Dev branch (aka v3.0.0). No substantial changes were made other than compatibility.
 +
* '''1.1.0*1:'''Latest commit to ensure compatibility with LK v2.1.0. No changes made otherwise.
 +
* '''1.2.0:''' Pre-sorted for LK v3.0.0 pre-release candidate. No substantial changes were made other than compatibility.
 +
* '''2.0.0:''' Major Update! Adds TimeZone support and parsing directly in text pages.
 +
(Versions marked with * did not receive an update in the extension tracker.)
  
 
== See Also ==
 
== See Also ==
Alternatively, you could try [[Extensions:Mini clock|Newt's Mini Clock extension]], which was in fact the inspiration for this little project.
+
Alternatively, you could try [[User:Newt]]'s [[Extensions:Mini clock]], which was in fact the inspiration for this little project.

Latest revision as of 06:50, 2 May 2024

LiveClock [LK v3.0.0+]
Description Adds a working clock to the site!
Author(s) Speedy
Status stable
Github extension/LiveClock
LK Version 3.0.0 (pre-1)






LiveClock [LK v2.1.x]
Description Adds a working clock to the site!
Author(s) Speedy
Status stable
Github extension/LiveClock-2.1
LK Version 2.1.0







Release branches have been renamed!
Please make sure that if you're on LK v2.1, that you use the LiveClock-2.1 branch.

Adds a working clock to the site!

By default, this will ONLY replace the static clock on the dashboard..

But you can add clocks wherever you want! Highly suggested to put it on the footer.

This extension uses Javascript and JQuery for it's live updates.

Thanks, as always, to User:Mercury!

Installation

Pull the extension branch and push to your site. Will replace the default clock on the dashboard, so be wary of conflicts if your dashboard is modified.

Don't forget to run php artisan update-extension-tracker!

Configuration

No configuration necessary.

Usage

Simply put the Basic Clock code in any location you want a clock.

Optionally, add the following in front of the LiveClock line to get a little clock icon in front:

<i class="far fa-clock"></i>

Code for Pages

Basic Clock: [liveclock]

To add a clock with a different timezone, simply add an = and the timezone to the basic code, for example: [liveclock=Europe/Amsterdam]

Code for Blades

Basic Clock: {!! LiveClock() !!}

To add a clock with a different timezone, simply add one in between the brackets, for example: {!! LiveClock("Europe/Amsterdam") !!}

Usable Timezones

Make sure to only use Timezones supported by PHP, as per the List of Supported Timezones from the PHP manual.

By default, LiveClock bases the time on your Lorekeeper timezone, found in the /config/app.php file.

Troubleshooting

Create a new thread in the #general-help channel of the Discord!

You can always try tagging me (see my user page), as I'm semi-active on the server, but a new thread is your best bet.

Images

All images are sourced from Realm of Mynros, where the extension is already running.

Version History

  • 1.0.0: Initial creation. Used to only change the frontpage.
  • 1.0.1: Converted to become a helper, so that the snippet above can be used.
  • 1.0.2: First official upload. This is when it was fully stable.
  • 1.0.2*1: Extra commit to quickly remove a very dumb mistake.
  • 1.0.2*2: Latest commit to ensure compatibility with LK v2.1.0. No changes made otherwise.
  • 1.1.0: Pre-sorted for LK Dev branch (aka v3.0.0). No substantial changes were made other than compatibility.
  • 1.1.0*1:Latest commit to ensure compatibility with LK v2.1.0. No changes made otherwise.
  • 1.2.0: Pre-sorted for LK v3.0.0 pre-release candidate. No substantial changes were made other than compatibility.
  • 2.0.0: Major Update! Adds TimeZone support and parsing directly in text pages.

(Versions marked with * did not receive an update in the extension tracker.)

See Also

Alternatively, you could try User:Newt's Extensions:Mini clock, which was in fact the inspiration for this little project.