Author |
Topic  |
Kal Corp
Average Member
  
USA
878 Posts |
Posted - 07 August 2000 : 21:32:53
|
In the Default.asp
Change all <b>if (mlev = 4 or mlev = 3) or (lcase(strNoCookies) = "1") then </b>
to
<b>if (mlev = 4 ) or (chkForumModerator(rsForum("FORUM_ID"), Request.Cookies("User")("Name")) = "1") or (chkForumModerator(rsForum("FORUM_ID"), session("username")= "1") or (lcase(strNoCookies) = "1") then </b>
Also in Forum and Topic.asp's you need to chage
<b>if (mlev = 4 or mlev = 3) or (lcase(strNoCookies) = "1") then </b>
to
<b>if (mlev = 4 ) or (chkForumModerator(Request.QueryString("FORUM_ID"), Request.Cookies("User")("Name")) = "1") or (chkForumModerator(Request.QueryString("FORUM_ID"), session("username")= "1") or (lcase(strNoCookies) = "1") then </b>
There is a question here, Should "Request.Cookies("User")("Name")" just work ? Because it does not for NT. I needed to add "session("username")"section so that it would work.
Kal's Forums http://vasserver.dyndns.org/Forums/default.asp
Edited by - kal corp on 07 August 2000 21:52:40 |
|
davemaxwell
Access 2000 Support Moderator
    
USA
3020 Posts |
Posted - 08 August 2000 : 07:36:04
|
Actually, in Forum.asp and Topics.asp, this code is less CPU intensive:
Right after <font color=green>include inc_top.asp</font id=green>, add the following code: <pre id=code><font face=courier size=2 id=code> If mlev = 4 or _ (chkForumModerator(Request.QueryString("FORUM_ID"), Request.Cookies("User")("Name")) = 1) or _ (chkForumModerator(Request.QueryString("FORUM_ID"), session("username")) = 1) then AdminAllowed = 1 Else AdminAllowed = 0 End if </font id=code></pre id=code>
Then where ever you see: <b>if (mlev = 4 or mlev = 3) or (lcase(strNoCookies) = "1") then </b>
you would place: <b>if AdminAllowed = 1 or strNoCookies = "1" then</b>
Since AdminAllowed would be a local variable, you don't have as many calls to the Cookie. The CPU work is less, hence the speed is faster...
Dave Maxwell -------------- Self Certified Snitz Bug Swatter <img src=icon_smile_big.gif border=0 align=middle> |
 |
|
Lord Maverick
New Member

Norway
92 Posts |
Posted - 08 August 2000 : 18:18:19
|
Actually, I don't understand what this addition does to the forum. Do you have a explanation or a link...
|
 |
|
Kal Corp
Average Member
  
USA
878 Posts |
Posted - 08 August 2000 : 20:15:44
|
Thanks davemaxwell i'm still new to this ASP <img src=icon_smile.gif border=0 align=middle>
Hay Maverick, here is a demo. Goto http://vasserver.dyndns.org/forums_2000/forum1/default.asp
and logon as "TestMod" password "test" Look at "Test - Mod Admin Icons".
Only the forums that you have access to will show the Admin icons. Currently thay show up for everything even if you are just a mod for one forum. It does clean things up.
Kal's Forums http://vasserver.dyndns.org/Forums/default.asp
Edited by - kal corp on 09 August 2000 00:14:08 |
 |
|
Kal Corp
Average Member
  
USA
878 Posts |
Posted - 09 August 2000 : 00:13:01
|
I Set up a test forum from V3 Final. added in 3 mod's and i have the file for download.
Snitz_Forums_2000_v3_final + Statistics + FORUM PAGING + Cleaned up Admin Icons (DB), NT works with code change, Working to have both together.
Zip file has 6 files that have been updated from v3 Final. active.asp, default.asp, forum.asp, paging.asp, statistics.asp, topic.asp
http://vasserver.dyndns.org/forums_2000/Updates.zip
If you are just looking just for the Clean admin icons just ask, i can create the updates from V3 Final
Testing forums - 2 Forums same database + mod's http://vasserver.dyndns.org/forums_2000/forum1/default.asp
Edited by - kal corp on 09 August 2000 00:17:42 |
 |
|
Lord Maverick
New Member

Norway
92 Posts |
Posted - 09 August 2000 : 01:42:59
|
Nice work guys!
But there is a BUG in here somewhere.
Tried to log in as TestMod-test, went into the topics page, and tried to logout from there. Then I got the:
Could not use ''; file already in use. /forums_2000/forum1/inc_top.asp, line 31
error that has been bugging us (here
|
 |
|
smiddy
New Member

USA
81 Posts |
Posted - 09 August 2000 : 01:53:52
|
Kal, looks real nice. A suggestion, finish the tables. In Netscape there is a black hole where the admin icons are supposed to be located for forums not editable by the moderator.
<div align=right>-smiddy, Hey, BEER Me!</div id=right>
|
 |
|
Kal Corp
Average Member
  
USA
878 Posts |
|
Lord Maverick
New Member

Norway
92 Posts |
Posted - 09 August 2000 : 16:38:00
|
Still getting the file already in use!
|
 |
|
blkrogue
New Member

USA
79 Posts |
Posted - 09 August 2000 : 17:30:07
|
Only time I had a file-in-use error passing by was when I wrote the script that alters database tables (when I wrote the script for the db_profile_setup.asp).
Solved the problem when I made sure after each Connection.Execute a Connection.Close (and thus connection.open) followed before making another Connection.Execute.
Dunno if it helps you solve the problem or not, but just adding my 2 cents (as I'm not quite sure if it was a real fix for my problem, or just a work around).
Blkrogue
In the darkness of my soul a sparkling light has appeared |
 |
|
Kal Corp
Average Member
  
USA
878 Posts |
Posted - 09 August 2000 : 17:54:21
|
<BLOCKQUOTE id=quote><font size=1 face="Verdana, Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote> Still getting the file already in use! <hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Verdana, Arial, Helvetica" size=2 id=quote>
In all the Topics or just one? and what one would that be? [:-)]
I dont get the error from over here
Testing forums - 2 Forums same database + mod's http://vasserver.dyndns.org/forums_2000/forum1/default.asp |
 |
|
Lord Maverick
New Member

Norway
92 Posts |
Posted - 09 August 2000 : 17:54:34
|
I should have been more precise. I still get this error when testing the forum Kal Corp set up. I haven't done this addition at my forum due to this bug in Kal Corps test forum...
|
 |
|
Kal Corp
Average Member
  
USA
878 Posts |
|
Kal Corp
Average Member
  
USA
878 Posts |
|
Lord Maverick
New Member

Norway
92 Posts |
Posted - 10 August 2000 : 02:52:21
|
Kal Corp,
Did'nt get the error message now, but I've noticed this is'nt a restricted forum any longer. From your comments under the Test Mod forum it seems that you have been able to recreate the error I got... <img src=icon_smile_wink.gif border=0 align=middle>
|
 |
|
Kal Corp
Average Member
  
USA
878 Posts |
|
Topic  |
|