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/Code)
 sr_erick's Sub-forums MOD
 New Topic  Reply to Topic
 Printer Friendly
Previous Page
Author Previous Topic Topic Next Topic
Page: of 7

AnonJr
Moderator

United States
5768 Posts

Posted - 21 February 2008 :  14:11:22  Show Profile  Visit AnonJr's Homepage  Reply with Quote
It may have been part of an update I was working on then... unfortunately, my file server is down and I don't have access to said files.

I'll try to take a look at this when I get home tonight. If you could, please post a link to a *.txt copy of default.asp, forum.asp, and inc_subforums.asp<
Go to Top of Page

bitwise2000
Starting Member

38 Posts

Posted - 21 February 2008 :  16:06:22  Show Profile  Reply with Quote
Here's the original:
http://content.penturners.org/inc_subforum.txt

Here's my modified version to hide subforums based on the value of F_PrivateForums and strDBNTUserName.

http://content.penturners.org/inc_subforum-new.txt

I added some code to the loop that builds the list of subforums. That works.

What doesn't work is restricting access based on password. So if you set the forum to members only password protected, you don't get the challenge for the forum pswd before you get access. That's a separate issue that has to be addressed in forum.asp. I don't use password protected hidden forums, so it's not an issue for me, but it should be addressed to work correctly.<
Go to Top of Page

modifichicci
Average Member

Italy
787 Posts

Posted - 21 February 2008 :  16:36:12  Show Profile  Visit modifichicci's Homepage  Reply with Quote
there is not an option for hidden forum with password..
my modification use chkDisplayForum from inc_func_secure.
it works as the forum is hidden to users not allowed.
(I don't see the forum hidden you post.. and the link bring me to default)<

Ernia e Laparocele
Forum di Ernia e Laparocele
Acces - MySql Migration Tutorial
Adamantine forum

Edited by - modifichicci on 21 February 2008 16:38:10
Go to Top of Page

bitwise2000
Starting Member

38 Posts

Posted - 21 February 2008 :  17:33:18  Show Profile  Reply with Quote
Here's my quick and very dirty workaround for the subforum column headers being displayed in the parent forum when all the subforums are invisible to the user. The right way is of course to rewrite the sub ListSubForums so that it doesn't write the column headers right off the bat, only if there's at least one subforum visible to the user.

I didn't want to rewrite the entire ListSubForums sub so I just wrote a function to check to see if there are any subforums visible to the user and if not to exit that sub.


Function OneVisibleForum(FORUM_ID)
	' Is there at least one visible forum under this parent?
	OneVisibleForum = false 
	strSQL = "SELECT F.FORUM_ID, F.F_PRIVATEFORUMS, F.F_PASSWORD_NEW " & _
				 "FROM " & strTablePrefix & "FORUM F " & _
			 	 "WHERE F.F_PARENT = " & FORUM_ID & " AND F.F_TYPE = 0;" 
	set rs = my_Conn.Execute(strSQL)
	if not rs.eof then
		do until rs.eof
			intPrivateForum = rs("F_PRIVATEFORUMS")
			strPasswordNew = rs("F_PASSWORD_NEW")
			intForumID = rs("FORUM_ID")
			intMemberID = getMemberID(strDBNTUserName)
			if intMemberID = 0 then intMemberID = -1
			if chkDisplayForum(intPrivateForum, strPasswordNew, intForumID, intMemberID) then
				OneVisibleForum = true
				exit do
			end if
			rs.movenext
		loop
	end if
	set rs = nothing
end Function


Then I use this like so

sub ListSubForums(FORUM_ID)

	If Not OneVisibleForum(FORUM_ID) then Exit Sub


etc., etc.<
Go to Top of Page

modifichicci
Average Member

Italy
787 Posts

Posted - 22 February 2008 :  16:19:47  Show Profile  Visit modifichicci's Homepage  Reply with Quote
That is very strange..
I have replied to bitwise2000 post 21 February 2008 : 17:33:18

i have posted without login, inserting id and pass, but my reply is shown before the post I have replied..<

Ernia e Laparocele
Forum di Ernia e Laparocele
Acces - MySql Migration Tutorial
Adamantine forum
Go to Top of Page

AnonJr
Moderator

United States
5768 Posts

Posted - 22 February 2008 :  18:42:25  Show Profile  Visit AnonJr's Homepage  Reply with Quote
Were you in a cool De Lorean at the time? <
Go to Top of Page

modifichicci
Average Member

Italy
787 Posts

Posted - 23 February 2008 :  02:40:08  Show Profile  Visit modifichicci's Homepage  Reply with Quote
<

Ernia e Laparocele
Forum di Ernia e Laparocele
Acces - MySql Migration Tutorial
Adamantine forum
Go to Top of Page

OJJE
Starting Member

Bahamas
15 Posts

Posted - 11 June 2008 :  16:22:31  Show Profile  Reply with Quote
How well does this mod work with the latest version of Snitz forum and MySQL? Does anybody have the updated files or are the files on Snitzbitz the latest release of this MOD?<
Go to Top of Page

AnonJr
Moderator

United States
5768 Posts

Posted - 11 June 2008 :  17:01:49  Show Profile  Visit AnonJr's Homepage  Reply with Quote
The files on Snitzbitz.com are the latest released files. I've used it in 3.4.06 forums with only a few minor issues that have existed from the get-go. I've been meaning to add better support for MySQL but I just haven't had the time... work kicked into high gear and just hasn't stopped. =/ One way to add some better MySQL support has been posted here, as have other changes.<
Go to Top of Page
Page: of 7 Previous Topic Topic Next Topic  
Previous 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