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)
 UserGroups Beta Possibilities - More
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

jeffery
Junior Member

USA
176 Posts

Posted - 17 September 2003 :  17:56:07  Show Profile
Help!

I am attempting to use Nikkols UserGroup Beta http://forum.snitz.com/forum/topic.asp?TOPIC_ID=45449 to customize my portal page depending on the groups which a user belongs. I currently have this code
strSql = "SELECT U.USERGROUP_NAME, U.MEM_HIDE FROM " & strTablePrefix & "USERGROUPS U, " &_
strTablePrefix & "USERGROUP_MEMBERS UM " &_
"WHERE U.USERGROUP_ID = UM.USERGROUP_ID " &_
"AND UM.MEMBER_TYPE = 1 " &_
"AND UM.MEMBER_ID = " & MemberID & " " &_
"ORDER BY U.USERGROUP_NAME"
set rsGroups = my_Conn.execute(strSql)
arGroups = Null
if not rsGroups.bof and not rsGroups.eof then arGroups = rsGroups.GetRows
rsGroups.close
set rsGroups = Nothing
strGroups = ""
	if not IsNull(arGroups) then
		for iGcount = LBound(arGroups,2) to UBound(arGroups,2)
			if (arGroups(1,iGcount) = 0 or mlev = 4) then
				if strGroups <> "" then strGroups = strGroups & ", "
			strGroups = strGroups & arGroups(0,iGcount)
			end if
		next
	end if
which loads the group names into an array arGroups

Then I thought I could do something like this to check groups and display different menus etc
	if not IsNull(arGroups) then
		for iGcount = LBound(arGroups,2) to UBound(arGroups,2)
			if arGroups(0,iGcount) = "MainGroup" then
			
				%>
				<!--#include file="inc_news.asp" -->
				<!-- #include file="inc_spacer.asp" -->
				<!-- #include file="inc_spacer.asp" -->
				<%	
			 end if
		next
	end if
but this gives me errors in my includes such as this
Microsoft VBScript compilation error '800a03ea' 

Syntax error 

/inc_news.asp, line 104 

Function RemoveSignature(strExpression, strRemove)
which I cannot define.

I think this will be a good way to organize my site if I could figure out how to do it. Thanks in advance!

www.thomasforum.com

Edited by - jeffery on 18 September 2003 16:03:56

Nikkol
Forum Moderator

USA
6907 Posts

Posted - 17 September 2003 :  18:03:22  Show Profile
you are probably including those files before certain variable for them are defined. Make sure you are including them after includeds, such as inc_header, config, and so forth. I don't know anything about portals, so you might be better asking the portal authors how to include those files.

Nikkol ~ Help Us Help You | ReadMe | 3.4.03 fixes | security fixes ~
Go to Top of Page

jeffery
Junior Member

USA
176 Posts

Posted - 17 September 2003 :  18:08:00  Show Profile
Thanks Nikkol. I know I will love this mod. I was able to create a Primary Group addition if anyone is interested.

www.thomasforum.com
Go to Top of Page

jeffery
Junior Member

USA
176 Posts

Posted - 17 September 2003 :  18:14:42  Show Profile
All the errors I'm getting are Syntax errors ?? when calling Subs and Functions. Almost as if these cannot be called within the loop in the code above. Why would this be?

www.thomasforum.com
Go to Top of Page

jeffery
Junior Member

USA
176 Posts

Posted - 18 September 2003 :  11:35:03  Show Profile
Ok, I got it. Subs get redefined when calling from a loop like that. Hence the syntax error.

www.thomasforum.com
Go to Top of Page

jeffery
Junior Member

USA
176 Posts

Posted - 18 September 2003 :  16:05:56  Show Profile
Nikkol, what would it take to add a link next to each group for the member to join allowed groups in usergroups.asp?mode=ViewGroups ?

www.thomasforum.com
Go to Top of Page

Nikkol
Forum Moderator

USA
6907 Posts

Posted - 18 September 2003 :  19:41:14  Show Profile
huh? my mod doesn't have the capability to let members join groups on their own.

Nikkol ~ Help Us Help You | ReadMe | 3.4.03 fixes | security fixes ~
Go to Top of Page

jeffery
Junior Member

USA
176 Posts

Posted - 18 September 2003 :  20:03:10  Show Profile
I realize this. But can it be an option?

www.thomasforum.com
Go to Top of Page

Nikkol
Forum Moderator

USA
6907 Posts

Posted - 18 September 2003 :  20:59:18  Show Profile
it could be, but it's not something that I'm planning on working on.

Nikkol ~ Help Us Help You | ReadMe | 3.4.03 fixes | security fixes ~
Go to Top of Page

jeffery
Junior Member

USA
176 Posts

Posted - 19 September 2003 :  16:12:44  Show Profile
Done.

www.thomasforum.com
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.41 seconds. Powered By: Snitz Forums 2000 Version 3.4.07