![]() |
|
|
Thread Tools |
|
#1
|
||||
|
||||
|
Show usergroup name in emails?
In one of the email templates (in languages), the following variables are available:
$bbuserinfo[username] $vboptions[bburl]/showthread.php?t=$threadinfo[threadid] $threadinfo[prefix_plain]$threadinfo[title] $post[message] I want to show not just the username, but the usergroup, too. This way, for example, a person receiving the email will know right away if the posted reply was from a moderator, admin, or a specific member group -- without having to go to the forum first. But what's the variable to add this? ##
__________________
~ Thanks to all plugin devs. ~ Some sites that may interest you: The Digital FAQ video/photo help forum -|- my Web Hosting Suggestions -|- TV/DVD collecting forum No members have liked this post.
|
|
#2
|
||||
|
||||
|
I don't think there is an existing variable. You could write a plugin using hook location newpost_notification_start that sets a variable, then insert it in the phrase. I took a look at that code (in function exec_send_notification() in includes/functions_newpost.php), but it doesn't look like the group of the replying user is available, or even the userid in some cases, so you might have to do a query to look up the information by username.
__________________
Please don't PM me - post your questions in the appropriate forum.
Please don't PM me to ask me to read your thread. No members have liked this post.
|
|
#3
|
||||
|
||||
|
I can use $bbuserinfo[usergroupid], and it'll echo the number in the emails.
But I can't seem to find a way to make it echo the name of the group. I tried to write a plugin, but it did nothing. This is where I started...
... but it's just not working well, regardless of what I try. Any ideas on what plugin syntax would need to be? ##
__________________
~ Thanks to all plugin devs. ~ Some sites that may interest you: The Digital FAQ video/photo help forum -|- my Web Hosting Suggestions -|- TV/DVD collecting forum No members have liked this post.
|
||||
|
#4
|
||||
|
||||
|
Hmm...OK, fair enough. I guess I just didn't understand what was going on in that function, because it didn't look like all the info in $bbuserinfo was always the user who replied. Anyway, try this:
Then put $usergroupname in the phrase somewhere.
__________________
Please don't PM me - post your questions in the appropriate forum.
Please don't PM me to ask me to read your thread. No members have liked this post.
|
||||
|
#5
|
||||
|
||||
|
Yep, that's almost identical to what I had tried earlier. Doesn't work.
![]() #
__________________
~ Thanks to all plugin devs. ~ Some sites that may interest you: The Digital FAQ video/photo help forum -|- my Web Hosting Suggestions -|- TV/DVD collecting forum No members have liked this post.
|
|
#6
|
||||
|
||||
|
Oh, right...try this instead:
__________________
Please don't PM me - post your questions in the appropriate forum.
Please don't PM me to ask me to read your thread. The following members like this post: porschegruven
|
||||
|
#7
|
||||
|
||||
|
For Usergroup Title, Use this variable
The following members like this post: porschegruven
|
||||
![]() |
«
Previous Thread
|
Next Thread
»
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) |
| Thread Tools | |
|
|
| New To Site? | Need Help? |
All times are GMT. The time now is 03:06.



