You are viewing the PKP Support Forum | PKP Home Wiki

authors param for email?

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.

authors param for email?

Postby theodore » Tue Aug 07, 2012 4:05 pm

I want to make custom email to be sent by completing submission article, that shows to the editor the article name along with all the authors names and emails of the article.
the $authorName param presents the author who submitted the article, even if he hasn't included himself as author of the article.

What is the correct param to appear all the authors nams and emails of an article?
Posts: 37
Joined: Wed May 16, 2012 8:52 am

Re: authors param for email?

Postby theodore » Wed Aug 08, 2012 3:27 pm

I finally made it.

For al the authors to appear, there is already param as $authorString, which returns a string with all the authors names for the article submitted.
For the authors' mails, I needed to create new function in the "submission.inc.php" as follows:

* Return a STRING of ALL authors email addresses.
* @return string
* @by Kaligator87
function getAuthorEmailString($lastOnly = false, $separator = ', ') {
$strM = '';
foreach ($this->authors as $a) {
if (!empty($strM)) {
$strM .= $separator;
$strM .= $lastOnly ? $a->getLastName() : $a->getEmail();
return $strM;

then, in the "ArticleMailTemplate.inc.php", I just add the following line assignParams function:
$paramArray['authorEmailString'] = strip_tags($article->getAuthorEmailString());

Now, I have created new param as $AuthorEmailString which returns a string with the authors' mails in custom or edited prepared mail.

I hope I did not forget anything to my explanation.

Posts: 37
Joined: Wed May 16, 2012 8:52 am

Return to OJS Development

Who is online

Users browsing this forum: No registered users and 3 guests