by 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 = ', ') {
import('lib.pkp.classes.mail.Mail');
$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.
cheers!
theo