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)
 Drag & Drop privs for Forum access & Moderators

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
StephenD Posted - 09 August 2006 : 03:03:14
Here's the idea - I've got a Snitz intranet/client portal that runs completely 'Allowed Members Only Hidden' forums of which there are 50+ and growing. Employees are granted Moderator status and clients are Normal Users. This allows me an ease of flexibility in show/hide fucntions around the site.

Anyway, it is becoming a pain when we have a new employee start where we have to grant access to say 40 of the 50+ forums AND give them moderator access to these areas.

I've done a bit of code that grants FULL access to all of the forums and grants moderator privileges to all of them too. Reason being it is easier to then manually prune the say 10 forum access away from that user. Here is the code:

Dim EMP
EMP = ChkString(Request.QueryString("recid"),"SQLString")
Dim strSql, conn
Set conn = Server.CreateObject("ADODB.Connection")
conn.Open strConnString
strSql = " DELETE FROM FORUM_ALLOWED_MEMBERS WHERE MEMBER_ID ="&EMP&" "
conn.Execute strSql
strSql = " DELETE FROM FORUM_MODERATOR WHERE MEMBER_ID ="&EMP&" "
conn.Execute strSql
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
conn.Close


I've got this in a page that I link from within pop_profile.asp.

What I am thinking is that I've been playing around with some very nice Ajax forms of late (as a User) that could possibly allow me to do this for all employees on one page. I'm visualizing a column of User Names (moderators) on left side of the page and Forum Names on right side. By mouseover of the username the Forum Names of the forums that they have access privs and moderator privs become highlighted. By dragging the username across to the forum name it does the SQL updates as above but for a single forum. Ideally I'd have an All forums tag too.

Now, I have no experience with Ajax or jscript and would be interested in any pointers in how I could buiid this page.

Maybe it could be done in jscript/css alone .. I don't know but would appreciate your thoughts.<

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