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)
 a small mod: to show new/edit Last Post
 New Topic  Topic Locked
 Printer Friendly
Next Page
Author Previous Topic Topic Next Topic
Page: of 2

DoraMoon
Average Member

Taiwan
661 Posts

Posted - 10 August 2002 :  05:05:07  Show Profile
this so stupid thing happen to me ...
one day i see the Last Post show me a new post i want to see, so i click in and ...
try looking for,reload,jumping page...again and again, but also can't find this post !
so i'm angry, i think the author already delete his reply, but the Last Post did'nt update.
i immediately go to the Bug Report forum and post "wrong Last Post infomation !!!!"

then after a while, i found how stupid am i, the author just Edit his original topic.
and i hav'nt notice the reminder of "Edited by :....." in this long thread. so shame to me..

so i decide to try something for preventing this stupid thing happen again~~~

*Last Post info - it's a very small "practice" mod, to show more Last Post information


and i think it's very easy to install..

- add/insert this function somewhere in inc_functions.asp
lastpostinfo-inc_functions-add.txt

(below modified files base on clean Snitz 3.3.05)
- add one line in default.asp
find this line at line.339
strLastUser = strLastUser & chkString(rsForum("M_NAME"),"display") & "</a>" & vbNewline
and below add new one line
' ###### Last Post Info addon - begin #####
strLastUser = strLastUser & ChkNewPost(0,RsForum("MEMBER_ID"),rsForum("F_LAST_POST")) & vbNewline
' ###### Last Post Info addon - end #####

- add one line in forum.asp
find this line at line.388
strLastAuthor = strLastAuthor & ChkString(rs("LAST_POST_AUTHOR_NAME"), "display") & "</a>"
and below add new one line
' ###### Last Post Info addon - begin #####
strLastAuthor = strLastAuthor & ChkNewPost(Topic_ID,rs("T_LAST_POST_AUTHOR"),rs("T_LAST_POST"))
' ###### Last Post Info addon - end #####

- add one line in active.asp
find this line at line.449
strLastAuthor = strLastAuthor & Topic_Last_Post_Author_Name & "</a>"
and below add new one line
' ###### Last Post Info addon - begin #####
strLastAuthor = strLastAuthor & ChkNewPost(Topic_ID,Topic_Last_Post_Author,Topic_Last_Post)
' ###### Last Post Info addon - end #####

- and u may also need these 4 small image... {{ }}

- it's all !


IMPORTANT:
the Snitz 3.3.x did'nt update the LastPost when user edit the topic (only update in edit reply..)
and i found the new coming Snitz 3.4 already correct this problem....
also it's mean... this small mod will become Unavailable soon !!
(yeh~ i know, we all hope it as sooner as better !!! )

~......~.~~

Edited by - DoraMoon on 16 August 2002 15:52:26

DoraMoon
Average Member

Taiwan
661 Posts

Posted - 10 August 2002 :  05:15:40  Show Profile
*Last Post info small Bonus - for those who have Babygate's Last Post Mod installed...


