| Author |  Topic  | 
              
                | xx ENIGMA xxJunior Member
 
   
 
                166 Posts | 
                    
                      |  Posted - 09 December 2003 :  22:03:34   
 |  
                      | Post Counter Mod carried over from my original post here
 requires only 2 modifications done in topic.asp and I got
 the idea from a feature I liked that Vbulletin and possibly
 other boards offer.
 
 As far as I know and from my orginal post requesting it,
 it didnt exist for snitz until now thanks to laser
 for the coding and tremendous help fine tuning it. The
 location of where it displays is my own coding.
  w00t! w00t! 
 What does it do?
 this mod allows the counting of posts within the posts themselves,
 and puts a small (Post #xxxxx) in upper right hand corner of each
 individual post and counts accurately through however many pages
 you may have.
 
 example screenshot
 
  
 Alterations to topic.asp
 
 1. find this bit of code (somewhere around line 930)
 
 			if Request.QueryString("SearchTerms") <> "" then
				Response.Write	SearchHiLite(formatStr(Reply_Content))
			elsedirectly above that, add this line:
 
 Response.Write  " <div align=""right""><table cellspacing=""0"" cellpadding=""3"" border=""0""><tr><td align=""center""><font face=""Verdana, Tahoma, Arial"" size=""1"">(Post #" & (iForum+2) + (mypage-1) * strPageSize & ")</font><br /><br /></td></tr></table></div>" so that it now looks like:
 
                         Response.Write  " <div align=""right""><table cellspacing=""0"" cellpadding=""3"" border=""0""><tr><td align=""center""><font face=""Verdana, Tahoma, Arial"" size=""1"">(Post #" & (iForum+2) + (mypage-1) * strPageSize & ")</font><br /><br /></td></tr></table></div>"
		if Request.QueryString("SearchTerms") <> "" then
			Response.Write	SearchHiLite(formatStr(Topic_Message))
		else
 next, find this bit of code (somewhere around line 1240)
 
 		if Request.QueryString("SearchTerms") <> "" then
			Response.Write	SearchHiLite(formatStr(Topic_Message))
		elsedirectly above that, add this line:
 
 Response.Write  " <div align=""right""><table cellspacing=""0"" cellpadding=""3"" border=""0""><tr><td align=""center""><font face=""Verdana, Tahoma, Arial"" size=""1"">(Post #1)</font><br /><br /></td></tr></table></div>" so that it now looks like:
 
                                 Response.Write  " <div align=""right""><table cellspacing=""0"" cellpadding=""3"" border=""0""><tr><td align=""center""><font face=""Verdana, Tahoma, Arial"" size=""1"">(Post #1)</font><br /><br /></td></tr></table></div>"
			if Request.QueryString("SearchTerms") <> "" then
				Response.Write	SearchHiLite(formatStr(Reply_Content))
			else
 thanks again to laser for the asp coding and I hope you
 find it useful for your forum.
  
 
 |  
                      | 
 my little forum playground
 
 |  
                      | Edited by - xx ENIGMA xx on 10 December 2003  14:41:34
 |  | 
              
                | RebelTechAverage Member
 
    
 
                USA613 Posts
 | 
                    
                      |  Posted - 09 December 2003 :  22:28:08     
 |  
                      | Good looking mod! |  
                      |  |  | 
              
                | xx ENIGMA xxJunior Member
 
   
 
                166 Posts | 
                    
                      |  Posted - 09 December 2003 :  22:59:00   
 |  
                      | quote:Originally posted by RebelTech
 
 Good looking mod!
 
 
 
 thanks RT, works great too thanks to laser
  |  
                      | 
 my little forum playground
 
 |  
                      |  |  | 
              
                | cripto9tAverage Member
 
    
 
                USA881 Posts
 | 
                    
                      |  Posted - 10 December 2003 :  06:34:53   
 |  
                      | Enigma I had the post count thing done a while ago. I missed the your post about it. But all is well because laser came up with something easier than mine ( I missed iforum  ). Well anyway I was at site point forums the other day and got to looking at theirs and seeing what it does (site point is what gave me the idea for the post count in the first place  ). Theirs is a link to a single post view. I couldn't understand why anyone would want a single post view ,except for maybe a screen shot. I thought about a printer friendy post for a link, so I spent the last 2 days getting it together as a mod. You beat me to it  . As soon as I find a place to put the .zip I'll be releasing mine. It's got a few extras that you might want  . 
 p.s. You might want to look at your instructions above, they look kinda weird
  . |  
                      | _-/Cripto9t\-_
 |  
                      |  |  | 
              
                | xx ENIGMA xxJunior Member
 
   
 
                166 Posts | 
                    
                      |  Posted - 10 December 2003 :  12:43:18   
 |  
                      | this is as plain and simple as it probably gets, just shows the count in upper right corner - no bells/whitsles
  
 I'd like to see your version of it though when released.
 
 btw, what is weird about the above directions? I tried to make
 it as understandable as I could
  |  
                      | 
 my little forum playground
 
 |  
                      |  |  | 
              
                | cripto9tAverage Member
 
    
 
                USA881 Posts
 | 
                    
                      |  Posted - 10 December 2003 :  13:07:22   
 |  
                      | quote:
 this is as plain and simple as it probably gets, just
 shows the count in upper right corner - no bells/whitsles
  
 Thats usually the best.
 
 quote:
 I'd like to see your version of it though when released.
 
 Its been posted (print friendly post mod)
 
 quote:
 btw, what is weird about the above directions? I tried to make
 it as understandable as I could
  
 
 Where you've got "so it looks like this", I think you've got the topic and reply flip-flopped.
  |  
                      | _-/Cripto9t\-_
 |  
                      |  |  | 
              
                | xx ENIGMA xxJunior Member
 
   
 
                166 Posts | 
                    
                      |  Posted - 10 December 2003 :  13:41:41   
 |  
                      | I will take a look at your mod and on the flip flopped oddity, check your topic.asp against
 my instructions
  you'll see the reply section comes before the topic which I did find kinda odd myself
  |  
                      | 
 my little forum playground
 
 |  
                      |  |  | 
              
                | MarcelGRetired Support Moderator
 
      
 
                Netherlands2625 Posts
 | 
                    
                      |  Posted - 10 December 2003 :  13:45:57     
 |  
                      | sorry to ask dumb questions, but does it give the postnumber in thát topic, or the postnumber by that member ? So for instance this post would be my 387ed post, however the 7th in this topic.
 |  
                      | portfolio - linkshrinker - oxle - twitter
 |  
                      |  |  | 
              
                | xx ENIGMA xxJunior Member
 
   
 
                166 Posts | 
                    
                      |  Posted - 10 December 2003 :  13:52:23   
 |  
                      | quote:Originally posted by marcelgoertz
 
 sorry to ask dumb questions, but does it give the postnumber in thát topic, or the postnumber by that member ?
 So for instance this post would be my 387ed post, however the 7th in this topic.
 
 
 
 this just counts posts in sequence and has nothing to do with
 how many posts a certain user may have in total.
 
 you might get a better idea seeing it in action on my site?
 >> here
 
 btw cripto9t, yours is very similar although I didnt look
 to deep, and I guess some could use the printer link but is
 not needed on my forums. Also you mentioned yours begins with
 post #2 whereas mine doesnt, mine actually does begin on post #2
 while post #1 is hardcoded for convienence
 
 EDIT: I was just informed of exactly what my error was above in
 trying to display how to do this mod. It has now been fixed in the
 original post above. You were right cripto9t and thanks weeweeslap
 for pointing out exactly what it was.
 |  
                      | 
 my little forum playground
 
 |  
                      | Edited by - xx ENIGMA xx on 10 December 2003  14:44:06
 |  
                      |  |  | 
              
                | MarcelGRetired Support Moderator
 
      
 
                Netherlands2625 Posts
 |  | 
              
                | cripto9tAverage Member
 
    
 
                USA881 Posts
 | 
                    
                      |  Posted - 10 December 2003 :  16:22:37   
 |  
                      | Thats cool, I don't need the printer friendy either  . Before the printer thing I was using it as a link to Hamlins Who Posted mod
 That was pretty nice to.
 
 I'm just putting out a few ideas for people. I think its a nice mod
  . |  
                      | _-/Cripto9t\-_
 |  
                      | Edited by - cripto9t on 10 December 2003  16:31:14
 |  
                      |  |  | 
              
                | AstralisSenior Member
 
     
 
                USA1218 Posts
 | 
                    
                      |  Posted - 10 December 2003 :  17:01:54   
 |  
                      | Any way to make it possible for someone to link to that post within the forum?  Sort of like a mix between this and the printer friendly post mod, I guess. |  
                      |  |  | 
              
                | cripto9tAverage Member
 
    
 
                USA881 Posts
 | 
                    
                      |  Posted - 10 December 2003 :  18:19:49   
 |  
                      | quote:Originally posted by Astralis
 
 Any way to make it possible for someone to link to that post within the forum?  Sort of like a mix between this and the printer friendly post mod, I guess.
 
 
 Do you mean like a pop-up window with the complete url in it?
 If so I'm working on it. I think the last post code provides a solution
  . 
 |  
                      | _-/Cripto9t\-_
 |  
                      |  |  | 
              
                | laserAdvanced Member
 
      
 
                Australia3859 Posts
 | 
                    
                      |  Posted - 10 December 2003 :  18:20:49   
 |  
                      | Quite easy to do really, with either MOD. |  
                      |  |  | 
              
                | AstralisSenior Member
 
     
 
                USA1218 Posts
 | 
                    
                      |  Posted - 10 December 2003 :  19:36:44   
 |  
                      | Yeah, that would be right - a "permalink". |  
                      |  |  | 
              
                | cripto9tAverage Member
 
    
 
                USA881 Posts
 | 
                    
                      |  Posted - 11 December 2003 :  13:03:11   
 |  
                      | I finally got this working, an ampersand was throwing me off  . Anyway it seems to work allright.
  I haven't tested on an archived post, so if anyone tests this out try an achived post.
 
 Note: For this to work you have to have the correct forum URL in "admin options" > "main forum config."
 
 In "topic.asp"
 
 put this link in the "replies" part.
 Response.Write  "          <a href=""JavaScript:openWindowHelp('pop_url.asp?" & ArchiveLink & "method=Reply&whichpage=" & myPage & "&REPLY_ID=" & Reply_ReplyID & "&TOPIC_ID=" & Topic_ID & "')"">test</a>" & vbNewLine & _
 put this one  in "getFirst sub" for the topic.
 Response.Write  "          <a href=""JavaScript:openWindowHelp('pop_url.asp?" & ArchiveLink & "method=Topic&TOPIC_ID=" & Topic_ID & "')"">test</a>" & vbNewLine & _
 Finally copy and save this code as "pop_url.asp"
 
<%
'#################################################################################
'## Copyright (C) 2000-02 Michael Anderson, Pierre Gorissen,
'##                       Huw Reddick and Richard Kinser
'##
'## This program is free software; you can redistribute it and/or
'## modify it under the terms of the GNU General Public License
'## as published by the Free Software Foundation; either version 2
'## of the License, or any later version.
'##
'## All copyright notices regarding Snitz Forums 2000
'## must remain intact in the scripts and in the outputted HTML
'## The "powered by" text/logo with a link back to
'## http://forum.snitz.com in the footer of the pages MUST
'## remain visible when the pages are viewed on the internet or intranet.
'##
'## This program is distributed in the hope that it will be useful,
'## but WITHOUT ANY WARRANTY; without even the implied warranty of
'## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
'## GNU General Public License for more details.
'##
'## You should have received a copy of the GNU General Public License
'## along with this program; if not, write to the Free Software
'## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
'##
'## Support can be obtained from support forums at:
'## http://forum.snitz.com
'##
'## Correspondence and Marketing Questions can be sent to:
'## reinhold@bigfoot.com
'##
'## or
'##
'## Snitz Communications
'## C/O: Michael Anderson
'## PO Box 200
'## Harpswell, ME 04079
'#################################################################################
%>
<!--#INCLUDE FILE="config.asp" -->
<!--#INCLUDE FILE="inc_func_secure.asp" -->
<!--#INCLUDE FILE="inc_sha256.asp" -->
<!--#INCLUDE FILE="inc_header_short.asp" -->
<%
if Request.QueryString("method") <> "" then
	strRqMethod = chkString(Request.QueryString("method"), "SQLString")
else
	Response.Redirect("default.asp")
end if
    Topic_ID = cLng(Request.QueryString("TOPIC_ID"))
    Reply_ID = cLng(Request.QueryString("REPLY_ID"))
    whichpage = cLng(Request.QueryString("whichpage"))
    Anchor = "#"
if Request("ARCHIVE") = "true" then
	ArchiveLink = "ARCHIVE=true&"
else
	ArchiveLink = ""
end if
if strRqMethod = "Reply" then
   Response.Write "    <b>Reply URL:</b> <a href=""" & strForumURL & "topic.asp?" & ArchiveLink & "whichpage=" & whichpage & "&TOPIC_ID=" & Topic_ID  & Anchor & Reply_ID & """ target=""_blank"">" & strForumURL & "topic.asp?" & ArchiveLink & "whichpage=" & whichpage & "&TOPIC_ID=" & Topic_ID & Anchor & Reply_ID & "</a>" 
elseif strRqMethod = "Topic" then
   Response.Write  "   <b>Topic URL:</b> <a href=""" & strForumURL & "topic.asp?" & ArchiveLink & "TOPIC_ID=" & Topic_ID & """ target=""_blank"">" & strForumURL & "topic.asp?" & ArchiveLink & "TOPIC_ID=" & Topic_ID & "</a>" 
else
   Response.Write  "" 'Do Nothing
end if
WriteFooterShort
Response.End
 %>
 Thats it
  |  
                      | _-/Cripto9t\-_
 |  
                      | Edited by - cripto9t on 11 December 2003  13:08:18
 |  
                      |  |  | 
              
                
                |  Topic  |  |