@akierig (Andrew Kierig) posted a new topic, subject "Email Template Formatting/Tags?". It read:

   Dear All:
    
    I am trying to revise my journal's `Review Request` template to make it more succinct. One thing I have noticed is that authors either don't remember their username or didn't save it to their browser, so I wanted to include the `{$username}` tag in the email template. But when I prepare to send an email using the template, OJS won't recognize the `{$username}` tag in that email, but it will recognize all of the others.
    
    So the template is as follows:
    
    > Dear {$reviewerName}:
    > 
    > I am writing to respectfully request that you serve as a reviewer for the American Review of Politics, an open access journal published by the University of Oklahoma Department of Political Science and University Libraries.
    > 
    > Title: {$articleTitle}
    > 
    > Abstract: {$articleAbstract}
    > 
    > The manuscript is at: {$submissionReviewUrl}
    > 
    > Your username is: {$username}
    > 
    > Thank you for considering this request.
    > 
    > Best regards,
    > 
    > (Editor's Name)  
    >  The University of Oklahoma  
    >  Department of Political Science
    
    and the result is:
    
    > Dear Andrew Kierig:
    > 
    > I am writing to respectfully request that you serve as a reviewer for the  
    >  American Review of Politics, an open access journal published by the  
    >  University of Oklahoma Department of Political Science and University  
    >  Libraries.
    > 
    > Title: State Making, State Breaking, and the Search for a Nation: Three Chapters in Austrian Political History
    > 
    > Abstract: My thesis is my thesis is…
    > 
    > The manuscript is at:  
    >  https://journals.shareok.org/arp/reviewer/submission/xxx
    > 
    > Your username is: **{$username}**
    > 
    > Thank you for considering this request.
    > 
    > Best regards,
    > 
    > (Editor's Name)  
    >  The University of Oklahoma  
    >  Department of Political Science
    
    The point being that it recognizes the other tags, but not `{$username}`. Is there a reason for this?
    
    Is there any documentation on which tags are allowed in which templates?
    
    We're running 302-237-6233.
    
    Thanks for any help in advance!

Then @israel.cefrin (Israel Cefrin) said

    Hi @akierig
    
    OJS has some common variables shared by all email templates, but specific mail templates may add their own set of tags, e.g. REVIEW_REQUEST set of emails.
    
    Template tag variable you should use is {$reviewerUsername}, as you can see in this link:
    
    github.com
    
    #### pkp/ojs/blob/ojs-stable-2_4_8/classes/submission/sectionEditor/SectionEditorAction.inc.php#L269
    [code]     
          259. 						$numWeeks = max((int) $journal->getSetting('numWeeksPerReview'), 2);
        
        
          260. 						$reviewDueDate = strftime(Config8b7c:f320:99b9:690f:4595:cd17:293a:c069getVar('general', 'date_format_short'), strtotime('+' . $numWeeks . ' week'));
        
        
          261. 					}
        
        
          262. 
        
          263. 					$submissionUrl = $request->url(null, 'reviewer', 'submission', $reviewId, $reviewerAccessKeysEnabled?array('key' => 'ACCESS_KEY'):array());
        
        
          264. 
        
          265. 					$paramArray = array(
        
        
          266. 						'reviewerName' => $reviewer->getFullName(),
        
        
          267. 						'weekLaterDate' => $weekLaterDate,
        
        
          268. 						'reviewDueDate' => $reviewDueDate,
        
        
          269. 						'reviewerUsername' => $reviewer->getUsername(),
        
        
          270. 						'reviewerPassword' => $reviewer->getPassword(),
        
        
          271. 						'editorialContactSignature' => $user->getContactSignature(),
        
        
          272. 						'reviewGuidelines' => PKPString8b7c:f320:99b9:690f:4595:cd17:293a:c069html2text($journal->getLocalizedSetting('reviewGuidelines')),
        
        
          273. 						'submissionReviewUrl' => $submissionUrl,
        
        
          274. 						'abstractTermIfEnabled' => ($sectionEditorSubmission->getLocalizedAbstract() == ''?'':__('article.abstract')),
        
        
          275. 						'passwordResetUrl' => $request->url(null, 'login', 'resetPassword', $reviewer->getUsername(), array('confirm' => Validation8b7c:f320:99b9:690f:4595:cd17:293a:c069generatePasswordResetHash($reviewer->getId())))
        
        
          276. 					);
        
        
          277. 					$email->assignParams($paramArray);
        
        
          278. 					if ($isEmailBasedReview) {
        
        
          279. 						// An email-based review process was selected. Attach
        
        
        
    [/code]
    
    You may check other sets through this thread:
    
    Shortcode for prepared e-mails Software Support
    
    > Hello, is there any table/list of short codes for prepared e-mails ie. journal title, author name, author salutation, article id, date of submission so we can add to prepared e-mails. Thanks 
    
    Regards,  
    Israel Cefrin  
    Public Knowledge Project Team

To which @akierig (Andrew Kierig) replied

    Dear Israel:
    
    Thanks for your reply. Is there a particular reason these codes aren't documented somewhere? It seems like it could make things a lot easier.
    
    Not being familiar with PHP code, and only ever getting on Github to find python packages, I never would have thought to check the source code.
    
    Thanks  
    aak

To which @israel.cefrin (Israel Cefrin) replied

    Hi @akierig
    
    There is no a particular reason but, it is a “feature request” to documentation. We're a small team with a lot of competing responsibilities. Although PKP team is constantly working in improvements, e.g. those in OJS3.1 are inspired by community feedback and user experience testing with OJS.  
    We will continue to introduce refinements to help editors to manage their journals as like to authors submit their manuscripts.  
    Your suggestion is a valid concerning and may be included in future documentation releases along others incoming issues. But it depends on internal planning of team.
    
    Best Regards,  
    Israel Cefrin  
    Public Knowledge Project Team

Then @fjbonilla said

    Hi, I am also working on our email templates. We only email the corresponding author {$authorName}; however, when the article is published I want to send a message to all the authors to congratulate them   
    is there is a way to mention all the authors' names using a tag like the one for the corresponding author?  
    We are running OJS 302-237-6233  
    Thank you  
    Francisco

To which @akierig (Andrew Kierig) replied

    It sounds like you'd just be better off emailing them outside of OJS?

Then @iafriansyah said

    Hi, we have same problem here, but we are running OJS 3.1.2
    
    Where I can find SectionEditorAction.inc.php in OJS 3.1.2?
    
    Thanks for any help in advance!


{'source': 'discourse', 'url': 'https://forum.pkp.sfu.ca/t/email-template-formatting-tags/34814', 'title': 'Email Template Formatting/Tags?', 'views': 1483, 'has_accepted_answer': False, 'word_count': 667, 'like_count': 2, 'reply_count': 2, 'participant_count': 4, 'posts': 7, 'tags': '', 'author': '@akierig (Andrew Kierig)', 'participants': '@akierig (Andrew Kierig), @israel.cefrin (Israel Cefrin), @fjbonilla, @iafriansyah', 'image_url': [None], 'created_at': '2017-10-31T21:48:23.471Z', 'last_posted_at': '2019-07-02T07:12:13.896Z'}