Mach eine Pause! Theme-Komponent

What is it?

After a discussion about moderators about spending an extended amount of time on the screen, I decided it’ll be best to remind staff members(and non-staff!) to frequently take a break from the forums after looking at it for a long time. New update: It also works on non-staff and can be toggled on and off via theme settings.

What does it do?

This theme component shows an alert message after the member is on the forums for x amount of seconds. So 30 minutes would be 1800 seconds until the message is shown. This component has 4 main settings that let you customize your message and change the time until the message is shown.

Why?

It’s PROVEN to help you if you take a break from the screen. This is especially for moderators and admins who sometimes spend the night doing staff work! This component is a great reminder to take a break if you’re moderating or looking at the forums for too long. This component also helps for those who can’t stop replying, posting, etc. It’s always good to take a break!

Preview

Here’s a quick preview video(Sorry the webpage took so long to load)

Since changing the settings in theme creator is currently broken, you can download this component on your instance and try changing the message and the time!

36 „Gefällt mir“

Should I change something? Critical feedbacks are welcome!

2 „Gefällt mir“

Maybe there should be an option to show it to users, too (not only staff). As a regular user I would be fascinated to see that the forum admins care about users’ health :slight_smile:

2 „Gefällt mir“

Hi @Chaboi_3000,

neat idea, we talked of something similar with @sam recently.

My main criticism is the code, it should be vastly improved, I can provide guidance if you are willing to improve it.

Few ways to improve it:

Let me know if you need more help, happy to review more.


I’m a little bit concerned we can’t disable it on per user basis, as I would never use this. But we don’t have per user setting in theme components ATM. So I don’t see any good/easy solution here.

Maybe a good solution would be to have a pair of groups/message, that would make it slightly more configurable.

10 „Gefällt mir“

Added an option for normal users. (Default is off for normal users)

Fixed. Sorry about that.

I haven’t checked discourse for a while. I’ll go over it tomorrow. I’ll also check on the other ones too. I’ll message you if I have trouble with any on them. Thanks :slight_smile:

10 „Gefällt mir“

Is it reasonable to migrate this theme component to the new javascript files? If so, is there a guide on how to do this?

2 „Gefällt mir“

Fixed. I’m still wondering about the differences between javascript files and the standard html, css, and js.

2 „Gefällt mir“

Thanks. I’ll try adding some QOL features when I get some time :slight_smile:

3 „Gefällt mir“

Eindrucksvoll! Ich hätte selbst nie gedacht, dass es für verschiedene Zwecke angepasst werden kann! Es ist großartig zu hören, dass es hilft. Das Beantworten unbeantworteter Threads wird überall ausdrücklich begrüßt, unabhängig davon, wofür das Forum genutzt wird. Danke fürs Teilen! :slight_smile:

3 „Gefällt mir“

Unterbricht es die Nutzer beim Erstellen eines neuen Beitrags?
Ist es möglich, über diese Komponente Anzeigen auszuliefern?

Ich habe es nicht so eingestellt, dass es verhindert wird, wenn ein Benutzer tippt :pensive: (obwohl es den Editor nicht schließt). Sie können diese Komponente definitiv für Werbung verwenden, aber ich empfehle diese Lösung, da sie für Werbung optimierter ist:

1 „Gefällt mir“

Entschuldigung für das Aufwärmen, aber ich habe einige Vorschläge: Vielleicht sollte es vom Benutzer in den Einstellungen konfigurierbar sein, sodass man die Farbe ändern kann. Anstatt eines X sollten zwei Buttons vorhanden sein: einer für eine Social-Media-Plattform wie YouTube, die vom Benutzer geändert werden kann, und einer mit der Aufschrift „Mir geht es gut

Ist es überhaupt möglich, HTML zum Text hinzuzufügen? Das wäre wirklich schön, falls ja. (Und vielleicht in diesem Fall eine zusätzliche Option für die Häufigkeit… z. B. nur jeden „n-ten

Sie können den Quellcode ganz einfach bearbeiten und das HTML an Ihre Bedürfnisse anpassen.

Ich verwende bereits das offizielle Werbe-Plugin. Ich möchte wissen, ob es möglich ist, beim Laden der Seite Pop-up-Werbeanzeigen wie im folgenden Link anzuzeigen. Führt es Google AdSense-Code aus?

https://www.edaboard.com

Standardmäßig ist es nur dazu gedacht, normalen Text anzuzeigen. Wenn Sie in den Quellcode eintauchen und ihn ändern, können Sie definitiv eine Anzeige anzeigen.

1 „Gefällt mir“

@Pravi, wenn du möchtest, kannst du das Repository forken und dir die Datei head-tag.html hier in der Komponente ansehen (hier werden die Pop-ups und alles andere umgesetzt), um sie an deine Vorlieben anzupassen. showModal wird hier aufgerufen. Du solltest wahrscheinlich ein bisschen mit dem Code herumspielen :slight_smile:

1 „Gefällt mir“


Die Komponente ist derzeit defekt

4 „Gefällt mir“

Ich habe den PR erstellt :+1:


Er wurde gemerged, danke Chaboi! :clap:

Beachte, dass dies ein einfaches Update ist.

Ich habe interessante Vorschläge/Funktionen gesehen, die es wert sein könnten, implementiert zu werden:

  • Den Kontext beobachten, um das Modal nicht zur falschen Zeit (z. B. beim Schreiben) anzuzeigen
  • Häufigkeitsoption
  • Den Text von den Einstellungen in die Lokalisierung verschieben
6 „Gefällt mir“