Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Help Groups for Snitz Forums 2000 Users
 Help: MOD Implementation
 Snitz Polls - Davio - restrict poll creation
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

Chuck McB
Junior Member

WooYay
196 Posts

Posted - 05 June 2001 :  19:53:09  Show Profile  Visit Chuck McB's Homepage  Send Chuck McB an ICQ Message
Hi

Any pointers on the code change needed to restrict moderators to just adding polls to their own forums?

Using poll code last modified - May 26, 2001

TIA

Chuck

---
DNA.styx
DNA Games

dayve
Forum Moderator

USA
5820 Posts

Posted - 06 June 2001 :  01:01:47  Show Profile  Visit dayve's Homepage
in topic.asp change this:

<% ' ################ Poll Mod ###################

if (strUserPolls = "1") and (mlev = 4 or mlev = 3) then %>
 <a href="post.asp?poll=1&method=Topic&FORUM_ID=<% =Request.QueryString("FORUM_ID") %>&CAT_ID=<% =Request.QueryString("CAT_ID") %>&Forum_Title=<% =ChkString(Request.QueryString("FORUM_Title"),"urlpath") %>"><img src="pin.gif" alt="Add Poll" border=0></a> <a href="post.asp?poll=1&method=Topic&FORUM_ID=<% =Request.QueryString("FORUM_ID") %>&CAT_ID=<% =Request.QueryString("CAT_ID") %>&Forum_Title=<% =ChkString(Request.QueryString("FORUM_Title"),"urlpath") %>">new poll</a><br>
<% end if
' ############################################


and in forum.asp change this:

<% ' #################### Poll Mod #####################
if (strUserPolls = "1") and (mlev = 4 or mlev = 3) then %>
 <a href="post.asp?poll=1&method=Topic&FORUM_ID=<% =Request.QueryString("FORUM_ID")%>&CAT_ID=<% =Request.QueryString("CAT_ID")%>&Forum_Title=<% =ChkString(Request.QueryString("FORUM_Title"),"urlpath") %>"><img src="pin.gif" alt="Add Poll" border=0></a> <a href="post.asp?poll=1&method=Topic&FORUM_ID=<% =Request.QueryString("FORUM_ID")%>&CAT_ID=<% =Request.QueryString("CAT_ID")%>&Forum_Title=<% =ChkString(Request.QueryString("FORUM_Title"),"urlpath") %>">new poll</a>
<% end if
' ###################################################

the boolean OR should be AND

Dayve
Go to Top of Page

Chuck McB
Junior Member

WooYay
196 Posts

Posted - 06 June 2001 :  10:17:00  Show Profile  Visit Chuck McB's Homepage  Send Chuck McB an ICQ Message
that would seems to mean that anyone can now post polls?

Chuck

---
DNA.styx
DNA Games
Go to Top of Page

dayve
Forum Moderator

USA
5820 Posts

Posted - 06 June 2001 :  10:26:53  Show Profile  Visit dayve's Homepage
nope, incorrect statement... read the logic...

if (strUserPolls = "1") and (mlev = 4 or mlev = 3) then %>

means, if poll feature is ON and the user is a moderator or admin then display the option for creating polls. this means the poll feature has to be on AND the user must be an admin or moderator. now look at this logic...

if (strUserPolls = "1") or (mlev = 4 or mlev = 3) then %>

means, if poll feature is ON then disply option for creating polls or if user is moderator or admin display option for creating polls. this allows EVERYONE to create polls...

Dayve

Edited by - dayve on 06 June 2001 10:28:24
Go to Top of Page

Davio
Development Team Member

Jamaica
12217 Posts

Posted - 06 June 2001 :  11:01:32  Show Profile
Yep. That's correct.
Good going Dayve.

Go to Top of Page

Chuck McB
Junior Member

WooYay
196 Posts

Posted - 06 June 2001 :  12:15:07  Show Profile  Visit Chuck McB's Homepage  Send Chuck McB an ICQ Message
Yup, with you on the logic

...but #1 When I made the changes anyone logged in can make polls....

...but #2 if I change
if (strUserPolls = "1") and (mlev = 4 or mlev = 3) then %>

