OJS OCS OMP OHS

You are viewing the PKP Support Forum | PKP Home Wiki



Using new email templates

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
The Public Knowledge Project Support Forum is moving to http://forum.pkp.sfu.ca

This forum will be maintained permanently as an archived historical resource, but all new questions should be added to the new forum. Questions will no longer be monitored on this old forum after March 30, 2015.

Using new email templates

Postby ggna » Sat Jan 27, 2007 3:54 am

Hi,

I have created a new email template from

User > Journal manager > Prepared emails > Create email

However, I cannot associate a Sender/Recipient pair to newly created e-mails.

More importantly, how can associate new templates to "events" (such as the acceptance of a manuscript), or , more generally, import an existing template into a generic empty email?

(E.g. from http://pathto.ojs/user/email)

Many thanks,

Giuseppe.
ggna
 
Posts: 6
Joined: Sun Dec 31, 2006 8:54 am

Postby asmecher » Tue Jan 30, 2007 4:14 pm

Hi Giuseppe,

If you're an Editor, Section Editor, or Journal Manager, you can call up an arbitrary email template by going to a URL like:
Code: Select all
http://pathto.ojs/user/email?template=PASSWORD_RESET_CONFIRM

...where the PASSWORD_RESET_CONFIRM is the symbolic name of the template you want to bring up. If you want to associate it with an event, you'll need to write some code. There's a good coding example of this in pages/user/UserHandler.inc.php in the "email" function (as you might expect, this handles the URL above).

Regards,
Alec Smecher
Open Journal Systems Team
---
Don't miss the First International PKP Scholarly Publishing Conference
July 11 - 13, 2007, Vancouver, BC, Canada
http://ocs.sfu.ca/pkp2007/
asmecher
 
Posts: 10015
Joined: Wed Aug 10, 2005 12:56 pm

Postby ggna » Wed Jan 31, 2007 12:27 am

Dear Alec,

many thanks.

I have tried by writing the URL directly, or by modifying a link to an email by adding the &template=... string at the end of the URL, but this does not resolve variables such as {$authorName} etc.

Best regards,

Giuseppe.
ggna
 
Posts: 6
Joined: Sun Dec 31, 2006 8:54 am

Postby asmecher » Wed Jan 31, 2007 9:37 am

Hi Giuseppe,

If you'd like to assign values to template variables, it'll require a little bit of PHP. There are many examples in the OJS code, such as the submission confirmation email (classes/author/form/submit/AuthorSubmitStep5Form.inc.php). The assignParams function is the one you're looking for.

Regards,
Alec Smecher
Open Journal Systems Team
---
Don't miss the First International PKP Scholarly Publishing Conference
July 11 - 13, 2007, Vancouver, BC, Canada
http://ocs.sfu.ca/pkp2007/
asmecher
 
Posts: 10015
Joined: Wed Aug 10, 2005 12:56 pm

Re: Using new email templates

Postby parisa » Sat Jul 12, 2014 9:57 pm

Hi
The same question for me: How can I edit the sender and recipient of an email? Or when I create a new email how can I assign sender and recipient to it?
I really appreciate your answer! I couldn't understand the previous answer you provided.
Thanks,
Parisa
parisa
 
Posts: 2
Joined: Sat Jul 12, 2014 12:38 pm

Re: Using new email templates

Postby asmecher » Mon Jul 14, 2014 10:02 am

Hi Parisa,

Which email do you want to alter?

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


Return to OJS Technical Support

Who is online

Users browsing this forum: Google [Bot] and 1 guest