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
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | recent-content-test-only-1297234-1.patch | 2.3 KB | drupal_was_my_past |
| #1 | recent-content-with-test-1297234-1.patch | 3.09 KB | drupal_was_my_past |
Comments
Comment #1
drupal_was_my_past commentedPatch with tests attached.
Comment #2
webmaster-eddie commentedHello,
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
Comment #3
drupal_was_my_past commented@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.
Comment #4
drupal_was_my_past commentedComment #5
kscheirer#1: recent-content-with-test-1297234-1.patch queued for re-testing.
Comment #6.0
(not verified) commentedUpdate remaining tasks now that patch has been posted.
Comment #7
xjm(Merging "node system" and "node.module" components for 8.x; disregard.)
Comment #8
dawehnerThis really does not make any sense in Drupal 8.