There are many instances when I would like to have tokens of the licences available. For example for the Meta Tags or Meta Tags modules.

I suggest that the module creates at least these tokens:

Node tokens:

[creativecommons-licence-full]
[creativecommons-licence-generic]
[creativecommons-licence-short]
[creativecommons-licence-url]

Global tokens:

[creativecommons-site-licence-full]
[creativecommons-site-licence-generic]
[creativecommons-site-licence-short]
[creativecommons-site-licence-url]

It should be in plain text, but it might be useful to have the same tokens with "-html" added for use in other context than meta tags (which is my primary motivation).

I also suggest that this should be implemented as a separate, but included in the distro, module probably called creativecommons_tokens to not make tokens a dependency of the basic module.

Comments

pkej’s picture

Priority: Normal » Minor

I managed to the things I required by downloading Custom Tokens (token_custom in drush), and creating a custom token with the following php:

if (arg(0) == 'node' && is_numeric(arg(1))) {
  $nid = arg(1);
  $node = node_load($nid);
  echo $node->cc->name;
}

It would still be nice if the module provided its own tokens :)

kreynen’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

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