Mark topics where I posted

Snitz™ Forums 2000
https://forum.snitz.com/forumTopic/Posts/59963?pagenum=1
05 November 2025, 09:23

Topic


tribaliztic
Mark topics where I posted
24 October 2005, 09:22


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?<

 

Replies ...


tribaliztic
02 November 2005, 08:14


come on now guys, I know there is a mod for this somewhere =)
<
Shaggy
02 November 2005, 08:18


Not quite what you're looking for but this may be of use.
<
tribaliztic
02 November 2005, 08:23


nah, not at all what I was looking for..
when browsing a forum, there is different icons for new/old/hot/whatever posts, I'd like to have new icons for all threads where I have posted. For example blue color instead of yellow or something. <
AnonJr
02 November 2005, 09:22


I know there is a bookmark mod floating around here somewhere, where you can bookmark a topic... but unless someone who's been around longer knows of it, I think the ideas been presented before with no followthrough at this point.<
tribaliztic
19 December 2005, 06:05


No, that's not it.. I want the litte icon that mark new/hot/and so on topics to have a mark on it if I posted in the specific thread. <
HuwR
19 December 2005, 06:14


did you try searching?
MARK TOPIC SEARCH<
tribaliztic
19 December 2005, 06:16


Yes, I did try the search but apparently I'm not very good at it =) Thanks alot HuwR! <
tribaliztic
19 December 2005, 06:26


Well, had a look at that thread now, it's the bookmark mod? That's not what I'm after. Or is there some code in that mod that I can use to do this? <
HuwR
19 December 2005, 06:45


I think you must have been mistaken then, I can find no reference to a mod that does what you ask, sorry.<
tribaliztic
19 December 2005, 06:49


Okay, maybe someone just asked for it earlier.. Would it be possible to do this then? Is the info already there about me having posted in the thread (probably not =))? <
HuwR
19 December 2005, 06:56


you are correct, the necesary info probably is not there. firstly it would depend which page you were on, but in general information is only fetched from the db when it is needed, adding the extra overhead of checking whether or not you have posted a response to a particular topic would severely affect the performance of your forum.
<
tribaliztic
19 December 2005, 06:58


ok, I've seen this on another board and it has been requested by my users... I'll leave this then =)
Thanks for your help HuwR! <
HuwR
19 December 2005, 07:06


Originally posted by tribaliztic
ok, I've seen this on another board and it has been requested by my users...
Was it on another Snitz board ? if it was it may be worth contacting the admin<
tribaliztic
19 December 2005, 07:18


No, it was a php board =)
<
cripto9t
20 December 2005, 15:59


Originally posted by tribaliztic
No, it was a php board =)

Invision Board has this feature.
I played around with this awhile back and believe I had it working. I had a look at my old files and what I did was check the replies table for each topic on forum.asp.

If you want I'll get the changes together.<
tribaliztic
21 December 2005, 02:36


Did it slow down the forums much? If not I'd love to have a look at it =)
<
cripto9t
21 December 2005, 08:06


I never used it on a live forum, just something I was playing around with. I'll go through it today to make sure it works and trim the code as best I can.

There are just 4 or 5 changes on forum.asp and you would have to find a couple of icons to add to your files. I'll post the changes here so everyone can see them and maybe get some opinions.<
tribaliztic
21 December 2005, 08:11


Cool! Thanks alot! <
cripto9t
21 December 2005, 17:17


-gary
21 December 2005, 17:32


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.<
tribaliztic
22 December 2005, 02:39


-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. <
cripto9t
22 December 2005, 10:14


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.
Code:
'## 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
22 December 2005, 10:19


Cool, and this version will cut down the amount of db-calls? <
cripto9t
22 December 2005, 10:44


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
22 December 2005, 10:50


Okay, I'll wait alittle and see what others have to say about the db hits =)
<
cripto9t
23 December 2005, 11:36


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.<
Bassman
23 December 2005, 17:54


Microsoft JET Database Engine error '80040e14'

Syntax error in JOIN operation.
Its not playing along with access. <
cripto9t
24 December 2005, 06:24


It figures :(
Its a syntax error though, so maybe it won't be a tough fix.
Thanks Bassman<
cripto9t
24 December 2005, 15:40


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.<
Bassman
24 December 2005, 17:12


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
29 December 2005, 08:17


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.<
tribaliztic
14 February 2007, 11:31


Did you find the time to look at this again cripto9t? =)
<
© 2000-2021 Snitz™ Communications