Hi

I had a problem with the chameleon theme. it wasn't displaying post information on comments, even though I'd ticked the box to do so in the theme configuration

Have since got around this by using bluemarine instead, but have a bit more info on this which might be helpful in a forum conversation with another user here:
http://drupal.org/node/101812#comment-178249

setup: Drupal 5 beta 1, linux apache shared hosting. looked at it in Firefox 1 and IE6.

I've attached a screenshot

best wishes
John

Comments

johninnit’s picture

StatusFileSize
new26.64 KB

and another screenshot of the problem fixed by using bluemarine, so you can see what was missing

Paul Natsuo Kishimoto’s picture

@johninnit - Hi! Can you confirm this is unfixed in 5.0-rc1?

johninnit’s picture

Sorry it looks that way. I tried replacing the chameleon theme files with the new ones from 5rc and it still won't display.

This could of course be because I didn't replace all Drupal's files, only the theme ones. Sorry if that's me being thick!

Conincidentally, I'd moved to using bluemarine as a result of this and then found an incompatibility with FCK Editor module in Bluemarine. *That* bug is now fixed when replacing the theme files with 5rc ones.

hruodland’s picture

I'm having this problem on 5.0 final. Does anyone know if it's likely to be fixed anytime soon? (I have no idea how to get around it, so I have to decide whether to move to another theme.)

ohzbees’s picture

I upgraded to Drupal 5.1 and and the "submitted by" information is still missing for Chameleon. However, it is present for all of the other core themes.

Here is the place in the chameleon.theme file where I imagine the problem is (unfortunately I don't see the problem ... yet :-)

$submitted['node_submitted'] = theme_get_setting("toggle_node_info_$node->type") ? array('#title' => t("By !author at @date", array('!author' => theme('username', $node), '@date' => format_date($node->created, 'small')))) : array();

Note that all of the taxonomy information and the "read more" link are present.

drupalluver’s picture

I'm having this problem as well. I'm hoping that someone can find a fix as this is a lovely theme.

davecormier’s picture

me too. same symptoms. Also works in all other themes. It's a little over my head but I'll look into the pages and see what i can do.

coofercat’s picture

Version: 5.0-beta1 » 5.1

I've narrowed down the problem a little (with Drupal 5.1). This code:

$submitted['node_submitted'] = theme_get_setting("toggle_node_info_$node->type") ? array('#title' => t("By !author at @date", array('!author' => theme('username', $node), '@date' => format_date($node->created, 'small')))) : array();

... is the problem - change the "#title" to 'title' (a slight API inconsistency, I guess?). Like this:

$submitted['node_submitted'] = theme_get_setting("toggle_node_info_$node->type") ? array('title' => t("By !author at @date", array('!author' => theme('username', $node), '@date' => format_date($node->created, 'small')))) : array();

The problem is, this will display:

Posted by <a href="/user/1" title="View user profile.">coofercat</a> at 2007-03-06 12:19 | Add new comment | 7 reads

...which isn't ideal. However, the major emergency for me is over, as my visitors don't get to view user profiles (so the link doesn't appear). It's annoying me though, so I'll keep looking at it.

Rapee’s picture

The problem is, that chameleon theme is not using the new theme_links function, that changed a lot. After looking the code, I found an easy solution:

In function chameleon_node:

  $submitted['node_submitted'] = theme_get_setting("toggle_node_info_$node->type") ? array('#title' => t("By !author at @date", array('!author' => theme('username', $node), '@date' => format_date($node->created, 'small')))) : array();

Change it to this:

  $submitted['node_submitted'] = theme_get_setting("toggle_node_info_$node->type") ? array(
    'title' => t("By !author at @date", array('!author' => theme('username', $node), '@date' => format_date($node->created, 'small'))),
    'html' => TRUE) : array();

function chameleon_comment:

$submitted['comment_submitted'] = array('#title' => t('By !author at @date', array('!author' => theme('username', $comment), '@date' => format_date($comment->timestamp, 'small'))));

Change it to this:

  $submitted['comment_submitted'] = array(
    'title' => t('By !author at @date', array('!author' => theme('username', $comment), '@date' => format_date($comment->timestamp, 'small'))),
    'html' => TRUE);

Thus theme_links will know, that Author's name and date are in HTML already.

coofercat’s picture

I've just tried this out, and indeed it works perfectly.

Easy when you know how ;-)

drupalluver’s picture

I just tried it as well! It does work perfectly. Thank you so much!

coofercat’s picture

Status: Active » Needs review
StatusFileSize
new1.75 KB

Just to try to close this off - Patch (against HEAD) attached.

andrewfn’s picture

Status: Needs review » Reviewed & tested by the community

Great work! tested out perfectly.

drumm’s picture

Version: 5.1 » 6.x-dev
StatusFileSize
new1.84 KB

I committed a slightly modified version with correct code style to 5.

dries’s picture

Status: Reviewed & tested by the community » Fixed

I committed this to CVS HEAD. Thanks!

Anonymous’s picture

Status: Fixed » Closed (fixed)