OJS OCS OMP OHS

You are viewing the PKP Support Forum | PKP Home Wiki



How to add aticle ID to email template ?

Are you responsible for making OJS work -- installing, upgrading, migrating or troubleshooting? Do you think you've found a bug? Post in this forum.

Moderators: jmacgreg, btbell, michael, bdgregg, barbarah, asmecher

Forum rules
What to do if you have a technical problem with OJS:

1. Search the forum. You can do this from the Advanced Search Page or from our Google Custom Search, which will search the entire PKP site. If you are encountering an error, we especially recommend searching the forum for said error.

2. Check the FAQ to see if your question or error has already been resolved.

3. Post a question, but please, only after trying the above two solutions. If it's a workflow or usability question you should probably post to the OJS Editorial Support and Discussion subforum; if you have a development question, try the OJS Development subforum.

How to add aticle ID to email template ?

Postby kennymatthew » Sat Dec 28, 2013 10:35 pm

Hi,

When sending emails to reviewers or section editors, I would like the article ID also to be on the subject so it is easier for people to understand which paper it is.
Any Idea if it is possible to add the "article ID" in an email template subject ?

Best Regards,
Kenny
kennymatthew
 
Posts: 127
Joined: Wed Jan 09, 2013 11:49 pm

Re: How to add aticle ID to email template ?

Postby asmecher » Sun Dec 29, 2013 9:17 am

Hi Kenny,

What are you clicking in order to compose the email? What version of OJS are you running?

Regards,
Alec Smecher
Public Knowledge Project Team
asmecher
 
Posts: 8869
Joined: Wed Aug 10, 2005 12:56 pm

Re: How to add aticle ID to email template ?

Postby kennymatthew » Tue Dec 31, 2013 2:34 am

I did not understand your first question .. the request email we send for reviewers and the email we sent section editors when we assign them to a paper.
and version OJS 2.3.8
kennymatthew
 
Posts: 127
Joined: Wed Jan 09, 2013 11:49 pm

Re: How to add aticle ID to email template ?

Postby asmecher » Tue Dec 31, 2013 8:19 am

Hi Kenny,

You can put {$articleId} into the email title or body to add the article ID. Do this by editing the email templates you want to change in the Journal Manager's "Prepared Emails" area.

Regards,
Alec Smecher
Public Knowledge Project Team
asmecher
 
Posts: 8869
Joined: Wed Aug 10, 2005 12:56 pm

Re: How to add aticle ID to email template ?

Postby kennymatthew » Sat Jan 04, 2014 10:23 pm

Hi,

Awesome .. thanks alot...
kennymatthew
 
Posts: 127
Joined: Wed Jan 09, 2013 11:49 pm

Re: How to add aticle ID to email template ?

Postby aleskl » Tue Jan 28, 2014 7:46 am

Excuse me to hijack this thread, but I have a refinement to this question.

I've added the {$articleId} number to most of our templates, but I can't find the template that is used for sending an email from the editor to the authors from the Submission page (from Summary, Review or Editing tab). The email template uses the article title for email subject, but I would like to insert the $articleId here as well. The email is sent using the letter icon next to the author names, as indicated in the attached screenshot.

