Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Snitz Forums 2000 MOD-Group
 MOD Add-On Forum (W/Code)
 Mark All Topics Read With a Button
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

Roland
Advanced Member

Netherlands
9335 Posts

Posted - 08 January 2003 :  14:00:50  Show Profile
MOD Title: Mark All Topics Read With a Button
Version: 1.0
Author: Roland Pot (FrutZle)
Purpose/use: Get rid of the "Mark All Read" icon on active.asp (which a lot of people don't see, or
don't click on because it's not clear it has a function and/or what the function should be) and add
a clearly visible button (either a regular form button or an image)
Difficulty (1-10 with 10 being hardest): 1
New files needed: 1 - image to be used as a button in case "Use Graphics as Buttons" is turned off
in the Admin Options > Main Forum Configuration
Files to edit: 1 - active.asp
Tested successfully on: Snitz Forums 2000, version 3.4.03
Support: not necessary as it works flawlessly and can't go wrong if you follow the instructions.
Note: Create a backup of active.asp before you start making any changes!

Updates:
- 08-01-2003: added the "alt text" and status bar message from the original icon to the new image button. Added tabindex=""-1"" to the button.



Instructions:


Open active.asp and go to line 374. This line is blank, the next 3 lines should look like this:
'### Start to build the table
Response.Write	"      <table border=""0"" width=""100%"" cellspacing=""0"" cellpadding=""0"" align=""center"">" & vbNewLine & _
		"        <tr>" & vbNewLine & _


Paste the following code on the blank line:
'### Start modified 'Mark All Read' code
If recActiveTopicsCount <> "" and (mLev > 0) then
	Response.Write	"        <form name=""MarkRead"" action=""active.asp"" method=""post"">" & vbNewline & _
		"      <table border=""0"" width=""100%"" cellspacing=""0"" cellpadding=""0"" align=""center"">" & vbNewLine & _
		"        <tr>" & vbNewLine & _
		"              <td valign=""bottom"">" & vbNewline & _
		"                <input type=""hidden"" name=""AllRead"" value=""Y"">" & vbNewline & _
		"                <input type=""hidden"" name=""BuildTime"" value=""" & DateToStr(strForumTimeAdjust) & """>" & vbNewline & _
		"                <input type=""hidden"" name=""Cookie"" value=""2"">" & vbNewLine
	if strGfxButtons = "1" then
		Response.Write	"                <acronym title=""Mark all topics as read""><input type=""image"" src=""" & strImageUrl & "button_mark_all_read.gif"" value=""Mark all read"" id=""submit1"" name=""Mark all topics as read"" border=""0""" & dWStatus("Mark all topics as read") & " tabindex=""-1""></acronym></td>" & vbNewLine
	else
		Response.Write	"                <input type=""submit"" value=""Mark all read"" id=""submit1"" name=""Mark all topics as read"" tabindex=""-1""></td>" & vbNewLine
	end if
	Response.Write	"        </tr>" & vbNewLine & _
		"      </table>" & vbNewLine & _
		"        </form>" & vbNewline
End if
'### End modified 'Mark All Read' code



Modify line 399 by adding & _ to the end of the line (shown in red):
		"                <td align=""center"" bgcolor=""" & strHeadCellColor & """ valign=""middle""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strHeadFontColor & """>" & vbNewline & _



Replace the following lines (lines 400 to 410):
If recActiveTopicsCount <> "" and (mLev > 0) then
	Response.Write	"                <form name=""MarkRead"" action=""active.asp"" method=""post"">" & vbNewline & _
			"                <input type=""hidden"" name=""AllRead"" value=""Y"">" & vbNewline & _
			"                <input type=""hidden"" name=""BuildTime"" value=""" & DateToStr(strForumTimeAdjust) & """>" & vbNewline & _
			"                <input type=""hidden"" name=""Cookie"" value=""2"">" & vbNewLine & _
			"                <acronym title=""Mark all topics as read""><input type=""image"" src=""" & strImageUrl & "icon_topic_all_read.gif"" value=""Mark all read"" id=""submit1"" name=""Mark all topics as read"" border=""0""" & dWStatus("Mark all topics as read") & "></acronym></font></td>" & vbNewLine & _
			"                </form>" & vbNewline
