Do you want to display time information as accurately as possible for your visitors? With this plugin you can insert time points until the year 2038 in the form of a Unix-Timestamp into your content, which will be output according to a user's time zone and language preference. This way you can be sure that everyone can see the time in their own time zone and language.
The time is displayed in the visitor's time zone, or in the time zone specified by the user. The user's time zone can be set individually in the user settings.
Usage
If you want to include a point in time in your content, you need the corresponding Unix-Timestamp, which you can access, for example, via services like this one. You can then use the BBCode as follows:
[unixtime]1672570800[/unixtime]
[unixtime='1672570800'][/unixtime]
You can also customize the date and/or time format. For how this works, see documentations like this one. Note that the output is always based on the %DATE%, %TIME% format. You can use the value default to use the default date or time format.
You can also place an icon in front of the time if the content supports HTML output.
[unixtime='1663334124','default','default','fa-clock-o'][/unixtime]
[unixtime='1663334124','j. F Y','H:i:s A e','fa-clock-o'][/unixtime]
The order of possible attributes is always:
[unixtime='Unix-Timestamp','Date-Format','Time-Format','Icon-Name'][/unixtime]
Relative Time-Format
As of version 1.2.0, this plugin contains another BBCode unixrelative, which can be used to display relative time intervalls. By default, the output is truncated and rounded to the largest time difference of the given intervall. The result is intended to be used in full sentences.
Contact
If you still have questions, you can ask them in the comments section of the plugin.
-
Version 1.2.0
- DMedia
- 2.33 kB
- 6 Downloads
Changelog:
- A new BBCode unixrelative has been added to display relative time intervalls.
- The BBCode unixrelative is not included in the WYSIWYG editor by default.
- The BBCode unixrelative supports both full output and output rounded to the largest time difference.
Examples and instructions for the new BBCode can be found in the plugin description.
-
Version 1.1.0
- DMedia
- 2.08 kB
- 14 Downloads
Changelog:
- The date and time format can now be set individually
- An icon can now optionally be placed in front of the output (requires HTML output)
Examples and instructions for the new attributes can be found in the description.
-
Version 1.0.0
- DMedia
- 1.9 kB
- 9 Downloads
Spaex
Hi:) Super Plugin und danke für die tolle Arbeit:)
Ich fände es noch super cool wenn du ähnlich wie bei den Discord Timestamps eine Relative Time integrierst. Die quasi immer anzeigt wie lang es noch bis Time X ist oder wie lange das schon abgelaufen ist.
Siehe auch hier: https://gist.github.com/LeviSn…7abeef2f770e9ddcd91eb85aa
Bzw. in Discord kann man es auch einfach mal ausprobieren mit <t:1672958640:R>
MfG und ein frohes Neues Jahr!:)
DMedia Author
Danke für dein Feedback. Ich habe mich etwas mit der Idee beschäftigt, sehe darin allerdings keinen wirklichen Mehrwert für speziell diesen BBCode, da ein Unix-Timestamp immer eine absolute Zeitangabe ist. Hinzu kommt, dass ich den BBCode nicht noch weiter "aufblähen" möchte, wenn es nicht unbedingt notwendig ist.
Relative Zeitangaben können zwar optisch ansprechend sein, sind aber weniger genau und damit in der Regel unzuverlässiger als absolute Zeitangaben, deren Informationsgehalt einfach höher ist. Nahezu immer gibt es die Möglichkeit, den tatsächlichen Zeitpunkt mittels Mouseover einzusehen, um nicht auf die Uhr oder bei größeren Differenzen in den Kalender schauen zu müssen. Diese Möglichkeit würde bei diesem BBCode entfallen und innerhalb der WoltLab Suite werden relative Zeitangaben generell auch nur gemacht, solange der Zeitpunkt weniger als eine Woche in der Vergangenheit liegt.
Eine Möglichkeit, die ich in Betracht gezogen habe, wäre, dem Paket einen weiteren BBCode hinzuzufügen, der eine relative Zeitangabe ermöglicht, jedoch auch Auskunft über den tatsächlichen Zeitpunkt bietet. Ich bin mir allerdings auch hierbei nicht sicher, wo der Mehrwert (im Kontext eines Forums) gegenüber der absoluten Zeitangabe besteht.
Ich lasse mich für letzteres aber gerne anhand von Fallbeispielen überzeugen
Spaex
Ich find das grad bei Ankündigungen von Events schön.
Wenn man zwar einerseits so wie es bereits möglichst den genauen Zeitpunkt per Datum kennt aber zusätzlich noch einen relativen Zeitstempel hat um zu sehen wie viel Zeit man hierfür noch hat. Da gehts ja nicht ums genau sein sondern lediglich um eine grobe Angabe um eine Orientierung zu haben.
Klar könnte man auch große Countdowns nutzen ich find das aber einfach persönlich schöner so.
Auch kann man damit Texte/Antworten bauen die immer aktuell bleiben. Beispiel: Hi, das Event endet "in X Tagen" und der Beitrag bleibt aktuell da nach Ablauf dann sofern man es wie in Discord umsetzt steht Hi, das Event endet "vor X Tagen".
Ich glaub größtenteils ist bei sowas die Wahrnehmung subjektiv. Ich kann jedoch auch komplett nachvollziehen wenn du den BBCode nicht unnötig aufblähen möchtest!:) Danke für die schnelle Antwort:)
DMedia Author
Fair. Ich habe gerade eine Version eingereicht, in der ein weiterer BBCode enthalten ist, mit welchem relative Zeitangaben gemacht werden können. Die Standardfunktionsweise sollte deine Anwendungsfälle abdecken.
Spaex
Einfach bombe!:) Vielen lieben Dank!:)
doerek
Vielen Dank für die Umsetzung

Ich weiß jetzt bereits schon, dass mir dieser BBcode sehr lange gute Dienste leisten wird.
mfg
DMedia Author
Sehr gerne