Thank you for this simple, straightforward module. :)

While it would be nice to be able to alter the bookmark link text (i.e. use "Save" or "Bookmark" instead of the whole phrase), I would most like to be able to replace the link itself to bookmark with a small "add-to-favorites" type icon on my site.

I realize I could probably hack the code pretty easily to do that (I haven't looked yet), but it would be nice to have the option in the module. Thank you.

Comments

ericdes’s picture

Status: Active » Closed (works as designed)

You can 'override' this function in the phptemplate file. You can put whichever link, images, etc. as you like instead of call this function. You don't need to hack the code.

function click2bookmark_link($type, $node = null, $teaser = false) {
  
  $link = array();
  
  if ($type == 'node' && !$teaser && (user_access(CLICK2BOOKMARK_PERM)) && variable_get(CLICK2BOOKMARK_NODE_TYPE . $node->type, 0)) {
    $link['click2bookmark_add_bookmark'] = array(
      'title' => t('Click to bookmark'),
      'href' => 'bookmark/add/' . $node->nid, 
      'attributes' => array('class' => 'click2bookmark', 'title' => t('Click to bookmark this content'), 'rel' => 'nofollow',),
    );
  };

  return $link;
}