The template.php in the D6 package contains a _phptemplate_variables($hook, $vars) example that is D5 only. In D6 this code must be moved into service_links_preprocess_page().

Comments

NiklasBr’s picture

This is still an issue with the latest snapshot. I am unable to get this to work with Drupal v. 6.4, this does not work either:

function phptemplate_preprocess_page(&$vars) {
  $vars['tabs2'] = menu_secondary_local_tasks();
  switch($hook) {
    case 'node':
    case 'page':
      if (module_exists('service_links')) {
        $vars['service_links'] = theme('links', service_links_render($vars['node'], TRUE));
      }
      break;
  }
  return $vars;
hass’s picture

Try to add drupal_rebuild_theme_registry(); on top of your template.php while development...

NiklasBr’s picture

Thanks for your help hass, however, it did not solve my problem. My node.tpl.php has the following code:
<?php /*stuff*/ <div class="node_sociable"><?php print $service_links ?></div> /*other stuff*/ ?> and my template.php contains the code pasted in my first post. Caches have been cleaned, user permissions are double-checked and Service links preferences are set to display on all node types, yet all that is returned is <div class="node_sociable"></div>.

hass’s picture

Hm, please open a new case for your issue.

NiklasBr’s picture

For future reference, it can be found here.

TheCrow’s picture

Version: 6.x-1.0 » 6.x-2.x-dev
Status: Active » Fixed

added examples in template.php long time ago!

Status: Fixed » Closed (fixed)

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