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)
 Admin Icons For Forums that you have access too
 New Topic  Topic Locked
 Printer Friendly
Next Page
Author Previous Topic Topic Next Topic
Page: of 2

Kal Corp
Average Member

USA
878 Posts

Posted - 07 August 2000 :  21:32:53  Show Profile  Visit Kal Corp's Homepage
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  Show Profile  Visit davemaxwell's Homepage  Send davemaxwell an AOL message  Send davemaxwell an ICQ Message  Send davemaxwell a Yahoo! Message
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>
Go to Top of Page

Lord Maverick
New Member

Norway
92 Posts

Posted - 08 August 2000 :  18:18:19  Show Profile  Send Lord Maverick an ICQ Message
Actually, I don't understand what this addition does to the forum. Do you have a explanation or a link...

Go to Top of Page

Kal Corp
Average Member

USA
878 Posts

Posted - 08 August 2000 :  20:15:44  Show Profile  Visit Kal Corp's Homepage
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
Go to Top of Page

Kal Corp
Average Member

USA
878 Posts

Posted - 09 August 2000 :  00:13:01  Show Profile  Visit Kal Corp's Homepage
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
Go to Top of Page

Lord Maverick
New Member

Norway
92 Posts

Posted - 09 August 2000 :  01:42:59  Show Profile  Send Lord Maverick an ICQ Message
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


Go to Top of Page

smiddy
New Member

USA
81 Posts

Posted - 09 August 2000 :  01:53:52  Show Profile  Send smiddy an AOL message  Send smiddy an ICQ Message  Send smiddy a Yahoo! Message
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>
Go to Top of Page

Kal Corp
Average Member

USA
878 Posts

Posted - 09 August 2000 :  11:08:39  Show Profile  Visit Kal Corp's Homepage
Still getting the black hole's or file already in use ?

Testing forums - 2 Forums same database + mod's
http://vasserver.dyndns.org/forums_2000/forum1/default.asp
Go to Top of Page

Lord Maverick
New Member

Norway
92 Posts

Posted - 09 August 2000 :  16:38:00  Show Profile  Send Lord Maverick an ICQ Message
Still getting the file already in use!

Go to Top of Page

blkrogue
New Member

USA
79 Posts

Posted - 09 August 2000 :  17:30:07  Show Profile
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
Go to Top of Page

Kal Corp
Average Member

USA
878 Posts

Posted - 09 August 2000 :  17:54:21  Show Profile  Visit Kal Corp's Homepage
<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
Go to Top of Page

Lord Maverick
New Member

Norway
92 Posts

Posted - 09 August 2000 :  17:54:34  Show Profile  Send Lord Maverick an ICQ Message
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...

Go to Top of Page

Kal Corp
Average Member

USA
878 Posts

Posted - 09 August 2000 :  20:42:33  Show Profile  Visit Kal Corp's Homepage
I still can not get the error in the Kal test forum.

How am i going to trouble shoot this [:-(]

Testing forums - 2 Forums same database + mod's
http://vasserver.dyndns.org/forums_2000/forum1/default.asp
Go to Top of Page

Kal Corp
Average Member

USA
878 Posts

Posted - 09 August 2000 :  21:18:04  Show Profile  Visit Kal Corp's Homepage
Updated files , (Now Clean Admin Icons work for DB and NT)

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



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 21:18:29
Go to Top of Page

Lord Maverick
New Member

Norway
92 Posts

Posted - 10 August 2000 :  02:52:21  Show Profile  Send Lord Maverick an ICQ Message
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>

Go to Top of Page

Kal Corp
Average Member

USA
878 Posts

Posted - 10 August 2000 :  19:06:32  Show Profile  Visit Kal Corp's Homepage
I also have the Code cleaned up. and now completely working for DB and NT, I will update test forum, and the download soon.

Testing forums - 2 Forums same database + mod's
http://vasserver.dyndns.org/forums_2000/forum1/default.asp
Go to Top of Page
Page: of 2 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.52 seconds. Powered By: Snitz Forums 2000 Version 3.4.07