OJS OCS OMP OHS

You are viewing the PKP Support Forum | PKP Home Wiki



How to include salutation in the emails

Are you an Editor, Author, or Journal Manager in need of help? Want to talk to us about workflow issues? This is your forum.

Moderators: jmacgreg, michael, vgabler, John

Forum rules
This forum is meant for general questions about the usability of OJS from an everyday user's perspective: journal managers, authors, and editors are welcome to post questions here, as are librarians and other support staff. We welcome general questions about the role of OJS and how the workflow works, as well as specific function- or user-related questions.

What to do if you have general, workflow or usability questions about OJS:

1. Read the documentation. We've written documentation to cover from OJS basics to system administration and code development, and we encourage you to read it.

2. take a look at the tutorials. We will continue to add tutorials covering OJS basics as time goes on.

3. Post a question. Questions are always welcome here, but if it's a technical question you should probably post to the OJS Technical Support subforum; if you have a development question, try the OJS Development subforum.

How to include salutation in the emails

Postby robinhood1362 » Mon Mar 02, 2009 2:25 am

Hi
The faculty we're sending review requests and... (and I guess all faculty members everywhere in the world) using OJS 2.2.2 are accustomed to be called "Dr." or "Professor" or whatever their title is. However, the template emails do not include the salutation field in the prepared emails. Is there a way to include this field in all email templates?
Thanks
robinhood1362
 
Posts: 31
Joined: Sat May 24, 2008 3:27 pm

Re: How to include salutation in the emails

Postby mcrider » Tue Mar 03, 2009 1:40 pm

Hi Sina,

Do you want to have a field in the email form to select the salutation, or do you want all emails to automatically begin with "Professor {$name}"? If your request is the latter, you can edit the email templates (in the 'Prepared Emails' section of the Journal Management page) and add the salutation to whatever templates you like (e.g. REVIEW_REQUEST for the review request emails). If you want to add a different salutation for each email, you could just manually add it when you send emails to reviewers.

Cheers,
Matt
mcrider
 
Posts: 952
Joined: Mon May 05, 2008 10:29 am
Location: Vancouver, BC

Re: How to include salutation in the emails

Postby robinhood1362 » Wed Mar 04, 2009 11:44 pm

Hi Matt
Thanks for your response. There's a 'Salutation' filed on the register form, and I am looking for a way to include this filed in the email templates before the {$name} (something like {$salutation} {$name} maybe). I think it should be there in the prepared emails by default. Since we're collecting information on the register form, we should be able to use them at our disposal, rather than manually editing info, e.g in each email going out.

Regards
robinhood1362
 
Posts: 31
Joined: Sat May 24, 2008 3:27 pm

Re: How to include salutation in the emails

Postby mcrider » Thu Mar 05, 2009 12:12 pm

Hi Sina,

Aah yes I forgot about that.. But unfortunately, making this change will be quite a bit of work. For the review requests, you can make the change by editing classes/submission/sectionEditor/SectionEditorAction.inc.php and at about line 246, add this line:
Code: Select all
'salutation' => $reviewer->getSalutation(),
to the $paramArray array. Then in the review request email template (which you can edit by logging in as a journal manager, clicking on the 'Prepared Emails' link, then editing the 'REVIEW_REQUEST' template), add {$salutation} right before {$reviewerName}:. Similar changes would have to be made to affect templates elsewhere in the system, which as I'm sure you're aware, would be quite time consuming. Hopefully, this template is enough for your purposes.

Cheers,
Matt
mcrider
 
Posts: 952
Joined: Mon May 05, 2008 10:29 am
Location: Vancouver, BC

Re: How to include salutation in the emails

Postby robinhood1362 » Fri Mar 06, 2009 8:33 am

Hi Matt
Ok, got it, thanks! Keep shedding light on the subjects! But what makes me wonder is why this field has not been in use by default. I mean, the team has been thinking of including this field on the form, without including it in any template. Maybe titles (salutations) aren't that critical in the context you're considering for OJS. However, we had a case of a faculty member very offended by being addressed like 'John Smith:' without any 'Dr.'.
Anyway, keep up the good work!
robinhood1362
 
Posts: 31
Joined: Sat May 24, 2008 3:27 pm

Re: How to include salutation in the emails

Postby mcrider » Fri Mar 06, 2009 4:50 pm

Hi again Sina,

Point well taken! I've filed a bug for this, which should add salutations to all emails when completed.

Cheers,
Matt
mcrider
 
Posts: 952
Joined: Mon May 05, 2008 10:29 am
Location: Vancouver, BC

Re: How to include salutation in the emails

Postby blstzus » Wed May 05, 2010 8:30 pm

Hello,

Thank you for having this topic discussed here.

What if I want salutations to appear in the editorial team also? Where do I edit? FYI, i'm creating my own titles in the masthead

Thank you.

-Aiman-
blstzus
 
Posts: 16
Joined: Mon Apr 26, 2010 12:08 am

Re: How to include salutation in the emails

Postby robinhood1362 » Thu May 06, 2010 12:46 am

Hi all,

Bug 4118 - Add salutations to emails says it has been fixed in mid-2009, and the product and version reads Open Journal Systems 2.2.4, which I have upgraded to as soon as it was out. But the salutations of the users' who have filled the field, aren't getting in the prepared emails going out. Am I missing out on something?

Cheers,
Sina
robinhood1362
 
Posts: 31
Joined: Sat May 24, 2008 3:27 pm

Re: How to include salutation in the emails

Postby mcrider » Tue May 11, 2010 9:53 am

Hi all,

This appears to not have been applied to OJS pre-2.3 versions, sorry, but it is in OJS 2.3+, and if you don't want to upgrade, you should be able to add this functionality to your own version of OJS. To do so, replace the getFullName() function in classes/user/User.inc.php with the new one:
Code: Select all
function getFullName($lastFirst = false) {
      $salutation = $this->getData('salutation');
      $firstName = $this->getData('firstName');
      $middleName = $this->getData('middleName');
      $lastName = $this->getData('lastName');
      if ($lastFirst) {
         return "$lastName, " . ($salutation != ''?"$salutation ":'') . "$firstName" . ($middleName != ''?" $middleName":'');
      } else {
         return ($salutation != ''?"$salutation ":'') . "$firstName " . ($middleName != ''?"$middleName ":'') . $lastName;
      }
   }


Cheers,
Matt
mcrider
 
Posts: 952
Joined: Mon May 05, 2008 10:29 am
Location: Vancouver, BC


Return to OJS Editorial Support and Discussion

Who is online

Users browsing this forum: Yahoo [Bot] and 4 guests

cron