Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Snitz Forums 2000 MOD-Group
 MOD Add-On Forum (W/O Code)
 Email a Usergroup

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!
Before posting, make sure you have read this topic!

Screensize:
UserName:
Password:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkInsert EmailInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
   

T O P I C    R E V I E W
JBaldwin Posted - 17 June 2006 : 16:53:56
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.<
15   L A T E S T    R E P L I E S    (Newest First)
secretsquirrel Posted - 07 August 2007 : 23:00:31
hehe this will be fun
I'm a squirrel, i'm good at climbing trees. Coding, well that's another story although i'm getting there on basic stuff lol <
AnonJr Posted - 07 August 2007 : 17:26:01
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.<
secretsquirrel Posted - 07 August 2007 : 14:24:57
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?<
JBaldwin Posted - 28 June 2006 : 18:51:45
Yes<
AnonJr Posted - 28 June 2006 : 17:36:15
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?<
JBaldwin Posted - 28 June 2006 : 16:22:47
..thanks everyone! ..however, my problem seem to be in implementing it into "Email All Users" Mod.<
PPSSWeb Posted - 28 June 2006 : 15:18:28
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<
AnonJr Posted - 28 June 2006 : 13:10:31
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.<
brian33433 Posted - 28 June 2006 : 12:38:23
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)<
JBaldwin Posted - 28 June 2006 : 12:16:49
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<
AnonJr Posted - 28 June 2006 : 11:16:26
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. <
JBaldwin Posted - 28 June 2006 : 10:43:20
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.
<
brian33433 Posted - 23 June 2006 : 17:09:38
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
<
AnonJr Posted - 23 June 2006 : 12:49:15
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.<
JBaldwin Posted - 23 June 2006 : 10:43:54
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]
<

Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.04 seconds. Powered By: Snitz Forums 2000 Version 3.4.07