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)
 Post Counter Mod
 New Topic  Topic Locked
 Printer Friendly
Next Page
Author Previous Topic Topic Next Topic
Page: of 2

xx ENIGMA xx
Junior Member

166 Posts

Posted - 09 December 2003 :  22:03:34  Show Profile  Send xx ENIGMA xx an AOL message
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))
			else

directly 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))
		else

directly 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

RebelTech
Average Member

USA
613 Posts

Posted - 09 December 2003 :  22:28:08  Show Profile  Visit RebelTech's Homepage  Send RebelTech an ICQ Message
Good looking mod!
Go to Top of Page

xx ENIGMA xx
Junior Member

166 Posts

Posted - 09 December 2003 :  22:59:00  Show Profile  Send xx ENIGMA xx an AOL message
quote:
Originally posted by RebelTech

Good looking mod!



thanks RT, works great too thanks to laser


my little forum playground

Go to Top of Page

cripto9t
Average Member

USA
881 Posts

Posted - 10 December 2003 :  06:34:53  Show Profile
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\-_
Go to Top of Page

xx ENIGMA xx
Junior Member

166 Posts

Posted - 10 December 2003 :  12:43:18  Show Profile  Send xx ENIGMA xx an AOL message
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

Go to Top of Page

cripto9t
Average Member

USA
881 Posts

Posted - 10 December 2003 :  13:07:22  Show Profile
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\-_
Go to Top of Page

xx ENIGMA xx
Junior Member

166 Posts

Posted - 10 December 2003 :  13:41:41  Show Profile  Send xx ENIGMA xx an AOL message
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

Go to Top of Page

MarcelG
Retired Support Moderator

Netherlands
2625 Posts

Posted - 10 December 2003 :  13:45:57  Show Profile  Visit MarcelG's Homepage
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
Go to Top of Page

xx ENIGMA xx
Junior Member

166 Posts

Posted - 10 December 2003 :  13:52:23  Show Profile  Send xx ENIGMA xx an AOL message
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
Go to Top of Page

MarcelG
Retired Support Moderator

Netherlands
2625 Posts

Posted - 10 December 2003 :  15:49:31  Show Profile  Visit MarcelG's Homepage
ah, thanks for the demo!

portfolio - linkshrinker - oxle - twitter
Go to Top of Page

cripto9t
Average Member

USA
881 Posts

Posted - 10 December 2003 :  16:22:37  Show Profile
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
Go to Top of Page

Astralis
Senior Member

USA
1218 Posts

Posted - 10 December 2003 :  17:01:54  Show Profile  Send Astralis a Yahoo! Message
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.
Go to Top of Page

cripto9t
Average Member

USA
881 Posts

Posted - 10 December 2003 :  18:19:49  Show Profile
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\-_
Go to Top of Page

laser
Advanced Member

Australia
3859 Posts

Posted - 10 December 2003 :  18:20:49  Show Profile
Quite easy to do really, with either MOD.
Go to Top of Page

Astralis
Senior Member

USA
1218 Posts

Posted - 10 December 2003 :  19:36:44  Show Profile  Send Astralis a Yahoo! Message
Yeah, that would be right - a "permalink".
Go to Top of Page

cripto9t
Average Member

USA
881 Posts

Posted - 11 December 2003 :  13:03:11  Show Profile
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
Go to Top of Page
Page: of 2 Previous Topic Topic Next Topic  
Next Page
 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.19 seconds. Powered By: Snitz Forums 2000 Version 3.4.07