You are here

README.txt in Flag 5

Same filename in this branch
  1. 5 README.txt
  2. 5 theme/README.txt
Same filename and directory in other branches
  1. 6.2 theme/README.txt
  2. 6 theme/README.txt
  3. 7.3 theme/README.txt
  4. 7.2 theme/README.txt
Theming instructions
====================

You may want to visit the Theming Guide of this module, at:

  http://drupal.org/node/295346

Template file
-------------
In order to customize flag theming:

- Copy the 'flag.tpl.php' template file into your theme's folder.

- Copy the 'phptemplate_flag()' function, which is at the end of this
  file, into your 'template.php'.

- Edit 'flag.tpl.php' to your liking.


Template variants
-----------------
In addition, the theme layer will first look for the template
'flag--<FLAG_NAME>.tpl.php' before it turns to 'flag.tpl.php'. This too
you should place in your theme's folder.


The phptemplate_flag()
----------------------
You should paste the following function into your 'template.php'. This
function instructs PHPTemplate to use your template file, or files, when
theming flags.


  function phptemplate_flag($flag, $action, $content_id, $after_flagging = FALSE) {
    return flag_phptemplate_adapter($flag, $action, $content_id, $after_flagging);
  }

File

theme/README.txt
View source
  1. Theming instructions
  2. ====================
  3. You may want to visit the Theming Guide of this module, at:
  4. http://drupal.org/node/295346
  5. Template file
  6. -------------
  7. In order to customize flag theming:
  8. - Copy the 'flag.tpl.php' template file into your theme's folder.
  9. - Copy the 'phptemplate_flag()' function, which is at the end of this
  10. file, into your 'template.php'.
  11. - Edit 'flag.tpl.php' to your liking.
  12. Template variants
  13. -----------------
  14. In addition, the theme layer will first look for the template
  15. 'flag--.tpl.php' before it turns to 'flag.tpl.php'. This too
  16. you should place in your theme's folder.
  17. The phptemplate_flag()
  18. ----------------------
  19. You should paste the following function into your 'template.php'. This
  20. function instructs PHPTemplate to use your template file, or files, when
  21. theming flags.
  22. function phptemplate_flag($flag, $action, $content_id, $after_flagging = FALSE) {
  23. return flag_phptemplate_adapter($flag, $action, $content_id, $after_flagging);
  24. }