Implementing hook_theme with two theme functions. This gives developers & themers the opportunity to theme this module without having to hack into it.

Comments

toemaz’s picture

You will have to clear the cache to make sure the theme functions, i.e. hook_theme, are registered.

turadg’s picture

Category: task » feature
Status: Needs review » Fixed

Thanks for this new feature! I've committed it to the 6.x-1.x-dev branch of the CVS.

toemaz’s picture

Wow, this is what I call 'maintaining' a module! Great ;-)

toemaz’s picture

Status: Fixed » Needs work

I 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.

turadg’s picture

Status: Needs work » Fixed

Oh 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.

toemaz’s picture

Committing early & often is still the right strategy, even when making mistakes. Thx!

toemaz’s picture

How 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.

toemaz’s picture

Status: Fixed » Needs work

The 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.

jcmarco’s picture

StatusFileSize
new1017 bytes

Yes, functions in theme.inc are duplicated

turadg’s picture

Status: Needs work » Fixed

Done.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.