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

How to give a badge depending on the registration date ?

polkipolki New
edited January 2016 in Feedback

Hi @hgtonight and thanks for Yaga !

Vanilla : 2 . 2
Theme : Bootstrap

Is there a way to award a badge depending on the registration date of an user ?
I can't code the rule by myself since I don't have the skills at all.

I think its a great idea since it will encourage people from registering on your new forum by giving them a "Founder badge" or something like this.

Can't wait for the new version of Yaga that'll work with 2.2 ! ( since the develop version for me doesn't work : badges edit page is broken )
Thanks in advance.

Comments

  • Search first

    Check out the Documentation! We are always looking for new content and pull requests.

    Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.

  • Thanks hgtonight.

    Managed to do it by inserting a SQL

    INSERT INTO GDN_Badge (BadgeID, Name, Description, Photo, RuleClass, RuleCriteria, AwardValue, Enabled) VALUES (48, 'Fondateur', 'Vous faites partie des premiers membres de Paris forum', '/uploads/yaga/9DPE0NXZ4V51.jpg', 'LengthOfService', 'a:2:{s:8:"Duration";s:1:"1";s:6:"Period";s:4:"day";}', 20, 1);

    Because I can't manually add them since it gives me a blank page when saving badges.

    But now that the badge is given to everyone that have 0 day, how can I change it ( via SQL ) to "manually award" ?

    Thanks @hgtonight

  • Turn on debugging by adding $Configuration['Debug'] = true; to your /conf/config.php file.

    Then try to save the badge. The white page should show an error now. Post back this error.

    Search first

    Check out the Documentation! We are always looking for new content and pull requests.

    Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.

  • it doesn't show anything, just a white page : p nothing in the console too.
    Nothing before that white page too

  • Is there anything in your server logs?

    Search first

    Check out the Documentation! We are always looking for new content and pull requests.

    Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.

  • it's an error 500.

    But it's not related to server I guess because I managed to solve it by using some files from older version of Yaga and Vanilla. But this option led to Yaga being a bit bugged at some places.

    But now, i'm using last version of Yaga ( development ) and Vanilla 2.2

  • polkipolki New
    edited January 2016

    Damn, wanted to Edit but 15mn have passed.

    So to clear everything :

    Yaga developpment version + Vanilla 2.2 when trying to access badge/settings = http://pastebin.com/D4XmyDY4

    Yaga master + Vanilla 2.2 = error 500 when trying to add badges or saving them after editing.

    Application: Vanilla
    Application Version: 2.2
    PHP Version: 5.5.29
    Operating System: Linux
    Server Software: Apache
    Referer: http://mysite.fr/forum/rank/settings
    User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.111 Safari/537.36
    Request Uri: /forum/badge/settings
    Controller: PHP
    Method: trigger_error

    Hope it can help making Yaga even better : )
    or maybe is it just me ?

    Thanks @hgtonight !

  • @polki said:
    Damn, wanted to Edit but 15mn have passed.

    So to clear everything :

    Yaga developpment version + Vanilla 2.2 when trying to access badge/settings = http://pastebin.com/D4XmyDY4

    You need to run /utility/structure as there is now a Sort column.

    Search first

    Check out the Documentation! We are always looking for new content and pull requests.

    Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.

  • okay, feeling dumb now : )

    Everything is working now, no more errors, can edit w/e I want !

    Thanks hgtonight u are awesome

  • @polki said:
    okay, feeling dumb now : )

    Everything is working now, no more errors, can edit w/e I want !

    Thanks hgtonight u are awesome

    When you update any addons that have a db, you need to either disable/re-enable or run the /utility/structure endpoint to make sure structure changes take place.

    Search first

    Check out the Documentation! We are always looking for new content and pull requests.

    Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.

Sign In or Register to comment.