This is SO close to perfect! This adds the requested information on every node, but only when a user clicks on the particular node. It doesnt show up on the main weblisting of nodes. ie, it shows up on $URL/node/7686 but not on $URL/node

Comments

dwees’s picture

Assigned: Unassigned » dwees

Do you mean $url/tracker? $url/node for me just leads to a single post.

Dave

JymBrittain’s picture

That's not exactly what I mean, sorry. If you visit http://www.technology4teachers.com (ie http://www.technology4teachers.com/node) the link is not with the posts. When you click on any headline to see only that post (ie http://www.technology4teachers.com/node/1047) the link is there.

dwees’s picture

What I mean is that for me, $url/node only leads to the posts that have been promoted to the front page. I'll have to see if I can find out how that list is generated, and see if I can hook into it, but my premonition is that it involves modifying your template.php file and over-riding the theme function for that page.

If there is a hook to modify that stuff, then I'll see if I can find it. Otherwise, I'll see if I can modify my own version of the same, and work from there to produce some documentation on how you can do it as well.

Of course, I also have a lot of other things to get done, so please be patient on this one. :)

Dave

JymBrittain’s picture

No worries regarding time. I'm using a CSS based theme, Chameleon. I assumed it would appear when the node was generated. I guess drupal is more complex than I gave it credit for.

dwees’s picture

Status: Active » Fixed

Here is a quick fix, which hopefully works.

Try changing

  if ($type == 'node') {
    if (!$teaser || variable_get('talkr_show_teaser', 0) {
      $talkr_account = variable_get('talkr_account_number', '');
      if (user_access('listen to nodes') && $talkr_account != '') {
        $links['book_add_child'] = array(
          'title' => '<img style="border:none;" src="http://images.talkr.com/images/speaker_20.gif" alt="Listen to this article" />',
          'href' => 'http://www.talkr.com/app/fetch.app?feed_id=' . $talkr_account . '&perma_link=' . talkr_detect_baseurl(),
          'html' => TRUE,
        );
      }
    }
  }

to


  if ($type == 'node') {
    $talkr_account = variable_get('talkr_account_number', '');
    if (user_access('listen to nodes') && $talkr_account != '') {
      $links['book_add_child'] = array(
        'title' => '<img style="border:none;" src="http://images.talkr.com/images/speaker_20.gif" alt="Listen to this article" />',
        'href' => 'http://www.talkr.com/app/fetch.app?feed_id=' . $talkr_account . '&perma_link=' . talkr_detect_baseurl(),
        'html' => TRUE,
      );
    }
  }

dwees’s picture

Have committed the changes to the module, including a longer, more obvious link. You can now decide in the module settings page if the links show up in a teaser view of a node. Did a quick test and it looks like it works.

Anonymous’s picture

Status: Fixed » Closed (fixed)
JymBrittain’s picture

Well done! THANKS!!!! I would label this as complete and out of dev status :)

JymBrittain’s picture

Whewps...spoke too soon.

When one clicks on the title of the article in drupal to read it, one gets a listen to link with an url like http://www.talkr.com/app/fetch.app?feed_id=28155&perma_link=http://www.t...

All the teasers have the url http://www.talkr.com/app/fetch.app?feed_id=28155&perma_link=http://www.t...