vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Beta Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=34)
-   -   Email notification of usergroup join requests (https://vborg.vbsupport.ru/showthread.php?t=68683)

efoo 08-24-2004 10:00 PM

Email notification of usergroup join requests
 
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.

Milorad 08-25-2004 06:00 AM

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!

Phalynx 08-25-2004 07:32 AM

Nice work!

???`S?LV?R???` 08-25-2004 07:34 AM

nice.. looks like i might have some use for this

scoheb 10-22-2004 06:08 PM

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

SH

Makador 10-23-2004 11:46 AM

Very nice, I was searching for something like that.

KoalaMama 05-04-2006 03:24 PM

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!

cocjh1 11-14-2006 04:03 PM

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);
            } 


itsalltropical 01-05-2007 05:35 PM

Quote:

Originally Posted by cocjh1 (Post 1117192)
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 blackhttps://vborg.vbsupport.ru/external/2010/01/19.gif


All times are GMT. The time now is 01:35 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01119 seconds
  • Memory Usage 1,738KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (9)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete