Seite 1 von 2

Posttext In der Mail

Verfasst: 26.10.2004 12:21
von Angela Goldig
ich habe gestern einen mod eingebaut, wo der text des posts in der mail mit drin ist.

das sieht in der includes/functions_post.php so

Code: Alles auswählen

      'POSTER_NAME' => $userdata['username'],
      'MESSAGE' => $post_message, 
aus. ich hätte nun gerne dass dieser teil

Code: Alles auswählen

 'MESSAGE' => $post_message,
nur für admin und mods ist. also dass die user den text nicht mit drin haben. kann mir da jemand behilflich sein?

Verfasst: 26.10.2004 12:41
von Leuchte

Code: Alles auswählen

'MESSAGE' => $post_message,
ersetzen mit

Code: Alles auswählen

'MESSAGE' => ( $userdata['user_level'] == MOD || $userdata['user_level'] == ADMIN ) ? $post_message : '',

Verfasst: 26.10.2004 12:46
von Angela Goldig
danke :)

Verfasst: 26.10.2004 12:54
von Angela Goldig
das geht nicht.

der user bekommt jetzt gar keine mail mehr und der admin hat die ohne text.

Verfasst: 26.10.2004 12:56
von Leuchte
Kannst mal den kompletten Code posten (wenn er nicht zu lang ist (weniger als 20 Zeilen) ansonsten als .txt abspeichern und den Link posten)

Verfasst: 26.10.2004 13:09
von Angela Goldig
loool. also ich hab mir jetzt jemand anderen zum testen gesucht. der vorige hatte nicht mal mailbenachrichtigung an. *fg*

also das sieht jetzt so aus.

mailbenachrichtigung bekommen admin + user. nur mit deiner änderung hat der admin keinen text aber dafür der user. *ggg*

Code: Alles auswählen

#
#-----[ OPEN ]------------------------------------------
#
posting.php
#
#-----[ FIND ]------------------------------------------
#
user_notification($mode, $post_data, $post_info['topic_title'], $forum_id, $topic_id, $post_id, $notify_user);

#
#-----[ REPLACE, WITH ]------------------------------------------
#
user_notification($mode, $post_data, $post_info['topic_title'], str_replace("\'", "''", $message), $forum_id, $topic_id, $post_id, $notify_user);
#
#-----[ OPEN ]------------------------------------------
#
includes/functions_post.php

#
#-----[ FIND ]------------------------------------------
#
function user_notification($mode, &$post_data, &$topic_title, &$forum_id, &$topic_id, &$post_id, &$notify_user)

#
#-----[ REPLACE, WITH ]------------------------------------------
#
function user_notification($mode, &$post_data, &$topic_title, &$post_message, &$forum_id, &$topic_id, &$post_id, &$notify_user)

#
#-----[ FIND ]------------------------------------------
#
      'TOPIC_TITLE' => $topic_title,
#
#-----[ AFTER, ADD ]------------------------------------------
#
      'POSTER_NAME' => $userdata['username'],
      'MESSAGE' => $post_message,
#
#-----[ OPEN ]------------------------------------------
#
language/lang_english/email/topic_notify.tpl

#
#-----[ FIND ]------------------------------------------
#
Subject: Topic Reply Notification - {TOPIC_TITLE}
Charset: iso-8859-1

Hello {USERNAME},

You are receiving this email because you are watching the topic, "{TOPIC_TITLE}" at {SITENAME}. This topic has received a reply since your last visit. You can use the following link to view the replies made, no more notifications will be sent until you visit the topic.

{U_TOPIC}

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}

#
#-----[ REPLACE, WITH ]------------------------------------------
#
Subject: Topic Reply Notification - {TOPIC_TITLE}
Charset: iso-8859-1

Hello {USERNAME},

You are receiving this email because you are watching the topic, "{TOPIC_TITLE}" at {SITENAME}. This topic has received a reply since your last visit. You can use the following link to view the replies made, no more notifications will be sent until you visit the topic.

{U_TOPIC}

The contents of the reply, posted by {POST_USERNAME}, are as follows:

{MESSAGE}


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}

#
#-----[ SAVE & CLOSE ALL FILES ]--------------------------
#
#End

Verfasst: 26.10.2004 18:16
von Leuchte
Ist das die komplette Anleitung?
Wird bei dir der Username in der Mail angezeigt?

Verfasst: 26.10.2004 18:18
von Angela Goldig
is der komplette text.

das {POST_USERNAME} wird natürlich nicht angezeigt. das is ja falsch. habs bei mir geändert.

Verfasst: 27.01.2005 23:55
von kokett
Hi,

bin schon seit langem auf der Suche nach so einem MOD. Wie muss er denn nun richtig aussehen?

Verfasst: 28.01.2005 00:00
von Angela Goldig
{POSTER_NAME}