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)
 Display Content Mod
 New Topic  Topic Locked
 Printer Friendly
Previous Page | Next Page
Author Previous Topic Topic Next Topic
Page: of 16

Rob Poretti
Junior Member

Canada
435 Posts

Posted - 05 July 2001 :  14:24:31  Show Profile  Visit Rob Poretti's Homepage
Hi Simonduz,

The Link for the editor a couple of messages up, is a DEMO so that people could look at the new version of the editor -- it is simply named differently becasue that was the original develpment name, and that's what I happen use on this particular website. If you click on the link, and play with the parameters, you can see that (with the exception of private forums), it all works just fine....

The reason NONE of the modes are working is probably an ACCESS related problem OR an incompatability with your forum because of a different database structure as a result of not having the mods installed or done correctly. It works fine with my forum on SQL Server 7.0...

I mainly posted the new version for Bozden to deal with the Access issues and for you to "look" at the table structures. I don't want to debug anything else right now -- sorry -- otherwise I wouldn't have posted it until it was ready! I just thought it might be more efficient to work in parallel, and I didn't forsee any more changes in the SQL statements.

Bozden is obviously busy with other things right now, so lets just wait...

If Bookie wants to attempt the Access thing, then kewl... at least we now have the correct files to work from...

Cheers!




Rob Poretti
Sascom Marketing Group ~ Toronto
vox.905.825.5373 fax.905.825.5960

Edited by - Rob Poretti on 05 July 2001 14:26:23
Go to Top of Page

Bookie
Average Member

USA
856 Posts

Posted - 05 July 2001 :  14:44:52  Show Profile  Visit Bookie's Homepage  Send Bookie an AOL message  Send Bookie a Yahoo! Message
quote:
If Bookie wants to attempt the Access thing, then kewl...


Oh boy. That's a lot of pressure. Unfortunately I'm just a novice when it comes to asp. This is a lot more complicated than anything I've ever done. I can't promise anything but if I get the guts to try it, I will.

Bookie

"May the forces of evil become confused on the way to your home."
- George Carlin
Go to Top of Page

Rob Poretti
Junior Member

Canada
435 Posts

Posted - 05 July 2001 :  18:14:58  Show Profile  Visit Rob Poretti's Homepage
Bookie,

Have you downloaded the latest version? If you have, is it working on your site? I'm just curious if this is really an Access problem (it sounds like it is), or something specific to Simonduz's forum.

Cheers!



Rob Poretti
Sascom Marketing Group ~ Toronto
vox.905.825.5373 fax.905.825.5960
Go to Top of Page

Bookie
Average Member

USA
856 Posts

Posted - 05 July 2001 :  21:18:42  Show Profile  Visit Bookie's Homepage  Send Bookie an AOL message  Send Bookie a Yahoo! Message
quote:

Bookie,

Have you downloaded the latest version? If you have, is it working on your site? I'm just curious if this is really an Access problem (it sounds like it is), or something specific to Simonduz's forum.

Cheers!



Rob Poretti
Sascom Marketing Group ~ Toronto
vox.905.825.5373 fax.905.825.5960



Not yet but I'll give it a shot and let you know the results.

By the way, do you think we should start a new topic and title it ... version 2 or whatever? Just a suggestion.

Bookie

"May the forces of evil become confused on the way to your home."
- George Carlin
Go to Top of Page

Bookie
Average Member

USA
856 Posts

Posted - 05 July 2001 :  21:34:04  Show Profile  Visit Bookie's Homepage  Send Bookie an AOL message  Send Bookie a Yahoo! Message
Ok. I've installed the most recent version.

http://www.bookfamily.net/forum/contentdisplay_editor2.asp

I've uncommented the response.write so it will display the sql statement. Let's see if we can figure this one out. I don't have any private forums so don't worry about stumbling across sensitive data .

Bookie

"May the forces of evil become confused on the way to your home."
- George Carlin
Go to Top of Page

Rob Poretti
Junior Member

Canada
435 Posts

Posted - 06 July 2001 :  00:19:16  Show Profile  Visit Rob Poretti's Homepage
Hi Bookie,

Ok, that was helpfull...

I was able to take the SQl statement from the webpage that you posted, and paste it directly into SQL EM and it worked just fine, so I'm pretty sure this is simply an Access problem. I went through an old Access 95 book and I noticed that the syntax they show for doing multiple joins has to follow this format:

FROM(...(table1 JOIN table2 ON conditionA) JOIN table3 ON conditionB)
JOIN ...)

So... try using this instead:

strSql = strSql & " FROM ((" & strTablePrefix & "FORUM "
strSql = strSql & "INNER JOIN " & strTablePrefix & "TOPICS ON "
strSql = strSql & strTablePrefix & "FORUM.FORUM_ID = "
strSql = strSql & strTablePrefix & "TOPICS.FORUM_ID) "
strSql = strSql & "INNER JOIN " & strTablePrefix & "MEMBERS ON "
strSql = strSql & strTablePrefix & "TOPICS.T_AUTHOR = "
strSql = strSql & strTablePrefix & "MEMBERS.MEMBER_ID) "

