Show Username

This forum is now closed as part of retiring phpBB2
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

This forum is now closed due to phpBB2.0 being retired.
Post Reply
saintmichael
Registered User
Posts: 10
Joined: Tue Jul 08, 2003 5:01 am

Show Username

Post by saintmichael » Sun Jul 13, 2003 7:33 pm

How can I show the username of the person that replied to a topic people are subscribed to? Is there a way to show who replied.

SeanMcQ
Registered User
Posts: 188
Joined: Mon Oct 28, 2002 2:56 pm
Location: Belfast, Ireland
Contact:

Post by SeanMcQ » Sun Jul 13, 2003 7:44 pm

Try this. As always, backup the file incase it dosen't work, I'm just guessing on this one:

Code: Select all

--[OPEN]--

languages/lang_english/email/topic_notify.tpl

--[FIND]--

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.

--[REPLACE WITH]--

You are receiving this email because you are watching the topic, "{TOPIC_TITLE}" at {SITENAME}. This topic has received a reply from {p.post_username}.

saintmichael
Registered User
Posts: 10
Joined: Tue Jul 08, 2003 5:01 am

Post by saintmichael » Sun Jul 13, 2003 8:11 pm

thanks for your reply, it didn't work, this is what it showed me
You are receiving this email because you are watching the topic, "{This worked}" at {This worked}. This topic has received a reply from {p.post_username} <----This one didn't work. It said the same text as the code {p.post_username}

User avatar
Black Fluffy Lion
Former Team Member
Posts: 6057
Joined: Sat Dec 15, 2001 11:37 am

Post by Black Fluffy Lion » Sun Jul 13, 2003 8:12 pm

This requires a MOD, so moving to MOD requests...

SeanMcQ
Registered User
Posts: 188
Joined: Mon Oct 28, 2002 2:56 pm
Location: Belfast, Ireland
Contact:

Post by SeanMcQ » Sun Jul 13, 2003 8:12 pm

Try using {u.username}

saintmichael
Registered User
Posts: 10
Joined: Tue Jul 08, 2003 5:01 am

Post by saintmichael » Sun Jul 13, 2003 8:23 pm

No, sorry but it's still the same thing

SeanMcQ
Registered User
Posts: 188
Joined: Mon Oct 28, 2002 2:56 pm
Location: Belfast, Ireland
Contact:

Post by SeanMcQ » Sun Jul 13, 2003 8:30 pm

Damn. Sorry, you must need to mod one of the other files. I don't know how to do it

User avatar
warmweer
Registered User
Posts: 2160
Joined: Fri Jul 04, 2003 6:34 am
Location: Van Allen Belt ... well actually Belgium

Post by warmweer » Sun Jul 13, 2003 8:59 pm

saintmichael wrote: thanks for your reply, it didn't work, this is what it showed me
You are receiving this email because you are watching the topic, "{This worked}" at {This worked}. This topic has received a reply from {p.post_username} <----This one didn't work. It said the same text as the code {p.post_username}


It can't work because p.post_username isn't passed from the php-file to the tpl-file.
What you need to do is add the postername to the array passed on to the tpl.

It would be something like this (I think)

Code: Select all

$emailer->assign_vars(array(
...
...
'POSTER_NAME' => $userdata['user_name'];
and in the tpl file you would then call the {POSTER_NAME}
My board's not broken, it just went peculiar

saintmichael
Registered User
Posts: 10
Joined: Tue Jul 08, 2003 5:01 am

Post by saintmichael » Sun Jul 13, 2003 9:22 pm

Thanks. So where do I put that code you gave me?

User avatar
warmweer
Registered User
Posts: 2160
Joined: Fri Jul 04, 2003 6:34 am
Location: Van Allen Belt ... well actually Belgium

Post by warmweer » Tue Jul 15, 2003 6:40 am

saintmichael wrote: Thanks. So where do I put that code you gave me?


in includes/functions_post.php look for a line

Code: Select all

// Handle user notification on new post
about a page lower is the emailer section

Code: Select all

$emailer->assign_vars(array(   
so just put

Code: Select all

'POSTER_NAME' => $userdata['user_name']; 
In the tpl-file you would then apply the changes mentioned earlier.

I haven't tested it so I won't promise it will work (but I'm fairly confident).

Sorry for the late response.

Post Reply

Return to “[2.0.x] MOD Requests”