Download & Extend

Related Amazon links at the bottom of the short version of a post

Project:Amazon associate tools
Version:5.x-1.3
Component:Documentation
Category:feature request
Priority:normal
Assigned:Unassigned
Status:active

Issue Summary

Hi Folks,

First of all sorry for my bad english :(

I love this great module, but I have one problem with this function: "A comma delimited list of ASINs will produce Amazon links for each ASIN at the bottom of the post."

The related Amazon links at the bottom of the post are fine, but they are also shown at the bottom of the short versions of the post. For example in the taxonomy list of my Senseo Site (german website but you will see the problem).

Is there an option to disable the related links for the short versions of the post?

Thanks in advance for your help.
Dominik

Comments

#1

Hi I found a solution myself :)

I added only the following if-statement in amazon.module:

if ($teaser==NULL) // Show the related links only when the node is not a teaser
{
if ($amazondata) {
  $related_links .= "<h4>Related products on Amazon.com</h4>";
          foreach($amazondata as $amazon_data) {
            $related_links .= theme('amazon_related_link', $amazon_data);
          }
          $node->content['related_links'] = array(
    '#weight' => 25,
            '#value' => $related_links
          );
        }
} // Don't forget this :)

Maybe it's useful for somebody else.

#2

Category:support request» feature request

Great. But where does this code go? ie. in which function?

#3

it's in the amazon_nodeapi function