Author |
Topic  |
HuwR
Forum Admin
    
United Kingdom
20595 Posts |
Posted - 10 January 2001 : 08:33:23
|
This is a reposting of a previous topic.
I have done this by adding three new private forum types
10 - Only Admin/Moderators can Reply -
Users can post questions, but are not allowed to reply
11 - Everyone can Reply -
Users are only allowed to reply to topics, they can't create new ones.
12 - Only Admin/Moderators can Post/Reply -
Effectively a locked forum, it is read only to users.
Instructions below
'Resistance is futile' |
|
HuwR
Forum Admin
    
United Kingdom
20595 Posts |
Posted - 10 January 2001 : 08:35:14
|
Code changes for extra Private Forums
Changes..
INC_FUNCTIONS.ASP <hr>
Search for the sub chkUser4(), you will see a large case statement, immediately before the lines
case else Response.Write "<BR>ERROR: Invalid forum type: " & rsStatus("F_PRIVATEFORUMS") Response.end end select
insert.... case 10,11,12
This is required to validate the forum type
POST.ASP <hr>
Search for the large group of
option value="8" <% if ForumAuthType = option value="9" <% if ForumAuthType =
statements
and add the following lines of code before the closing </select>
<option value="10" <% if ForumAuthType = 10 then Response.Write(" selected")%> > Only Admin/Moderators can Reply</option> <option value="11" <% if ForumAuthType = 11 then Response.Write(" selected") %> >Everyone can Reply</option> <option value="12" <% if ForumAuthType = 12 then Response.Write(" selected") %> >Only Admin/Moderators can Post/Reply</option>
FORUM.ASP <hr>
At around line 250, look for a closing and opening table tag, a few rows further on, you should see some code for the setdays box.
</td> </tr> </table> <table border="0" width="95%" cellspacing="0" cellpadding="0" align="center">
Immediately after the open table tag, insert the following <p><font face="<% =strDefaultFontFace %>" size="<% =strFooterFontSize %>"><b> <% select case cInt(strPrivateForums) case 10 response.write "Only Admins and Moderators can post REPLIES to topics in this forum" case 11 response.write "Only Admins and Moderators can post NEW topics to this forum" case 12 response.write "This Forum is READ only, NO POSTING allowed" case else end select %> </b></font></p>
Look for the sub PostNewTopic()
Insert.. if cInt(strPrivateForums) < 11 or AdminAllowed = 1 then as the first line in the sub, then add an end if as the last line of the sub
cont..
'Resistance is futile' |
 |
|
HuwR
Forum Admin
    
United Kingdom
20595 Posts |
Posted - 10 January 2001 : 08:35:45
|
TOPIC.ASP <hr>
Search for the following code, should be around line ~220
</td> <td align="right"> <% if maxpages > 1 then %> <table border=0 align="right"> <tr> <td valign="top"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>"><b>Pages: </b></font></td>
Immediately before this code, insert the following..
<p><font face="<% =strDefaultFontFace %>" size="<% =strFooterFontSize %>"><b> <% select case cInt(strPrivateForums) case 10 response.write "Only Admins and Moderators can post REPLIES to topics in this forum" case 11 response.write "Only Admins and Moderators can post NEW topics to this forum" case 12 response.write "This Forum is READ only, NO POSTING allowed" case else end select %> </b></font></p>
Next, search for
a href=post.asp ? method=ReplyQuote & REPLY_ID insert if (cint(strPrivateForums) <> 10 and cint(strPrivateForums) <> 12) or AdminAllowed = 1 then before it, and an end if after
Next, search for
a href="post.asp?method=TopicQuote&TOPIC_ID insert if (cint(strPrivateForums) <> 10 and cint(strPrivateForums) <> 12) or AdminAllowed = 1 then before it, and an end if after
Next, search for the sub PostingOptions()
After if (mlev = 4 or mlev = 3 or mlev = 2 or mlev = 1) or (lcase(strNoCookies) = "1") or (STRdbntUserName = "") then Add.. if cInt(strPrivateForums) < 11 or AdminAllowed = 1 then
Before if (rsCStatus("CAT_STATUS") = 1) and (rsFStatus("F_STATUS") = 1) and (rsTStatus("T_STATUS") = 1) then Add.. end if if (cint(strPrivateForums) <> 10 and cint(strPrivateForums) <> 12) or AdminAllowed = 1 then
Before if (lcase(strEmail) = "1") then Add.. end if
Let me know if you need any help
'Resistance is futile' |
 |
