This plugin enables a newsletter subscription feature for Open Monograph Press (OMP) 3.4 and Open Journal Systems (OJS) 3.4 by registering subscribers as "Readers" within the system.
- Seamless Subscription: Provides a dedicated endpoint (
/newsletter/subscribe) for handling subscription requests. - Automatic User Creation: Automatically creates a system account for new subscribers and assigns them the "Reader" role.
- Email Validation: Leverages the core PKP email validation workflow to ensure that subscribers verify their email addresses before being fully activated.
- AJAX Ready: Returns JSON responses, making it easy to integrate with custom front-end subscription forms or popups.
- Security: Includes validation for email formats and mandatory name fields, and uses random secure passwords for newly created accounts.
- Multi-Journal/Press Support: Handles subscriptions on a per-context basis.
- Download the plugin files.
- Upload the
newsletterfolder to your installation'splugins/generic/directory. - Log in as a Site Administrator.
- Go to Settings > Website > Plugins.
- Locate the Newsletter Subscription plugin and enable it.
Once enabled, you can send POST requests to the following URL:
your-site.com/index.php/press_path/newsletter/subscribe
email: The subscriber's email address.firstname: The subscriber's first name.lastname: The subscriber's last name.
$.post('/index.php/jlsr/newsletter/subscribe', {
email: 'user@example.com',
firstname: 'John',
lastname: 'Doe'
}, function(response) {
if (response.status === 'success') {
alert(response.message);
} else {
alert('Error: ' + response.message);
}
});- Request Receipt: The plugin intercepts requests to the
newsletter/subscribepath. - User Check: It checks if a user with that email already exists in the system.
- Account Creation: If the user is new, it creates a profile, assigns the "Reader" role, and generates a random password.
- Verification: If email validation is required in site settings, it sends an activation link to the user.
- Role Assignment: If the user exists but isn't a Reader in the current context, it adds the role for them.
- OMP 3.4.x or OJS 3.4.x
- PHP 8.0 or higher.
This plugin is distributed under the GNU General Public License v3.
Developed by OJSpro