Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Snitz Forums 2000 MOD-Group
 MOD Add-On Forum (W/O Code)
 Mark topics where I posted

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!
Before posting, make sure you have read this topic!

Screensize:
UserName:
Password:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkInsert EmailInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
   

T O P I C    R E V I E W
tribaliztic Posted - 24 October 2005 : 09:22:24
I'm pretty sure I saw this mod a while ago, can't find it.

What I'm after is that all topics where I've posted will have a different icon from the others.
Can anyone remember what the mod was called?<
15   L A T E S T    R E P L I E S    (Newest First)
tribaliztic Posted - 14 February 2007 : 11:31:55
Did you find the time to look at this again cripto9t? =)
<
cripto9t Posted - 29 December 2005 : 08:17:20
I take that back Bassman, I am getting the error. My changes weren't getting saved. I'll see if I can come up with something else.<
Bassman Posted - 24 December 2005 : 17:12:33
Ok, then it is in conflict with some other mod. Not the first time this happends :) I will have a go at a clean forum and work my way up. Thanks for your input Cripo.<
cripto9t Posted - 24 December 2005 : 15:40:02
I managed to make the sql changes on a forum that uses ms access. It was error free. Maybe your missing a space or a comma Bassman.<
cripto9t Posted - 24 December 2005 : 06:24:44
It figures :(
Its a syntax error though, so maybe it won't be a tough fix.
Thanks Bassman<
Bassman Posted - 23 December 2005 : 17:54:55
Microsoft JET Database Engine error '80040e14'

Syntax error in JOIN operation.

Its not playing along with access.
<
cripto9t Posted - 23 December 2005 : 11:36:45
I edited the instruction post for code changes in forum.asp.
Those changes and the sql changes above have to be made for this to work.<
tribaliztic Posted - 22 December 2005 : 10:50:11
Okay, I'll wait alittle and see what others have to say about the db hits =)
<
cripto9t Posted - 22 December 2005 : 10:44:31
I assume this is something like gary did.
As for the db hits, I don't know much about that stuff. But it looks like it will ;).

Gary mentioned something else, would using 1 icon be better than 11?

I'll try and get the new code to work with what I had before the days up here.<
tribaliztic Posted - 22 December 2005 : 10:19:49
Cool, and this version will cut down the amount of db-calls?
<
cripto9t Posted - 22 December 2005 : 10:14:17
Going with garys advice :) I came up with this after working out
a few problems with the mySql specific code and this has only been tested in mySql.

'## Forum_SQL - Get all topics from DB
strSql ="SELECT T.T_STATUS, T.CAT_ID, T.FORUM_ID, T.TOPIC_ID, T.T_VIEW_COUNT, T.T_SUBJECT, " 
strSql = strSql & "T.T_AUTHOR, T.T_STICKY, T.T_REPLIES, T.T_UREPLIES, T.T_LAST_POST, T.T_LAST_POST_AUTHOR, "  
strSql = strSql & "T.T_LAST_POST_REPLY_ID, M.M_NAME, MEMBERS_1.M_NAME AS LAST_POST_AUTHOR_NAME "
strSql = strSql & ", COUNT(R.R_AUTHOR) AS REPLIES "

strSql2 = " FROM " & strMemberTablePrefix & "MEMBERS M, "
strSql2 = strSql2 & strActivePrefix & "TOPICS T, " 
strSql2 = strSql2 & strMemberTablePrefix & "MEMBERS AS MEMBERS_1 "

strSql6 = "LEFT JOIN " & strActivePrefix & "REPLY R "
strSql6 = strSql6 & "ON T.TOPIC_ID = R.TOPIC_ID AND R.R_AUTHOR = " & MemberID & " "

strSql3 = " WHERE M.MEMBER_ID = T.T_AUTHOR "
strSql3 = strSql3 & " AND T.T_LAST_POST_AUTHOR = MEMBERS_1.MEMBER_ID "
strSql3 = strSql3 & " AND T.FORUM_ID = " & Forum_ID & " "
if nDays = "-1" then
	if strStickyTopic = "1" then
		strSql3 = strSql3 & " AND (T.T_STATUS <> 0 OR T.T_STICKY = 1)"
	else
		strSql3 = strSql3 & " AND T.T_STATUS <> 0 "
	end if
end if
if nDays > "0" then
	if strStickyTopic = "1" then
		strSql3 = strSql3 & " AND (T.T_LAST_POST > '" & defDate & "' OR T.T_STICKY = 1)"
	else
		strSql3 = strSql3 & " AND T.T_LAST_POST > '" & defDate & "'"
	end if
