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)
 Read/Write Access
 New Topic  Topic Locked
 Printer Friendly
Next Page
Author Previous Topic Topic Next Topic
Page: of 3

Jeepaholic
Average Member

USA
697 Posts

Posted - 29 October 2000 :  23:25:48  Show Profile  Visit Jeepaholic's Homepage
Sorry if this suggestion/question has been posted before. I looked around and couldn't find anything...

Are there plans to have read/write access to specific forums? In a nutshell, I need to be able to allow users to reply to topics but not initiate their own. Starting new topics would be the responsibility of the Admin/Moderator.

Thanks for any info!

Al Bsharah
Jeepaholics Anonymous

<font color=green>Moved by Gor from W/O Code forum</font id=green>

HuwR
Forum Admin

United Kingdom
20587 Posts

Posted - 30 October 2000 :  03:10:58  Show Profile  Visit HuwR's Homepage
The quickest way would be to remove the two links to new topic from Topic.asp

You need to look for the line that start
<pre id=code><font face=courier size=2 id=code>
<a href="post.asp?method=Topic&FORUM_ID
</font id=code></pre id=code>

<font color=blue>'Resistance is futile'</font id=blue>
Go to Top of Page

RichardKinser
Snitz Forums Admin

USA
16655 Posts

Posted - 30 October 2000 :  03:18:31  Show Profile
HuwR,

I thought about that too (and just adding a check for mlev after method="topic" in post_info.asp), but he only wants some forums to be this way, not all.

We could add a data field in the FORUM_FORUM table (i.e. F_ALLOWNEWTOPIC), this would be configurable via the Create Forum Form, and the Edit Forum Form.

Then after the method = "Topic" in post_info.asp have a check to see if strAllowNewTopic is on or off, if it's off then check to see if mlev=4 , if it is then post the Topic. If not, then don't post the Topic.

Edited by - Richard Kinser on 31 October 2000 01:02:18
Go to Top of Page

HuwR
Forum Admin

United Kingdom
20587 Posts

Posted - 30 October 2000 :  03:27:20  Show Profile  Visit HuwR's Homepage
Sounds much more generic, and a useful addition to a release sometime.

<font color=blue>'Resistance is futile'</font id=blue>
Go to Top of Page

Jeepaholic
Average Member

USA
697 Posts

Posted - 30 October 2000 :  18:08:58  Show Profile  Visit Jeepaholic's Homepage
Richard,
You're right about only wanting to do this with some forums. I suppose I could put in some temporary hard-code to look at the mlev (I assume this is member level 1-3?) for specific forum id's only? I'm just now starting to understand some of the coding...any quick insight as to what this would look like?
Thanks guys!

Al Bsharah
Jeepaholics Anonymous
Go to Top of Page

HuwR
Forum Admin

United Kingdom
20587 Posts

Posted - 30 October 2000 :  18:17:19  Show Profile  Visit HuwR's Homepage
mLev < 4 means not the administrator

<font color=blue>'Resistance is futile'</font id=blue>
Go to Top of Page

Jeepaholic
Average Member

USA
697 Posts

Posted - 31 October 2000 :  00:28:51  Show Profile  Visit Jeepaholic's Homepage
Ok, here's what I did. I think this will work. I added the following code <b>(bold)</b> to the following files:


<font color=red>post_info.asp:</font id=red><pre id=code><font face=courier size=2 id=code>
if Request.Form("Method_Type") = "Topic" then
'## Forum_SQL
strSql = "SELECT MEMBER_ID, M_LEVEL, M_EMAIL, "&Strdbntsqlname
if strAuthType = "db" then
strSql = strSql & ", M_PASSWORD "
end if
strSql = strSql & " FROM " & strMemberTablePrefix & "MEMBERS "
strSql = strSql & " WHERE "&Strdbntsqlname&" = '" & STRdbntUserName & "'"
if strAuthType = "db" then
strSql = strSql & " AND M_PASSWORD = '" & Request.Form("Password") &"'"
QuoteOk = (ChkQuoteOk(STRdbntUserName) and ChkQuoteOk(Request.Form("Password")))
else
QuoteOk = ChkQuoteOk(Session(strCookieURL & "userid"))
end if
set rs = my_Conn.Execute (strSql)
<b>if (mlev < 3) and (Request.Form("FORUM_ID") = 12) then
Go_Result "Only Moderators and Admins can post to this forum!", 0
end if</b>
if rs.BOF or rs.EOF or not(QuoteOk) then '## Invalid Password
Go_Result "Invalid UserName or Password", 0
</font id=code></pre id=code>





<font color=red>post.asp:</font id=red><pre id=code><font face=courier size=2 id=code>
case "Topic"
if (strNoCookies = 1) or (STRdbntUserName = "") then
Msg = Msg & "<b>Note:</b> You must be registered in order to post a Topic.<br>"
Msg = Msg & "To register, <a href=""policy.asp"">click here</a>. Registration is FREE!<br>"
end if
<b>if (mlev < 3) and (Request.QueryString("FORUM_ID") = 12) then
msg = msg & "Only Moderators and Admins can post to this forum!"
end if
</b></font id=code></pre id=code>



