I have finally sat down, and after a few months, have managed to construct a plugin to send an HTML table of contents by email to all registered users, not a notification.
So far, it is still basic: i need to do some settings, and a preview pane. It uses the ISSUE::published Hook, so the user needs to do nothing special except publish the issue.
It also obeys the ‘send notification’ checkbox, so if this is unchecked, no email is sent. If checked, it will send the eTOC rather than the notification.
It uses a Smarty template, so it would be customizable.
I wish i knew how to nest the smarty templates, using include file=… However, I cannot figure out the proper nomenclature to use
I will try to add a preview button to the Publish Issue modal, which would open a second window, not initialized by OJS, as would appear in an email window.
I will need to learn how to add an action however…
I will try to add a preview button to the Publish Issue modal, which would open a second window, not initialized by OJS, as would appear in an email window.
I will need to learn how to add an action however…
Take a look at the Navigation Menu Item form. It has a preview button for custom pages.
A couple other things you might want to consider:
Users can opt out of receiving email notifications for new issues in their profile. But your code will send to all users regardless of their settings. Check out NotificationSubscriptionSettingsDAO and NotificationSettingsForm for a way to check a user’s setting for NOTIFICATION_TYPE_PUBLISHED_ISSUE before sending the email out.
You might want to record that an email has been sent for an issue in the issue settings table. It is possible to publish an issue, unpublish it, and republish it. A user error, of course, but in such cases you may want to avoid sending the email twice. Just something to consider.
It is a pleasure to give something back to the community: I had seen a number of ppl were asking for this feature. Once it is polished, is there somewhere I can submit it for general use, for people to actually find it?
Mostly just here. The Plugin Gallery in OJS is run off an XML file that we edit with new entries. When you feel like you’re ready for that, let us know and we can guide you through some steps to polish it off and get it ready for entry.
This looks great and solves the exact problem I’m facing! Is this plugin still the recommended means of achieving this result in OJS v3.3? I don’t find this plugin in the Plugin Gallery there and was wondering if this functionality has been incorporated into the main application somehow.
Thanks a lot for clarifying. I’ve currently just extracted the plugin directory into the plugins/generic directory of my OJS 3.3 installation, and it appears to be working okay.