It should be obvious what this replaces -- this is one complete "section" of the SQL statement in the content.asp file. I'm hoping that the missing brackets are causing the SQL parser for Access to not "see" the operator -- which is otherwise plainly visible!

Let me know...

Cheers!


Rob Poretti
Sascom Marketing Group ~ Toronto
vox.905.825.5373 fax.905.825.5960

Edited by - Rob Poretti on 06 July 2001 00:19:52
Go to Top of Page

simonduz
Junior Member

161 Posts

Posted - 06 July 2001 :  06:54:46  Show Profile  Visit simonduz's Homepage  Send simonduz an ICQ Message  Send simonduz a Yahoo! Message
Simply put WOW!! It works... I spent some time yesterday afternoon and tried using some of that code from the last Access version which looks similar but you hit the nail on the head.
Thanks Bookie for knowing how to look for the problem.
Yet another great job.

OK spoke to soon. Let me restate that it is working on my local copy (Win2k IIS) but not on my hosted site. Recieving weird error:
Microsoft VBScript runtime error '800a000d'
Type mismatch: 'StripAll'
/content.asp, line 876

Probably something I overlooked. Looking into it.
Still looks and works great on my local copy though. Im happy.

Simonduz

http://easyromantic.webbhost.net -[test site]-
yada, yada.

Edited by - simonduz on 06 July 2001 07:38:09
Go to Top of Page

Rob Poretti
Junior Member

Canada
435 Posts

Posted - 06 July 2001 :  08:26:03  Show Profile  Visit Rob Poretti's Homepage
StripAll... right!

This is a new function that I patched together. YOu need to put this in your inc_functions.asp file:


FOR SOME REASON THE FUNCTION THAT I KEEP TRYING TO PUT HERE, CAUSES PROBLEMS IN DISPLAYING THIS POST.

I'M GOING TO HAVE CREATE A TEXT FILE, UPLOAD TO MY SERVER, AND POST THIS AS A LINK.

STAY TUNED!


There will be some other functions required as well, (the chkDisplayPrivateForums, for example.) I'll include them all in the new zip file once the database thing is resolved. -- And you I will start a new topic when it is released...

Cheers!


Rob Poretti
Sascom Marketing Group ~ Toronto
vox.905.825.5373 fax.905.825.5960

Edited by - Rob Poretti on 06 July 2001 08:38:13
Go to Top of Page

Rob Poretti
Junior Member

Canada
435 Posts

Posted - 06 July 2001 :  08:33:35  Show Profile  Visit Rob Poretti's Homepage
So while you are copy/pasting in new functions, you're gonna need this one when the final gets released:

function chkDisplayPrivateForum(fForum_ID)
if (mlev = 4) then ' If administrator
chkDisplayPrivateForum = true ' then display all forums -- set to 3 for moderator
exit function
end if

'////// LEGEND ///////////////////////////////////////////////////////
' 0 All Visitors
' 1 Allowed Member List
' 2 Password Protected
' 3 Allowed Member List & Password Protected
' 4 Members Only
' 5 Members Only (Hidden)
' 6 Allowed Member List (Hidden)
' 7 Members Only & Password Protected
' 8 NT Global Group
' 9 NT Global Group


'## Forum_SQL - load the user list
strSql = "SELECT " & strTablePrefix & "FORUM.F_USERLIST, " & strTablePrefix & "FORUM.F_PRIVATEFORUMS "

'############### Posting Restrictions ###########################
strSql = strSql & ", F_HIDDEN "
'############### Posting Restrictions ###########################

strSql = strSql & " FROM " & strTablePrefix & "FORUM "
strSql = strSql & " WHERE FORUM_ID = " & fForum_ID

set rsAccess = my_Conn.Execute(strSql)
select case rsAccess("F_PRIVATEFORUMS")


case 0, 1, 4, 9 ' Forums with Member lists but not with Passwords...
'############### Posting Restrictions ###########################
if rsAccess("F_HIDDEN") = 1 then
chkDisplayPrivateForum = false
else
UserNum = getNewMemberNumber()
if UserNum = - 1 then
chkDisplayPrivateForum= false
exit function
end if
if Instr(rsAccess("F_USERLIST"), ", ") > 0 then
Users = Split(rsAccess("F_USERLIST"), ", ")
elseif trim(rsAccess("F_USERLIST")) <> "" then ' Only 1 member assigned to forum
chkDisplayPrivateForum = (cint(rsAccess("F_USERLIST")) = cint(UserNum))
exit function
else ' No members assigned to forum
chkDisplayPrivateForum = false
exit function
end if
MatchFound = 0
for i = 0 to ubound(Users)
if cint(Users(i)) = cint(UserNum) then
MatchFound = 1
exit for
end if
next
if MatchFound = 1 then
chkDisplayPrivateForum= true
Else
chkDisplayPrivateForum= false
end if
end if
exit function
'############### Posting Restrictions ###########################

