By doomed on
Hello,
I'm working on a website and i want to have a certain set of icons (pictures, badges, missing the right term here) and then be able to attach some or all of them to my story/page/whatever nodes.
I found this module - Node badges ( http://drupal.org/project/node_badges ) - and it looks like what i want but i'm not sure because there isnt a version for Drupal 6, only 5.
I'm using Drupal 6.
If anyone have any ideas on how i can achieve this, please post them here.
Comments
Yup
Well, i just tried Node Badges on a test Drupal 5 site and it works the way i want.
So.. does anyone know if there's something like this on Drupal 6?
Obviously i'm looking on the modules list, but there's so much stuff there...
=-=
check the issue queue of the module in question to see if a port of that module has started. If not file an issue to see when a port will be available. It's possible the developer hasn't done it yet because he/she doesn't think anyone is interested.
Outside of that you could try porting the module on your own if you have the skillset. There are modules that help you do so as well as a great deal of documentation on porting modules from 5.x to 6.x in the documentation area.
Flag module
For Drupal 6, I think you would be better off using Flag module instead. Flag is rapidly becoming a "standard" in Drupal, and looks to be around for a long time. Flag can do everything (as far as I can tell) that Node Badges do, and quite a bit more. The basic aspects are straight-forward (which content types are included, whether the flag is per user or global - global would probably be the choice in this case, which roles are allowed to use this flag, and where the flag link/option shows up (e.g. on the node creation/edit page, and/or as an instant toggle link on the node itself).
When I look at Node Badges they are essentially Flags on a node, with a specific behavior/theming attached to them (to display a specific image). Flag module has this helpful page which shows you how to 1) Check whether the current node, comment, or user is flagged, and 2) If flagged, do something (e.g. print out an image). http://drupal.org/node/305086
Untested example in node.tpl.php for a flag you make called "badge1":
You don't have to understand any of that code other than: 1) the name of the flag in the first line, 2) the image to use.
Best practice is to keep PHP like that stored neatly in template.php instead of you node.tpl.php... so if you want to do that, you could replace the above code with
<?php print $flag_badge1; ?>and add the following to template.php (again, not tested):Anyhow hope this helps :)
Well thank you very much. I
Well thank you very much.
I will check this module and if i end up using it, i'll make sure to post something here.
Thanks! works. helped me a
Thanks! works. helped me a lot.
in template.php code is little different, here is what worked for me...