Topics you've started or replied to - Posted (1043 Views)
Average Member
Webbo
Posts: 982
982
How easy would it be to add a fifth folder image to identify topics that you have started or replied to in forum.asp similar to some php boards where the topic shows a star at the side of it if you have previously posted in that topic?
Currently forum.asp shows images for:
New posts since last logon. Old Posts. ( 25 replies or more.)
Locked topic.
The fifth image would be: Topics you have contributed to

 Sort direction, for dates DESC means newest first  
 Page size 
Posted
Advanced Member
Carefree
Posts: 4224
4224
That's a fairly easy one, Webbo. I'll write it today for you.
Posted
Average Member
Webbo
Posts: 982
982
That would be appreciated [^]
Posted
Average Member
Webbo
Posts: 982
982
If it helps, here is a folder icon that could be used:

icon_folder_contributed.gif

Posted
Advanced Member
Carefree
Posts: 4224
4224
OK, here it is. I placed a copy on SnitzBitz.
1. Copy Webbo's image from above to your image directory, titled "icon_folder_contributed.gif". Here's an alternative image:
[IMG]http://i1308.photobucket.com/albums/s611/RetVetnPI/icon_folder_contributed_zpsb8ce639b.gif[/IMG]
2. Make the following code changes.
"forum.asp"
Code:

Look for the following lines (appx 490-497):

' DEM --> Added code for topic moderation
if Topic_Status = 2 then
UnApprovedFound = "Y"
Response.Write getCurrentIcon(strIconFolderUnmoderated,"Topic Not Moderated","hspace=""0""")
elseif Topic_Status = 3 then
HeldFound = "Y"
Response.Write getCurrentIcon(strIconFolderHold,"Topic on Hold","hspace=""0""")
' DEM --> end of code Added for topic moderation

Below those, insert these:

' ## Contributed Below
elseif intPart = 1 then
Response.Write getCurrentIcon(strIconFolderContributed,"Contributed","hspace=""0""")
' ## Contributed Above

Look for the following lines (appx 477-479):

if AdminAllowed = 1 and Topic_UReplies > 0 then
Topic_Replies = Topic_Replies + Topic_UReplies
end if

Below those, insert these:

' ## Contributed Below
intPart=0
strSqlP="SELECT R_AUTHOR, TOPIC_ID FROM " & strTablePrefix & "REPLY WHERE TOPIC_ID=" & TOPIC_ID & " AND R_AUTHOR=" & MemberID
Set rsPart=my_Conn.Execute(strSqlP)
If not rsPart.EOF Then
intPart=1
rsPart.Close
End If
Set rsPart=Nothing
strSqlP="SELECT T_AUTHOR, TOPIC_ID FROM " & strTablePrefix & "TOPICS WHERE TOPIC_ID=" & TOPIC_ID & " AND T_AUTHOR=" & MemberID
Set rsPart=my_Conn.Execute(strSqlP)
If not rsPart.EOF Then
intPart=1
rsPart.Close
End If
Set rsPart=Nothing
' ## Contributed Above

"inc_iconfiles.asp"
Code:

Look for the following line (appx 64):

Const strIconFolderClosedTopic = "icon_folder_closed_topic.gif|15|15"

Below that, insert these:

' ## Contributed Below
Const strIconFolderContributed = "icon_folder_Contributed.gif|15|15"
' ## Contributed Above
Posted
Average Member
Webbo
Posts: 982
982
Nice work Carefree

The following needs adding to forum.asp

Code:
      '  ## Contributed Below
Response.Write" " & getCurrentIcon(strIconFolderContributed,"Contributed","align=""absmiddle""") & " Topics you have contributed to.<br />" & vbNewLine
' ## Contributed Above


After:

Code:
Response.Write "                " & getCurrentIcon(strIconFolderLocked,"Locked Topic","align=""absmiddle""") & " Locked topic.<br />" & vbNewLine

in order to show the folder description at the bottom of forum.asp



Also, some code changes need to be made to active.asp to show topics contributed to. I'll have a look at that shortly unless you beat me to it bigsmile
Posted
Average Member
Webbo
Posts: 982
982
In active.asp find:

Code:
               Response.Write    getCurrentIcon(strIconFolderUnmoderated,"Topic Not Moderated","hspace=""0""") & "</a>" & vbNewline
elseif Topic_Status = 3 then
HeldFound = "Y"
Response.Write getCurrentIcon(strIconFolderHold,"Topic on Hold","hspace=""0""") & "</a>" & vbNewline


Look for the following lines (appx 490-497):

Code:
				' DEM --> Added code for topic moderation
if Topic_Status = 2 then
UnApprovedFound = "Y"
Response.Write getCurrentIcon(strIconFolderUnmoderated,"Topic Not Moderated","hspace=""0""")
elseif Topic_Status = 3 then
HeldFound = "Y"
Response.Write getCurrentIcon(strIconFolderHold,"Topic on Hold","hspace=""0""")
' DEM --> end of code Added for topic moderation

Below those, insert these:

Code:
'	##	Contributed Below
elseif intPart = 1 then
Response.Write getCurrentIcon(strIconFolderContributed,"Contributed","hspace=""0""")
' ## Contributed Above


Find:
Code:
      if canView then
if ModerateAllowed = "Y" and Topic_UReplies > 0 then
Topic_Replies = Topic_Replies + Topic_UReplies
end if

Below those, insert these:

Code:
		'	##	Contributed Below
intPart=0
strSqlP="SELECT R_AUTHOR, TOPIC_ID FROM " & strTablePrefix & "REPLY WHERE TOPIC_ID=" & TOPIC_ID & " AND R_AUTHOR=" & MemberID
Set rsPart=my_Conn.Execute(strSqlP)
If not rsPart.EOF Then
intPart=1
rsPart.Close
End If
Set rsPart=Nothing
strSqlP="SELECT T_AUTHOR, TOPIC_ID FROM " & strTablePrefix & "TOPICS WHERE TOPIC_ID=" & TOPIC_ID & " AND T_AUTHOR=" & MemberID
Set rsPart=my_Conn.Execute(strSqlP)
If not rsPart.EOF Then
intPart=1
rsPart.Close
End If
Set rsPart=Nothing
' ## Contributed Above


Find:
Code:
Response.Write "                " & getCurrentIcon(strIconFolderLocked,"Locked Topic","align=""absmiddle""") & " Locked topic.<br />" & vbNewLine


Below those, insert these:

Code:
            '  ## Contributed Below
Response.Write" " & getCurrentIcon(strIconFolderContributed,"Contributed","align=""absmiddle""") & " Topics you have contributed to.<br />" & vbNewLine
' ## Contributed Above


I haven't included line numbers as a lot of my code has been modified so the line numbers would be irrelevant to many
Posted
Average Member
Webbo
Posts: 982
982
A better folder image to the one I originally posted is below:


Posted
Average Member
Webbo
Posts: 982
982
My OCD is now taking over - what about a 'New posts since last logon that you've contributed to' folder purple one with a yellow star cool
It's late, I'm off to bed clown
Posted
Forum Admin
HuwR
Posts: 20611
20611
Originally posted by Webbo
My OCD is now taking over - what about a 'New posts since last logon that you've contributed to' folder purple one with a yellow star cool
It's late, I'm off to bed clown
Isn't that already in your profile
 
You Must enter a message