I am using OJS-2.4.7.1 and I’m wondering if you know of an easy way to email the actual table of contents. I’ve been inserting a screenshot, but that’s not as professional looking as the emails I see from other journals—the actual table of contents inserted with links to the
articles.
Thanks,
Edward
The system’s way of doing this is as an Editor:
User Home → Editor → Notify Users
There is a checkbox to include a TOC.
Hi @ctgraham ,
What about people that are not users?
Thanks,
Edward
The best way to handle that would be for these folks to subscribe to notifications. They could then be included in regular notifications via the “Include all emails on the mailing list” option.
Alternately, you could include yourself via “Send a copy of this message to my address” and then forward that email to the non-OJS emails as needed.
Finally, you could make a local modification to the interface to allow just sending this to an arbitrary email address. This would obviously be the most work.
It does not include links to the articles. Is there anything else?
The format is not as well designed as the user would like.
Can this be modified and or worked on if so what file(s) would I need to look at.
Thanks,
Edward
To find the code, consider the URL “…/editor/notifyUsers”. This sends us to “pages/editor/index.php” for the notifyUsers handler:
case 'issueToc':
case 'updateIssueToc':
case 'setCurrentIssue':
case 'moveIssue':
case 'resetIssueOrder':
case 'moveSectionToc':
case 'resetSectionOrder':
case 'moveArticleToc':
case 'publishIssue':
case 'unpublishIssue':
case 'notifyUsers':
define('HANDLER_CLASS', 'IssueManagementHandler');
import('pages.editor.IssueManagementHandler');
break;
case 'index':
case 'submissions':
case 'setEditorFlags':
case 'deleteEditAssignment':
case 'assignEditor':
case 'deleteSubmission':
case 'instructions':
This sends us to “pages/editor/IssueManagementHandler.inc.php”, with the notifyUsers()
method:
if ($request->getUserVar('send') && !$email->hasErrors()) {
if($request->getUserVar('ccSelf')) {
$email->addRecipient($user->getEmail(), $user->getFullName());
}
switch ($request->getUserVar('whichUsers')) {
case 'allIndividualSubscribers':
$recipients =& $individualSubscriptionDao->getSubscribedUsers($journal->getId());
break;
case 'allInstitutionalSubscribers':
$recipients =& $institutionalSubscriptionDao->getSubscribedUsers($journal->getId());
break;
case 'allAuthors':
$recipients =& $authorDao->getAuthorsAlphabetizedByJournal($journal->getId(), null, null, true, true);
break;
case 'allUsers':
$recipients =& $roleDao->getUsersByJournalId($journal->getId());
break;
case 'allReaders':
$recipients =& $roleDao->getUsersByRoleId(
The “includeToc” conditional populates $publishedArticles in the template file:
unset($callback);
$templateMgr->assign('message', 'editor.notifyUsers.inProgress');
$templateMgr->display('common/progress.tpl');
echo '<script type="text/javascript">window.location = "' . $request->url(null, 'editor') . '";</script>';
} else {
if (!$request->getUserVar('continued')) {
$email->assignParams(array(
'editorialContactSignature' => $user->getContactSignature()
));
}
$issuesIterator =& $issueDao->getIssues($journal->getId());
$allUsersCount = $roleDao->getJournalUsersCount($journal->getId());
// FIXME: There should be a better way of doing this.
The template file at “templates/editor/notifyUsersEmail.tpl” is responsible for the output:
{$body}
{$journal->getLocalizedTitle()|strip_tags}
{$issue->getIssueIdentification()|strip_tags}
{translate key="issue.toc"}
{url page="issue" op="view" path=$issue->getBestIssueId()}
{foreach name=sections from=$publishedArticles item=section key=sectionId}
{if $section.title}{$section.title}{/if}
--------
{foreach from=$section.articles item=article}
{$article->getLocalizedTitle()|strip_tags}{if $article->getPages()} ({$article->getPages()}){/if}
{if (!$section.hideAuthor && $article->getHideAuthor() == $smarty.const.AUTHOR_TOC_DEFAULT) || $article->getHideAuthor() == $smarty.const.AUTHOR_TOC_SHOW}
{foreach from=$article->getAuthors() item=author name=authorList}
{$author->getFullName()}{if !$smarty.foreach.authorList.last},{/if}
{/foreach}
{/if}
This file has been truncated. show original