Jump to content
JustTom

A badge just like in r/stopgaming

Recommended Posts

On 7/7/2018 at 9:23 AM, info-gatherer said:

I think it’s possible. The italian vaping forum svapo.it has the same code of this website (well at least the same interface, I know nothing about code), and they have the function.

Here it is: https://www.svapo.it/tools/svapometro/

It measures the days since last cigarette smoked & money saved

At a first glance, it's the same content provider for both forums, so this should be doable. It would be a really nice addition too.

Share this post


Link to post
Share on other sites
19 hours ago, Tux said:

At a first glance, it's the same content provider for both forums, so this should be doable. It would be a really nice addition too.

@stablish already had a look at the code. The tool I posted was written with a software that’s not available anymore + other problems.

Share this post


Link to post
Share on other sites

Are images allowed in signature ? Another way would be to have a web service that provides you with an image of your counter, so that when someone open a topic with your signature with the badge in it, it displays it by requesting the proper image (depending on the date you chose). More of a hack, but this would be easy to do.

  • Like 1

Share this post


Link to post
Share on other sites

Yes, there are no limits for signatures, so you should be able to use images.

What I don't like about the image thingy: It is static.

I have something in my mind which is more dynamic, but need to find a proper coder for this since it would be a plugin/modification.

Basically: Have a custom field at your profile which shows 'Detox days: X' and the number will increase daily.
So lets say we have a member who put in like 13, so it shows: 'Detox days: 13' on the next day it will then show: 'Detox days: 14' and so on.

On a signature image it will only show the date when you quit, which is also a nice idea and should be do-able I guess. I just dont have that much time at the moment, so if there is someone out there who could code something like this, it would be awesome.

  • Like 1

Share this post


Link to post
Share on other sites

If I'm not mistaken, you can have something dynamic with my solution. It's simple: the link provide an image, but that image change each day (on the server side), based on the number of days that passed since that date.

You have an image in you signature, with the link of that image being "www.example.com/badge/20170101/". That link is updated automatically each day, with an image generated on the server side (of example.com). And by visiting here, your browser automatically fetch the correct image provided to display it in the signature.

I think it would be fun to code. However I don't want to promise anything; so right now it's just an idea that anyone can pick up. If I find the time, I could dive into this. Which programming language is used for the server here ? PHP ? Ruby on rails ? Django ? That would be good to know, I wouldn't want to spend a few hours in PHP, only to learn that C# is used here (but you are not using C#, since you are good guys ? :P ). You can just PM if you have more details on that.

  • Like 3

Share this post


Link to post
Share on other sites

I've been working a bit on it, here and there. So far it's a simple circle with the number of days in it, and it still need some tweaking (like properly centering the text, having more colors in the badge...).

What colors would be nice to show some kind of progression ?

  • Like 3

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×