View Single Post
  #3 (permalink)  
Old February 8th, 2007, 11:44 AM
Maxxim Maxxim is offline
Friend of Wrox
 
Join Date: Mar 2006
Location: , , Portugal.
Posts: 310
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I'm starting this version 2.

But when i maked a site with version 1 (thePhille) I changed all the forum classes.

I made:
Private messages.
Search engine.
Statistics.
Sticky, announcemants, polls.
The possibility to users see different icon images for the new threads since they last visit.
Resuming... I made all the stuff that phpbb forum have!

I maded all by myself with a big help from Eric, some forums, etc.

I have to do the same stuff in this version 2. Because i want to make a portal based on this.

Lets Start:

Sticky, announcemants and normal threads
I think it can be done with an extra column [priority] (int) on the [posts] table.
for normal thread -> priority = 0
for sticky thread -> priority = 1
for annoucement threads -> priority = 2

When a user insert a new thread the default value for priority is "0"
Only moderators and admin can change priority.

For binding gridviews with this just order by "Priority DESC, LastPostDate"

users see different icon images for the new threads since they last visit
I loose some time with this on version 1
First I tried to do this by session values but then i see that this generate a long ammount of data.
My choice on version 1 was:
create a help table: "UserViews" with "UserID(int),TopicID(int),LastView(datetime)"
When a user login, delete all the values from [UserViews] for this user
When a user see one topic it will be inserted this datetime on [usersview] for this user
Then i made some procedures with this and "lastvisit" from each user on sql and when the dataset is created it already has a column "new(bit)"
If new = 1 show newpost.gif else show oldpost.gif
When a user open the forum gridviews will see the new and old posts

I don't know if this is the best way but for me worked on version 1 and it's fast because all this are made on sql.

You please give some possible solutions for this.
We really could work on this and make a new forum!!

Forgive my bad english!
Max, Portugal