Problem/Motivation

Issues #421586: Author nevertheless displayed in RSS feeds if disabled for privacy reasons and #70722: Search results should respect the content type's "Display author and date information." option address how the node post setting "Display author and date information" affects only the node view, but not the search result view or the RSS feed. I wasn't able to find an existing issue that deals with how the post setting also isn't used when displaying the "Recent Content" block, so I'm capturing that piece here.

Proposed resolution

A patch that would conditionally display a node's author based on the node's content type's post setting. This would make the post setting's affects more consistent.

Remaining tasks

- Review patch and tests

User interface changes

The node post setting "Display author and date information" would now also affect whether a node's author is displayed in the "Recent Content" block.

API changes

None

Comments

drupal_was_my_past’s picture

Status: Active » Needs review
StatusFileSize
new3.09 KB
new2.3 KB

Patch with tests attached.

webmaster-eddie’s picture

Hello,

I have a similar problem in Dupal 7 - perhaps you could direct me to a solution, please.
I want to remove the display of author and date info for the recent content block. I want just the teaser to display.
There seems to be no way to do this in the system.
I am starting to learn a little about drupal 7 development, and it seems to me that I would have to modify the block.api.php
file in the relevant theme used, but

It states that modules can implement hook_block_view_MODULE_DELTA_alter() to modify a specific block.

I see aound line 152 of the file block.api.php an area where it seems to me logican to try to implement this, but I don't know
what the variables for author info and date info are called.

In the node_recent_block it says that $data is defined as an array of data as rendered from the hook_block_view() implementation of the module that defined the block, and that content: should be a renderable array representing the content of the block.

Here I'm lost. Is this the right way to modify a drupal 7 site without disrupting the upgrade path?

Do you have any info on how this can be fully implemented for D7 - or know of an already-worked-out solution?

Can your patch be modified to (or can it) work with D7?

I appreciate any help,

Best regards,

Eddie
eddie@toutpourleweb.info

drupal_was_my_past’s picture

@webmaster-eddie This is a bug report issue queue, so please only post comments relevant to the bug described in the overview. I encourage you to seek support for your Drupal core questions in the Forums or on IRC. Check out http://drupal.org/community for how to access the Forums and IRC, as well as other support channels.

drupal_was_my_past’s picture

Assigned: Unassigned » drupal_was_my_past
kscheirer’s picture

Status: Needs review » Needs work

The last submitted patch, recent-content-with-test-1297234-1.patch, failed testing.

Anonymous’s picture

Issue summary: View changes

Update remaining tasks now that patch has been posted.

xjm’s picture

Component: node.module » node system
Issue summary: View changes

(Merging "node system" and "node.module" components for 8.x; disregard.)

dawehner’s picture

Version: 8.x-dev » 7.x-dev

This really does not make any sense in Drupal 8.

Status: Needs work » Closed (outdated)

Automatically closed because Drupal 7 security and bugfix support has ended as of 5 January 2025. If the issue verifiably applies to later versions, please reopen with details and update the version.