I have searched through the available email templates in our system, but I couldn't find a corresponding template for this type of email. It seems that this email is generated from the code, but I can't find the place where this is coded (again :( ). The $articleId in the subject would really help our editor to cope with the numerous emails that are exchanged already before the article enters the Review stage.

Thanks for your help!
Ales
Attachments
Screenshot 2014-01-28 15.27.47.png
Screenshot 2014-01-28 15.27.47.png (28.72 KiB) Viewed 1518 times
aleskl
 
Posts: 106
Joined: Mon Apr 11, 2011 7:08 am

Re: How to add aticle ID to email template ?

Postby asmecher » Tue Jan 28, 2014 7:56 am

Hi Ales,

That email is kicked off from the Smarty template; see templates/sectionEditor/submission/management.tpl:
Code: Select all
{url|assign:"url" page="user" op="email" redirectUrl=$currentUrl to=$submission->getAuthorEmails() subject=$submission->getLocalizedTitle() articleId=$submission->getId()}
{$submission->getAuthorString()|escape} {icon name="mail" url=$url}
Regards,
Alec Smecher
Public Knowledge Project Team
asmecher
 
Posts: 8869
Joined: Wed Aug 10, 2005 12:56 pm

Re: How to add aticle ID to email template ?

Postby aleskl » Wed Jan 29, 2014 4:04 am

Thanks Alec, you've been most helpful again!

I've changed the code in templates/sectionEditor/submission/management.tpl like this:
Code: Select all
      <td width="80%" colspan="2" class="value">
         {assign var=emailSubject value="#"|concat:$submission->getId():" ":$submission->getLocalizedTitle()}
         {url|assign:"url" page="user" op="email" redirectUrl=$currentUrl to=$submission->getAuthorEmails() subject=$emailSubject articleId=$submission->getId()}
         {$submission->getAuthorString()|escape} {icon name="mail" url=$url}
      </td>

Now the email being sent from the editor to the authors has the subject: #articlenumber Article title

I really appreciate your help with my tweaking experiments!
Cheers, Ales
aleskl
 
Posts: 106
Joined: Mon Apr 11, 2011 7:08 am

Re: How to add aticle ID to email template ?

Postby kennymatthew » Wed Jan 29, 2014 10:10 pm

Hi ,


Could you tell me what needs to be changed if I want to add the article ID and title to the emails the editors want to send each other ( from the review page) ?

Best Regards.
Attachments
sample.jpg
sample.jpg (62.76 KiB) Viewed 1470 times
kennymatthew
 
Posts: 127
Joined: Wed Jan 09, 2013 11:49 pm

Re: How to add aticle ID to email template ?

Postby asmecher » Fri Jan 31, 2014 3:34 pm

Hi kennymatthew,

This is the same modification posted just above, but in your case to the templates/sectionEditor/submission/peerReview.tpl template.

Regards,
Alec Smecher
Public Knowledge Project Team
asmecher
 
Posts: 8869
Joined: Wed Aug 10, 2005 12:56 pm

Re: How to add aticle ID to email template ?

Postby kennymatthew » Sat Feb 01, 2014 9:44 pm

Hi Alec,

Awesome..thanks ..


FYI ...the modified code ... and it works


Code: Select all
<td class="label">{translate key="user.role.editor"}</td>
      <td>
      
     
      
         {assign var=editAssignments value=$submission->getEditAssignments()}
         {foreach from=$editAssignments item=editAssignment}
            {assign var=emailString value=$editAssignment->getEditorFullName()|concat:" <":$editAssignment->getEditorEmail():">"}
             {assign var=emailSubject value="Article #"|concat:$submission->getId():" ":$submission->getLocalizedTitle()}
            {url|assign:"url" page="user" op="email" redirectUrl=$currentUrl to=$emailString|to_array subject=$emailSubject articleId=$submission->getId()}
            {$editAssignment->getEditorFullName()|escape} {icon name="mail" url=$url}
            
kennymatthew
 
Posts: 127
Joined: Wed Jan 09, 2013 11:49 pm

Re: How to add aticle ID to email template ?

Postby aleskl » Mon Feb 03, 2014 7:38 am

Hi,
I've added the Article number in the email subject in several template files (in some files in more than one place, eg. where the emails get sent to the authors or to editors):

in /templates/sectionEditor/submission/:
  • editors.tpl
  • management.tpl
  • peerReview.tpl
  • summary.tpl
in /templates/submission/metadata/:
  • metadata.tpl
in /templates/author/submission/:
  • management.tpl
  • summary.tpl
in /templates/reviewer/:
  • submission.tpl
This way most of the email communication between editors, authors and reviewers gets an article number label (for emails that do not use the email template system).

Regards,
Ales
aleskl
 
Posts: 106
Joined: Mon Apr 11, 2011 7:08 am

Re: How to add aticle ID to email template ?

Postby kennymatthew » Tue Feb 04, 2014 11:19 pm

Thanks alot aleskl...
kennymatthew
 
Posts: 127
Joined: Wed Jan 09, 2013 11:49 pm


Return to OJS Technical Support

Who is online

Users browsing this forum: Google [Bot], Yahoo [Bot] and 3 guests