Hi,

This is not entirely a bug but something not expected. Content types can be configured to not display post information, i.e. submitted by author, in admin/build/themes/settings. "Page" content type is configured to hide post information by default. However, when Author information profile block is enabled, author info is shown even for a "Page" content type. This seems like a conflict. And there's no easy way to turn it off for just some content types.

CommentFileSizeAuthor
#5 368384.diff710 bytesball.in.th

Comments

roball’s picture

I have enabled all the checkboxes available in the "Display post information on" group at "admin/build/themes/settings" - so even posts of content type "page" should get the author information. That works, but I'm not happy with it for several reasons:

  • The info always displays the original creation date, but not the date of the last update. Even if I delete the revision corresponding to the creation, the old creation date is still displayed.
  • The info is *always* displayed as "January 26, 2009 by User" - and I see no way to customize the format. Even the date format set in Drupal's core "date-time" module will be ignored

So I tried the 'Author information' block - set it to be displayed on the Content bottom region, enabled some of the (custom) profile fields - but nothing gets displayed at all :-(

roball’s picture

Update: Only on the front page there was no author information displayed. On all the others, there was. Even the user's picture has been displayed, although I've disabled "User pictures in posts" to be displayed in the "Toggle display" section of "admin/build/themes/settings". And there seems no way to get the date of the last update displayed. How can this be done?

roball’s picture

Update 2: I have now found the solution for me :-)

I am no more thinking about enabling the "Author information" block - the enabled "Display post information on" just works fine when the corresponding theme template will be modified. So I'm now using
format_date($node->changed, 'large')
to get the date of the last update in the customized date & time format, instead of getting the creation date in a fixed date format (which was hard coded in the theme I am using).

ball.in.th’s picture

I've found a workaround; in "Show block on specific pages: ", select "Show if the following PHP code returns TRUE (PHP-mode, experts only)." And use this php code:

<?php
if ((arg(0) == 'node') && is_numeric(arg(1)) && (arg(2) == NULL)) {
	$node = node_load(arg(1));
	if (theme_get_setting('toggle_node_info_'. $node->type)) {
		return TRUE;
	}
}
return FALSE;
?>
ball.in.th’s picture

Status: Active » Needs review
StatusFileSize
new710 bytes

ok, here's my first attempt to send a patch.

Status: Needs review » Needs work

The last submitted patch, 368384.diff, failed testing.

Status: Needs work » Closed (outdated)

Automatically closed because Drupal 6 is no longer supported. If the issue verifiably applies to later versions, please reopen with details and update the version.