Register Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools
  #1  
Old 29 Apr 2012, 20:01
kpmedia's Avatar
kpmedia kpmedia is offline
 
Join Date: Jan 2008
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?

##
__________________
FAQ: What are some HostGator alternatives? And who is EIG?
FAQ: What are the best web hosts and why?
And to all the vB plugin authors ... Thanks for making this a great app!
Reply With Quote
  #2  
Old 29 Apr 2012, 23:55
kh99's Avatar
kh99 kh99 is online now
 
Join Date: Aug 2009
Real name: Kevin
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.
Reply With Quote
  #3  
Old 30 Apr 2012, 20:37
kpmedia's Avatar
kpmedia kpmedia is offline
 
Join Date: Jan 2008
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...

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

... but it's just not working well, regardless of what I try.

Any ideas on what plugin syntax would need to be?

##
__________________
FAQ: What are some HostGator alternatives? And who is EIG?
FAQ: What are the best web hosts and why?
And to all the vB plugin authors ... Thanks for making this a great app!
Reply With Quote
  #4  
Old 30 Apr 2012, 20:54
kh99's Avatar
kh99 kh99 is online now
 
Join Date: Aug 2009
Real name: Kevin
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:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.


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.
Reply With Quote
  #5  
Old 30 Apr 2012, 22:19
kpmedia's Avatar
kpmedia kpmedia is offline
 
Join Date: Jan 2008
Yep, that's almost identical to what I had tried earlier. Doesn't work.

#
__________________
FAQ: What are some HostGator alternatives? And who is EIG?
FAQ: What are the best web hosts and why?
And to all the vB plugin authors ... Thanks for making this a great app!
Reply With Quote
  #6  
Old 01 May 2012, 00:15
kh99's Avatar
kh99 kh99 is online now
 
Join Date: Aug 2009
Real name: Kevin
Oh, right...try this instead:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

__________________
Please don't PM me - post your questions in the appropriate forum.
Please don't PM me to ask me to read your thread.
Reply With Quote
  #7  
Old 03 May 2012, 05:05
Badshah93's Avatar
Badshah93 Badshah93 is offline
 
Join Date: Jun 2010
For Usergroup Title, Use this variable


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
Forum Jump


New To Site? Need Help?

All times are GMT. The time now is 14:57.

Layout Options | Width: Wide Color: