Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
When a anonymous user closes a message, the message is no longer displayed to any other anonymous users. If page caching is enabled, this does not become apparent until the page caches are cleared.
Comment | File | Size | Author |
---|---|---|---|
#4 | admin_message_anonymous.patch | 2.7 KB | dsnopek |
#1 | anonymous-1290414-1.patch | 811 bytes | jmcintyre |
Comments
Comment #1
jmcintyre CreditAttribution: jmcintyre commentedThe attached patch prevents the module from saving the "close" actions of anonymous users.
Comment #2
jmcintyre CreditAttribution: jmcintyre commented(forgot to change status w/yesterday's post)
Comment #3
b.ravanbakhshI use cookie to save anonymous closes.
just add these code at the begining of admin_message.module file.
then patch current "admin_message_close" function by following code
and finaly change line 112 to this
if (empty($closed_by_user) && ($item->created >= $user->created || $item->keep_new) && $php_visibility && _admin_message_read_cookie($item->nid)) {
Comment #4
dsnopekI've made a patch out of the approach described in comment #3. It's a little bit different than what b.ravanbakhsh did:
Please let me know what you think!
Best regards,
David.
Comment #5
dsnopekPatch from #4 committed! Thanks, b.ravanbakhsh!
Comment #6.0
(not verified) CreditAttribution: commentedRemoved info about patch, moving to comments.