Private Forum - Access Allowed When Posts > X - Postet den (652 Views)
Junior Member
ILLHILL
Innlegg: 341
341
Ok, so far I have added an extra option in post.asp
option number 10 to be exact and have created a forum
which is supposed to be only accessible to those with
(in my case) 150 posts or more.
However, I'm stuck at the following snippet in inc_func_secure

case 10

'## VIP Forum
strSql = "SELECT " & strMemberTablePrefix & "MEMBERS.MEMBER_ID"
strSql = strSql & ", " & strMemberTablePrefix & "MEMBERS.M_POSTS"
strSql = strSql & " FROM " & strMemberTablePrefix & "MEMBERS "
strSql = strSql & " WHERE MEMBER_ID=" & isAllowedMember

set rsCase10 = my_Conn.Execute(strSql)

if rsCase10("M_POSTS") > 150 then chkDisplayForum = true
if rsCase10("M_POSTS") = 150 then chkDisplayForum = true
if rsCase10("M_POSTS") < 150 then chkDisplayForum = false

rsCase10.close
set rsCase10=nothing


However when trying to access the forum as a non-admin with > 150 posts I get this:

Microsoft VBScript runtime error '800a01f5'

Illegal assignment: 'chkDisplayForum'

/forum/inc_func_secure.asp, line 221

With line 221 being this one:
if rsCase10("M_POSTS") > 150 then chkDisplayForum = true
What am I doing wrong and how to fix it? Or is this already done? (Couldn't find it with search though)

I think when working this would be a great addition to most forums. Nothing more motivating to be active when something is waiting at the
end. (When solved I plan on making different levels of VIP depending on the ammount of posts).
Greets & thanks,

Dominic
<
   
 Sidestørrelse 
Postet den
Support Moderator
Shaggy
Innlegg: 6780
6780
Rather than struggling with inc_func_secure, what I'd recommend is adding a check to post_info.asp to see if the member's post count is 150 and, if so, add them to the allowed members list for your private forum.
<
Search is your friend “I was having a mildly paranoid day, mostly due to the
fact that the mad priest lady from over the river had
taken to nailing weasels to my front door again.”
Postet den
Junior Member
CalloftheHauntedMaster
Innlegg: 289
289
Has this mod been finished because I'm extremely interested in using it?<
This account was hacked into by Image, a very honest guy as you all can see! Stealing people's passwords is his pasttime. Beware of this, before you register at his forums!
Postet den
Junior Member
ILLHILL
Innlegg: 341
341
Couldn't get it to work yet. Maybe over the weekend I give it another try.
I still got Nertz WYSIWYG mod to install...if only I would find a way to fit 72 hours in a day :)

Greets, Dominic<
 
Du må legge inn en melding