- chrisguitarguy / email-reminder.php
- Saved searches
- Use saved searches to filter your results more quickly
- License
- joeldalley/PHP-Email-Reminder
- Name already in use
- Sign In Required
- Launching GitHub Desktop
- Launching GitHub Desktop
- Launching Xcode
- Launching Visual Studio Code
- Latest commit
- Git stats
- Files
- README.md
- About
- Saved searches
- Use saved searches to filter your results more quickly
- mantisbt-plugins/Reminder
- Name already in use
- Sign In Required
- Launching GitHub Desktop
- Launching GitHub Desktop
- Launching Xcode
- Launching Visual Studio Code
- Latest commit
- Git stats
- Files
- README.md
- About
- Пишем свой стартап на PHP: подготовка к напоминаниям
- Как будут работать напоминания
- Разрешаем людям настраивать напоминания
- Таблица напоминаний
chrisguitarguy / email-reminder.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
/* |
Plugin Name: Reminder Emails |
Plugin URI: http://www.christopherguitar.net/ |
Description: Sends a reminder email if you haven’t posted in seven days. |
Version: n/a |
Author: Christopher Davis |
Author URI: http://www.christopherguitar.net |
License: GPL2, Creative Commons |
*/ |
register_activation_hook( __FILE__, ‘wpse29671_activation’ ); |
function wpse29671_activation () |
wp_schedule_event( time(), ‘daily’ , ‘wpse29671_cron’ ); |
> |
add_action( ‘wpse29671_cron’ , ‘wpse29671_maybe_send_email’ ); |
function wpse29671_maybe_send_email () |
// get the latest post |
$ posts = get_posts( array ( ‘numberposts’ => 1 ) ); |
if ( ! $ posts ) return ; |
// Latest posts date as a unix timestamp |
$ latest = strtotime( $ posts [ 0 ]-> post_date ); |
// how long has it been? |
$ diff = ( time() — $ latest ) / ( 60 * 60 * 24 ); |
// if it has been more than 7 days, send the email |
if ( $ diff >= 7 ) |
wp_mail( ‘youremail@yoursite.com’ , ‘Better Write a Post!’ , ‘Hey, you should go write a blog post or something’ ); |
> |
> |
register_deactivation_hook( __FILE__, ‘wpse29671_deactivation’ ); |
function wpse29671_deactivation () |
wp_clear_scheduled_hook( ‘wpse29671_cron’ ); |
> |
Saved searches
Use saved searches to filter your results more quickly
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session.
Very simple PHP email collector / reminder system.
License
joeldalley/PHP-Email-Reminder
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Sign In Required
Please sign in to use Codespaces.
Launching GitHub Desktop
If nothing happens, download GitHub Desktop and try again.
Launching GitHub Desktop
If nothing happens, download GitHub Desktop and try again.
Launching Xcode
If nothing happens, download Xcode and try again.
Launching Visual Studio Code
Your codespace will open once ready.
There was a problem preparing your codespace, please try again.
Latest commit
Git stats
Files
Failed to load latest commit information.
README.md
A very simple PHP email address collector / reminder system.
This is not meant to be a professionally written program, but is for educational purposes only.
PHP-Email-Reminder is copyright © 2014 Joel Dalley.
PHP-Email-Reminder is distributed under the same license as Perl.
For more details, see the full text of the license in the file LICENSE.
About
Very simple PHP email collector / reminder system.
Saved searches
Use saved searches to filter your results more quickly
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session.
This plugin can be used to send periodic email reminders to bug reporters, managers, and assignees.
mantisbt-plugins/Reminder
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Sign In Required
Please sign in to use Codespaces.
Launching GitHub Desktop
If nothing happens, download GitHub Desktop and try again.
Launching GitHub Desktop
If nothing happens, download GitHub Desktop and try again.
Launching Xcode
If nothing happens, download Xcode and try again.
Launching Visual Studio Code
Your codespace will open once ready.
There was a problem preparing your codespace, please try again.
Latest commit
Added thanks for the Czech trannsaltion
Git stats
Files
Failed to load latest commit information.
README.md
This plugin can be used to send periodic email reminders to bug reporters, managers, and assignees.
The files in the plugins/Reminder/scripts directory should be run directly, from the command line.
- bug_feedback_mail.php sends emails to reporters listing all bugs awaiting their feedback.
- bug_reminder_mail.php sends emails to assignees when bugs are approaching their due date.
- assigned_bugs.php sends emails to assignees listing all open bugs that are assigned to them.
The plugin requires MantisBT version 1.3.0 or higher.
Make sure to have this statement in confg_inc.php:
$g_path = 'http://path-to-your-mantis-installation/';
Like any other plugin. After copying to your webserver :
- Start mantis as administrator
- Select manage
- Select manage Plugins
- Select Install behind Reminder
- Once installed, click on the plugin’s name for further configuration.
No Mantis scripts or tables are being altered.
// What is the body of the E-mail reminder_mail_subject = "Following issue will be Due shortly"; // What is the subject of the grouped E-mail reminder_group_subject = "You have issues approaching their Due Date"; // What is the start of the body of the grouped E-mail reminder_groupbody1 = "Please review the following issues"; // What is the end of the body of the grouped E-mail reminder_groupbody2 = "Please do not reply to this message"; // perform for which project reminder_project_id = 0; means ALL // how many days before Due date should we take into account reminder_days_treshold = 2; // Should we use hours instead of days reminder_hours = OFF; // Should we store this reminder as bugnote reminder_store_as_note = OFF; // only possible for handler // For which status to send reminders reminder_bug_status = ASSIGNED // Ignore reminders for issues with no Due date set reminder_ignore_unset = ON // Ignore reminders for issues with Due dates in the past reminder_ign_past = ON // only valid for the mail function, downloads will always have duedates that have gone by // Create overview per handler reminder_handler = ON // Group issues by Handler reminder_group_issues = ON // Group issues by project/handler reminder_group_project = OFF // Create overview per manager/project reminder_manager_overview = ON // // access level for manager= 70 // this needs to be made flexible // we will only produce overview for those projects that have a separate manager // // Select project to receive Feedback mail reminder_feedback_project = 0; means ALL // For which status to send feedbackreminders reminder_bug_status = FEEDBACK
Automatically generating mail
Once configuration is complete, bug_reminder_mail.php script can be used as described below, depending on your operating system.
*/1440 * * * * lynx --dump http://mantis.homepage.com/plugins/Reminder/scripts/bug_reminder_mail.php
or via PHP command line interface
*/1440 * * * * /usr/local/bin/php /path/to/mantis/plugins/Reminder/scripts/bug_reminder_mail.php
This would send out a reminder every day.
You can use a scheduled task under Windows by calling a batch-file like:
REM *** this batch is running as a scheduled task under the . Account *** g: cd \inetpub\wwwroot\mantis php.exe plugins/Reminder/scripts/bug_reminder_mail.php
Reminders for feedback status
One can also schedule a job to prompt reporters to respond because their issue has status Feedback. In that case use the same methods as described above, but replace bug_reminder_mail.php with bug_feedback_mail.php .
On top of that, I have created a little variant which will create a spreadsheet with issues getting due. Call script like:
http://www.YourMantisHome.com/plugins/Reminder/scripts/bug_due_overview2.php?days=2&status=50
If you do not apply parameters, the script will default to the above.
In the script directory you will also find a script called bug_reminder_mail_test.php , which you should call from within the browser (once logged on) to provide useful feedback if things are not working as expected. In case of a blank screen, all is processed normally.
For option Days/Hours, the script will fetch the plugin definition.
Log new issues against the [Plugin — Reminder] project on mantisbt.org’s tracker.
Source code is available on Github.
About
This plugin can be used to send periodic email reminders to bug reporters, managers, and assignees.
Пишем свой стартап на PHP: подготовка к напоминаниям
Jeff Reifman Last updated Nov 10, 2016
Этот учебник является частью серии статей Пишем свой стартап на PHP на Envato Tuts +. В этой серии я направляю вас через запуск приложения от концепции до готового продукта, используя приложение Планировщик встреч в качестве реального приложения. На каждом шаге я делаю релиз кода планировщика собраний в качестве примеров с открытым исходным кодом, из которых вы можете узнать что-то новое. Я также рассмотрю связанные с запуском бизнес-вопросы по мере их возникновения.
В этой серии из двух частей я опишу, как мы построили инфраструктуру для напоминаний и их доставки. Этот эпизод будет посвящен инфраструктуре и пользовательскому опыту по настройке напоминаний.
Если вы еще не опробовали Планировщик собраний, то обязательно запланируйте свою первую встречу. Я участвую в комментариях ниже, так что дайте мне знать, что вы думаете об этом уроке! Меня особенно интересуют, если вы хотите новые функции или предлагаете темы для будущих учебников.
Напомним, что весь код Планировщика собраний написан на Yii2 Framework для PHP. Если вы хотите узнать больше о Yii2, ознакомьтесь с нашей параллельной серией Программирование с Yii2.
Как будут работать напоминания
Сначала я создал несколько простых напоминаний в таблице UserSetting. Однако я понял, что пользователи захотят гораздо большей гибкости и контроля над тем, когда и как будут отправляться их напоминания.
Люди должны иметь возможность устанавливать напоминания за 30 минут до, за 3 часа до и за 48 часов до или только за 1 час до собрания. Этого должно хватить. Они также должны иметь возможность выбирать, хотят ли они получать напоминания по электронной почте, SMS или и по тому и другому. Планировщик встреч пока не поддерживает SMS, но скоро под это будет отдельный учебник.
Вот пример гибкости, которую предлагает Apple Calendar:
Разрешаем людям настраивать напоминания
Давайте создадим инфраструктуру для поддержки любого количества пользовательских настраиваемых напоминаний о встречах.
Таблица напоминаний
Во-первых, я создал таблицу напоминаний для поддержки одного или нескольких запросов напоминаний для всех своих встреч. Как это обычно происходит в Yii2, я создал таблицу с помощью миграции.
Вот консольная команда Yii для создания миграции базы данных:
./yii migrate/create create_reminder_table
Затем я изменил этот файл свойствами, которые мне нужны:
class m160503_234630_create_reminder_table extends Migration