(well~ i'm too eagerly to waiting the 3.4 release.. so take the small image from 3.4 first !!! )

- add a new function & a little modify LastPost Mod's function in inc_functions.asp
lastpostinfo-inc_functions-modify2.txt

(below modified files base on Snitz 3.3.x with Babygat's LastPost Mod)
- default.asp
nothing need to change. (modification in LastPost Mod's LastPost(Forum) function in inc_functions.asp

- a little modification in Babygate's section in forum.asp
find this in LastPost Mod
Response.Write " "">"
%>
<img alt="Go to Latest Post" src="lastpost.gif" border=0></a>

and replace with
Response.Write " "">"
' ###### Last Post Info addon - change one line #####
Response.Write ChkNewPost2(Topic_ID,rs("T_LAST_POST_AUTHOR"),rs("T_LAST_POST"),"") & "</a>"
%>


- a little modification in Babygate's section in active.asp
find this in LastPost Mod
if Last_Post <> "0" then Response.Write "#" & Last_Post
Response.Write " ""><img alt=""Go to Latest Post"" src=""lastpost.gif"" border=""0""></a> "

and replace with
if Last_Post <> "0" then Response.Write "#" & Last_Post
Response.Write """>"
' ###### Last Post Info addon - change one line #####
Response.Write ChkNewPost2(Topic_ID,Topic_Last_Post_Author,Topic_Last_Post,"") & "</a>"



- and another 4 small image... {{ }}

- it's all ! really !!

IMPORTANT:
this still a Snitz newbie's practice mod, need someone find bugs and improve it !

~......~.~~

Edited by - DoraMoon on 16 August 2002 15:53:43
Go to Top of Page

Massimo
Junior Member

Italy
125 Posts

Posted - 10 August 2002 :  11:59:22  Show Profile  Visit Massimo's Homepage
Very good tanks ! ;)

Massimo Farieri
Snitz Italian Community
===============
http://www.snitz.it
http://www.superdeejay.net/forum/


Edited by - Massimo on 10 August 2002 11:59:55
Go to Top of Page

Etymon
Advanced Member

United States
2385 Posts

Posted - 12 August 2002 :  21:20:18  Show Profile  Visit Etymon's Homepage
If you have BabyGate's MOD, could you please post it. The MOD is no longer offered at BabyGate's site if I remember correctly.

Thanks,

Etymon
Go to Top of Page

DoraMoon
Average Member

Taiwan
661 Posts

Posted - 13 August 2002 :  01:31:52  Show Profile
quote:
Originally posted by Etymon

If you have BabyGate's MOD, could you please post it. The MOD is no longer offered at BabyGate's site if I remember correctly.

not sure where i get this version of Babygate's LastPost Mod,
but it work good for me ... get it here lastpost_mod.zip

~......~.~~
Go to Top of Page

Etymon
Advanced Member

United States
2385 Posts

Posted - 13 August 2002 :  01:36:02  Show Profile  Visit Etymon's Homepage

Thanks, got it!

Go to Top of Page

Etymon
Advanced Member

United States
2385 Posts

Posted - 13 August 2002 :  01:53:57  Show Profile  Visit Etymon's Homepage

The dimensions on those arrows are 12 pixels (width) by 10 pixels (height).

Go to Top of Page

DoraMoon
Average Member

Taiwan
661 Posts

Posted - 13 August 2002 :  08:49:53  Show Profile
quote:
Originally posted by Etymon


The dimensions on those arrows are 12 pixels (width) by 10 pixels (height).


??? yes~ the small arrows is 12x10 images, it just like this forum (Snitz 3.4) used on default page..
the orginial LastPost mod have another lastpost.gif is 14x14.

~......~.~~
Go to Top of Page

DoraMoon
Average Member

Taiwan
661 Posts

Posted - 13 August 2002 :  15:23:06  Show Profile
Last Post Info - my last post

a small addon for this stuff ~~
just put another small image in Last Post row to "remind" someone ..You Have Replied this Topic Before !!
and it also show how many replies & the last post date you've done to this topic. (and link to this "my last post"..)


it's similar like my previous doing, and also very easy to install..

- add/insert this function somewhere in inc_functions.asp
lastpostinfo-inc_functions-add2.txt

- Please refer to above posts, and just add new one line before ending..
- add one line in forum.asp
' ###### Last Post Info addon - begin #####
strLastAuthor = strLastAuthor & ChkNewPost(Topic_ID,rs("T_LAST_POST_AUTHOR"),rs("T_LAST_POST"))
strLastAuthor = strLastAuthor & ChkMyPost(Topic_ID,MemberID)
' ###### Last Post Info addon - end #####

- add one line in active.asp
' ###### Last Post Info addon - begin #####
strLastAuthor = strLastAuthor & ChkNewPost(Topic_ID,Topic_Last_Post_Author,Topic_Last_Post)
strLastAuthor = strLastAuthor & ChkMyPost(Topic_ID,MemberID)
' ###### Last Post Info addon - end #####

- and this just for forum.asp and active.asp page, i have no idea how to add to default.asp ..

- the same doning if you have Last Post Mod ...
e.x.
Response.Write ChkNewPost2(Topic_ID,rs("T_LAST_POST_AUTHOR"),rs("T_LAST_POST"),"") & "</a>"
Response.Write ChkMyPost(Topic_ID,MemberID)

- and maybe u also need this ..
it's 15x15 to fit my need (the Chinese words is more bigger..), maybe you'll instead of smaller image..


that's all, hope it useful for someone.....

(if you can't see the image, please right click and show it again..
i do'nt know what's wrong, maybe the free webspace is heavy traffic..)
<edit>change the image source, it should be display more correctly... </edit>

~......~.~~

Edited by - DoraMoon on 16 August 2002 15:57:01
Go to Top of Page

DoraMoon
Average Member

Taiwan
661 Posts

Posted - 14 August 2002 :  00:04:45  Show Profile
Update the link .txt file ..

sorry~ i forgot add these lines: rsXXX.close , set rsXXX = nothing in previous posts.
and as other professional programmer's opinion,(i read from this forum..)
it seem had better add these lines to close db query.

if someone get these code before, please update it. thx~

~......~.~~
Go to Top of Page

DoraMoon
Average Member

Taiwan
661 Posts

Posted - 16 August 2002 :  15:50:50  Show Profile
update: Last Post Info - my last post addon

to show My Topic too.

lastpostinfo-inc_functions-add3.txt

Edited by - DoraMoon on 30 August 2002 02:35:36
Go to Top of Page

DoraMoon
Average Member

Taiwan
661 Posts

Posted - 30 August 2002 :  02:38:44  Show Profile
fix a big mistake!! in my last post addon...

i'm so innocent as thinking about the "jump to last post" function before..
i think it could be just topic.asp?TOPIC_ID=xxx#replyid at all....
but now i know i'm wrong~~ it's not so simply as my stupid thought..
thanks ruirib remind me this point at this topic..
http://forum.snitz.com/forum/topic.asp?whichpage=-1&TOPIC_ID=33408&REPLY_ID=166011

for "jump to last post" function work correctly, we still need to add the "whichpage" info on the link url..
below is fixed code..
lastpostinfo-inc_functions-add3-fix.txt (update!!08/31/2002)

Wrong Fix ! please see above update txt file..
there are 3 places modification in function ChkMyPost
1. add T_REPLIES in sql statement
strSql1 = "SELECT T_DATE, T_REPLIES FROM " & strTablePrefix & "TOPICS"

2. below this line
set rsChkMyTopic1 = my_Conn.Execute (strSql1)
add 4 lines
mxpages = (rsChkMyTopic1("T_REPLIES") / strPageSize)
if mxpages <> cint(mxpages) then
mxpages = int(mxpages) + 1
end if


3. and replace this line
ChkMyPost = " <a href='topic.asp?TOPIC_ID=" & TopicID & "#" & rsChkMyReply("LASTRID") & "' "
with these
ChkMyPost = " <a href='topic.asp?TOPIC_ID=" & TopicID
if mxpages > 1 then
ChkMyPost = ChkMyPost & "&whichpage=" & mxpages
end if
ChkMyPost = ChkMyPost & "#" & rsChkMyReply("LASTRID") & "' "



although it's a OLD mod, not available in 3.4 anymore...
but i think i have responsibility to announce this fix.
sorry for this mistake, hope it not bother too many ones...

Edited by - DoraMoon on 31 August 2002 05:36:43
Go to Top of Page

Etymon
Advanced Member

United States
2385 Posts

Posted - 31 August 2002 :  08:17:37  Show Profile  Visit Etymon's Homepage
Thanks again, DoraMoon! You are a true MOD creator!

Etymon
Go to Top of Page

DoraMoon
Average Member

Taiwan
661 Posts

Posted - 31 August 2002 :  10:10:23  Show Profile
Thanks, Etymon...

now i'm really afraid to touch the code i "mod".. coz everytime i try to test it more, i'll found a lots bugs again...
but anyway, it's great experience for me. i think i also learn more from this mod work..

about above fix to "jump to my last post"..
i did'nt consider the topic.asp is a "paging" page before. we need know where the exact page to jump to that place of someone reply post.

my first fix, it count the topic pages and link to the last page...
but i forgot this.."my last post in this topic NOT surely in the last page" !! how stupid am i.....
so fix it again~~~ sorry for my frequently make a wrong mod...
Go to Top of Page

HarshReality
Junior Member

USA
128 Posts

Posted - 31 August 2002 :  17:50:41  Show Profile  Visit HarshReality's Homepage  Send HarshReality an AOL message  Send HarshReality an ICQ Message  Send HarshReality a Yahoo! Message
Ok is there like a zip with all this in it?


Anti Social Personality
Go to Top of Page

DoraMoon
Average Member

Taiwan
661 Posts

Posted - 31 August 2002 :  21:32:56  Show Profile
quote:
Originally posted by HarshReality

Ok is there like a zip with all this in it?

ok~ i do a little arrangement and package in zip.
you can download here.. LastPostInfo.zip

there are three "independent" parts in this small mod.
  • Last Post Info - original (for Snitz 3.3.x)
  • Last Post Info - lastpost mod addon (for Snitz 3.3.x with Babygate's lastpost mod installed)
  • Last Post Info - my last post (for Snitz 3.3.x)

and they are almost the same doing... just add a new function in inc_functions.asp, then add one line in default.asp, forum.asp, active.asp pages...
i including a simple install instruction in individual zip.(sorry, i really poor in english, so can't document it well...) and also including Babygate's lastpost mod within the zip file.

make sure you know this just a newbie's "practice" & immature mod. still need someone find problem and improve it.. any suggestion just let me know... thanks!
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.25 seconds. Powered By: Snitz Forums 2000 Version 3.4.07