Download & Extend

Add link to original article to planet node type

Project:Planet profile
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:closed (fixed)

Issue Summary

The link to the original article can be parsed from the feed, and perhaps already is, but needs to be saved in the planet node type as an article_link field (or something similar).

I'd like to be able to provide a link when displaying the blog entry to the original source blog for consideration of the blog owner and also in case the feed doesn't contain the full article text.

Comments

#1

Status:active» fixed

Planet nodes get a "link" attribute that contains the original link. A fairly safe way to substitute this into your templates is to include something like the following near the top of node.tpl.php (or whatever custom template you're using):

<?php
 
if($node->link){
   
$node_url = $node->link;
  }
?>

#2

Your query got me thinking, and I remembered one problem with the module that the solution I proposed above doesn't fix: The feed will link to the node/$nid url unless you hack node_feed to behave otherwise. So I added functionality that lets admins tell planet to automatically forward to originating links when the node/$nid url is loaded (presumably this will also work if url_aliases are used, as I just implemented hook_view for the module). If the new version of the module is used, toggling the setting in administration will solve your problem and solve the feed problem.

#3

Your query got me thinking, and I remembered one problem with the module that the solution I proposed above doesn't fix: The feed will link to the node/$nid url unless you hack node_feed to behave otherwise. So I added functionality that lets admins tell planet to automatically forward to originating links when the node/$nid url is loaded (presumably this will also work if url_aliases are used, as I just implemented hook_view for the module). If the new version of the module is used, toggling the setting in administration will solve your problem and solve the feed problem.

I've packaged this up into a new release that will be ready whenever Drupal gets around to packaging it; it should also be available in HEAD in CVS.

#4

Status:fixed» closed (fixed)
nobody click here