HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

YAGA for Vanilla 3.2 and up

I just wanted to let you know that I've been maintaining a fork of YAGA (Yet Another Gamification Application) as a plugin for some time now.

It mostly features performance improvements and modern admin pages:


All of the original credit for the application goes to @hgtonight, who created it of course.


Why a fork?

Most of the functional improvements of this fork have been suggested (and some of them merged) in the original repo.

See https://github.com/hgtonight/Application-Yaga/pulls

With the way Vanilla has changed in recent years however, the Yaga application was lagging behind a little, so I maintained a (previously) private fork that went beyond a simple change that could be reasonably submitted as pull requests:

  • Change the application to a plugin. Plugins have had the same power as applications for some time now and are the preferred way to extend Vanilla.
  • New table names. All table names have been prefixed with "Yaga" to prevent future name clashes. There is already a GDN_reaction that has made Yaga incompatible on case-insensitive systems.
  • Update all files to the coding style introduced in may 2015 (4 space indents, lowercase function & variable naming).


Thanks go to @pioc34 for some of the fixes I took from his fork & issue reports and @phreak for sponsoring many bug fixes & hosting the fork.

You can download a zipped version here:

https://vanillaskins.com/plugins.html#yaga

...or visit the github repository here:

https://github.com/bleistivt/yaga

I intend to keep this fork updated, as I use it myself. You are free to report issues or submit pull requests of course.

I am happy to give any developer here wanting to contribute write access to the repo.

«1

