OJS OCS OMP OHS

You are viewing the PKP Support Forum | PKP Home Wiki



Variables in "Prepared Emails" templates

OJS development discussion, enhancement requests, third-party patches and plug-ins.

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

Forum rules
Developer Resources:

Documentation: The OJS Technical Reference and the OJS API Reference are both available from the OJS Documentation page.

Git: You can access our public Git Repository here. Comprehensive Git usage instructions are available on the wiki.

Bugzilla: You can access our Bugzilla report tracker here.

Search: You can use our Google Custom Search to search across our main website, the support forum, and Bugzilla.

Questions and discussion are welcome, but if you have a workflow or usability question you should probably post to the OJS Editorial Support and Discussion subforum; if you have a technical support question, try the OJS Technical Support subforum.

Variables in "Prepared Emails" templates

Postby rmichael » Wed Jul 09, 2008 6:57 am

Hello,

One feature/improvement I'd like to suggest is the availability/handling of variables in email templates.

For example, we prefer to have our salutation using the family name only (no prename), so I use {$authorLastName} after modifying the assignParams array via:

Code: Select all
'authorLastName' => $user->getLastName()


However, this means I must modify OJS everywhere the $mail setup occurs. It would be nice if the entire user profile was available consistently in every template. Then, I'd simply write my templates without wondering which user data was available to me.

Perhaps this can be done in the mail constructor (a second constructor with additional arguments)?

(I can add this to my own "things I never seem to have time for with OJS" todo list, such as my plugins and other modifications. :-))

Thanks.
rmichael
 
Posts: 113
Joined: Fri Mar 30, 2007 3:32 pm

Re: Variables in "Prepared Emails" templates

Postby jmacgreg » Thu Jul 10, 2008 12:05 pm

Hi Richard,

I like the sound of this, too -- and to extend the idea a bit, it would be nice to see a list of variables to pick and choose from when editing Prepared Email templates.

I'm not sure how quickly the developers would be able to get to it, but you are welcome to post this as a feature request to Bugzilla. Alternatively, if you do develop code for this we would be very happy to take a look.

Cheers,
James
jmacgreg
 
Posts: 4181
Joined: Tue Feb 14, 2006 10:50 am


Return to OJS Development

Who is online

Users browsing this forum: No registered users and 1 guest