|
wii
Free ASP Hosts Moderator
    
Denmark
2632 Posts |
Posted - 10 January 2001 : 08:45:16
|
Huwr - something in this code is not right, because I just checked this on my new forum:
http://hifi.mobilixnet.dk/
and registered a normal user - I can still reply the posts on the forums type "Only Admins and Moderators can post REPLIES to topics in this forum"
I can send you the mod files if you like.
|
 |
|
HuwR
Forum Admin
    
United Kingdom
20595 Posts |
Posted - 10 January 2001 : 08:51:37
|
could you point me to the topic, I'll have a look
'Resistance is futile' |
 |
|
wii
Free ASP Hosts Moderator
    
Denmark
2632 Posts |
|
HuwR
Forum Admin
    
United Kingdom
20595 Posts |
Posted - 10 January 2001 : 09:29:00
|
You are absolutely correct, there is a bit missing. You need to do this in topic.asp aswell
a href=post.asp ? method=Reply & TOPIC_ID insert if (cint(strPrivateForums) <> 10 and cint(strPrivateForums) <> 12) or AdminAllowed = 1 then before it, and an end if after
'Resistance is futile' |
 |
|
HellRazor
New Member

59 Posts |
Posted - 14 January 2001 : 06:47:12
|
I'm having some trouble getting this mod to work. I can set a forum with the new access levels, but they don't seem to work...non-admins/moderators can still post/reply to the forums.
Was wondering if you could take a look at my source files and see if you can tell what I am doing wrong?
Thanks!
HellRazor
http://www.kingdomofdawn.com/uploads/forumfiles.zip
|
 |
|
HuwR
Forum Admin
    
United Kingdom
20595 Posts |
Posted - 14 January 2001 : 07:47:03
|
Checking
'Resistance is futile' |
 |
|
HuwR
Forum Admin
    
United Kingdom
20595 Posts |
Posted - 14 January 2001 : 08:03:53
|
I found some lines were missing in a couple of your files, I have emailed them back to you.
Let me know how you get on
'Resistance is futile' |
 |
|
Smiff
New Member

90 Posts |
Posted - 27 January 2001 : 20:19:25
|
HuwR, could you please tell me which lines he was missing? I think I have the same prob - can set the levels but it has no effect.
|
 |
|
Davio
Development Team Member
    
Jamaica
12217 Posts |
Posted - 29 January 2001 : 13:57:51
|
HuwR, I was trying to install this mod but I don't seem to be able to get it working. I see you are checking to see if strPrivateForums is either 10, 11 or 12 for the new forums. But the strPrivateForums is only either 1 or 0 and is set in the Admin Config. The variable is there to see if Private Forums is On or Off. I think you would need to either create a new variable and assign the contents of F_PRIVATEFORUMS into the variable, then you can check to see if it is either 10, 11 or 12, or you can just do a check directly from the database.
Did I make any sense? 
*----*----*----*----*----*----*----*----* "Even when you feel you have nothing left, You still have prayer--And that's enough." *----*----*----*----*----*----*----*----* |
 |
|
HuwR
Forum Admin
    
United Kingdom
20595 Posts |
Posted - 29 January 2001 : 15:03:21
|
Davio,
you're right, you also need to change
strPrivateForums =rsFStatus("F_PRIVATEFORUMS") to intPrivateForums =rsFStatus("F_PRIVATEFORUMS")
then change the CINT(strPrivateForums) to intPrivateForums
'Resistance is futile' |
 |
|
Smiff
New Member

90 Posts |
Posted - 29 January 2001 : 21:06:27
|
HuwR, sorry I don't see that code anywhere (is that code?), but I'm very keen to get this great mod working 
If you could explain using small words please? 
|
 |
|
Smiff
New Member

90 Posts |
Posted - 29 January 2001 : 21:07:21
|
It's the last two posts I don't follow. Thanks v much!
|
 |
|
John
Junior Member
 
USA
427 Posts |
Posted - 30 January 2001 : 01:39:39
|
Better idea would be to have two new DB fields:
F_TOPIC_LEVEL F_REPLY_LEVEL
each being 1-3 for the memberlevel required to post.
John Looking for mods? |
 |
|
Topic  |
|