to
if (strUserPolls = "1") and (AdminAllowed = 1) then %>


This only allows the Moderator of that forum to add new polls....


Chuck

---
DNA.styx
DNA Games
Go to Top of Page

Davio
Development Team Member

Jamaica
12217 Posts

Posted - 06 June 2001 :  13:03:52  Show Profile
Ahh. Yes, the AdminAllowed variable should be used instead of the mLev. Because it checks the mLev at the begining of the file and stores that in the AdminAllowed variable.

Don't know why the mLev didn't work. But I will need to change that in files.
Make sure you make the same changes in the forum.asp file.

Go to Top of Page

dayve
Forum Moderator

USA
5820 Posts

Posted - 06 June 2001 :  16:24:45  Show Profile  Visit dayve's Homepage
I didn't know you wanted to restrict moderators to creating polls in their own section so that is a better edit. As for this:

quote:

but #1 When I made the changes anyone logged in can make polls



I don't see how that could happen. if (strUserPolls = "1") and (mlev = 4 or mlev = 3) then %> will only allow moderators and admins to create polls in ALL categories. I tested this and you should NOT see the link for New Poll for regular members. Am I misunderstanding what you are saying?



Dayve

Edited by - dayve on 06 June 2001 16:26:21
Go to Top of Page

Chuck McB
Junior Member

WooYay
196 Posts

Posted - 07 June 2001 :  15:56:18  Show Profile  Visit Chuck McB's Homepage  Send Chuck McB an ICQ Message
quote:
I don't see how that could happen.
Yup, sorry it didn't happen I tried it again now, worked fine....must have had finger trouble the other day.

Thanks guys.

Chuck

---
DNA.styx
DNA Games
Go to Top of Page

dayve
Forum Moderator

USA
5820 Posts

Posted - 07 June 2001 :  19:51:13  Show Profile  Visit dayve's Homepage
quote:

quote:
I don't see how that could happen.
Yup, sorry it didn't happen I tried it again now, worked fine....must have had finger trouble the other day.

Thanks guys.

Chuck

---
DNA.styx
DNA Games



...placing the prozac back in the medicine cabinet...

cool...

Dayve
Go to Top of Page

Chuck McB
Junior Member

WooYay
196 Posts

Posted - 08 June 2001 :  15:55:46  Show Profile  Visit Chuck McB's Homepage  Send Chuck McB an ICQ Message
quote:
...placing the prozac back in the medicine cabinet...
;)

Now if only I could figure out why when I post a topic:

quote:

Posted - 08 Jun 2001 : 20:54:50
test

Chuck
HL Admin Mod Player Manager



and then lock it I get the poll apearing then there...

quote:

Posted - 08 Jun 2001 : 20:54:50

test

Chuck
HL Admin Mod Player Manager
Poll Question:
test

Chuck
HL Admin Mod Player Manager
Results:


Total of 1 votes counted so far



LINK <-- Dead link - Problem was solved.

/me wonders how hard it is to copy/paste :)



Chuck

---
DNA.styx
DNA Games

Edited by - chuck mcb on 09 June 2001 05:23:55
Go to Top of Page

Davio
Development Team Member

Jamaica
12217 Posts

Posted - 08 June 2001 :  16:05:34  Show Profile
Aaaaaaah!!! Bug bug bug!!!!!
Somebody get the bug spray, quick!!!

Chuck you must keep a messy forum, why the bugs crawl around in there. hehe

It's a bug chuck. I'll check it why it's doing that.

Go to Top of Page

Davio
Development Team Member

Jamaica
12217 Posts

Posted - 08 June 2001 :  19:07:04  Show Profile
Chuck, if you send me your topic.asp file, I will fix that for you.

Go to Top of Page

Chuck McB
Junior Member

WooYay
196 Posts

Posted - 09 June 2001 :  05:20:18  Show Profile  Visit Chuck McB's Homepage  Send Chuck McB an ICQ Message
Workin' fine.

Cheers Davio.

Chuck

---
DNA.styx
DNA Games
Go to Top of Page
  Previous Topic Topic Next Topic  
 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.43 seconds. Powered By: Snitz Forums 2000 Version 3.4.07