Comments

  • phreakphreak Vanilla*APP (White Label) & Vanilla*Skins Shop MVP
    edited March 2020

    YAGA => Plugin. Great work! Works like a charm.

    As soon as I find more time I will finish the SVG reactions set I already started working on. It’s time to replace the current icons, as they look pixelated and outdated on Retina+ devices.

    • VanillaAPP | iOS & Android App for Vanilla - White label app for Vanilla Forums OS
    • VanillaSkins | Plugins, Themes, Graphics and Custom Development for Vanilla
  • pioc34pioc34 Pézenas ✭✭

    I confirm it works fine. I migrate from the application to this plugin and old tables are renamed and their content updated! Very good job.

  • Hi @Bleistivt . Thanks for good job!

    After enabling I should import Yaga.Transport, right? I tried import defaultTransport.yaga.zip but got Yaga.Error.ArchiveChecksum.

  • BleistivtBleistivt Moderator

    @mirX You shouldn't have to export/import your settings. If you have been using Yaga before, all settings should still be the same.

    I didn't look into the default export yet, but will do so soon, thanks for reporting!

  • Thanks @Bleistivt for reply. It was fresh installation of YAGA.

  • BleistivtBleistivt Moderator
    edited March 2020

    @mirX I actually didn't intend to include the defaultTransport.zip because upon clicking enable it should've installed the default set of reactions and badges:

    https://github.com/bleistivt/yaga/blob/master/settings/stub.php

    If not, that is a bug.

  • pitkmipitkmi scifi-meshes.com
    edited April 2020

    I installed this a few weeks ago and everything seems to have gone smoothly, but I haven't seen any auto awarded badges since the change, so I'm starting to think there might be something up with them.

    I currently have auto awards set up for Length of Service, Reaction Count (for likes), Post Count and a custom Points Count rule (just copied Comment count, but using Points instead), but I haven't seen any awards since switching to the new plugin, and looking at the numbers in the database I think there are a few cases, where they should have triggered. Manual awarding (and unawarding with Yaga Unaward Badge plugin) work fine.

    Can someone confirm their auto award badges are working, so I know for sure the problem is in my end?


    [Edit]: This might have something to do with it... Ran dba/counts and got this: 🤔

    [Edit2]: Removed a bit of the path. Probably shouldn't expose all of it publicly.

  • pitkmipitkmi scifi-meshes.com

    Fixed the issue. Grabbed a newer version (2.0.1) off of github. You'll want the commits from March 28, if you run into the same issue. :)

  • MrCaspanMrCaspan
    edited April 2020

    Tried to install this from the zip and is says Application not Found when i try to enable it.. Please note I had the old one form the plugins page and disabled it and installed this version


    EDIT: NM didn't realize this is a Plugin not an application.... all good!!

  • There seems to be an issue that the default boiler plate theme has this CSS in it which interfeers with YAGA

    .ReactSprite, .SpFlyoutHandle, .Sprite, .Sprite16 {
        background-image: none!important;
        height: auto;
        width: auto;
    }
    

    This stops the image from being seen. I can add an !important to your CSS as follows

    .ReactSprite {
        display: inline-block;
        width: 16px;
        height: 16px;
        margin-right: 4px;
        line-height: 18px;
        vertical-align: bottom;
        background-image: url(images/action-sprites.png) !important;
        background-position: 16px 16px;
        background-repeat: no-repeat;
    }
    

    Just thought I would let you know to maybe choose another CSS class maybe as it collides with Keystone boiler plate theme

  • BleistivtBleistivt Moderator

    @MrCaspan Thanks for the info. It is really unfortunate that boilerplate (being a base theme to build onto) is already using a last resort !important rule. I will have to dig into why that is, before making a decision.

    Completely separate CSS classes would be better, but that would break all styles backward compatibility. Something for a future update maybe, I created an issue.

    Thanks everybody for all the feedback! There has been a minor release, available again on

    https://vanillaskins.com/plugins.html#yaga

    ...or github:

    https://github.com/bleistivt/yaga

    Compatiblity with Vanilla 3.2 is still given, but 3.3 or 4 (depending on the release) will be required for the next Version.

    • Fixed import/export (old exports, e.g. the default export found in /yaga/design are now compatible again)
    • Fixed above mentioned auto award issue
    • Added unique key for badges preventing double awards (it is thus recommended to run /utility/structure or disable/enable the plugin on update)
    • Working towards a more modern architecture (deprecation of static factories in favour of dependency injection)


  • R_JR_J Ex-Fanboy Munich Admin

    If you are working on the code base, have you considered splitting yags up into several plugins? Having badges, ranks & reactions plugins as separate plugins would be very cool.

  • BleistivtBleistivt Moderator
    edited May 2020

    @R_J I really like the idea, but I don't know how willing people would be to switch plugins again.

    Backwards compatibility has been my no.1 concern and I want to fix the outstanding issues first. But in theory decoupling would be quite easy as I have removed most of the statically called dependencies. Badges and reactions are quite interconnected, but all badge rules based on reactions could easily be registered using the existing hooks.

  • phreakphreak Vanilla*APP (White Label) & Vanilla*Skins Shop MVP

    @R_J: Do you see any performance impact or similar when It stays as a one suite? I think splitting is more a matter of cleanliness and beauty of a clean installation, probably a reduced vulnerability to security issues that always arises when there is more code installed. Bit for me and most other fellows that suits I think as THE “gamification” extension and makes sense to be all-in-one.

    • VanillaAPP | iOS & Android App for Vanilla - White label app for Vanilla Forums OS
    • VanillaSkins | Plugins, Themes, Graphics and Custom Development for Vanilla
  • R_JR_J Ex-Fanboy Munich Admin

    There certainly must be differences in memory consumption and performance (either way) but I'm convinced they wouldn't be even measurable.

    There are several reasons why I said it would be cool.

    1. I prefer a modular approach where ever possible; simply a gut feeling.
    2. As x00 used to say: "Vanilla is not Tutti-Frutti". Therefore multiple plugins would be more the Vanilla way, I'd say.
    3. If somebody wants all features, he can use all needed plugins. But if somebody just wants one features, the rest might feel bloated.
    4. Some official in the past (maybe Linc) said that reactions might be part of the OS version and the tables are already created with the current version. If an official reactions plugin is enclosed with Vanilla, people might need to continue using YAGA if they want the other features although there is an official plugin (which most admins might prefer)
  • LincLinc Detroit Admin
    edited May 2020

    I wouldn't hold your breath for additional established features to be open sourced at this stage, since I was frankly the only vocal advocate for the change.

    My opinion is that dividing it is a waste of time. There is a very strong overlap in users of those feature sets, easily 80% IMO. Fight the urge to make code prettier or "more correct" at the expense of more pressing user-facing improvements. If there was a serious architectural problem to be solved here I'd certainly look at an iterative way of doing it, but it doesn't sound like there is one (and I wouldn't anticipate one).

  • phreakphreak Vanilla*APP (White Label) & Vanilla*Skins Shop MVP
    edited May 2020

    One day I wish there’d be a book about the internal ongoings at Vanilla about the Open Source version... to reconsilliate my trauma on my deathbed.

    @Linc: Thank you for raising a flag... ähm, a reaction for this cause.

    • VanillaAPP | iOS & Android App for Vanilla - White label app for Vanilla Forums OS
    • VanillaSkins | Plugins, Themes, Graphics and Custom Development for Vanilla
  • I'm getting a "Class 'Gdn_UserExeption' not found" when I try to enable it. Not sure what I screwed up.

  • Oh nevermind. Figured it out. The old Application-Yaga-Master was still in the config.php file. Had to delete it.

  • Hello all.

    I just installed this today and it installed easily, but I have problems.

    It automatically started awarding badges the instant it activated, but the ranks and reactions don't work at all. I tried to get the reactions working by adding the "!important" like others have done, but that didn't help at all.

    I tried both versions: the 2.0 download from vanillaskins and the github link that named it YAGA-MASTER.

    Both have the same exact problem: the ranks and reactions don't work. Not only do they not show up in the forum threads but there's no control panel for them in the settings either.

    Using Vanilla 3.3, PHP 7.2 on Ubuntu 18.04 Server.

    Any help would be greatly appreciated.

    Link to forum if that helps: https://exposingwot.com/forum/

Sign In or Register to comment.