Hi, and thanks for the great module!

The following code appears under the node titles:

safe_section); $section_name=drigg_section_name_by_safe_name($node->safe_section); $section_link=l($section_name, 'taxonomy/term/'.$section_id); ?>

I've attached a screen shot that demonstrates the problem. Any ideas?

Thanks.

CommentFileSizeAuthor
Picture 3.png49.63 KBoldmanpants

Comments

mercmobily’s picture

Status: Active » Postponed (maintainer needs more info)

Hi,

Can you please post here the contents of your file node-drigg.tpl.php?
Please use the <code> tag around your code.

How did you install it?

Bye,

Merc.

oldmanpants’s picture

Hi. Here are the contents of the node-drigg.tpl.php file:

I installed Drigg using the 'express install method'. So, it is a fresh install using Drupal 5.5. No additional modules. The only thing I did that is different (as far as I know) is to install Drigg in a sub-directory rather than the root. Thanks.

<div class="node ntype-<?php print $node->type; ?> <?php print $zebra; ?> clearfix" id="node-<?php print $node->nid; ?>">
  <?php print extra_voting_forms_show_form($node,'n',3); ?>
 
  <div class="offset">
    <?php if($node->teaser){ ?>
      <h2><a href="<?php print $node_url ?>"><?php print $title; ?></a></h2>
    <?php } else { ?>
      <h2><a href="<?php print $node->url ?>"><?php print $title; ?></a></h2>
    <?php } ?>
    
    <?
      $section_id=drigg_section_id_by_safe_name($node->safe_section);
      $section_name=drigg_section_name_by_safe_name($node->safe_section);
      $section_link=l($section_name, 'taxonomy/term/'.$section_id);
    ?>

    <?php $embedded_stuff=drigg_embedded_contents($node,$node_url,$teaser); ?>

    <?php if ($node->teaser && $embedded_stuff) { ?>
      <div class="embedded-teaser">
        <?php print $embedded_stuff ?>
      </div>
    <?php } ?>

    <div class="story">
      <small><?php print theme_format_url_home($url); ?> &ndash;</small>
      <?php print $content; ?>
      <?php if($node->teaser){ ?>
        <a href="<?php print $node_url ?>">Read more &raquo;</a>
      <?php } else { ?>
        <a href="<?php print $node->url ?>">Read &raquo;</a>
      <?php } ?>
    </div>

    <?php if (!$node->teaser && $embedded_stuff) { ?>
      <div class="embedded">
        <?php print $embedded_stuff ?>
      </div>
    <?php } ?>

    <?php if($links){ ?>
      <div class="storydata">
        <?php print theme('user_picture',user_load(array('uid'=>$node->uid)));?>
        Created by <?php print theme('username', $node); ?> <?php print drigg_get_created_string($node); ?>
        <?php $ps=drigg_get_promote_string($node); ?>
        <?php if($ps){ ?>
        &ndash; <strong><?php print $ps; ?></strong>
        <?php } ?>
        <br />
        Category: <?php print $section_link; ?> &nbsp; Tags: <?php print $terms; ?>
      </div>
      
      <div class="links">
        <?php print $links; ?>
      </div>
    <?php } ?>
    
  </div>
</div>

<?php if(!$node->teaser):  ?>
  <div class="node-related clearfix">
    <h2>Similar stories</h2>
    <?php print drigg_related_links_get_html($node->title.' '.$node->body, $node->nid, 5, FALSE); ?>
  </div>
<?php endif; ?>

<?php print drigg_get_article_menu(); ?>
alliax’s picture

Try to add php after the first <? in

<?
      $section_id=drigg_section_id_by_safe_name($node->safe_section);
      $section_name=drigg_section_name_by_safe_name($node->safe_section);
      $section_link=l($section_name, 'taxonomy/term/'.$section_id);
?>

so it looks like:

<?php
      $section_id=drigg_section_id_by_safe_name($node->safe_section);
      $section_name=drigg_section_name_by_safe_name($node->safe_section);
      $section_link=l($section_name, 'taxonomy/term/'.$section_id);
?>

It's stupid and should not happen, there's something on your side, on your server which doesn't recognize <? as a php beginning, strange.

I'm not sure but that's the only thing I see

mercmobily’s picture

Hi,

I think allias is right... can you confirm that adding "php" fixes the issue?

I think I should change the template so that it does have the PHP there...

Bye,

oldmanpants’s picture

That fixed the problem. Thanks.

mercmobily’s picture

Status: Postponed (maintainer needs more info) » Fixed
mercmobily’s picture

Status: Fixed » Closed (fixed)