После установки Forum notification mod в низу страницы каждого форума появляется ссылка «Следить за ответами в форуме» После того, как вы щелкните по ней, вы будите следить за ответами/новыми темами в этом форуме. Вы всегда сможете отписаться от такой рассылки нажатием на «Перестать следить за ответами в форуме» или же перейдя по ссылке в e-mail сообщении.
Пример уведомления:
Примерно такой же вид имеет уведомление об ответе в уже существующей теме.Здравствуйте, User!
demo создал(а) новую тему "Forum notification mod" в форуме "Вопросы администрирования и модерирования" на сайте xxxxxx.
Используйте следующую ссылку, чтобы посмотреть форум:
http://forum.xxxxx.ru/viewtopic.php?p=96396#96396
Текст сообщения:
-----------------------------------------------
Forum notification mod Test
-----------------------------------------------
Вы получили это email сообщетие. т.к. Вы следите за ответами в форуме "Вопросы администрирования и модерирования" на
сайте xxxxxx. Если вы больше не хотите следить за темой, то либо щёлкните по ссылке "Перестать следить за ответами в
форуме ", находящуюся внизу форума "Вопросы администрирования и модерирования", либо перейдите по следующей ссылке:
http://forum.xxxxx.ru/viewforum.php?f=4&unwatch=forum
--
Развлекательно-информационные форумы xxxxxx
http://Forum.xxxxx.ru
Technical support e-mail: forum@xxxxx.ru
Краткий обзор мода:
Код: Выделить всё
#################################################################
## Mod Title: Forum notification mod
## Mod Version: 1.4
## Date: 2004-02-22
## Author: David Herrmann < david.herrmann@gmx.net >
## Description: adds forum notification functionality to phpBB 2.0.6c,
## also adds some enhancements to the email bodies
##
## Installation Level: intermediate
## Installation Time: 20 Minutes
## Files To Edit:
## posting.php
## viewforum.php
## admin/admin_forums.php
## includes/constants.php
## includes/functions_post.php
## language/lang_english/lang_main.php
## language/lang_english/lang_admin.php
## language/lang_english/email/topic_notify.tpl
## templates/subSilver/viewforum_body.tpl
## templates/subSilver/admin/forum_edit_body.tpl
##
## language/lang_german/lang_main.php
## language/lang_german/lang_admin.php
## language/lang_german/email/topic_notify.tpl
##
## Files to Create:
## language/lang_english/email/newtopic_notify.tpl
## language/lang_english/email/forum_notify.tpl
##
## language/lang_german/email/newtopic_notify.tpl
## language/lang_german/email/forum_notify.tpl
##
## Included Files:
## posting.php
## viewforum.php
## admin/admin_forums.php
## includes/constants.php
## includes/functions_post.php
## language/lang_english/lang_main.php
## language/lang_english/lang_admin.php
## language/lang_english/email/topic_notify.tpl
## language/lang_english/email/newtopic_notify.tpl
## language/lang_english/email/forum_notify.tpl
## language/lang_german/lang_main.php
## language/lang_german/lang_admin.php
## language/lang_german/email/topic_notify.tpl
## language/lang_german/email/newtopic_notify.tpl
## language/lang_german/email/forum_notify.tpl
## templates/subSilver/viewforum_body.tpl
## templates/subSilver/admin/forum_edit_body.tpl
##
#################################################################
##
## Author Note:
##
## This mod adds a "watch this forum" link to the viewforum page, similar to the
## "watch this topic" link on viewtopic. Further on, this mod changes the structure
## of email bodies, now including the post text, the name of the poster etc. in the
## email text.
## There are different email texts for watched topic (reply), watched forum (newtopic) and
## watched forum (reply).
## The texts are available both in English and German.
##
## Security should be ok, you are not able to receive a notification email if the forum is private
## and you are not allowed to read!
##
## Do not forget to run the following commands on your sql database (replace phpbb2_ with your db prefix):
##
##CREATE TABLE phpbb2_forums_watch (
## forum_id smallint(5) unsigned NOT NULL default '0',
## user_id mediumint(8) NOT NULL default '0',
## notify_status tinyint(1) NOT NULL default '0',
## KEY forum_id (forum_id),
## KEY user_id (user_id),
## KEY notify_status (notify_status)
## )
##
##ALTER TABLE phpbb2_forums
## ADD forum_notify TINYINT(1) UNSIGNED DEFAULT '1' NOT NULL
## AFTER forum_last_post_id
##
## the description is for subsilver theme users, it should work with every theme
## if you are using the files from the package you only have to run the sql command
##
## this mod was tested on phpBB 2.0.6c
##
## Should be no problem for any user who knows what they are doing ;-)
##
#################################################################
##
## New in 1.4:
##
## Updated mod for phpBB 2.0.6c (should also do with 2.0.5, but untested)
##
#################################################################
##
## New in 1.2:
##
## Fixed the url bug in the email text. users of 1.1 can replace the user_notification
## function in the incldues/functions_post.php file with the new one and it should work.
##
#################################################################
##
## New in 1.1:
##
## Now there's a checkbox in the "edit forum" admin panel where you can turn the
## notification on or off for every forum. for example, a test forum won't need
## notification ever and any user doing it would only cause useless traffic.
##
#################################################################
##
## users of version 1.0 of this mod should just use the files in the package to
## overwrite the old ones and run the second sql command. there were slight changes
## in nearly every file!
## of course you can also run a diff to the 1.0 description and only update the changed areas ;-)
##
#################################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
#################################################################
Код: Выделить всё
#
#-----[ OPEN ]------------------------------------------
#
phpBB2/language/lang_english/lang_main.php
#
#-----[ FIND ]------------------------------------------
#
$lang['You_are_watching'] = 'You are now watching this topic';
#
#-----[ AFTER, ADD ]------------------------------------------
#
$lang['Stop_watching_forum'] = 'Stop watching this forum';
$lang['Start_watching_forum'] = 'Watch this forum for posts';
$lang['No_longer_watching_forum'] = 'You are no longer watching this forum.';
$lang['You_are_watching_forum'] = 'You are now watching this forum.';
#
#-----[ OPEN ]------------------------------------------
#
phpBB2/language/lang_english/lang_admin.php
#
#-----[ FIND ]------------------------------------------
#
$lang['Forum_status'] = 'Forum status';
#
#-----[ AFTER, ADD ]------------------------------------------
#
$lang['Forum_notify'] = 'Allow forum notification';
$lang['Forum_notify_enabled'] = 'Allow';
$lang['Forum_notify_disabled'] = 'Do not allow';
#
#-----[ OPEN ]------------------------------------------
#
language/lang_english/email/topic_notify.tpl
#
#-----[ REPLACE WITH ]------------------------------------------
#
Subject: Topic Reply Notification for "{TOPIC_TITLE}" in forum "{FORUM_NAME}"
Charset: iso-8859-1
Hello {USERNAME}!
{POSTERNAME} has posted a new reply to "{TOPIC_TITLE}" in the "{FORUM_NAME}" forum at {SITENAME}. You can use the following link to view the replies made:
{U_TOPIC}
-----------------------------------------------
Posted text:
{POST_TEXT}
-----------------------------------------------
You are receiving this email because you are watching the topic, "{TOPIC_TITLE}" at {SITENAME}. If you no longer wish to watch this topic you can either click the "Stop watching this topic link" found at the bottom of the topic above, or by clicking the following link:
{U_STOP_WATCHING_TOPIC}
{EMAIL_SIG}
#
#-----[ CREATE ]------------------------------------------
#
phpBB2/language/lang_english/email/newtopic_notify.tpl
#
#-----[ AFTER, ADD ]------------------------------------------
#
Subject: New Topic Notification for forum "{FORUM_NAME}" - {TOPIC_TITLE}
Charset: iso-8859-1
Hello {USERNAME}!
{POSTERNAME} has posted a new topic called "{TOPIC_TITLE}" in the "{FORUM_NAME}" forum at {SITENAME}. You can use the following link to view the topic:
{U_TOPIC}
-----------------------------------------------
Posted text:
{POST_TEXT}
-----------------------------------------------
You are receiving this email because you are watching the forum, "{FORUM_NAME}" at {SITENAME}. If you no longer wish to watch this forum you can either click the "Stop watching this forum link" found at the bottom of the "{FORUM_NAME}" forum, or by clicking the following link:
{U_STOP_WATCHING_FORUM}
{EMAIL_SIG}
#
#-----[ CREATE ]------------------------------------------
#
phpBB2/language/lang_english/email/forum_notify.tpl
#
#-----[ AFTER, ADD ]------------------------------------------
#
Subject: Topic Reply Notification for forum "{FORUM_NAME}" - {TOPIC_TITLE}
Charset: iso-8859-1
Hello {USERNAME}!
{POSTERNAME} has posted a new reply to "{TOPIC_TITLE}" in the "{FORUM_NAME}" forum at {SITENAME}. You can use the following link to view the replies made:
{U_TOPIC}
-----------------------------------------------
Posted text:
{POST_TEXT}
-----------------------------------------------
You are receiving this email because you are watching the forum, "{FORUM_NAME}" at {SITENAME}. If you no longer wish to watch this forum you can either click the "Stop watching this forum link" found at the bottom of the "{FORUM_NAME}" forum, or by clicking the following link:
{U_STOP_WATCHING_FORUM}
{EMAIL_SIG}
#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM
language/lang_russian
Код: Выделить всё
language/lang_russian
#
#-----[ OPEN ]------------------------------------------
#
phpBB2/language/lang_russian/lang_main.php
#
#-----[ FIND ]------------------------------------------
#
$lang['You_are_watching'] = 'Теперь вы следите за ответами в этой теме';
#
#-----[ AFTER, ADD ]------------------------------------------
#
$lang['Stop_watching_forum'] = 'Перестать следить за ответами в форуме';
$lang['Start_watching_forum'] = 'Следить за ответами в форуме';
$lang['No_longer_watching_forum'] = 'Вы больше не следите за ответами в этом форуме';
$lang['You_are_watching_forum'] = 'Теперь вы следите за ответами в этом форуме';
#
#-----[ OPEN ]------------------------------------------
#
phpBB2/language/lang_russian/lang_admin.php
#
#-----[ FIND ]------------------------------------------
#
$lang['Forum_status'] = 'Статус форума';
#
#-----[ AFTER, ADD ]------------------------------------------
#
$lang['Forum_notify'] = 'Разрешить пользователям следить за ответами в форуме';
$lang['Forum_notify_enabled'] = 'Разрешить';
$lang['Forum_notify_disabled'] = 'Запретить';
#
#-----[ OPEN ]------------------------------------------
#
language/lang_russian/email/topic_notify.tpl
#
#-----[ REPLACE WITH ]------------------------------------------
#
Subject: Уведомление об ответе в теме - {TOPIC_TITLE}
Charset: windows-1251
Здравствуйте, {USERNAME}!
{POSTERNAME} оставил(а) новое сообщение в теме "{TOPIC_TITLE}" в форуме "{FORUM_NAME}" на сайте {SITENAME}. Используйте следующую ссылку, чтобы посмотреть изменения:
{U_TOPIC}
Текст сообщения:
-----------------------------------------------
{POST_TEXT}
-----------------------------------------------
Вы получили это сообщение потому, что следите за темой "{TOPIC_TITLE}" на сайте {SITENAME}. В этой теме со времени вашего последнего посещения появилось новое сообщение. Вы можете перейти по ссылке, чтобы прочитать поступившие ответы; новые уведомления не будут приходить, пока вы не просмотрите тему:
{U_TOPIC}
Если вы больше не хотите следить за темой, то либо щёлкните по ссылке "перестать следить за темой" внизу страницы, либо перейдите по следующей ссылке:
{U_STOP_WATCHING_TOPIC}
{EMAIL_SIG}
#
#-----[ CREATE ]------------------------------------------
#
phpBB2/language/lang_russian/email/newtopic_notify.tpl
#
#-----[ AFTER, ADD ]------------------------------------------
#
Subject: Новое сообщение в форуме "{FORUM_NAME}" - {TOPIC_TITLE}
Charset: windows-1251
Здравствуйте, {USERNAME}!
{POSTERNAME} создал(а) новую тему "{TOPIC_TITLE}" в форуме "{FORUM_NAME}" на сайте {SITENAME}. Используйте следующую ссылку, чтобы посмотреть форум:
{U_TOPIC}
Текст сообщения:
-----------------------------------------------
{POST_TEXT}
-----------------------------------------------
Вы получили это email сообщетие. т.к. Вы следите за ответами в форуме "{FORUM_NAME}" на сайте {SITENAME}. Если вы больше не хотите следить за темой, то либо щёлкните по ссылке "Перестать следить за ответами в форуме ", находящуюся внизу форума "{FORUM_NAME}", либо перейдите по следующей ссылке:
{U_STOP_WATCHING_FORUM}
{EMAIL_SIG}
#
#-----[ CREATE ]------------------------------------------
#
phpBB2/language/lang_russian/email/forum_notify.tpl
#
#-----[ AFTER, ADD ]------------------------------------------
#
Subject: Уведомление об ответе на форуме "{FORUM_NAME}" - {TOPIC_TITLE}
Charset: windows-1251
Здравствуйте, {USERNAME}!
{POSTERNAME} оставил(а) новое сообщение в теме "{TOPIC_TITLE}" в форуме "{FORUM_NAME}" на сайте {SITENAME}. Используйте следующую ссылку, чтобы посмотреть форум:
{U_TOPIC}
Текст сообщения:
-----------------------------------------------
{POST_TEXT}
-----------------------------------------------
Вы получили это email сообщетие. т.к. Вы следите за ответами в форуме "{FORUM_NAME}" на сайте {SITENAME}. Если Вы больше не хотите следить за ответами на этом форуме, Вы можете отказаться от получения подобных уведомлений, нажав на ссылку "Перестать следить за ответами в форуме ", находящуюся внизу форума "{FORUM_NAME}", или нажав следующую ссылку:
{U_STOP_WATCHING_FORUM}
{EMAIL_SIG}
#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM
<<<<<<<<<<<<<<================>>>>>>>>>>>>>>>
Мод достаточно просто устанавливается. Единственное затруднение может вызвать это:
Код: Выделить всё
CREATE TABLE phpbb2_forums_watch (
forum_id smallint(5) unsigned NOT NULL default '0',
user_id mediumint(8) NOT NULL default '0',
notify_status tinyint(1) NOT NULL default '0',
KEY forum_id (forum_id),
KEY user_id (user_id),
KEY notify_status (notify_status)
)
ALTER TABLE phpbb2_forums
ADD forum_notify TINYINT(1) UNSIGNED DEFAULT '1' NOT NULL
AFTER forum_last_post_id
Ну для того чтобы у вас с этим не было проблем, воспользуйтесь phpMyAdmin или другой программой для работы с базами данных MySQL в которой и нужно будет сделать соответствующие запросы к bd.
Да, если вы сначала модифицируете файлы, и только потом будите делать обновлять базу данных, то при попытке ответить в теме или открытии форумов последует ошибка. Поэтому предварительно выполните запросы к базе данных и только потом загружайте модифицированные файлы.
Удачи

Скачать этот мод:
Download MOD
Добавлено спустя 3 часа 31 минуту 47 секунд:
Есть маленький нюанс

В инструкции по установке найти:
Код: Выделить всё
// start of reply forum notification
$sql = "SELECT u.user_id, u.user_email, u.user_lang, f.forum_name
FROM " . USERS_TABLE . " u, " . FORUMS_WATCH_TABLE . " fw, " . FORUMS_TABLE . " f
WHERE fw.forum_id = $forum_id
Код: Выделить всё
$sql = "SELECT u.user_id, u.user_email, u.user_lang, f.forum_name
Код: Выделить всё
$sql = "SELECT u.user_id, u.user_email, u.user_lang, u.username, f.forum_name
