Пожалуй, последняя информация (либо - одна из последних) на этот счет.
Modify text in new post email notifications
I think the code that generates the email is contain in the file ../components/kunena/lib/kunena.posting.class.php. I could be wrong.
The code that seems to generate emails for subscribers seems to be located at around lines 924-1019 (the reference may be different in your version of Kunena), namely:
public function emailToSubscribers($LastPostUrl = false, $mailsubs = false, $mailmods = false, $mailadmins = false) {
if ($LastPostUrl === false) {
jimport ( 'joomla.environment.uri' );
$uri = JURI::getInstance ( JURI::base () );
$LastPostUrl = $uri->toString ( array ('scheme', 'host', 'port' ) ) . CKunenaLink::GetMessageURL($this->get ( 'id' ), $this->get ( 'catid' ), 0, false);
}
$once = false;
if ($mailsubs) {
if (!$this->get ( 'parent' )) {
// New topic: Send email only to category subscribers
$mailsubs = $this->_config->category_subscriptions != 'disabled' ? 3 : 0;
$once = $this->_config->category_subscriptions == 'topic';
} elseif ($this->_config->category_subscriptions != 'post') {
// Existing topic: Send email only to topic subscribers
$mailsubs = $this->_config->topic_subscriptions != 'disabled' ? 2 : 0;
$once = $this->_config->topic_subscriptions == 'first';
} else {
// Existing topic: Send email to both category and topic subscribers
$mailsubs = $this->_config->topic_subscriptions == 'disabled' ? 3 : 1;
// FIXME: category subcription can override topic
$once = $this->_config->topic_subscriptions == 'first';
}
}
// Fetch all subscribers, moderators and admins who will get the email
$emailToList = CKunenaTools::getEMailToList ( $this->get ( 'catid' ), $this->get ( 'thread' ), $mailsubs, $mailmods, $mailadmins, $this->_my->id );
if (count ( $emailToList )) {
jimport('joomla.mail.helper');
kimport('html.parser');
if (! $this->_config->email ) {
KunenaError::warning ( JText::_ ( 'COM_KUNENA_EMAIL_DISABLED' ) );
return false;
} else if ( ! JMailHelper::isEmailAddress ( $this->_config->email ) ) {
KunenaError::warning ( JText::_ ( 'COM_KUNENA_EMAIL_INVALID' ) );
return false;
}
// clean up the message for review
$authorname = $this->get ( 'name' );
$message = KunenaParser::stripBBCode ( $this->get ( 'message' ) );
$subject = $this->get ( 'subject' );
$topicsubject = $this->parent->subject ? $this->parent->subject : $subject;
$mailsender = JMailHelper::cleanAddress ( $this->_config->board_title . " " . JText::_ ( 'COM_KUNENA_GEN_FORUM' ) );
$mailsubject = JMailHelper::cleanSubject ( "[" . $this->_config->board_title . " " . JText::_ ( 'COM_KUNENA_GEN_FORUM' ) . "] " . $topicsubject . " (" . $this->parent->catname . ")" );
$sentusers = array();
foreach ( $emailToList as $emailTo ) {
if (! $emailTo->email || ! JMailHelper::isEmailAddress ( $emailTo->email )) {
continue;
}
if ($emailTo->subscription) {
$msg1 = $this->get ( 'parent' ) ? JText::_ ( 'COM_KUNENA_POST_EMAIL_NOTIFICATION1' ) : JText::_ ( 'COM_KUNENA_POST_EMAIL_NOTIFICATION1_CAT' );
$msg2 = $this->get ( 'parent' ) ? JText::_ ( 'COM_KUNENA_POST_EMAIL_NOTIFICATION2' ) : JText::_ ( 'COM_KUNENA_POST_EMAIL_NOTIFICATION2_CAT' );
} else {
$msg1 = JText::_ ( 'COM_KUNENA_POST_EMAIL_MOD1' );
$msg2 = JText::_ ( 'COM_KUNENA_POST_EMAIL_MOD2' );
}
$msg = "$emailTo->name,\n\n";
$msg .= $msg1 . " " . $this->_config->board_title . "\n\n";
// DO NOT REMOVE EXTRA SPACE, JMailHelper::cleanBody() removes "Subject:" from the message body
$msg .= JText::_ ( 'COM_KUNENA_MESSAGE_SUBJECT' ) . " : " . $subject . "\n";
$msg .= JText::_ ( 'COM_KUNENA_GEN_CATEGORY' ) . " : " . $this->parent->catname . "\n";
$msg .= JText::_ ( 'COM_KUNENA_VIEW_POSTED' ) . " : " . $authorname . "\n\n";
$msg .= "URL : $LastPostUrl\n\n";
if ($this->_config->mailfull == 1) {
$msg .= JText::_ ( 'COM_KUNENA_GEN_MESSAGE' ) . " :\n-----\n";
$msg .= $message;
$msg .= "\n-----\n\n";
}
$msg .= $msg2 . "\n";
if ($emailTo->subscription && $once) {
if ($this->get ( 'parent' )) {
$msg .= JText::_ ( 'COM_KUNENA_POST_EMAIL_NOTIFICATION_MORE_READ' ) . "\n";
} else {
$msg .= JText::_ ( 'COM_KUNENA_POST_EMAIL_NOTIFICATION_MORE_SUBSCRIBE' ) . "\n";
}
}
$msg .= "\n";
$msg .= JText::_ ( 'COM_KUNENA_POST_EMAIL_NOTIFICATION3' ) . "\n";
$msg = JMailHelper::cleanBody ( $msg );
JUtility::sendMail ( $this->_config->email, $mailsender, $emailTo->email, $mailsubject, $msg );
$sentusers[] = $emailTo->id;
}
if ($once && $sentusers) {
$sentusers = implode (',', $sentusers);
$db = JFactory::getDBO();
$query = "UPDATE #__kunena_subscriptions
SET future1=1 WHERE thread={$this->get ( 'thread' )} AND userid IN ({$sentusers})";
$db->setQuery ($query);
$db->query ();
KunenaError::checkDatabaseError();
}
}
}
From this we can see that some of the information is obtained by using PHP variables contained in the language files (for example, COM_KUNENA_GEN_MESSAGE). See Where is the language file? for further information.
Therefore, the solution is to change the source code (that I have shown you above) and to replace the file ../components/kunena/lib/kunena.posting.class.php with your changes together with any changes that you need to make to the language file(s). I've only shown you the general principles; if you do not feel "qualified" to make these changes on your own, I'm sure that (for a modest fee) someone can make them for you ... with the caveats that the changes may need to be reapplied in a selective manner when you upgrade. I hope this information helps.
Если для вас пока еще сложно копаться в этих премудростях, попробуйте следующее немудреное решение - удалите компонент (т.е. форум kunena) средствами joomla и установите его заново. Вся база, разумеется, останется на месте. Я не знаю, почему форум у вас рассылает такие письма, но вполне возможно, что таким образом вы все автоматом поправите. Во всяком случае - хуже не будет.