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.
Placeholder for work on porting this module to D7.
Comment | File | Size | Author |
---|---|---|---|
#25 | simplenews_realname-1019622-25.patch | 2.28 KB | sgabe |
#22 | 10919622-simplenews_realname-d7.patch | 2.65 KB | pillarsdotnet |
Comments
Comment #1
webankit CreditAttribution: webankit commented+1
Comment #2
felipepodesta CreditAttribution: felipepodesta commented+1
Subs
Comment #3
Tebb CreditAttribution: Tebb commentedWill the D7 version of this module integrate http://drupal.org/project/realname into SimpleNews?
Comment #4
pillarsdotnet CreditAttribution: pillarsdotnet commentedThat would be the goal, yes.
Comment #5
Tebb CreditAttribution: Tebb commentedGreat.
Changed title to show in dashboard.
Comment #6
shaisamuel CreditAttribution: shaisamuel commented+1
Comment #7
Quarantine CreditAttribution: Quarantine commentedSubscribing.
Comment #8
pillarsdotnet CreditAttribution: pillarsdotnet commentedActually, the D7
format_username()
function and associatedhook_username_alter()
hook makes the RealName module obsolete.Comment #9
shaisamuel CreditAttribution: shaisamuel commentedThanks. Can you explain and give direction please, to the most of us, who are waiting? Is there a solution out there we can use?
Comment #10
pillarsdotnet CreditAttribution: pillarsdotnet commentedSure. In all code that prints a username, replace
$user->name
withformat_username($user)
And to show (e.g.) a "realname" field supplied by a profile module, write a teensy-weensy module that contains a single function like this:
For another example, I wrote a tiny module that uses the CiviCRM "display_name" field to format the username.
Comment #11
shaisamuel CreditAttribution: shaisamuel commented@pillarsdotnet, maybe I dont get it, but in my case the issue is about the simplenews support for subscribers which are not registered uses. Realname adds the username field on the register block as well as in the process of the mail sending. So if there is solution, I would appreciate your guidens.
Thanks, Shai.
Comment #12
pillarsdotnet CreditAttribution: pillarsdotnet commentedAh; your use-case is not mine. I register all my subscribers.
Comment #13
waltf CreditAttribution: waltf commentedSubscribing
Comment #14
drupal a11y CreditAttribution: drupal a11y commentedCheck "http://drupal.org/node/922662/release" for a first D7 version,
Comment #15
shaisamuel CreditAttribution: shaisamuel commentedThanks @mori. I think this ver needs a small upgrade, since it contains "db_result" calls, which was removed in D7. I wish I new how to do it. I actually tried, by looking at some other examples, but I have errors. There are total of 6 "db_result", which needs to be changed. If there is someone here who nows how to, please provide the patch, so we can test it.
Comment #16
deggertsen CreditAttribution: deggertsen commentedSeems to me that this is a much better solution for us to support.
#127178: Make Subscribers fieldable
Comment #17
rofsky CreditAttribution: rofsky commentedIf you download the 7x version here : http://drupal.org/node/1036302
Replace line 521 on the simplenews_realname.module file with the following:
return db_query('SELECT realname FROM {simplenews_realname} r WHERE r.mail = :mail', array(':mail' => $mail))->fetchField();
That is the proper drupal 7.x way to replace db_result. Drupal 7.x uses a pdo style syntax for db queries. To keep it all on one line as the module is currently written that would work. The ->fetchField(); will return a single value.
Changing that line works for me. So far I have only tested on the block, and frontend.
Comment #18
pminfYou also have to replace
taxonomy_get_term()
(Drupal 6 function) withtaxonomy_term_load()
(Drupal 7 function) in line 249 and 266.Comment #19
pminfAfter a few minute testing I noticed some issues with mass import. E-mails are not subscribed to newsletter categories and the real name is not displayed after import (notfication area and list of subscribers). Although the real name is displayed in the newsletter. I guess this still needs some work till it can be used in a productive system. Any information about the progress?
Comment #20
hailaz CreditAttribution: hailaz commentedsubscribing
Comment #21
broonIn addition to #17 and #18 you should also change line 496
from
$account = user_load(array('mail' => $mail));
to
$account = user_load_multiple(array(), array('mail' => $mail));
in order to avoid the
array_flip
error. The most common cause of this error is using a something_load() function with an array as argument. This is not supported anymore because the load_multiple() functions need to be used for this in Drupal 7.Comment #22
pillarsdotnet CreditAttribution: pillarsdotnet commentedPatch including changes from #17, #18, and #21 above.
Comment #23
sgabe CreditAttribution: sgabe commentedI didn't investigate this issue yet on Drupal 7, is this module deprecated/obsolete or still needed for D7?
Comment #24
pillarsdotnet CreditAttribution: pillarsdotnet commented@#23 -- see comments #11 and #12.
Comment #25
sgabe CreditAttribution: sgabe commentedThe attached patch has been committed with the proposed changes. An alpha release should be available soon and the development snapshot is also available from the project page. Feel free to test and give feedback!