At the bottom of this site http://www.tinemuller.dk/drupal/view/list/copenhagen it's inline but when you look in Google Reader with the RSS link http://www.tinemuller.dk/drupal/list_copenhagen_feed it's above. Can I do something to change this, please?

Also the links to the 2 maps are not opening up in the special InfoWindow as they do on list/copenhagen. Something to do to change this, please?

Hope you understand what I'm trying to get help to do.

/Tine

Comments

tinem’s picture

Is it "normal" that the RSS is showed in 2 lines instead of one which it is in the Content type?

I made this changes node-copenhagen.tpl.php to get the links functioning on the site.

    <?php print $content;
	print '<a href="' . $node->field_copenhagen_map[0][display_url] . $node->nid . '"><b>See the toilet on Copenhagen Map</a></b>
	<br><a href="' . $node->field_copenhagen_map_radius[0][display_url] . $node->nid . '"><b>See the toilet on Google Map width Radius</a></b>'; ?>

About the links in RSS I have been told that I need to write a Module and Hook but as a beginner I have not tried this yet. Have any of you such a Module and Hook which I can use or help me make it, please?

/Tine

tinem’s picture

I got help from Victor Kane which made a Module for me and now the links is functioning but now the problem is that the OLD info is not deleted. Can someone help about what to do, please?

copenhagen_utilities.module

<?php
// $Id$

/**
 * @file
 *   Utilities for the Copenhagen site
 */

/*
 * Implement hook_nodeapi
 */
function copenhagen_utilities_nodeapi(&$node, $op, $arg = 0) {
  switch ($op) {
    case 'rss item':
      $the_map_links = '<a href="' . $node->field_copenhagen_map[0][display_url] . $node->nid . '"><b>See the toilet on Copenhagen Map</a></b>
 <br><a href="' . $node->field_copenhagen_map_radius[0][display_url] . $node->nid . '"><b>See the toilet on Google Map width Radius</a></b>';
      // add the map links to both body and teaser to cover both RSS feed configurations
      $node->teaser .= $the_map_links;
      $node->body .= $the_map_links;
    break;
  }
}

In the table content_type_copenhagen I have this informations if that helps you.

field_copenhagen_map_url
Copenhagen_map?nid=

field_copenhagen_map_title
Copenhagen map

field_copenhagen_map_radius_url
Copenhagen_map_radius?nid=

field_copenhagen_map_radius_title
Copenhagen map/radius

/Tine

chrisshattuck’s picture

Glad to hear you got it working, Tine!

Whenever you see old information hanging around, the first thing to do is clear your cache. The easiest way to do this is to install the Administration menu module, hover over the icon in the upper left hand corner, and select 'Flush all caches.'

Let me know if that works for you.

Cheers,
Chris

Build a Module.com - The definitive video guide to Drupal development

Learn virtually any aspect of Drupal on BuildAModule, where I've recorded over 2200 video tutorials.

tinem’s picture

@Chris:I have NOT got this solved. Can you help, please? If there is something you are unclear about please ask.

tinem’s picture

I have just discovered that module copenhagen_utilities is going to be showed on ALL the RSS feeds on the site and also for my test here http://www.tinemuller.dk/drupal/crime/feed which it shouldn't.

So still struggling for making this the right way. I can't be the only person in the world with this problem, right? I wish I knew Drupal better so I could solve this myself. :-(

tinem’s picture

WOW - I searched for using a special content type and found the code to use so now it's ONLY for content type "copenhagen" which it should be. To someone else having problems with this I show the new code down here.

<?php
// $Id$

/**
 * @file
 *   Utilities for the Copenhagen site
 */

/*
 * Implement hook_nodeapi
 */
function copenhagen_utilities_nodeapi(&$node, $op, $arg = 0) {
  switch ($op) {
    case 'rss item':
	if ($node->type=="copenhagen") {     // and in fact, only care about Content Type "copenhagen"
      $the_map_links = '<a href="' . $node->field_copenhagen_map[0][display_url] . $node->nid . '"><b>See the toilet on Copenhagen Map</a></b>
 <br><a href="' . $node->field_copenhagen_map_radius[0][display_url] . $node->nid . '"><b>See the toilet on Google Map width Radius</a></b>';
      // add the map links to both body and teaser to cover both RSS feed configurations
      $node->teaser .= $the_map_links;
      $node->body .= $the_map_links;
    break;
  }
}
}