Author |
Topic  |
|
MarkJH
Senior Member
   
United Kingdom
1722 Posts |
Posted - 06 May 2004 : 11:45:09
|
How would I go about making a forum hidden from everybody (except admin) but allow read access to all?
I've got some locked forums which I want people to be able to view the archives of but not be able to post to. The nearest I can find in forum properties is locking the forum and using Allowed Members List (Hidden) which hides the forums from the main page but doesn't allow access to the archives (i've used weblinks to link to these from the default page) to anybody apart from admin.
Hoping somebody can help! |
Bandlink.net - http://www.bandlink.net/ Bandlink Music Forums - http://www.bandlink.net/forum/ |
|
MarkJH
Senior Member
   
United Kingdom
1722 Posts |
|
wii
Free ASP Hosts Moderator
    
Denmark
2632 Posts |
Posted - 07 May 2004 : 14:17:40
|
Can´t you just lock the forum ? |
 |
|
MarkJH
Senior Member
   
United Kingdom
1722 Posts |
|
Nikkol
Forum Moderator
    
USA
6907 Posts |
|
MarkJH
Senior Member
   
United Kingdom
1722 Posts |
Posted - 08 May 2004 : 05:10:06
|
If you check out my default.asp and scroll down to the bottom to the "Old Forums (Read Only)" category, you'll see that I've made weblinks to the archives for a bunch of forums. The forums themselves are also in that category but are hidden (only the admin can see them). Unfortunately, hiding the forums means that nobody but the admin can read the archives. |
Bandlink.net - http://www.bandlink.net/ Bandlink Music Forums - http://www.bandlink.net/forum/ |
 |
|
cripto9t
Average Member
  
USA
881 Posts |
Posted - 09 May 2004 : 13:57:08
|
Mark, I did something like this awhile back. I'm not sure it will work on archives, but I think it should.
Anyway its not much, so you can try it .
- inc_func_secure.asp
Find function chkDisplayForum (close to the top) and add the part in red
function chkDisplayForum(fPrivateForums,fFPasswordNew,fForum_ID,UserNum)
dim strSql
dim rsAccess
chkDisplayForum = false
if (mLev = 4) or (mLev = 3 and ModerateAllowed = "Y") then
chkDisplayForum = true
exit function
end if
select case cLng(fPrivateForums)
case 0, 1, 2, 3, 4, 7, 9
chkDisplayForum = true
exit function
case 5
if UserNum = -1 then
chkDisplayForum = false
exit function
else
chkDisplayForum = true
exit function
end if
case 6
if UserNum = -1 then
chkDisplayForum = false
exit function
end if
if isAllowedMember(fForum_ID,UserNum) = 1 then
chkDisplayForum = true
else
chkDisplayForum = false
end if
case 8
chkDisplayForum = false
if strAuthType ="nt" THEN
NTGroupSTR = Split(Session(strCookieURL & "strNTGroupsSTR"), ", ")
for j = 0 to ubound(NTGroupSTR)
NTGroupDBSTR = Split(fFPasswordNew, ", ")
for i = 0 to ubound(NTGroupDBSTR)
if NTGroupDBSTR(i) = NTGroupSTR(j) then
chkDisplayForum = true
exit function
end if
next
next
end if
case 10
chkDisplayForum = false
exit function
case else
chkDisplayForum = true
end select
end function Find this code in function chkForumAccess and add the part in red.
Select case rsStatus("F_PRIVATEFORUMS")
case 0, 10 '## Add 10 for new private forum
chkForumAccess = true
case 1, 6 '## Allowed Users
if isAllowedMember(fForum,UserNum) = 1 then
chkForumAccess = true That's All For inc_func_secure.asp
- post.asp
Find this code around line 1232
if ForumAuthType = 6 then Response.Write(" selected")
Response.Write ">Allowed Member List (Hidden)</option>" & vbNewLine
if strNTGroups = "1" then
Response.Write " <option value=""9"""
if ForumAuthType = 9 then Response.Write(" selected")
Response.Write ">NT Global Group</option>" & vbNewLine & _
" <option value=""8"""
if ForumAuthType = 8 then Response.Write(" selected")
Response.Write ">NT Global Group (Hidden)</option>" & vbNewLine
end if And add this right after it '### ADD code below ############################################################################################### Response.Write " <option value=""10""" if ForumAuthType = 10 then Response.Write(" selected") Response.Write ">Hide Forum on Default</option>" & vbNewLine '### END addon ###################################################################################################
If you find something wrong let me know. I'm useing this on one of my forums. |
_-/Cripto9t\-_ |
 |
|
dpmcalister
Junior Member
 
United Kingdom
161 Posts |
Posted - 09 May 2004 : 16:09:51
|
Yet again, someone with just the sort of thing I was about to try and work out. This is excellent, I'll give it a try tomorrow 
Thanks. |
 |
|
cripto9t
Average Member
  
USA
881 Posts |
Posted - 09 May 2004 : 18:25:11
|
quote: Originally posted by dpmcalister
Yet again, someone with just the sort of thing I was about to try and work out. This is excellent, I'll give it a try tomorrow 
Thanks.
Your welcome 
Just a few things I should have pointed out in my 1st reply.
This mod just hides the forum on "default.asp" from everyone except the forums' moderators and admins. Members can still veiw the "forum.asp" and "topic.asp", but you have to supply a link (as Mark has done).
Also, "private forums" in admin options has to be turned on and you will need to edit your forum and choose the new option "Hide Forum on Default".
That's all 
|
_-/Cripto9t\-_ |
 |
|
MarkJH
Senior Member
   
United Kingdom
1722 Posts |
|
dpmcalister
Junior Member
 
United Kingdom
161 Posts |
Posted - 18 May 2004 : 18:59:29
|
Sorry, forgot to say that it's working perfectly on Modus Operandi (it's hiding the Footer Information forum  |
 |
|
|
Topic  |
|