Yeah it sucks because it's hard coded...but I think it'll do what I'm looking for. Oh, and...I'm learning, I'm learning!


Al Bsharah
Jeepaholics Anonymous
Go to Top of Page

RichardKinser
Snitz Forums Admin

USA
16655 Posts

Posted - 31 October 2000 :  01:04:42  Show Profile
Looks like it would work.

Nothing sucky about something that does what you want it to. <img src=icon_smile.gif border=0 align=middle>
Go to Top of Page

Jeepaholic
Average Member

USA
697 Posts

Posted - 31 October 2000 :  01:19:05  Show Profile  Visit Jeepaholic's Homepage
Also added this:

<font color=red>forum.asp:</font id=red><pre id=code><font face=courier size=2 id=code>
sub PostNewTopic()
%>
<font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>">
<b><% if (mlev < 4) and (Request.QueryString("FORUM_ID") = 9) then %>
Only Admins can post NEW topics to this forum
<% else</b></font id=code></pre id=code>

And another "end if" at the end of that routine.

This actually doesn't even allow the above two scenarios to happen, but the above two protect against someone just typing in the URL code to post...

Yeah, I guess I agree that sucky code can sometimes be a good thing. Now...someone needs to take this concept and make it real! <nudge><cough><nudge>


Al Bsharah
Jeepaholics Anonymous
Go to Top of Page

Jeepaholic
Average Member

USA
697 Posts

Posted - 31 October 2000 :  01:41:11  Show Profile  Visit Jeepaholic's Homepage
Ok...one issue. It seems that when I post a new topic, and get this message...

New Topic Posted!
Thank you for your contribution!
Back To Forum

...it no longer returns automatically to the message like it used to. What'd I do?

Al Bsharah
Jeepaholics Anonymous
Go to Top of Page

HuwR
Forum Admin

United Kingdom
20587 Posts

Posted - 08 November 2000 :  15:34:18  Show Profile  Visit HuwR's Homepage
I have done this by adding three new private forum types

<b>10 - Only Admin/Moderators can Reply - </b>
<font color=red>
Users can post questions, but are not allowed to reply
</font id=red>

<b>11 - Everyone can Reply -</b>
<font color=red>
Users are only allowed to reply to topics, they can't create new ones.
</font id=red>

<b>12 - Only Admin/Moderators can Post/Reply -</b>
<font color=red>
Effectively a locked forum, it is read only to users.
</font id=red>

You can view a demo here, I will post instructions for the code changes later


<font color=blue>'Resistance is futile'</font id=blue>
Go to Top of Page

Jeepaholic
Average Member

USA
697 Posts

Posted - 08 November 2000 :  15:51:55  Show Profile  Visit Jeepaholic's Homepage
VERY cool, exactly what I'm looking for. Can't wait to see your code mods!

Al Bsharah
Jeepaholics Anonymous
Go to Top of Page

RichardKinser
Snitz Forums Admin

USA
16655 Posts

Posted - 08 November 2000 :  15:58:19  Show Profile
HuwR,

Did this require any new database fields? I was working on the same thing but I did add a database field for it. If no database fields had to be added it would be a plus.

Also, I added some text that would show up stating that:

<b><font size=1>Only Admins and Moderators can post NEW topics to this forum</font id=size1></b>

You can see a demo of this here
Go to Top of Page

HuwR
Forum Admin

United Kingdom
20587 Posts

Posted - 08 November 2000 :  16:00:06  Show Profile  Visit HuwR's Homepage
NO, I just added 3 new values for strPrivateForums.

<font color=blue>'Resistance is futile'</font id=blue>
Go to Top of Page

HuwR
Forum Admin

United Kingdom
20587 Posts

Posted - 08 November 2000 :  16:02:47  Show Profile  Visit HuwR's Homepage
<BLOCKQUOTE id=quote><font size=1 face="Verdana, Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote>
Also, I added some text that would show up stating that:

<b><font size=1>Only Admins and Moderators can post NEW topics to this forum</font id=size1></b>
<hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Verdana, Arial, Helvetica" size=2 id=quote>

That should be fairly easy to implement, I have basically added about a dozen lines of code. It is not fool proof, as it only hides the icons which allow you to post or reply, but it will be adequate for most people I guess.

<font color=blue>'Resistance is futile'</font id=blue>
Go to Top of Page

RichardKinser
Snitz Forums Admin

USA
16655 Posts

Posted - 08 November 2000 :  17:27:13  Show Profile
I actually added checks to post_info.asp also, so that if the person changes the URL to try to post it gives them the error message that only Admins and Moderators can Post New Messages.
Go to Top of Page
Page: of 3 Previous Topic Topic Next Topic  
Next Page
 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.15 seconds. Powered By: Snitz Forums 2000 Version 3.4.07