Welcome Guest ( Log In | Register)



 
Reply to this topicStart new topic
> How To Make A View New Post Script?
demonlord
post Jul 4 2008, 11:15 PM
Post #1


Member [Level 3]
******

Group: [HOSTED]
Posts: 92
Joined: 1-January 08
Member No.: 55,554



Ok so i'm still working on the forum software i posted about a while back, but I have no idea how to do this. I want to make a view new post script, as this is one of the main things that my forum software dose not have that all other forums have. so does any body have an idea on how i would do this?

Thanks.
Go to the top of the page
 
+Quote Post
truefusion
post Jul 4 2008, 11:44 PM
Post #2


Ephesians 6:10-17
Group Icon

Group: [MODERATOR]
Posts: 1,916
Joined: 22-June 05
From: The World of Gentoo
Member No.: 8,528



By "view new post," do you mean clicking on a link that is next to the topic name that shows you the very last post? If so, i would assume that the easiest way to achieve this is by first getting the topic id, getting the last post's id in that topic (limit to 1 and order by descend), and calling a php script that only shows that one post.

The more advanced way, which i think is how IPB boards does it, is done by getting the topic id, getting the number of posts in that topic, obtaining the forum's setting for pagination, getting the last post's id, doing the math for the pagination, and use a header to direct the user to the proper URL. This assumes that all your posts have a name attribute with a value of its id.
Go to the top of the page
 
+Quote Post
sonesay
post Jul 4 2008, 11:46 PM
Post #3


|||[ n00b King ]|||
*********

Group: [HOSTED]
Posts: 687
Joined: 20-June 07
From: Auckland
Member No.: 45,102



I use the view use post feature here a lot and I think* the way its done is using time stamps. Get the last posts within 12-24 hours? I don't know there is probably some other criteria missing for filtering post like if you've viewed them before or what.

One other criteria you could use to filter is have a way to determine when a thread was last active. If theres been changes to it since the users last visit then include it in your list of 'view new post'.

If you can get a hold of a forum software that already has this feature done and try and replicate it or its logic. Its kind of like cheating or even illegal but they probably have built a more efficient way of doing it and identified problems we haven't yet to this problem. I remember trying to look through pages of source code in a forum software a few years back and it was daunting but I think it would be a lot easier to follow now after more experience so its not entirely impossible.

This post has been edited by sonesay: Jul 5 2008, 12:04 AM
Go to the top of the page
 
+Quote Post
demonlord
post Jul 4 2008, 11:52 PM
Post #4


Member [Level 3]
******

Group: [HOSTED]
Posts: 92
Joined: 1-January 08
Member No.: 55,554



QUOTE(truefusion @ Jul 4 2008, 07:44 PM) *
By "view new post," do you mean clicking on a link that is next to the topic name that shows you the very last post? If so, i would assume that the easiest way to achieve this is by first getting the topic id, getting the last post's id in that topic (limit to 1 and order by descend), and calling a php script that only shows that one post.

The more advanced way, which i think is how IPB boards does it, is done by getting the topic id, getting the number of posts in that topic, obtaining the forum's setting for pagination, getting the last post's id, doing the math for the pagination, and use a header to direct the user to the proper URL. This assumes that all your posts have a name attribute with a value of its id.


I mean where it shows you all new posts that have been posted from the last time you loged in. like this http://www.trap17.com/forums/index.php?act...amp;CODE=getnew
Go to the top of the page
 
+Quote Post
truefusion
post Jul 5 2008, 12:00 AM
Post #5


Ephesians 6:10-17
Group Icon

Group: [MODERATOR]
Posts: 1,916
Joined: 22-June 05
From: The World of Gentoo
Member No.: 8,528



QUOTE(demonlord @ Jul 4 2008, 07:52 PM) *
I mean where it shows you all new posts that have been posted from the last time you loged in. like this http://www.trap17.com/forums/index.php?act...amp;CODE=getnew

Ah, consider timestamps like sonesay said. All posts and user sessions would have to have timestamps. I'm assuming you have a column for the users table and the posts table that deals with timestamps.
Go to the top of the page
 
+Quote Post
coolcat50
post Jul 5 2008, 04:13 AM
Post #6


Super Member
*********

Group: Members
Posts: 290
Joined: 5-October 07
From: Random Places
Member No.: 51,171
Spam Patrol



Yeah, use post IDs with ordering and make links go to the latest post ID. I am not entirely sure, but possibly look into the phpBB3 source.
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic

Collapse

> Similar Topics

Topics Topics
  1. Many Php Script Sites(16)
  2. Script: Php Jukebox(4)
  3. Parse: Error Unexpected T_lnumber(4)
  4. Transfer Variables To Another Php Script(8)
  5. Watermark Your Image With Simple Php Script(35)
  6. Script That Tracks The User Status(4)
  7. Wappychat_oldskool(15)
  8. Free Auction Script(6)
  9. Wappy Buddy V1.10 - Tibia Gold Edition By Wappy & Jon Roig(3)
  10. What Kind Of Script Do You Need ?(15)
  11. Creatting A Playlist Through Php(5)
  12. Very Simple Online Now Script(4)
  13. Html Code Tester. Online Script(15)
  14. Php Sessions And Post Variables Issues(1)
  15. Will This Code Work(5)
  1. Php Downloads Script(4)
  2. Script Help Required: Undefined Variable(3)
  3. Script Not Working(6)
  4. Library Script(6)
  5. How Would I Go About Making A Simple "counting" Script?(3)
  6. Forum Script(3)
  7. Php Rediret Script(12)
  8. Download Script For Mp3 Files(0)
  9. How Do I Connect To Live Database With Php Script?(6)
  10. Need Help Installing Dolphin Community Script!(5)
  11. Guessing Php Script(2)
  12. Php Guest Online Script(3)
  13. How To Make Php Newsletter Script(3)


 



- Lo-Fi Version Time is now: 6th October 2008 - 11:28 PM