Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.0 > vBulletin 3.0 Beta Releases
Email notification of usergroup join requests Details »»
Email notification of usergroup join requests
Version: 1.00, by efoo efoo is offline
Developer Last Online: Aug 2006 Show Printable Version Email this Page

Version: 3.0.3 Rating:
Released: 08-24-2004 Last Update: Never Installs: 11
Is in Beta Stage  
No support by the author.

I put this together to help my board usergroup leaders keep track of incoming join requests, and thought it might be useful to others.

I just added some code to profile.php immediately above the line "// insert the request":

PHP Code:
$leaders $DB_site->query("
                        SELECT ugl.userid, username, email
                        FROM " 
TABLE_PREFIX "usergroupleader AS ugl
                        INNER JOIN " 
TABLE_PREFIX "user AS user USING(userid)
                        WHERE ugl.usergroupid = 
$usergroupid
"
);
while (
$leader $DB_site->fetch_array($leaders))
{
   
vbmail($leader["email"], "new forums usergroup join request",
            
"A Forums user has asked to join a usergroup that you lead.\nPlease handle it at http://www.domain.com/forums/profile.php?do=editusergroups",
             
true);

This is rather quick and dirty, but it does seem to work well for our purposes. Perhaps others can improve on it.

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #2  
Old 08-25-2004, 06:00 AM
Milorad Milorad is offline
 
Join Date: Mar 2003
Posts: 70
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

this is really cool, but for my purposes would be better if it could send a PM

Would someone consider a modification to this to make that happen?

Thanks for this efoo, really useful submission!
Reply With Quote
  #3  
Old 08-25-2004, 07:32 AM
Phalynx Phalynx is offline
 
Join Date: Feb 2004
Location: Erlangen, Germany
Posts: 2,747
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Nice work!
Reply With Quote
  #4  
Old 08-25-2004, 07:34 AM
???`S?LV?R???`'s Avatar
???`S?LV?R???` ???`S?LV?R???` is offline
 
Join Date: Aug 2003
Posts: 368
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

nice.. looks like i might have some use for this
Reply With Quote
  #5  
Old 10-22-2004, 06:08 PM
scoheb scoheb is offline
 
Join Date: Aug 2004
Posts: 3
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Is there a way to get the Forums complete url instead of hard-coding it?

SH
Reply With Quote
  #6  
Old 10-23-2004, 11:46 AM
Makador Makador is offline
 
Join Date: Sep 2004
Posts: 9
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Very nice, I was searching for something like that.
Reply With Quote
  #7  
Old 05-04-2006, 03:24 PM
KoalaMama KoalaMama is offline
 
Join Date: Apr 2006
Posts: 4
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Forgive me if this is a silly question - I'm new! But can I add this code at one of the vB hooks? And if so, which one should I be using? Thanks!
Reply With Quote
  #8  
Old 11-14-2006, 04:03 PM
cocjh1 cocjh1 is offline
 
Join Date: Dec 2004
Posts: 7
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Has anybody considered writing this as a plug-in for 3.6??

Note, I had to slightly modify the above code to work on 3.6...
PHP Code:
            $usergroupid $vbulletin->input->clean_gpc('p''usergroupid'TYPE_UINT);
    
            
$leaders $db->query_read("
                SELECT ugl.userid, username, email
                FROM " 
TABLE_PREFIX "usergroupleader AS ugl
                INNER JOIN " 
TABLE_PREFIX "user AS user USING(userid)
                WHERE ugl.usergroupid = 
$usergroupid
            "
);

            while (
$leader $db->fetch_array($leaders))
            {
                
vbmail($leader["email"], "new forums usergroup join request",
                
"A Forums user has asked to join a usergroup that you lead.\nPlease handle it at http://www.domain.com/forums/profile.php?do=editusergroups"true);
            } 
Reply With Quote
  #9  
Old 01-05-2007, 05:35 PM
itsalltropical itsalltropical is offline
 
Join Date: Dec 2006
Posts: 16
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by cocjh1 View Post
Has anybody considered writing this as a plug-in for 3.6??

Note, I had to slightly modify the above code to work on 3.6...

[/php]
This code is exactly what I need. I have vBulletin 3.6.4 for a few weeks now. I am a novice so is there a way to put userid and usergroup in the text of the email? I see that ugl.userid and ugl.usergroupid are defined so how would I put that in the text of the email. Please include all <>, "", etc 'cause I am a novice.

I agree this should be a standard option in vBulletin, but I am so thankful as a newbie you guys offer these hacks! Thanks.

P.S. I have no idea why my text changed to green. I tried to change it back to black
Reply With Quote
Reply

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 08:46 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.11071 seconds
  • Memory Usage 2,287KB
  • Queries Executed 24 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (2)bbcode_php
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (9)post_thanks_box
  • (9)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (9)post_thanks_postbit_info
  • (8)postbit
  • (9)postbit_onlinestatus
  • (9)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete