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

 All Forums
 Help Groups for Snitz Forums 2000 Users
 Help: General / Classic ASP versions(v3.4.XX)
 Adding a member to multiple hidden forums
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

leatherlips
Senior Member

USA
1838 Posts

Posted - 11 May 2006 :  10:28:18  Show Profile  Visit leatherlips's Homepage
Is there an easy way to add a member to multiple hidden members only forums? I have about 40 forums set to allowed members only hidden. It is very tedious to edit each forum one by one. Is there a feature that can allow this in one shot? It would be nice to possible bring up the user and have all of the forums listed with a check box that they could be added to.

Mangione Magic Forum - The Music of Chuck Mangione

My Mods: Googiespell MOD | Link To Reply MOD | Petition MOD | Contact Page MOD | Share This Topic MOD | MP3 MOD | PageEar MOD | Google Viewer MOD

laser
Advanced Member

Australia
3859 Posts

Posted - 11 May 2006 :  18:14:23  Show Profile
I forget the syntax, but I had to do this a long time ago and I just figured out the SQL needed and then executed a ton of similar INSERTs all at the same time.

Play around with it, but it isn't too hard to figure out. What database are you using (Access, SQLServer, mySQL) ??
Go to Top of Page

ruirib
Snitz Forums Admin

Portugal
26364 Posts

Posted - 11 May 2006 :  18:34:09  Show Profile  Send ruirib a Yahoo! Message
The Usergroup Mod would be ideal for you.


Snitz 3.4 Readme | Like the support? Support Snitz too
Go to Top of Page

StephenD
Senior Member

Australia
1044 Posts

Posted - 11 May 2006 :  23:48:53  Show Profile  Send StephenD a Yahoo! Message
I did something similar which was activated by a link in their profile accessible to only the SuperAdmin. For this to work I made sure all my private forums where assigned to one Category. I aslo had the requirement to set the user as a moderator for each private forum at the same time - you can strip that part out from below

<!--#INCLUDE FILE="config.asp" -->
<!--#INCLUDE FILE="inc_func_common.asp" -->
<%
Dim EMP
EMP = ChkString(Request.QueryString("recid"),"SQLString") 
Dim strSql, conn
Set conn = Server.CreateObject("ADODB.Connection")
conn.Open strConnString
strSql = " SELECT FORUM_ID INTO FORUM_TEMP2 FROM FORUM_FORUM WHERE F_PRIVATEFORUMS=6 "
conn.Execute strSql 
strSql = " SELECT FORUM_ID INTO FORUM_TEMP3 FROM FORUM_FORUM WHERE F_PRIVATEFORUMS=6 AND CAT_ID=2 "
conn.Execute strSql
strSql = " ALTER TABLE FORUM_TEMP2 ADD MEMBER_ID INT"
conn.Execute strSql
strSql = " ALTER TABLE FORUM_TEMP3 ADD MEMBER_ID INT"
conn.Execute strSql
strSql = " UPDATE FORUM_TEMP2 SET MEMBER_ID = "&EMP&" "
conn.Execute strSql
strSql = " UPDATE FORUM_TEMP3 SET MEMBER_ID = "&EMP&" "
conn.Execute strSql
strSql = " INSERT INTO FORUM_ALLOWED_MEMBERS (MEMBER_ID, FORUM_ID) SELECT MEMBER_ID, FORUM_ID FROM FORUM_TEMP2  "
conn.Execute strSql
strSql = " INSERT INTO FORUM_MODERATOR (FORUM_ID, MEMBER_ID, MOD_TYPE) SELECT FORUM_ID, "&EMP&", 0  FROM FORUM_TEMP3 "
conn.Execute strSql
strSql = " DROP TABLE FORUM_TEMP2 "
conn.Execute strSql
strSql = " DROP TABLE FORUM_TEMP3 "
conn.Execute strSql

Response.Write "<table align=""center"" colspan=""0"" border=""0"">" & vbNewline & _
"<tr><td align=""center""><br /><br /><p><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>Access privileges have been granted to the nominated Employee."  & "</p>" & vbNewLine & _
	"<p><a href=""JavaScript:onClick=window.close()"">Close Window</a></font></p></td></tr></table>" & vbNewLine
Response.End
conn.Close
%>


Edit: Actually, looking at what I did again, the code first gives the user access to all 'Allowed Member Only Hidden' forums then sets them as a Moderator for all 'Allowed Member Only Hidden' forums with a Category ID of 2.

Edited by - StephenD on 11 May 2006 23:52:23
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.26 seconds. Powered By: Snitz Forums 2000 Version 3.4.07