Hello, everyone!
I'm a PHP programmer and I've been working with Drupal for a few weeks. I've read the quick tutorial on how to create a module and got a good idea.
My site is a gaming site, and I want to create a "Achievements" module. Those who have played on XBox, Windows Live or WoW know how it works: It's a reward that an user gains when he achieves a specific goal.
Example: Whenever a user makes 100 posts, the Achievement "Hundred Poster" is unlocked.
I want to port this feature to my Drupal website, and I need some conceptual assistance since it's my first module and the concept is pretty complicated itself, since I see an achievement as both a node and an action.
My ideas:
Achievement as a Node Type
- An achievement needs four fields:
- A name;
- An icon;
- A description on how to unlock it;
- The type of the achievement. Achievement are splitted in two types:
- Automatic, as described below;
- Manual, an achievement that has to be manually unlocked for each user.
- Each user can unlock any number of achievements.
- The achievements unlocked by the user can be seen on his profile, as well as in every post made by the user in the forums.
- When the node is viewed, a list showing how many users have unlocked that single achievement is shown.
Achievement as an Action
- Each automatic achievement has a PHP code that describes the condition to unlock it.
- Some achievements can only be unlocked after other achievements are unlocked (such as "Make 50 posts" and "Make 100 posts"). Therefore, it's possible to have a tree of achievements.
- The achievements could be processed through Drupal's core Trigger module.
- Whenever a achievement is unlocked, a message is shown on the page (using DOM and an JQuery/Scrip.taculo.us effect).
Well... that pretty much sums it up.
Since I'm a newbie at module development, my question is... how am I supposed to mix all of there interactions with different modules (CCK, Views, Actions and Trigger just at first sight) in one single module?
Tutorials, APIs... every kind of help is appreciated.
Thanks in advance! :)
Comments
I've already coded something
I've already coded something like this, but never got around to releasing it.
What's your email? I'll send it to you (mine's morbus@disobey.com).
From the README.txt:
The achievements are done as PHP actions... here's an example of a definition:
And, the actioning code (which you'd run in a hook_comment sorta thing):
The code also supports "hidden" achievements (wherein the user can't see what it is until he unlocks it), as well as leaderboards (so you can track who got the achievement first and most recently). It doesn't currently support icons, but that could easily be added in (I just didn't do it because I don't have any graphical capabilities).
http://www.disobey.com/
Wow, nice! Thanks! My e-mail
Wow, nice! Thanks!
My e-mail is aero@zelda.com.br.
You've tested it already?
Of course. I ran it on a live
Of course. I ran it on a live site for awhile, before said site was shuttered.
Will send it to ya shortly.
http://www.disobey.com/
Pre-Programmed achievements.
Would you mind sending me that achievement code that you gave AeroGabriel. I would like to make my own achievements, but I don't have quite enough knowledge in the subject and I'd rather not end up killing my site again. Otherwise I would make my own achievements. My email is dannon.trujillo@my.netech.edu
Important Message Here
Please read http://drupal.org/node/644164
Send a copy please
Hi!
Could you please send a copy to my email (mustainer2@gmail.com)?
Thanks,
I would really be interested
I would really be interested in this module too (as in its developpement as I am running a video gamming site too)
(we should really do a reall project on drupal.org for this :p )
*edit* removing email from this old post
Interested
I am also very interested, where can I get this module?
Thanks
Best regards
I want the code too please
Would you mind sending me the code anticolicos @ gmail . Com please?
Thanks in advance
By any chance, could you send
By any chance, could you send me a copy as well as I was actually just sitting down to start writing my own?
ColdSun[at]unitedadmins[.]com
Thanks =)
Achievement Module
Hi Guys,
Does anyone have any updates on possible module development for this achievements module?
I searched the module directory and come across this: http://drupal.org/project/achievements but there has been no further updates on a release for that module.
I stumbled across this thread and it looks like you guys have put together some code.
I am not a developer so cannot use the information posted here to build my own achievement module :( but I really need an achievement module to use on my site. It's a really nice feature that will add a lot of value in terms of encouraging user/community activity when using the site.
It would be great if you guys could get together and build this as a module for other users to download for use on their own Drupal sites.
Another nice feature to add when building this module would be to link it in with the http://drupal.org/project/userpoints module, so that when a user unlocks an achievement they will also be awarded a number of 'User Points'.
Can someone please please please develop and release this plug in for the community.
Cheers,
John
It looks like code has been posted
It looks like code has been posted by Morbus_Iff to the http://drupal.org/project/achievements issue queue, but it's not clear what else is happening, is there a maintainer and plans for a release?
Sounds like a great idea. I'd like to get involved!
This sounds exactly like something I need for my website. I would like a copy of this module (send to dirtysab@gmail.com) and be a part of the development. I want to add way more behind the scene stuff for getting achievements.
Could you please send me a copy as well
Anyone mind sending me a copy of this module xorkh1[at]gmail[.]com.
I'm working on a site that needs this functionality. I'd be interested in working on development.
I'd be interested in the code too
wastrilith [at] hotmail [dot] com
Achievements are now
Achievements are now available for Drupal 7: http://drupal.org/project/achievements
http://www.disobey.com/