Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Snitz Forums 2000 MOD-Group
 MOD Add-On Forum (W/O Code)
 Email a Usergroup
 New Topic  Reply to Topic
 Printer Friendly
Next Page
Author Previous Topic Topic Next Topic
Page: of 2

JBaldwin
Junior Member

USA
137 Posts

Posted - 17 June 2006 :  16:53:56  Show Profile  Reply with Quote
Ok, I have exhausted the SEARCH feature in Snitz looking for the answer to this one.

What would need to be done to email a group using the Usergoups MOD? I really need this one, so if anyone has any ideas it would really be appreciated.<

AbsolutelyFreerolls.com - Poker Freeroll Listings, Poker Forum and Poker News


brian33433
New Member

60 Posts

Posted - 23 June 2006 :  03:32:02  Show Profile  Visit brian33433's Homepage  Reply with Quote
well i don't have the mod installed, but whtever your using to emil your members you can write some code to just add that particular database field, if you past what email mod your using i'll take a look....

Brian
http://nightclubtonight.com<

When it happens after dark, its twice as nice...
http://nightclubtonight.com

Edited by - brian33433 on 23 June 2006 03:33:01
Go to Top of Page

JBaldwin
Junior Member

USA
137 Posts

Posted - 23 June 2006 :  10:43:54  Show Profile  Reply with Quote
I am using the Email All Users Mod to email the entire forum and I have made changes to that mod already to email selected members (with selected criteria from FORUM_MEMBERS table. I think I would have to do a series of JOINS in the SQL STRING to accomplish what I want, but I do not know enough about JOINS to do so.

admin_pop_mail.txt

The database fields for the USERGROUP MOD that I installed are...

[CREATE]
USERGROUPS
USERGROUP_ID
USERGROUP_NAME#varchar(100)##
USERGROUP_DESC#memo#NULL#
USERGROUP_TYPE#int##0
AUTOJOIN#int##0
MEM_HIDE#int##0
MOD_HIDE#int##0
[END]

[CREATE]
USERGROUP_USERS

USERGROUP_ID#int##
MEMBER_ID#int##
MEMBER_TYPE#int##1
[END]

[CREATE]
ALLOWED_USERGROUPS

USERGROUP_ID#int##
FORUM_ID#int##
PERMS#int##0
[END]

[INSERT]
CONFIG_NEW
(C_VARIABLE,C_VALUE)#('STRUGVIEW','0')
(C_VARIABLE,C_VALUE)#('STRUGMEMVIEW','0')
(C_VARIABLE,C_VALUE)#('STRUGMODFORUMS','0')
[END]
<

AbsolutelyFreerolls.com - Poker Freeroll Listings, Poker Forum and Poker News


Go to Top of Page

AnonJr
Moderator

United States
5768 Posts

Posted - 23 June 2006 :  12:49:15  Show Profile  Visit AnonJr's Homepage  Reply with Quote
The UserGroup MOD includes a function to get an array of Member ID's for a particular group. I don't have it in front of me at the moment, but it might be a starting point.<
Go to Top of Page

brian33433
New Member

60 Posts

Posted - 23 June 2006 :  17:09:38  Show Profile  Visit brian33433's Homepage  Reply with Quote
Ok i think you should look in this direction, its kinda tough cuse i don't have the mod installed, but if i get a chance i will look install it on my test server.
you may need to create a inc_mail 2

it seems the to key db fields you need to impliment in the strsql are USERGROUPS, USERGROUP_ID, USERGROUP_NAME

change strSql = strSql & " FROM " & strMemberTablePrefix & "USERGROUPS_ID"

basicaly you need the "from" to send to usergroup_id and not member_id

then make changes as so on, let me know if you get anywhere with this, otherwise i'll try to get the mod going on my test server

this should give you a point in the right direction

on the same file or w/ the newsletter mod. if anyone know how to create it so you can email certin members from choosing check boxs would love to do this.

good luck
brian
http://nightclubtonight.com
<

When it happens after dark, its twice as nice...
http://nightclubtonight.com

Edited by - brian33433 on 23 June 2006 17:15:37
Go to Top of Page

JBaldwin
Junior Member

USA
137 Posts

Posted - 28 June 2006 :  10:43:20  Show Profile  Reply with Quote
Ok. I have installed the Usergroups Mod. I want to email a usergroup much like with the "Email All Users" mod, but only to certain usergroups. I took the "Email All Usergroups" mod and tried to alter the SQL Statement. I used a JOIN for the MEMBERS and USERGROUP_USERS tables. The way I have it here:

www.jbaldwin.net/misc/admin_mail_usergroups1.txt

I get this error:

SELECT FORUM_MEMBERS.*, FORUM_USERGROUP_USERS.* FROM FORUM_MEMBERS LEFT JOIN FORUM_USERGROUP_USERS ON FORUM_MEMBERS.MEMBER_ID=FORUM_USERGROUP_USERS.MEMBER_ID WHERE FORUM_MEMBERS.M_STATUS = 1 AND FORUM_MEMBERS.M_RECEIVE_EMAIL = 1 AND FORUM_USERGROUP_USERS.USERGROUP_ID = 2 

Sending E-Mail

Microsoft VBScript runtime error '800a000d' 

Type mismatch: '[string: "Demo"]' 

/forum/forum2/admin_pop_mail_usergroups.asp, line 128
  


It is caused by this section in the code:

Select Case Member_Level
          	Case 1
      				strMessage = strMessage & "a member of usergroup 1 "
         	Case 2
  	    			strMessage = strMessage & "a member of usergroup 2 "
          End Select


Now, if I comment out that section, it says it sends the email, however, I do not receive an EMAIL?? I am hoping this is something simple, but I honestly have no idea....LOL :

SELECT FORUM_MEMBERS.*, FORUM_USERGROUP_USERS.* FROM FORUM_MEMBERS LEFT JOIN FORUM_USERGROUP_USERS ON FORUM_MEMBERS.MEMBER_ID=FORUM_USERGROUP_USERS.MEMBER_ID WHERE FORUM_MEMBERS.M_STATUS = 1 AND FORUM_MEMBERS.M_RECEIVE_EMAIL = 1 AND FORUM_USERGROUP_USERS.USERGROUP_ID = 2 

Sending E-Mail

Sent 1 E-Mail

Close Window


...and to further add to my confusion, if I add a Response.Write to see what the variables are that the SQL is pulling:

Response.Write	Member_Name & " --- " & Member_Email & " --- " & Usergroup_ID & "<hr>"


It is pulling out some odd variables, it looks like it is only pulling data from the USERGROUPS_ID table.

Sending E-Mail

797 (this is actually Member ID) --- 1 (this could be Status, level or...) --- Demo (this is the Member Name)------------------------------------------------
 
Microsoft VBScript runtime error '800a000d' 

Type mismatch: '[string: "Demo"]' 

/forum/forum2/admin_pop_mail_usergroups.asp, line 131 




Have I thoroughly confused everyone here? I know I've confused myself for SURE! LOL. Put a fork in me, I'm done.
<

AbsolutelyFreerolls.com - Poker Freeroll Listings, Poker Forum and Poker News


Go to Top of Page

AnonJr
Moderator

United States
5768 Posts

Posted - 28 June 2006 :  11:16:26  Show Profile  Visit AnonJr's Homepage  Reply with Quote
The UserGroup MOD adds a function called "getGroupMembership" that returns a comma-delimited list of either the Group ID's a person belongs to, or a comma-delimited list of Member ID's in a group.

Assuming the GroupID is 2, you could do something like this:
strMemList = getGroupMembership(2,2) 'The first value is the ID, the second is an indication of if its a group or member id you just passed.

If strMemList <> "" Then
    strSQL = "SELECT M.M_EMAIL FROM " & strMemberTablePrefix & "MEMBERS M " & _
        "WEHRE M.MEMBER_ID IN (" & strMemList & ") AND M.M_STATUS = 1 AND M.M_RECEIVE_EMAIL = 1"
End If


This should give you a recordset of all the email addresses. I may be missing a few minor details, but this should get you started. <
Go to Top of Page

JBaldwin
Junior Member

USA
137 Posts

Posted - 28 June 2006 :  12:16:49  Show Profile  Reply with Quote
my head hurts now. I officially pass the torch to someone with higher ASP skills than mine (which shouldn't be THAT difficult - as mine are minimal at BEST). If I stay on this any further, my laptop will officially become airborne, LOL.

I know how to add items and variables to MEMBERS table and send emails that way, maybe I'll go this route instead of trying to use USERGROUPS. ARGHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH<

AbsolutelyFreerolls.com - Poker Freeroll Listings, Poker Forum and Poker News


Go to Top of Page

brian33433
New Member

60 Posts

Posted - 28 June 2006 :  12:38:23  Show Profile  Visit brian33433's Homepage  Reply with Quote
well once again i don't know that mod, but what if you make a duplicate of email all users, and set that up with usergroup_id instead of member_id.

just seems easier then dealing with all new arrays

(just my 2 cents)<

When it happens after dark, its twice as nice...
http://nightclubtonight.com
Go to Top of Page

AnonJr
Moderator

United States
5768 Posts

Posted - 28 June 2006 :  13:10:31  Show Profile  Visit AnonJr's Homepage  Reply with Quote
quote:
Originally posted by brian33433

well once again i don't know that mod, but what if you make a duplicate of email all users, and set that up with usergroup_id instead of member_id.


All that is going to do is get you the array of MemberIDs. That's why I suggested using the bit I posted to get a recordset of e-mail addresses for the people in that usergroup.

If I've got time this weekend I may take a crack at it, but I can't promise anything. Bobby wants the Jesus Joshua 24:15 and Warsong Records sites re-built for the Sept. release of their new CD... it doesn't exactly leave me much spare time.<
Go to Top of Page

PPSSWeb
Junior Member

312 Posts

Posted - 28 June 2006 :  15:18:28  Show Profile  Reply with Quote
The following JOIN seems to work in my minor testing:


strSql = "SELECT M.MEMBER_ID, M.M_Email FROM " & strMemberTablePrefix & "MEMBERS M " &_
"INNER JOIN " & strTablePrefix & "USERGROUP_USERS UM ON M.MEMBER_ID = UM.MEMBER_ID " &_
"WHERE UM.MEMBER_TYPE = 1 AND UM.USERGROUP_ID = " & GroupID & " ORDER BY M.M_NAME"


It is based on the view users section of usergroups.asp

Hope that helps<
Go to Top of Page

JBaldwin
Junior Member

USA
137 Posts

Posted - 28 June 2006 :  16:22:47  Show Profile  Reply with Quote
..thanks everyone! ..however, my problem seem to be in implementing it into "Email All Users" Mod.<

AbsolutelyFreerolls.com - Poker Freeroll Listings, Poker Forum and Poker News


Go to Top of Page

AnonJr
Moderator

United States
5768 Posts

Posted - 28 June 2006 :  17:36:15  Show Profile  Visit AnonJr's Homepage  Reply with Quote
Ahhh I thought you were trying to make something modeled after the MOD, not built into the MOD.

Like I said earlier, if I have the time, I may take a crack at it this weekend. You're using the one that is posted on kwhipp's site, right?<
Go to Top of Page

JBaldwin
Junior Member

USA
137 Posts

Posted - 28 June 2006 :  18:51:45  Show Profile  Reply with Quote
Yes<

AbsolutelyFreerolls.com - Poker Freeroll Listings, Poker Forum and Poker News


Go to Top of Page

secretsquirrel
New Member

Australia
81 Posts

Posted - 07 August 2007 :  14:24:57  Show Profile  Visit secretsquirrel's Homepage  Reply with Quote
I dont know what happened with this in the end. Did it get done?
Could an email form be added in the usergroup manager to email selected usergroups?<

Anyone who says a square peg does not fit into a circular hole has never seen a crazy bítch with a hammer
Go to Top of Page

AnonJr
Moderator

United States
5768 Posts

Posted - 07 August 2007 :  17:26:01  Show Profile  Visit AnonJr's Homepage  Reply with Quote
It was on my perpetual to-do list and never got to it...

Using some of the code above you would have a good start at giving it a shot yourself.<
Go to Top of Page
Page: of 2 Previous Topic Topic Next Topic  
Next Page
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.1 seconds. Powered By: Snitz Forums 2000 Version 3.4.07