Implementing hook_theme with two theme functions. This gives developers & themers the opportunity to theme this module without having to hack into it.
| Comment | File | Size | Author |
|---|---|---|---|
| #9 | creativecommons_theme.patch | 1017 bytes | jcmarco |
| creativecommons-hook-theme.patch | 4.63 KB | toemaz |
Comments
Comment #1
toemaz commentedYou will have to clear the cache to make sure the theme functions, i.e. hook_theme, are registered.
Comment #2
turadg commentedThanks for this new feature! I've committed it to the 6.x-1.x-dev branch of the CVS.
Comment #3
toemaz commentedWow, this is what I call 'maintaining' a module! Great ;-)
Comment #4
toemaz commentedI noticed that you committed theme.inc directly in the creativecommons folder. The patch actually included the theme.inc file in a subfolder theme. So either we need to fix this, either we change the path in the creativecommons_theme() function to include the right theme.inc file.
Comment #5
turadg commentedOh thanks for catching that. I thought running the patch would create that dir but evidently not. (I was able to patch so quickly because I didn't actually test it…)
Fixed now.
Comment #6
toemaz commentedCommitting early & often is still the right strategy, even when making mistakes. Thx!
Comment #7
toemaz commentedHow to:
Overriding the theme_creativecommons_node_license() function is done by placing the creativecommons-node-license.tpl.php file in your theme folder, copying the content from the get_html() function in the creativecommons.class.php file and replacing all occurrences of $this by $node->cc.
Comment #8
toemaz commentedThe patch was rolled twice on the theme.inc file which resulted in twice the same functions. Just removed the second occurrence of <? php and everything beneath it.
Comment #9
jcmarco commentedYes, functions in theme.inc are duplicated
Comment #10
turadg commentedDone.