Plugin: The Konami Code

AI-generated summary

The Plugin: The Konami Code adds the Konami Code to Discourse, invoking “magic” when entered. Developed by cfstras, it utilizes Konami-JS and is easily installable through the app.yml file.

cfstras welcomes suggestions and patches. The plugin serves as a great example of a sample plugin or extension, as noted by jbruni and codinghorror. An update for Discourse 1.3 was made by cfstras.

Others have expressed interest in expanding the plugin’s functionality, such as awarding badges when the Konami Code is entered, as suggested by dosch. However, this would require modification, as noted by mikechristopher.

This plugin adds the Konami Code to Discourse.

When invoked, magic happens.

https://github.com/cfstras/discourse-konami
It’s built on Konami-JS, which made this really easy :)

To install, just open your Docker container’s app.yml and be sure to have the following:

hooks:
  after_code:
    - exec:
        cd: $home/plugins
        cmd:
          - mkdir -p plugins
          - git clone https://github.com/discourse/docker_manager.git
          # other plugins...
          - git clone https://github.com/cfstras/discourse-konami.git

Now, ./launcher rebuild and off we go!

Open Discourse and ↑↑↓↓←→←→BAEnter!

Suggestions and patches are highly welcome.

13 إعجابًا

Nice as a small sample of what is necessary to build and install an extension.

I agree with @jbruni this is a great idea for a sample plugin or extension. Fun and actually somewhat useful!

I based it off of Tutorial: Your first Discourse plugin, so thanks to @danneu for that!

Every site should have the Konami Code

Pretty cool! I wanted to do something like that.. do you have an idea for something similar to this to implement? I wanted to implement a simple plugin just to start with discourse…

Someone needs to update this to work with Discourse 1.3!

إعجابَين (2)

Done! was a quick fix.

Just ensure to put
- git clone https://github.com/cfstras/discourse-konami.git
in the plugins section of your app.yml.

(Sadly, I can’t edit my first post…)

4 إعجابات

Great! I activated it :slight_smile:

Now, is there a way to award a badge when a user does the konami code ?

إعجاب واحد (1)

Doesn’t look like it straight off. It would probably need to be modified in order to trigger a badge grant api call or an entry into the database and a badge query from that.

حسنًا، ما الذي يفعله بالضبط؟ هل هناك أي عرض توضيحي / فيديو / مثال؟

إعجاب واحد (1)

راجع الموضوع الأصلي، لقد قمت بتحديثه للتو

إعجابَين (2)

نعم، لقد أعدت الترجمة للتو. سرك في أمان :joy:
Leonardo Dicaprio Love GIF