Author |
Topic |
Rob Poretti
Junior Member
Canada
435 Posts |
Posted - 05 July 2001 : 14:24:31
|
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 |
|
|
Bookie
Average Member
USA
856 Posts |
Posted - 05 July 2001 : 14:44:52
|
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 |
|
|
Rob Poretti
Junior Member
Canada
435 Posts |
Posted - 05 July 2001 : 18:14:58
|
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 |
|
|
Bookie
Average Member
USA
856 Posts |
Posted - 05 July 2001 : 21:18:42
|
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 |
|
|
Bookie
Average Member
USA
856 Posts |
Posted - 05 July 2001 : 21:34:04
|
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 |
|
|
Rob Poretti
Junior Member
Canada
435 Posts |
Posted - 06 July 2001 : 00:19:16
|
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 |
|
|
simonduz
Junior Member
161 Posts |
Posted - 06 July 2001 : 06:54:46
|
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 |
|
|
Rob Poretti
Junior Member
Canada
435 Posts |
Posted - 06 July 2001 : 08:26:03
|
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 |
|
|
Rob Poretti
Junior Member
Canada
435 Posts |
Posted - 06 July 2001 : 08:33:35
|
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 |
|
|
Rob Poretti
Junior Member
Canada
435 Posts |
Posted - 06 July 2001 : 08:48:40
|
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 |
|
|
Bookie
Average Member
USA
856 Posts |
Posted - 06 July 2001 : 08:51:47
|
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 |
|
|
Bookie
Average Member
USA
856 Posts |
Posted - 06 July 2001 : 08:59:54
|
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 |
|
|
simonduz
Junior Member
161 Posts |
Posted - 06 July 2001 : 09:28:45
|
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. |
|
|
Rob Poretti
Junior Member
Canada
435 Posts |
Posted - 06 July 2001 : 09:46:15
|
Bookie, Simonduz...
Glad to here it!
Rob Poretti Sascom Marketing Group ~ Toronto vox.905.825.5373 fax.905.825.5960 |
|
|
z-man
Starting Member
Netherlands
41 Posts |
Posted - 06 July 2001 : 11:32:42
|
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
|
|
|
Topic |
|