When i submit a story link, then click on the link (Title of the story), I go to the node itself and not the URL/address of the story.

Comments

frjo’s picture

Category: bug » support

From the README file:

Theme story links:
-----------------
If you use a PHPTemplate theme you can theme story links nodes with a
"node-storylink.tpl.php" file.

An example "node-storylink.tpl.php" and "template.php" is included.
Place them in the folder of your theme. The examples are styled with the
css file "vote_up_down.css" in the vote_up_down module folder.

In "alternative" there are a "node-storylink.tpl.php" for use with the
"Alternative +1 vote style" (digg style) voting widget.

The example include these functions:
* Make the title an external link to the submitted story.
* Inserts the voting widget directly for greater control.
* Inserts the domain of the submitted story url like "(via example.com)".
* Displays a small user picture above the voting widget.

OBS! When using "node-storylink.tpl.php" you must turn off
"Vote widget display..." in "admin/settings/vote_up_down" to avoid
getting double voting widgets.

blackrain’s picture

Status: Active » Closed (fixed)

Thank you for the help that was very fast.

ssimmons’s picture

Version: 4.7.x-1.x-dev » 5.x-1.x-dev
Category: support » bug
Priority: Normal » Minor

I just installed this using the "Zen" theme, which already has a template.php. I found that you just need to copy the following:

$vars['storylink_url'] = check_url($vars['node']->vote_storylink_url);
      if (arg(1) != 'add' && arg(2) != 'edit') {
        $style = variable_get('vote_up_down_widget_style_node', 0) == 1 ? '_alt' : '';
        $vars['vote_up_down_widget'] = theme("vote_up_down_widget$style", $vars['node']->nid, 'node');
        $vars['vote_up_down_points'] = theme("vote_up_down_points$style", $vars['node']->nid, 'node');
      }
      $vars['vote_storylink_via'] = theme('vote_storylink_via', $vars['node']->vote_storylink_url);
      if (arg(1) == 'top') {
        static $count;
        $count = is_array($count) ? $count : array();
        $count[$hook] = is_int($count[$hook]) ? $count[$hook] : 1;
        $vars['seqid'] = $count[$hook]++;
      }

Paste that after this line:

$vars['node_classes'] = implode(' ', $node_classes);