replacing flag link with images doesn't work with current dev version
ju.ri - October 29, 2009 - 06:03
| Project: | Flag |
| Version: | 6.x-2.x-dev |
| Component: | Documentation |
| Category: | support request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed |
Jump to:
Description
After testing the current dev version with the new anonymous flagging code (works great! thanks!), my custom flag images don't appear any more. I was using this method from the handbook to replace the links:
http://drupal.org/node/305061
Do I have to adjust the code in some way?
Thanks for helping

#1
The variable "flag_name_css" no longer exists in the 2.x version (all the classes are now grouped together as $flag_classes instead). Note that you'll need to delete/update any existing flag-*.tpl.php files you've overridden in you theme if you've done that also.
I've update the documentation to just use
$vars['flag']->nameinstead, which should work just as well, except that it uses underscores instead of hyphens (so it would be "flag-my_bookmark-on.png" instead of "flag-my-bookmark-on.png"). It won't make any difference if your flag name is a single word.So in short, open up your template.php file and in phptemplate_preprocess_flag() replace:
$vars['flag_name_css']with
$vars['flag']->name#2
thanks a lot for the fast help! works great.
#3
Automatically closed -- issue fixed for 2 weeks with no activity.