else 
	Response.Write	"                 </font></td>" & vbNewline
end if
Response.Write	"                <td align=""center"" bgcolor=""" & strHeadCellColor & """><b><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strHeadFontColor & """>Topic</font></b></td>" & vbNewline & _


with the following two lines:
		"                 </font></td>" & vbNewline & _
		"                <td align=""center"" bgcolor=""" & strHeadCellColor & """><b><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strHeadFontColor & """>Topic</font></b></td>" & vbNewline & _



That's it for the code changes.
Now either create an image to use as the form button (name it button_mark_all_read.gif. If you name it something else you
must also change the name in the code), or use the image shown below (sorry it's not 100% the same as the login and logout buttons).


this is a GIF with transparent background and should work on most page backgrounds and background colors.


Edited by - Roland on 09 January 2003 03:16:39

Cliff
Average Member

United States
501 Posts

Posted - 08 January 2003 :  19:05:20  Show Profile  Visit Cliff's Homepage
Frutzle,
I added it to our Intranet and tried it out.
It was easy to add and seems to work fine.

I know this is a base code option, but I must say that I really like having it. I didn't know it existed either until someone pointed it out to me. Having this mod will make it easier on visitors to the site.

https://squarewheelscycling.com/

https://www.pathlabtalk.com/
Go to Top of Page

sentinel
New Member

United Kingdom
76 Posts

Posted - 08 January 2003 :  20:45:23  Show Profile  Visit sentinel's Homepage
didnt know there was a button.lol
will try this code. Nice one m8. Thanks

Sentinel
Go to Top of Page

snaayk
Senior Member

USA
1061 Posts

Posted - 08 January 2003 :  23:20:03  Show Profile  Visit snaayk's Homepage  Send snaayk an AOL message  Send snaayk an ICQ Message  Send snaayk a Yahoo! Message
Although I appreciate the simplicity of this MOD, i find it hard to quantify a good remark with the lack of a demo site.

Thus, I bid you to entertain me and provide a link in your post with a proper DEMO site for me to judge this MOD.

Bustin' your chops! I'm glad you put it together, I remember talking about this at SnitzBitz.
Go to Top of Page

Cliff
Average Member

United States
501 Posts

Posted - 09 January 2003 :  00:04:15  Show Profile  Visit Cliff's Homepage
I've seen a few other BB that use a similar concept of a text link or an image. I think it's a great option for people who only stop in once in a while and find there are dozens or hundreds of new posts since the last visit. They can read the ones they want and mark the rest as read. The little +/- symbol just wasn't that helpful. I'd bet many users of this forum didn't even know there was such an option.

https://squarewheelscycling.com/

https://www.pathlabtalk.com/
Go to Top of Page

Roland
Advanced Member

Netherlands
9335 Posts

Posted - 09 January 2003 :  03:13:51  Show Profile
quote:
Originally posted by snaayk

Although I appreciate the simplicity of this MOD, i find it hard to quantify a good remark with the lack of a demo site.

Thus, I bid you to entertain me and provide a link in your post with a proper DEMO site for me to judge this MOD.

Bustin' your chops! I'm glad you put it together, I remember talking about this at SnitzBitz.



I've had this going on my own forums for quite a while now. I might've made that change after it was discussed on SnitzBitz, but I'm not sure.
I guess the active.asp on my forums (http://www.frutzle.com/forums/active.asp) could be used as a demo, but since those forums hardly get used, it might not be the best place to go
<edit> Since guests don't get to see the "mark all read" button (that's how it works by default in the original codes too), I've set up a temporary demo account with password and username demo so you can at least give it a try.
If you feel the need to post something using that account, please only do so in the Testing Forum. </edit>

Anyway, I'm glad it's working for you all too, so now I can remove the "beta" part.

Edited by - Roland on 09 January 2003 03:43:28
Go to Top of Page

Steve D.
Average Member

USA
640 Posts

Posted - 03 February 2003 :  13:41:13  Show Profile  Visit Steve D.'s Homepage  Send Steve D. a Yahoo! Message
Is there a way to use a text link instead of an image? I've been tinkering with this and not having any luck yet.

Swing Dancing Video Clips - It's All Swing! Forum
Go to Top of Page

Steve D.
Average Member

USA
640 Posts

Posted - 03 February 2003 :  14:22:55  Show Profile  Visit Steve D.'s Homepage  Send Steve D. a Yahoo! Message
I tried this but it didn't seem to work...


'###### Text Form Submission Link #######
response.write "<script language=""JavaScript"" type=""text/javascript"">" & vbNewLine & _
				"<!--" & vbNewLine & _
				"	function MarkAllRead ()" & vbNewLine & _
				"		{" & vbNewLine & _
				"	  		document.MarkRead.submit();" & vbNewLine & _
				"		}" & vbNewLine & _
				"-->" & vbNewLine & _
				"</script> " & vbNewLine
'#########################################


and then put in the link where I wanted it....

' #### Add Mark All Topics Read Text Link ####
If recActiveTopicsCount <> "" and (mLev > 0) then
Response.Write "<tr><td><br />" & vbNewLine & _
" <form name=""MarkRead"" action=""active.asp"" method=""post"">" & vbNewline & _
" <input type=""hidden"" name=""AllRead"" value=""Y"">" & vbNewline & _
" <input type=""hidden"" name=""BuildTime"" value=""" & DateToStr(strForumTimeAdjust) & """>" & vbNewline & _
" <input type=""hidden"" name=""Cookie"" value=""2"">" & vbNewLine & _
" <acronym title=""Mark all topics as read""><input type=""image"" src=""" & strImageUrl & "icon_topic_all_read.gif"" value=""Mark all read"" id=""submit1"" name=""Mark all topics as read"" border=""0""" & dWStatus("Mark all topics as read") & "></acronym>" & vbNewLine & _
" <font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><a href=""javascript:MarkAllRead()"">Mark all topics as read</a></font>" & vbNewLine & _
" </form>" & vbNewline & vbNewLine & _
" </td></tr>" & vbNewLine
End If
' ############################################

Swing Dancing Video Clips - It's All Swing! Forum
Go to Top of Page

Roland
Advanced Member

Netherlands
9335 Posts

Posted - 03 February 2003 :  14:41:42  Show Profile
Replace the submit image code with <a href="javascript:document.MarkRead.submit()">Mark all topics as read</a> and it should work just fine.
Go to Top of Page

Steve D.
Average Member

USA
640 Posts

Posted - 03 February 2003 :  15:03:49  Show Profile  Visit Steve D.'s Homepage  Send Steve D. a Yahoo! Message
that gives an error, I think it's missing "" around the javascript part...

When I put the "" around the javascript, it doesn't go anywhere. Any thoughts as to why?

Swing Dancing Video Clips - It's All Swing! Forum
Go to Top of Page

Steve D.
Average Member

USA
640 Posts

Posted - 03 February 2003 :  15:07:47  Show Profile  Visit Steve D.'s Homepage  Send Steve D. a Yahoo! Message
So changing the "javascript:..." part to ""javascript..." plus changing the form name to MarkRead2 in both places worked.

I forgot to mention that I still left the other button below, for old users. I guess it was getting confused trying to submit 2 forms at the same time.... whoops.

Thanks for the help!

Swing Dancing Video Clips - It's All Swing! Forum
Go to Top of Page

Faizan
Average Member

United Kingdom
592 Posts

Posted - 03 February 2003 :  19:35:54  Show Profile  Visit Faizan's Homepage  Send Faizan an AOL message  Send Faizan an ICQ Message  Send Faizan a Yahoo! Message
I like that MOD, i might use it on my forum, its very good u know,
Thanks Frutz!


»Snitz Graphics
Go to Top of Page

Roland
Advanced Member

Netherlands
9335 Posts

Posted - 04 February 2003 :  10:53:19  Show Profile
Steve, you're absolutely right. I forgot that the code will be put in a Response.Write statement and therefore needs double quotes.
Faizan, I'm glad you like this little MOD
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.24 seconds. Powered By: Snitz Forums 2000 Version 3.4.07