end if
' DEM --> if not a Moderator, all unapproved posts should not be viewed.
if AdminAllowed = 0 then 
	strSql3 = strSql3 & " AND ((T.T_AUTHOR <> " & MemberID
	strSql3 = strSql3 & " AND T.T_STATUS < "  ' Ignore unapproved/rejected posts
	if Moderation = "Y" then
		strSql3 = strSql3 & "2"  ' Ignore unapproved posts
	else
		strSql3 = strSql3 & "3"  ' Ignore any hold posts
	end if
	strSql3 = strSql3 & ") OR T.T_AUTHOR = " & MemberID & ")"
end if
strSql7 = " GROUP BY T.TOPIC_ID"
strSql7 = strSql7 & " HAVING COUNT(R.R_AUTHOR) > -1"

strSql4 = " ORDER BY"
if strStickyTopic = "1" then
	strSql4 = strSql4 & " T.T_STICKY DESC, "
end if
if strtopicsortfld = "author" then
	strSql4 = strSql4 & " M." & strSortCol & " "
else
	strSql4 = strSql4 & " T." & strSortCol & " "
end if

if strDBType = "mysql" then 'MySql specific code
	if mypage > 1 then 
		intOffset = cLng((mypage-1) * strPageSize)
		strSql5 = strSql5 & " LIMIT " & intOffset & ", " & strPageSize & " "
	end if

	'## Forum_SQL - Get the total pagecount 
	strSql1 = "SELECT COUNT(T.TOPIC_ID) AS PAGECOUNT "

	set rsCount = my_Conn.Execute(strSql1 & strSql2 & strSql3)
	iPageTotal = rsCount(0).value
	rsCount.close
	set rsCount = nothing

	If iPageTotal > 0 then
		inttotaltopics = iPageTotal
		maxpages = (iPageTotal \ strPageSize )
		if iPageTotal mod strPageSize <> 0 then
			maxpages = maxpages + 1
		end if
		if iPageTotal < (strPageSize + 1) then
			intGetRows = iPageTotal
		elseif (mypage * strPageSize) > iPageTotal then
			intGetRows = strPageSize - ((mypage * strPageSize) - iPageTotal)
		else
			intGetRows = strPageSize
		end if
	else
		iPageTotal = 0
		inttotaltopics = iPageTotal
		maxpages = 0
	end if 

	if iPageTotal > 0 then
		set rs = Server.CreateObject("ADODB.Recordset")
		rs.open strSql & strSql2 & strSql6 & strSql3 & strSql7 & strSql4 & strSql5, my_Conn, adOpenForwardOnly, adLockReadOnly, adCmdText
			arrTopicData = rs.GetRows(intGetRows)
			iTopicCount = UBound(arrTopicData, 2)
		rs.close
		set rs = nothing
	else
		iTopicCount = ""
	end if
 
else 'end MySql specific code

	set rs = Server.CreateObject("ADODB.Recordset")
	rs.cachesize = strPageSize
	rs.open strSql & strSql2 & strSql6 & strSql3 & strSql7 & strSql4, my_Conn, adOpenStatic
		if not rs.EOF then
			rs.movefirst
			rs.pagesize = strPageSize
			inttotaltopics = cLng(rs.recordcount)
			rs.absolutepage = mypage '**
			maxpages = cLng(rs.pagecount)
			arrTopicData = rs.GetRows(strPageSize)
			iTopicCount = UBound(arrTopicData, 2)
		else
			iTopicCount = ""
			inttotaltopics = 0
		end if
	rs.Close
	set rs = nothing
end if
<
tribaliztic Posted - 22 December 2005 : 02:39:54
-gary: that's what I'm afraid of, can you explain alittle further what you did? =)

Cripto9t: Thanks alot, I'll try that on another forum and see how it works.
<
-gary Posted - 21 December 2005 : 17:32:43
That'll cause a ton of extra DB calls for a typical page view. I wouldn't recommend it unless you have a decent server or little concurrent traffic.

For my forum, I just threw in a join with a having in the post selection statement and display an arrow when you're posted or replied.<
cripto9t Posted - 21 December 2005 : 17:17:33
tribaliztic Posted - 21 December 2005 : 08:11:44
Cool! Thanks alot!
<

Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.04 seconds. Powered By: Snitz Forums 2000 Version 3.4.07