Seite 1 von 1

PN-Absender in Benachrichtigungs-Email

Verfasst: 16.01.2007 09:18
von Asmodeus666
Hallo zusammen,

kann mir einen einen Tipp geben wie ich in die Benachrichtigungsemail (privmsg_notify.tpl) den Usernamen des PN-Abenders reinbekomme?

Der im Forum schon benannte Mod (PN-Text mitanzeigen) kommt nicht in Frage, denn es geht mir nur um den Usernamen des Absenders.

Besten Dank!

Verfasst: 16.01.2007 09:56
von Markus Wandel
Moin,

das sollte Dir helfen. Bei mir geht es einwandfrei.

Code: Alles auswählen

##############################################################
## MOD Title: Include sender's name in private message notification
## MOD Author: DanielJarrett < daniel@nospam.team.4webhelp.net > http://www.4webhelp.net/
## MOD Description: With this mod, when someone sends you a PM,
## the notification email will include his/her username
## MOD Version: 1.0.0
##
## Installation Level: easy
## Installation Time: 1 minute
## Files To Edit: (2) privmsg.php, privmsg_notify.tpl
## Included Files: n/a
##############################################################
## Author Notes:
##         You will have to apply the changes to the email templates
##         in all languages in use on your board.
##############################################################
## MOD History:
##         0.0.1: MOD created
##         1.0.0: MOD released
############################################################## 
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD 
############################################################## 

# 
#-----[ OPEN ]----- 
# 
privmsg.php 

# 
#-----[ FIND ]----- 
# around line 1320 
'USERNAME' => $to_username, 

# 
#-----[ AFTER, ADD ]----- 
# 
'FROM' => $userdata['username'], 

# 
#-----[ OPEN ]----- 
# 
language/lang_english/email/privmsg_notify.tpl 

# 
#-----[ FIND ]----- 
# 
You have received a new private message to your account on "{SITENAME}" and you have requested that you be notified on this event. You can view your new message by clicking on the following link: 

# 
#-----[ REPLACE WITH ]----- 
# 
You have received a new private message to your account on "{SITENAME}" from {FROM} and you have requested that you be notified on this event. You can view your new message by clicking on the following link: 

# 
#-----[ SAVE/CLOSE ALL FILES ]----- 
# 
# EoM
Gruß

Verfasst: 16.01.2007 11:07
von Asmodeus666
Vielen Dank!
Hat geklappt!


Ich war erst etwas ratlos weil die Zeile inzwischen etwas anders lautet:

anstelle von

Code: Alles auswählen

'USERNAME' => $to_username, 
steht da jetzt:

Code: Alles auswählen

'USERNAME' => stripslashes($to_username), 
(das nur falls jemand das bei sich auch ändern möchte).