'chkDisplayPrivateForum = true ORIGINAL VERSION
'exit chkDisplayPrivateForum ORIGINAL ORIGINAL VERSION

case 2, 3, 7 ' Password Protected forums - need function to check each visitors password against the forum password
chkDisplayPrivateForum= false
exit function

case 5
UserNum = getNewMemberNumber()
if UserNum = - 1 then
chkDisplayPrivateForum= false
exit function
else
chkDisplayPrivateForum= true
exit function
end if

case 6
UserNum = getNewMemberNumber()
if UserNum = - 1 then
chkDisplayPrivateForum= false
exit function
end if
if Instr(rsAccess("F_USERLIST"), ", ") > 0 then
Users = Split(rsAccess("F_USERLIST"), ", ")
elseif trim(rsAccess("F_USERLIST")) <> "" then ' Only 1 member assigned to forum
chkDisplayPrivateForum = (cint(rsAccess("F_USERLIST")) = cint(UserNum))
exit function
else ' No members assigned to forum
chkDisplayPrivateForum = false
exit function
end if
MatchFound = 0
for i = 0 to ubound(Users)
if cint(Users(i)) = cint(UserNum) then
MatchFound = 1
exit for
end if
next
if MatchFound = 1 then
chkDisplayPrivateForum= true
Else
chkDisplayPrivateForum= false
end if

case 8 ' ADDED WITH POSTING RESTRICTIONS SR4
chkDisplayPrivateForum = false
if strAuthType ="nt" THEN
NTGroupSTR = Split(strNTGroupsSTR, ", ")
for j = 0 to ubound(NTGroupSTR)
NTGroupDBSTR = Split(rsAccess("F_PASSWORD_NEW"), ", ")
for i = 0 to ubound(NTGroupDBSTR)
if NTGroupDBSTR(i) = NTGroupSTR(j) then
chkDisplayPrivateForum = true
exit function
end if
next
next
End if

case else
chkDisplayPrivateForum= true
end select
end function


Let me now how it goes...

Rob Poretti
Sascom Marketing Group ~ Toronto
vox.905.825.5373 fax.905.825.5960
Go to Top of Page

Rob Poretti
Junior Member

Canada
435 Posts

Posted - 06 July 2001 :  08:48:40  Show Profile  Visit Rob Poretti's Homepage
To download the StripAll function, click here...

To download the chkDisplayPrivateForums (posted in the previous message), click here...




Rob Poretti
Sascom Marketing Group ~ Toronto
vox.905.825.5373 fax.905.825.5960

Edited by - Rob Poretti on 06 July 2001 08:49:50
Go to Top of Page

Bookie
Average Member

USA
856 Posts

Posted - 06 July 2001 :  08:51:47  Show Profile  Visit Bookie's Homepage  Send Bookie an AOL message  Send Bookie a Yahoo! Message
Well, that sql fix seemed to work. Except now I too have the StripAll error.

http://www.bookfamily.net/forum/contentdisplay_editor2.asp

I tried copying and pasting that function you posted but it strung it out on four lines. I'll just wait for both of them when you include them in the zip file.

Yippee! Thanks, Rob!

Bookie

"May the forces of evil become confused on the way to your home."
- George Carlin
Go to Top of Page

Bookie
Average Member

USA
856 Posts

Posted - 06 July 2001 :  08:59:54  Show Profile  Visit Bookie's Homepage  Send Bookie an AOL message  Send Bookie a Yahoo! Message
Rob and Simonduz,
It looks like we're good to go. I added the StripAll function and it works perfectly so far.

Bookie

"May the forces of evil become confused on the way to your home."
- George Carlin
Go to Top of Page

simonduz
Junior Member

161 Posts

Posted - 06 July 2001 :  09:28:45  Show Profile  Visit simonduz's Homepage  Send simonduz an ICQ Message  Send simonduz a Yahoo! Message
I new it was something simple I forgot.
This is the custom function I am using:
inc_function.txt
This works fine but is slightly different that the one you provided Rob.
Thanks.

http://easyromantic.webbhost.net -[test site]-
yada, yada.
Go to Top of Page

Rob Poretti
Junior Member

Canada
435 Posts

Posted - 06 July 2001 :  09:46:15  Show Profile  Visit Rob Poretti's Homepage
Bookie, Simonduz...

Glad to here it!



Rob Poretti
Sascom Marketing Group ~ Toronto
vox.905.825.5373 fax.905.825.5960
Go to Top of Page

z-man
Starting Member

Netherlands
41 Posts

Posted - 06 July 2001 :  11:32:42  Show Profile
Rob, simonduz. Bookie,

Could anybody make a step by step plan? I am bit confused right now. This forum topic is getting to big to handle. But I need this mod very very badly.

I got stuck with changing the sql query code.

Bookie is it possible to get your code maybe? I would appreciate it.

Cheers, and Snitz on!!

Z-Man

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