Closed (fixed)
Project:
FeedAPI
Version:
6.x-1.4
Component:
User interface
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
14 Oct 2008 at 00:26 UTC
Updated:
26 May 2010 at 02:11 UTC
hi, feedapi is working great, I have the latest installed. I created a new content type called "news" and all the new feeds items are created as "news" items. unfortunately, they always have a link back to the "feed" content even if I unpublish the feed. not a huge deal, but I was wondering if there was anyway to remove that link. The "original article" link gets lost in the shuffle somehow, I'd rather readers just be able to click on that with out distracting them with too many other links. And there really isn't much meat for readers on the "feed" page, just a link to the main site where the RSS originates.
Comments
Comment #1
eyecon-1 commentedEasy. In feedapi_node.module, Goto function feedapi_node_link
Comment out the line 'href' => 'node/'. $feed->nid,
That's it. I did this because it creates problems with Google if you have unpublished feed items.
Comment #2
petronikus commentedThanks. That was super easy. I also commented out the line above it:
'title' => t('Feed:') .' '. $feed->title,
to eliminate the text as well as the link.
Comment #3
petronikus commentedComment #4
wallbay1 commentedhi guy I am not a coder could you tell me how to comment out?
Comment #5
lias commentedIs there a way to do this using your template.php file and overriding the function rather than making the change to the module code itself?
@wallbay1
To change it in the module go to the feedapi/feedapi_node directory and open the feedapi_node.module.
Comment out line 102 and 103 (or thereabouts) like so:
// 'title' => t('Feed:') .' '. $feed->title,
// 'href' => 'node/'. $feed->nid,
Comment #6
stormsweeper commented@Isabug
This should work for items that are only coming in from one feed:
Multiple feed items are trickier, since the key will be feedapi_feed_nid.
Comment #7
lias commentedthank you stormsweeper very much for the code! i do appreciate it.
Comment #8
alex_b commentedNot a FeedAPI issue.
Comment #9
Rob T commentedThanks, stormsweeper.
One thing -- I have feed items coming in from multiple feeds, and your code still works (so far) in ridding the Feed URL link from feed item nodes. Hopefully it will stay that way since that's what I want.
Comment #10
Rob T commentedTurns out I needed this solution again. However, the stormsweeper code I was using was actually a modified version, inserted into my template.php's "function mytheme_preprocess_node".
Just in case I find myself looking once again for the solution (and stumbling yet again into this thread), here she is...
Comment #11
Rob T commentedYet another update. Ran into issue with multiple feeds. Ended up going with lsabug's solution in #5 (as much as I hate modifying modules).
Comment #12
quickcel commentedI just released a new module that deals with part of your problem it looks like, but it doesn't remove the whole feed link. Might serve as a good springboard to what you want to do: http://drupal.org/project/feedapi_la