p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 (http://p2p.wrox.com/forumdisplay.php?f=264)
-   -   Breaking the Forums? (http://p2p.wrox.com/showthread.php?t=53807)

iPagan February 8th, 2007 09:59 AM

Breaking the Forums?
Ok One thing I don't like with the format of the forums at the moment, and I've been trying to think how to better solve the issue. Many modern forums now allow you to nest forums within forums, make posts sticky, and search the Forums...

Anyone thought about this in any way?

Maybe this community could expand this Starterkit?


404 real life user not found

dparsons February 8th, 2007 10:20 AM

Ohhh community project ^^. In any case if there is interest from other members, ill lend some assistance. =]

================================================== =========
I will only tell you how to do it, not do it for you.
Unless, of course, you want to hire me to do work for you.
================================================== =========
Read this if you want to know how to get a correct reply for your question:
^^Took that from planoie's profile^^
^^Modified text taken from gbianchi profile^^
================================================== =========

Maxxim February 8th, 2007 11:44 AM

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.
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

rocco50 February 8th, 2007 07:20 PM

muito bom! :) I'd love to see this turn into another CSK. But hopefully not as bloated as CommunityServer! ;) I've submitted requests to create a new forum for this starter kit on asp.net, I think it would help tremendously with the exposure if this happens.

jimibt August 2nd, 2007 04:46 AM

As some may be aware, i made a few amendments to the forums stuff earlier this year and posted the code for all to use. After reviewing this post, looks like i missed a little trick. THe idea for last visited is a nice one and i might pull down a fresh copy of TBH, implement my existing changes and add this new functionality. Before doing so tho', i thought i'd ask if anyone has already done this as i don't wish to reinvent the wheel. My idea was going to be very similar to max's but work as follows:

1. Create a user table for post views 'UserPostViews' with fields 'UserID, ParentPostID, LastPostDate'
2. Only add an entry when the user views a thread (this entry being the LastPostDate on the thread [as well the the UserID and ParentPostID of course]).
3. when a new post is added to a thread, do a delete across the UserPostViews where the ParentPostID equals that of the thread. This is mainly to keep the size of the recordset in UserPostViews to a bare minimum.
4. when querying the BrowseThreads page, the DAL would have an outer join (or more likely, an correlated update as there is already a tmp table being created in the sql - whichever was most efficient) onto the UserPostViews table. This would add a value to a virtual column called 'IsNew'.
5. when displaying the results in BrowseThreads.aspx, show the appropriate icon in the gridview to indicate that the last post is new.

Really, that was the extent of it. I know it's somewhat simplistic, but for my purposes, i think it's fine. So if anyone has another implementation before i head down this path, please let me know.

The only 'main' concern is the fact that the cached data for the threads would now be somewhat comprimised, so perhaps the userpostviews table would have to be brought in seperately against the user querying the forum thread. hmmm, lots to think about before rushing in.

[edit] just thinking out loud here. probably i don't need the lastpostdate column as the presence or absence of the row is actually enough. still wondering if there's an 'interim' use for the date column before removing it from the definition.



Maxxim August 2nd, 2007 10:33 AM

Hello Jimi, if you do that I'll be very happy!

I had this in version 1

I made this table, like you said.
I think it is better do all this stuff under sql and simple show if one topic is new or not...
In version 2 (TBH) it is easier because the topic row has the "lastpostdate"...

better still would be to create one another icon where user click and see the post since its last visit.
Because When user clicks in the last page nor always distinguish what already it read what it did not read!

phpbb has this feature.

By the way, where are the new features that you had already done?

Thanks very much!

jimibt August 2nd, 2007 10:45 AM


in this thread (http://p2p.wrox.com/topic.asp?TOPIC_...22&whichpage=2) i've made a note of the location. you can see the threads in action on my 'test' site (www.jamestollan.com).

Let me know how you get on.



Maxxim August 2nd, 2007 02:02 PM

I Already had seen your forum and I liked!

During this month I go to pass my site of version 1 (thephile) for version 2 (theBeerHouse).
At this moment I am working in articles. Later I go to make a section of interviews and later I'm going to work in fórum.

I need to think if I keep some definitions of users (msn, yhm, mumPosts, ForumLastVisit, Signature, etc) in profile of membership or if I make a table in sql with this. Because if an administrator delete a topic (and all replies) the ASP.NET does not modify numPost's of profile... This is wrong.

All times are GMT -4. The time now is 12:31 PM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.