Author |
Topic |
Rob Poretti
Junior Member
Canada
435 Posts |
Posted - 17 May 2001 : 10:54:05
|
For those of you coming from Erik's COntent Management mod, there is one thing that is missing...
I decided not to update the topic's table T_VIEW_COUNT field in the DB. The way I look at it, opening a portal homepage -- even if the entire article is showing -- does not mean that the user has actually read the article. If they click on a link and actually go to a topic, there is a much greater chance that the user has read it. Increasing the view count distorts that statistic unreasonably. I'm sorry if you wanted this. ASP coders could probably copy/paste Erik's sub and call it at the end of each DisplayMode "CASE" easily enough...
Another issue that was discussed in Erik's COntent Mangement topic is the use of CSS. I'll probably get around to doing a CSS version at some point soon. However if people are screaming for this, I would entertain doing it sooner.
Cheers,
Rob Poretti Sascom Marketing Group ~ Toronto vox.905.825.5373 fax.905.825.5960
Edited by - Rob Poretti on 17 May 2001 15:58:05 |
|
|
Warren UK
Starting Member
United Kingdom
29 Posts |
Posted - 18 May 2001 : 07:27:19
|
quote: The Topic Order Mod needs to be installed as well. (It lets you order "By Topics Order field.")
I can't seem to find the "Topic Order" Mod... can someone point me to the thread please.
Also does this MOD "need it", in the sense it will not work without it, or will one order option be lost without it?
|
|
|
Rob Poretti
Junior Member
Canada
435 Posts |
Posted - 18 May 2001 : 09:01:17
|
Hmmm... I'm at a loss -- I can't seem to find it either. I'm pretty sure it was a Richard Kinser mod. I just finished checking myself and I can't find it anywhere... too bad, a worthwhile mod.
I'll look through my archives and post it when I find it.
BTW, the topic order is only used when ordering by topics and since the main SQL expression does not return the topic order this mod should work without the topic order mod installed. (I haven't tested it so lets underline should.) Just don't use DisplayOrder=1 and you should be fine.
Cheers!
Rob Poretti Sascom Marketing Group ~ Toronto vox.905.825.5373 fax.905.825.5960 |
|
|
Rob Poretti
Junior Member
Canada
435 Posts |
|
Rob Poretti
Junior Member
Canada
435 Posts |
Posted - 18 May 2001 : 16:07:57
|
quote:
quote: The Topic Order Mod needs to be installed as well. (It lets you order "By Topics Order field.")
I can't seem to find the "Topic Order" Mod... can someone point me to the thread please.
Also does this MOD "need it", in the sense it will not work without it, or will one order option be lost without it?
Well Warren,
I'm glad you brought up the Topic Order thing... turns out that the T_ORDER column must be in the select statement in order for it to work. Correcting this, means that DisplayOrder = 1 will now work -- it also means that this mod won't work without the Topic Order mod.
I've updated the files to fix this this problem -- PLUS,a related problem: the fact that nulls (and 'zeros'!) are ordered before '1' (number one) when using a SQL ORDER statement. This means that any topic that was not set to a specific order (ie: having a null value) -- or is set to 0 (zero) will actually be ordered before the items that you manually ordered numerically! Oops!
Anyway... this is all fixed now and working properly. When ordering by Topic Order (DisplayOrder=1), the value must be more than 0 for it be in the result set.
/////////////////////////////////////////////////////////////////////////////////////////////
Most of the implementation problems with this mod will relate to not having one of these three mods installed; Topic/Forum/category Ordering Mod, the Message Icons mod, and the Avatar Mod. (All excellent mods that I recommend by the way.)
If you don't have any of the above mods, I could probably let you know what changes to the SQL string need to be made. After that, you just have to make sure that you don't use certain parameters.
So let me know what mods you have installed and I'll see what I can do...
Cheers!
Rob Poretti Sascom Marketing Group ~ Toronto vox.905.825.5373 fax.905.825.5960
Edited by - Rob Poretti on 18 May 2001 16:12:04 |
|
|
Warren UK
Starting Member
United Kingdom
29 Posts |
Posted - 18 May 2001 : 16:34:44
|
Thanks that starts to make sense as I did try to install it without the Topic Order mod and think I hit an error mentioning T_ORDER... thanks.
|
|
|
Rob Poretti
Junior Member
Canada
435 Posts |
Posted - 18 May 2001 : 23:44:47
|
Hi Warren,
On further inspection, it seems that the T_ORDER column is not neccessary for SQL Server through Enterise manager. When I was testing my SQL statements earlier, I was using Access2000. It sometimes it behaves slightly differently. Anyway, as a result I didn't have to put the T_ORDER column in the main SELECT statement.
It turns out then, that if your are using SQL, the mod should work, as long as you don't use the display order = 0 mode. To be safe, you could comment these lines, out like this:
case 1 ' By Topics Order field (Topic Order mod must be installed) ' strSql = strSql & " AND " & strTablePrefix & "TOPICS.T_ORDER > 0 " ' Required because NULLs and ZEROs come before 1 ' strSql = strSql & " ORDER BY " & strTablePrefix & "TOPICS.T_ORDER ASC "
This would essentially "do nothing" when DisplayOrder is set to 0.
Check it out and let me know...
Cheers!
Rob Poretti Sascom Marketing Group ~ Toronto vox.905.825.5373 fax.905.825.5960 |
|
|
Warren UK
Starting Member
United Kingdom
29 Posts |
Posted - 19 May 2001 : 06:16:28
|
Well I'm actually using Access.. but I've got it working without the topic order ( in admin mode, haven't tested on main pages yet )....
One thing the DISPLAY ORDER seems to do the reverse of what is intended in the cases of 2 = By most View Counts 3 = By most Replies, it seems to show the "least" of post
Thanks for the great mod, I'll try and play around and give you more feedback on it.
|
|
|
Warren UK
Starting Member
United Kingdom
29 Posts |
Posted - 19 May 2001 : 07:07:49
|
I've found something else...
Simply putting the content.asp file as an include is not enough, you also need put includes for inc_functions.asp and config.asp as well... unless I'm missing something? Anyway, I added them to the top of ny content.asp file so only one include call is necessary.. Then found that as content.asp is called from within contentdisplayeditor, and those other two files conditionally upon your admin status then I had go back to simply including all three files in any page I want to display the content.
Also Display Modes 3 and 4 generate the follow error.
Microsoft JET Database Engine error '80040e14'
Syntax error (missing operator) in query expression 'FORUM_TOPICS.FORUM_ID = FORUM_FORUM.FORUM_ID INNER JOIN FORUM_MEMBERS ON FORUM_TOPICS.T_AUTHOR = FORUM_MEMBERS.MEMBER_ID'.
/my_forum_directory/content.asp, line 247
Edited by - Warren UK on 19 May 2001 07:30:21 |
|
|
Morpheus73
Average Member
Denmark
597 Posts |
Posted - 19 May 2001 : 07:41:50
|
can you call ID´s from the links manager also? - would be great if you could, to create more static linksektions inc_file for frontpage - how about the lassifieds, calendar etc...possible?
mph73
Morpheus73 - morpheus73@hotmail.com |
|
|
gemini
Starting Member
2 Posts |
Posted - 19 May 2001 : 16:24:55
|
quote:
I've found something else...
Simply putting the content.asp file as an include is not enough, you also need put includes for inc_functions.asp and config.asp as well... unless I'm missing something? Anyway, I added them to the top of ny content.asp file so only one include call is necessary.. Then found that as content.asp is called from within contentdisplayeditor, and those other two files conditionally upon your admin status then I had go back to simply including all three files in any page I want to display the content.
Also Display Modes 3 and 4 generate the follow error.
Microsoft JET Database Engine error '80040e14'
Syntax error (missing operator) in query expression 'FORUM_TOPICS.FORUM_ID = FORUM_FORUM.FORUM_ID INNER JOIN FORUM_MEMBERS ON FORUM_TOPICS.T_AUTHOR = FORUM_MEMBERS.MEMBER_ID'.
/my_forum_directory/content.asp, line 247
Edited by - Warren UK on 19 May 2001 07:30:21
I also use Access and found I needed to re-form the query string to get display option 3 to work. Here is my modification--I have just commented out the original code and placed my version (note I do not use the AVATAR MOD):
if DisplayMode = 3 or DisplayMode = 4 then ' add fields from Forum/Member Table strSql = strSql & strTablePrefix & "FORUM.F_SUBJECT, " strSql = strSql & strTablePrefix & "FORUM.F_DESCRIPTION, " strSql = strSql & strTablePrefix & "MEMBERS.M_NAME, " strSql = strSql & strTablePrefix & "MEMBERS.M_EMAIL, " strSql = strSql & strTablePrefix & "MEMBERS.M_PHOTO_URL, " ' strSql = strSql & strTablePrefix & "MEMBERS.M_AVATAR_URL, " end if
' Add final field from Topics DB strSql = strSql & strTablePrefix & "TOPICS.T_MSGICON "
'strSql = strSql & " FROM " & strTablePrefix & "TOPICS " strSql = strSql & " FROM " & strTablePrefix & "MEMBERS "
if DisplayMode = 3 or DisplayMode = 4 then ' then join FORUM & MEMBERS table linked with Forum ID/Member ID ' strSql = strSql & "INNER JOIN " & strTablePrefix & "FORUM ON " ' strSql = strSql & strTablePrefix & "TOPICS.FORUM_ID = " ' strSql = strSql & strTablePrefix & "FORUM.FORUM_ID " ' strSql = strSql & "INNER JOIN " & strTablePrefix & "MEMBERS ON " ' strSql = strSql & strTablePrefix & "TOPICS.T_AUTHOR = " ' strSql = strSql & strTablePrefix & "MEMBERS.MEMBER_ID " strSql = strSql & "INNER JOIN (" & strTablePrefix & "FORUM INNER JOIN " strSql = strSql & strTablePrefix & "TOPICS ON (" strSql = strSql & strTablePrefix & "FORUM.FORUM_ID = " strSql = strSql & strTablePrefix & "TOPICS.FORUM_ID) AND (" strSql = strSql & strTablePrefix & "FORUM.CAT_ID = " strSql = strSql & strTablePrefix & "TOPICS.CAT_ID)) " strSql = strSql & "ON " & strTablePrefix & "MEMBERS.MEMBER_ID = " strSql = strSql & strTablePrefix & "TOPICS.T_AUTHOR" end if
This seems to work for me...
|
|
|
Tiki
Starting Member
5 Posts |
Posted - 20 May 2001 : 09:41:29
|
quote:
if DisplayMode = 3 or DisplayMode = 4 then ' add fields from Forum/Member Table strSql = strSql & strTablePrefix & "FORUM.F_SUBJECT, " strSql = strSql & strTablePrefix & "FORUM.F_DESCRIPTION, " strSql = strSql & strTablePrefix & "MEMBERS.M_NAME, " strSql = strSql & strTablePrefix & "MEMBERS.M_EMAIL, " strSql = strSql & strTablePrefix & "MEMBERS.M_PHOTO_URL, " ' strSql = strSql & strTablePrefix & "MEMBERS.M_AVATAR_URL, " end if
' Add final field from Topics DB strSql = strSql & strTablePrefix & "TOPICS.T_MSGICON "
'strSql = strSql & " FROM " & strTablePrefix & "TOPICS " strSql = strSql & " FROM " & strTablePrefix & "MEMBERS "
if DisplayMode = 3 or DisplayMode = 4 then ' then join FORUM & MEMBERS table linked with Forum ID/Member ID ' strSql = strSql & "INNER JOIN " & strTablePrefix & "FORUM ON " ' strSql = strSql & strTablePrefix & "TOPICS.FORUM_ID = " ' strSql = strSql & strTablePrefix & "FORUM.FORUM_ID " ' strSql = strSql & "INNER JOIN " & strTablePrefix & "MEMBERS ON " ' strSql = strSql & strTablePrefix & "TOPICS.T_AUTHOR = " ' strSql = strSql & strTablePrefix & "MEMBERS.MEMBER_ID " strSql = strSql & "INNER JOIN (" & strTablePrefix & "FORUM INNER JOIN " strSql = strSql & strTablePrefix & "TOPICS ON (" strSql = strSql & strTablePrefix & "FORUM.FORUM_ID = " strSql = strSql & strTablePrefix & "TOPICS.FORUM_ID) AND (" strSql = strSql & strTablePrefix & "FORUM.CAT_ID = " strSql = strSql & strTablePrefix & "TOPICS.CAT_ID)) " strSql = strSql & "ON " & strTablePrefix & "MEMBERS.MEMBER_ID = " strSql = strSql & strTablePrefix & "TOPICS.T_AUTHOR" end if
This seems to work for me...
Putting that code break the mode for 1 and 2.
Tiki |
|
|
DocEVL
Starting Member
USA
19 Posts |
Posted - 20 May 2001 : 11:20:17
|
quote:
quote:
if DisplayMode = 3 or DisplayMode = 4 then ' add fields from Forum/Member Table strSql = strSql & strTablePrefix & "FORUM.F_SUBJECT, " strSql = strSql & strTablePrefix & "FORUM.F_DESCRIPTION, " strSql = strSql & strTablePrefix & "MEMBERS.M_NAME, " strSql = strSql & strTablePrefix & "MEMBERS.M_EMAIL, " strSql = strSql & strTablePrefix & "MEMBERS.M_PHOTO_URL, " ' strSql = strSql & strTablePrefix & "MEMBERS.M_AVATAR_URL, " end if
' Add final field from Topics DB strSql = strSql & strTablePrefix & "TOPICS.T_MSGICON "
'strSql = strSql & " FROM " & strTablePrefix & "TOPICS " strSql = strSql & " FROM " & strTablePrefix & "MEMBERS "
if DisplayMode = 3 or DisplayMode = 4 then ' then join FORUM & MEMBERS table linked with Forum ID/Member ID ' strSql = strSql & "INNER JOIN " & strTablePrefix & "FORUM ON " ' strSql = strSql & strTablePrefix & "TOPICS.FORUM_ID = " ' strSql = strSql & strTablePrefix & "FORUM.FORUM_ID " ' strSql = strSql & "INNER JOIN " & strTablePrefix & "MEMBERS ON " ' strSql = strSql & strTablePrefix & "TOPICS.T_AUTHOR = " ' strSql = strSql & strTablePrefix & "MEMBERS.MEMBER_ID " strSql = strSql & "INNER JOIN (" & strTablePrefix & "FORUM INNER JOIN " strSql = strSql & strTablePrefix & "TOPICS ON (" strSql = strSql & strTablePrefix & "FORUM.FORUM_ID = " strSql = strSql & strTablePrefix & "TOPICS.FORUM_ID) AND (" strSql = strSql & strTablePrefix & "FORUM.CAT_ID = " strSql = strSql & strTablePrefix & "TOPICS.CAT_ID)) " strSql = strSql & "ON " & strTablePrefix & "MEMBERS.MEMBER_ID = " strSql = strSql & strTablePrefix & "TOPICS.T_AUTHOR" end if
This seems to work for me...
Putting that code break the mode for 1 and 2.
Tiki
To fix 1 and 2 simply make the following change to the above code:
if DisplayMode = 3 or DisplayMode = 4 then ' then join FORUM & MEMBERS table linked with Forum ID/Member ID ' strSql = strSql & "INNER JOIN " & strTablePrefix & "FORUM ON " ' strSql = strSql & strTablePrefix & "TOPICS.FORUM_ID = " ' strSql = strSql & strTablePrefix & "FORUM.FORUM_ID " ' strSql = strSql & "INNER JOIN " & strTablePrefix & "MEMBERS ON " ' strSql = strSql & strTablePrefix & "TOPICS.T_AUTHOR = " ' strSql = strSql & strTablePrefix & "MEMBERS.MEMBER_ID " strSql = strSql & " FROM " & strTablePrefix & "MEMBERS " strSql = strSql & "INNER JOIN (" & strTablePrefix & "FORUM INNER JOIN " strSql = strSql & strTablePrefix & "TOPICS ON (" strSql = strSql & strTablePrefix & "FORUM.FORUM_ID = " strSql = strSql & strTablePrefix & "TOPICS.FORUM_ID) AND (" strSql = strSql & strTablePrefix & "FORUM.CAT_ID = " strSql = strSql & strTablePrefix & "TOPICS.CAT_ID)) " strSql = strSql & "ON " & strTablePrefix & "MEMBERS.MEMBER_ID = " strSql = strSql & strTablePrefix & "TOPICS.T_AUTHOR" else strSql = strSql & " FROM " & strTablePrefix & "TOPICS " end if
Edited by - docevl on 20 May 2001 11:22:05 |
|
|
Rob Poretti
Junior Member
Canada
435 Posts |
Posted - 21 May 2001 : 13:56:23
|
quote:
Well I'm actually using Access.. but I've got it working without the topic order ( in admin mode, haven't tested on main pages yet )....
One thing the DISPLAY ORDER seems to do the reverse of what is intended in the cases of 2 = By most View Counts 3 = By most Replies, it seems to show the "least" of post
Thanks for the great mod, I'll try and play around and give you more feedback on it.
Hi, long weekend up here in Canada... so I'm just geting back to the computer after a few days break...
Oops on the display order thing... simple fix - accidentlay reversed DESC with ASC .... simply change these two lines:
ORIGINAL:
strSql = strSql & " ORDER BY " & strTablePrefix & "TOPICS.T_VIEW_COUNT ASC " AND strSql = strSql & " ORDER BY " & strTablePrefix & "TOPICS.T_REPLIES ASC"
FIXED:
strSql = strSql & " ORDER BY " & strTablePrefix & "TOPICS.T_VIEW_COUNT DESC " AND strSql = strSql & " ORDER BY " & strTablePrefix & "TOPICS.T_REPLIES DESC "
I'll update the download files in a minute once I look at these other posted problems...
Cheers!
Rob Poretti Sascom Marketing Group ~ Toronto vox.905.825.5373 fax.905.825.5960 |
|
|
Rob Poretti
Junior Member
Canada
435 Posts |
Posted - 21 May 2001 : 14:07:24
|
quote:
I've found something else...
Simply putting the content.asp file as an include is not enough, you also need put includes for inc_functions.asp and config.asp as well... unless I'm missing something? Anyway, I added them to the top of ny content.asp file so only one include call is necessary.. Then found that as content.asp is called from within contentdisplayeditor, and those other two files conditionally upon your admin status then I had go back to simply including all three files in any page I want to display the content.
...<SNIP>...
Hey Warren,
Ya, you're right absolutely right ... my error for not beign more explicit in my instructions...I'll correct this immediately.
Since this mod is for the SNitz forums all pages will usually have the inc_functions.asp, config.asp AND the inc_top.asp pages.
Further, if the Content Display Editor will be an admin function then you should also have the typical Snitz admin checking code:
<!--#INCLUDE FILE="config.asp" -->
<% If Session(strCookieURL & "Approval") = "15916941253" Then %>
<!--#INCLUDE FILE="inc_functions.asp" --> <!--#INCLUDE FILE="content.asp" -->
Thats should be at the top of the page, while this should be towards the bottom:
<% Else %> <% Response.Redirect "admin_login.asp" %> <% End IF %>
I removed that stuff for the page so that people didn't have tolog in as admin to play with the mod...
Rob Poretti Sascom Marketing Group ~ Toronto vox.905.825.5373 fax.905.825.5960 |
|
|
Topic |
|