Re: Anyone built a forum system yet?

2009-01-22 Thread brian

Cake isn't limited to MySQL, nor (when using that particular DB) to
InnoDB. If you want to use ENGINE=MEMORY for sessions (a perfectly a
sound idea) I don't see any reason why that'd be a problem.

On Thu, Jan 22, 2009 at 5:49 PM, Miles J  wrote:
>
> Yes Ive seen them, but id prefer to use a MEMORY table. Anyone done
> this before, or will it not work since Cake uses InnoDB?
>
> Also what about the user groups, I mainly ask because I heard ACL lags
> a bit with a ton of users.
> >
>

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Anyone built a forum system yet?

2009-01-22 Thread Miles J

Yes Ive seen them, but id prefer to use a MEMORY table. Anyone done
this before, or will it not work since Cake uses InnoDB?

Also what about the user groups, I mainly ask because I heard ACL lags
a bit with a ton of users.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Anyone built a forum system yet?

2009-01-22 Thread brian

Like I said in the first reply here, a "who's online" feature was
discussed in this group very recently. I just found the thread:

http://groups.google.com/group/cake-php/browse_frm/thread/50fd37fe850cb31/6e65e7fcc6c0e1bc?lnk=gst&q=who%27s+online#6e65e7fcc6c0e1bc

There's an older one here:

http://groups.google.com/group/cake-php/browse_frm/thread/9ed197af4f891201/915feb7918f9f3b5?lnk=gst&q=who%27s+online#915feb7918f9f3b5


On Thu, Jan 22, 2009 at 5:03 AM, Miles J  wrote:
>
> What about the other 2 questions? -_-
> >
>

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Anyone built a forum system yet?

2009-01-22 Thread Miles J

What about the other 2 questions? -_-
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Anyone built a forum system yet?

2009-01-22 Thread posh beck
It would be great if all coding is given free here.

On Sat, Jan 17, 2009 at 11:07 AM, Miles J  wrote:

>
> If so, how did you do the following:
>
> - Determining if a user has read a thread or leave it unread, also
> marking all threads as read
> - Whos online (thinking of using a model for a memory table)
> - User groups (supermod, admin, etc), did you use ACL or custom system?
> >

az

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Anyone built a forum system yet?

2009-01-21 Thread Brian Williams
not showing 100,000 threads?  I assumed that was a given...

My perception was that the OP was worried about processing power; for
example, on my VPS there is (among others) a single MySQL db that is over
280 megs, with 183 tables and over 2 million records and it runs without any
problems, of note there is a single table that has 1,640,537 records and it
doesn't affect the performance of the site or the server -- it's all about
the quality of your query that matters - not to mention indexes, and decent
maintenance.

You will never be loading all of the data rows at any one time, it just
won't happen.  I don't see how loading 1 row with 1k to 4k of data is worse
than loading potentially 10,000 records and processing them all.  Every
developer knows, or should know, that retrieving the data from the disk
takes longer than most computational processes.

so, you (the OP) wants the best performance/processing intensity resolution
with long term storage, the answer is still a db, just the logic and
formatting of the data is what you need to determine.

i recommend a serialized list of threads read and the date they were read --
no need to store threads that they haven't read yet.

just my 2 cents


On Thu, Jan 22, 2009 at 12:17 AM, brian  wrote:

>
> On Wed, Jan 21, 2009 at 11:41 PM, Jon Bennett  wrote:
> >
> > This shouldn't incur a massive DB hit, as even if you have 100,000
> > threads, you won't display 100,000 on one page!
>
> Yes. That's precisely the point that I think I should have pointed out
> many comments ago. I don't know if it's that misconception that is
> objectionable, or the notion that storing hundreds of thousands of
> data points at all is somehow an abuse of a good DB.
>
> >
>

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Anyone built a forum system yet?

2009-01-21 Thread Miles J

Yes but if I understand that approach, for each thread in the system,
there would be a matching HABTM row as well... and that applies to
each user. Still just seems like a lot.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Anyone built a forum system yet?

2009-01-21 Thread brian

On Wed, Jan 21, 2009 at 11:41 PM, Jon Bennett  wrote:
>
> This shouldn't incur a massive DB hit, as even if you have 100,000
> threads, you won't display 100,000 on one page!

Yes. That's precisely the point that I think I should have pointed out
many comments ago. I don't know if it's that misconception that is
objectionable, or the notion that storing hundreds of thousands of
data points at all is somehow an abuse of a good DB.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Anyone built a forum system yet?

2009-01-21 Thread Jon Bennett

hi,

been watching this thread and thought I'd put my 2p in.

> I think you are trying to hard to formulate and verify data. (btw when i
> said hash previously I actually meant to say serialized data ... late hours)
> - plus, I now think that there is no need to use a cookie (other than
> typical session id, login status) - the user should know if they read a
> thread already so storing that data in the db makes more sense if they use
> multiple computers to access that forum (students, teachers, etc)

Personally, I would go with DB, with the following tables

Threads
Comments
Users

you then have 2 habtms

ThreadView habtm User
CommentView habtm User

Then, you then have a call to paginate the threads data. Then you need
to search your join model for all records matching the
Set::extract('{n}.Thread.id) and the active user_id. of your paginated
data.

With this array of read posts for the current set of threads, you can
pass to the view and check using a single if (in_array()) when looping
over your threads.

This shouldn't incur a massive DB hit, as even if you have 100,000
threads, you won't display 100,000 on one page!

You'd need to extend the functionality for Threads to Comments.

To implement this for non-signed in users, you could use cake's UUID
function to and create them a user record, just not an authenticated
one, a guest account. Store the uuid in a cookie and you'll always be
able to grab what they've read or not.

just an idea at least.

-- 

jon bennett
w: http://www.jben.net/
iChat (AIM): jbendotnet Skype: jon-bennett

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Anyone built a forum system yet?

2009-01-21 Thread Brian Williams
brian,

I think you are trying to hard to formulate and verify data. (btw when i
said hash previously I actually meant to say serialized data ... late hours)
- plus, I now think that there is no need to use a cookie (other than
typical session id, login status) - the user should know if they read a
thread already so storing that data in the db makes more sense if they use
multiple computers to access that forum (students, teachers, etc)

So let's say for the sake of example your serialized data is essentially an
array
$read_threads =
array(array('thread_id'=>12),array('last_date_visited'),array('thread_id'=>16),array('last_date_visited'))

when the list of threads is displayed you check against the
last_visited_date for the specific thread ID

foreach($read_threads as $n=>$v){
   if($thread($v['thread_id'])->messages->last_post_date() >
$v['last_date_visited'])
 //print out the right icon, or set the appropriate status variable
for use in smarty, etc

the foreach (or a regular for) works perfectly fine because you would use
that anyways to print the list of threads

then when they view a page of the thread's messages you update the
array/object/session with the last post date of that thread, save to the db

anyways, thats what i was thinking.



On Wed, Jan 21, 2009 at 1:17 PM, brian  wrote:

>
> On Wed, Jan 21, 2009 at 12:43 AM, Brian Williams 
> wrote:
> > not to step on toes but i'm not sure why it's such a problem storing that
> > data in a db...
> >
> > if you want quick access to the data but not a zillion records make a
> hash,
> > and store that hash in the db and a cookie.
> >
> > when the user logs in, read the hash and store into their session and
> save
> > it in their cookie until they log out.
>
> That seems like a good idea, but how would you get the thread IDs from
> a hash? The only way I can see that working is if you hashed every
> combination of thread IDs (plus whatever user-specific info you
> previously hashed) and tested against what was stored in the cookie.
> Obviously, that wouldn't be very efficient. What did you have in mind?
>
> >
>

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Anyone built a forum system yet?

2009-01-21 Thread Miles J

Exactly, it would take just way too much logic on each page. I have to
check the state of new posts since last visit, plus also posts that
were unread before this visit, then mark certain things as read/
unread... etc, etc. Then finally serializing the array and storing it
in the db.

Larger text/data in a single row can cause huge load times, id rather
stick to the session like my current one is.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Anyone built a forum system yet?

2009-01-21 Thread brian

On Tue, Jan 20, 2009 at 6:31 PM, mattmoy...@gmail.com
 wrote:
>
> Cookies/Session Vars. is the way to go for the read/unread threads.

Would you store every thread ID in the cookie? That'd soon become
rather unwieldy. Remember, we're talking about repeat visits, not just
within a single user session.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Anyone built a forum system yet?

2009-01-21 Thread brian

On Wed, Jan 21, 2009 at 12:43 AM, Brian Williams  wrote:
> not to step on toes but i'm not sure why it's such a problem storing that
> data in a db...
>
> if you want quick access to the data but not a zillion records make a hash,
> and store that hash in the db and a cookie.
>
> when the user logs in, read the hash and store into their session and save
> it in their cookie until they log out.

That seems like a good idea, but how would you get the thread IDs from
a hash? The only way I can see that working is if you hashed every
combination of thread IDs (plus whatever user-specific info you
previously hashed) and tested against what was stored in the cookie.
Obviously, that wouldn't be very efficient. What did you have in mind?

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Anyone built a forum system yet?

2009-01-21 Thread brian

As I mentioned earlier, this wouldn't be accurate. A user can log in
but not read certain threads. Think of an email client--when I open
Thunderbird, I expect that any unread messages will remain in an
"unread" state regardless of when they were sent.

On Wed, Jan 21, 2009 at 8:39 AM, mark_story  wrote:
>
> Couldn't you just compare dates?  Compare the last time the person
> logged in with that of all the most recent posts.  Then in the session
> all you need to do is track which ones have been read, and unhighlight
> those in the view.  I don't think there is really a need to store this
> in the database.
>
> -Mark
>
> On Jan 20, 4:00 pm, Miles J  wrote:
>> What if there are like 1000+ unread threads, with thousands of users.
>> Why would I want to store all that information in the system. Plus I
>> would also have to extract the array from the database, remove indexes
>> depending on what threads they have read, update the db again, etc.
>>
>> Anyways, anyone have answers to my initial questions?
> >
>

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Anyone built a forum system yet?

2009-01-21 Thread Brian Williams
not to step on toes but i'm not sure why it's such a problem storing that
data in a db...

if you want quick access to the data but not a zillion records make a hash,
and store that hash in the db and a cookie.

when the user logs in, read the hash and store into their session and save
it in their cookie until they log out.

when you read and process the hash you'll have the read threads which you
can use to differentiate the read/unread threads for the indicator image.

when they view a unread thread add it to the hash and update the db and the
session, and write the cookie.

just my 2 cent


On Tue, Jan 20, 2009 at 9:21 PM, Miles J  wrote:

>
> Sigh, man you guys are taking this way out of context.
>
> Perhaps answer the other questions that I asked.
> >
>

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Anyone built a forum system yet?

2009-01-21 Thread mattmoy...@gmail.com

Cookies/Session Vars. is the way to go for the read/unread threads.
Wouldn't make sense to put that much load on the database for such a
non-essential task.  Just use a little javascript to make the unread
thread titles bold or whatever else you to do.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Anyone built a forum system yet?

2009-01-21 Thread mark_story

Couldn't you just compare dates?  Compare the last time the person
logged in with that of all the most recent posts.  Then in the session
all you need to do is track which ones have been read, and unhighlight
those in the view.  I don't think there is really a need to store this
in the database.

-Mark

On Jan 20, 4:00 pm, Miles J  wrote:
> What if there are like 1000+ unread threads, with thousands of users.
> Why would I want to store all that information in the system. Plus I
> would also have to extract the array from the database, remove indexes
> depending on what threads they have read, update the db again, etc.
>
> Anyways, anyone have answers to my initial questions?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Anyone built a forum system yet?

2009-01-20 Thread Miles J

Sigh, man you guys are taking this way out of context.

Perhaps answer the other questions that I asked.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Anyone built a forum system yet?

2009-01-20 Thread Gonzalo Servat
On Tue, Jan 20, 2009 at 10:10 PM, Miles J  wrote:

>
> Yes but id rather listen to them, they know what they're talking
> about. One was even part of the Zend Team and has been doing this
> since PHP3. My current system is based on the session and not storing
> it in db.
>

An answer like "i rather listen to them, they know what they're talking
about" is probably not the best answer you want to give if you want to keep
the thread going trying to figure out different ways to keep track of thread
read count. You're basically saying that the guys here are a bunch of
amateurs, the zend guys are the shit.  Just because they were part of the
Zend Team does not make them any more qualified than the guys who replied to
this thread. What you could do, however, is find out what their method is to
keep a thread seen count and share it with us.

- Gonzalo

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Anyone built a forum system yet?

2009-01-20 Thread brian

On Tue, Jan 20, 2009 at 5:25 PM, Miles J  wrote:
>
> @Brian - Its just a lot of overhead. Ive spoken to many PHP gurus and
> they said storing it in the DB is not the best way. I even looked at
> PHPbb and they didnt do it that way, unless im completely blind.

Everything comes at a price. If you want to know which
threads/comments a user has seen, that has to be stored somewhere. If
you want to avoid that, you don't display any difference between read
& unread threads or comments.

I've no idea how PHPbb does it but I hope it's not setting a cookie
with all read thread IDs. That's the only other way I can imagine that
info being preserved.

> Anyways the process would be something like:
> - User logs in
> - Get last session of unread threads from the db
> - New query to get new threads/posts since last visit
> - Merge the 2 previous
> - Store new data in the session
> - If a user reads a thread, delete in the index from the session

Maybe we're not talking about the same thing. I've don't see how what
you're suggesting would be different from what I've already posted. If
you're grabbing the info from the DB, then which table?

Maybe what you mean by "unread" is threads/comments that have been
posted since the user's last visit (time grabbed from a cookie). But
that wouldn't be at all accurate. A user can log in but not read
certain threads. Those should remain in an "unread" state the next
time the user logs in.

Keep in mind that a decent DB engine can easily handle (many) millions
of records. And, I suppose, the table you use to store the keys for
"read" threads/comments can be flushed of very old rows to further cut
down on seek time.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Anyone built a forum system yet?

2009-01-20 Thread Miles J

Yes but id rather listen to them, they know what they're talking
about. One was even part of the Zend Team and has been doing this
since PHP3. My current system is based on the session and not storing
it in db.

But still im asking questions about cake, not my own forum code. -_-
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Anyone built a forum system yet?

2009-01-20 Thread Wayne Fay

> @Brian - Its just a lot of overhead. Ive spoken to many PHP gurus and
> they said storing it in the DB is not the best way. I even looked at
> PHPbb and they didnt do it that way, unless im completely blind.

No offense to your "PHP gurus" but I would suggest that you look at
the code for some more forum software before deciding the DB storage
approach suggested by Brian is "not the best way." And I'm not saying
it is or it isn't -- just suggesting you should look at more
implementations before making a decision.

Many free PHP forums are open source, so it should be fairly simple to
find the proper code and compare:
http://en.wikipedia.org/wiki/Comparison_of_Internet_forum_software

Wayne

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Anyone built a forum system yet?

2009-01-20 Thread Miles J

@Brian - Its just a lot of overhead. Ive spoken to many PHP gurus and
they said storing it in the DB is not the best way. I even looked at
PHPbb and they didnt do it that way, unless im completely blind.

Anyways the process would be something like:
- User logs in
- Get last session of unread threads from the db
- New query to get new threads/posts since last visit
- Merge the 2 previous
- Store new data in the session
- If a user reads a thread, delete in the index from the session

Then also
- During your login, check for new posts/topics
- Relogin if session expires
- Save all that to the db and repeat

Just seems... cumbersome.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Anyone built a forum system yet?

2009-01-20 Thread Wilson Sheldon

I've 'bridged' a phpBB2 and phpBB3 system successfully on two separate
occasions.  For phpBB3, you can use the bridge I wrote here.

http://bakery.cakephp.org/articles/view/phpbb3-api-bridge

And certainly you could extend it to match your ACL, Who's Online and
read/unread requirements.  Some of these may already be included in
phpBB3's API.

To display the forum, in the body of the page, I used the Dynamic
Drive iFrame script.

http://www.dynamicdrive.com/dynamicindex17/iframessi2.htm

On Jan 20, 4:00 pm, Miles J  wrote:
> What if there are like 1000+ unread threads, with thousands of users.
> Why would I want to store all that information in the system. Plus I
> would also have to extract the array from the database, remove indexes
> depending on what threads they have read, update the db again, etc.
>
> Anyways, anyone have answers to my initial questions?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Anyone built a forum system yet?

2009-01-20 Thread brian

On Tue, Jan 20, 2009 at 4:00 PM, Miles J  wrote:
>
> What if there are like 1000+ unread threads, with thousands of users.

Again, if you're using MSAccess, this might be an issue. With, say,
Postgres or MySQL? Not so much.

> Why would I want to store all that information in the system.

For the same reason you might want to be able to display which threads
are unread. It's not something you have to do but, if you want it,
you'll need to record the information somewhere.

> Plus I
> would also have to extract the array from the database, remove indexes
> depending on what threads they have read, update the db again, etc.

I don't understand what your concern is here. It's not as if you'll be
selecting *every* thread, and *every* user's thread info at once. Say
you want to get the comments that a user has seen already. When the
user selects a thread/post/whatever to view, grab that user's
coments_seen (or whatever) data, which should simply be a list of
comment_ids.

As for updating, again, this is something that's unnecessary *unless*
you want to save a record of which threads a particular user has seen.
If so, simply update the threads_users table when it's selected.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Anyone built a forum system yet?

2009-01-20 Thread Miles J

What if there are like 1000+ unread threads, with thousands of users.
Why would I want to store all that information in the system. Plus I
would also have to extract the array from the database, remove indexes
depending on what threads they have read, update the db again, etc.

Anyways, anyone have answers to my initial questions?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Anyone built a forum system yet?

2009-01-20 Thread brian

I forgot to mention how to deal with unread comments within a thread.
Store the user's last access time in a cookie. When the user opens a
thread/topic/post, if that access time isn't there, all comments are
new. If it is present, style all comments newer than that time as
being "unread" (actually, add "Unread" class or whatever).

On Tue, Jan 20, 2009 at 2:04 PM, brian  wrote:
> On Mon, Jan 19, 2009 at 4:28 PM, Miles J  wrote:
>>
>> Ive built my own forum from scratch. It works flawlessly, but the one
>> thing I never understood is the read/unread of topics. Because storing
>> that information in the database would be huge.
>
> Define "huge". Unless you're using MSAccess as a backend I doubt you'd
> see any significant issues as long as you used a sane strategy. All
> you'd need to store is the thread ID and user ID, after all. Make sure
> the columns are indexed and you're on your way.
>

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Anyone built a forum system yet?

2009-01-20 Thread brian

On Mon, Jan 19, 2009 at 4:28 PM, Miles J  wrote:
>
> Ive built my own forum from scratch. It works flawlessly, but the one
> thing I never understood is the read/unread of topics. Because storing
> that information in the database would be huge.

Define "huge". Unless you're using MSAccess as a backend I doubt you'd
see any significant issues as long as you used a sane strategy. All
you'd need to store is the thread ID and user ID, after all. Make sure
the columns are indexed and you're on your way.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Anyone built a forum system yet?

2009-01-19 Thread Miles J

Well its not built with Cake if thats what your asking. Im planning to
port hte current (my custom code) over to Cake because it has more
security, cache, etc.

And no ill probably not release the code, its pretty basic.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Anyone built a forum system yet?

2009-01-19 Thread Graham Weldon


Have you released / are you planning to release source for this?

Cheers,
Graham

On Mon, 19 Jan 2009 13:43:05 -0800 (PST), Miles J 
wrote:
> www.sc2armory.com
> 

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Anyone built a forum system yet?

2009-01-19 Thread Miles J

www.sc2armory.com
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Anyone built a forum system yet?

2009-01-19 Thread Kyle Decot

That's pretty cool. Since you said you did it from scratch, I'm
guessing you didn't use cake?

Could you give me a link to your forum so I could check it out? Thanks

On Jan 19, 4:28 pm, Miles J  wrote:
> Ive built my own forum from scratch. It works flawlessly, but the one
> thing I never understood is the read/unread of topics. Because storing
> that information in the database would be huge.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Anyone built a forum system yet?

2009-01-19 Thread Miles J

Ive built my own forum from scratch. It works flawlessly, but the one
thing I never understood is the read/unread of topics. Because storing
that information in the database would be huge.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Anyone built a forum system yet?

2009-01-19 Thread Kyle Decot

I'd like to know if anyone has done this also. I want to build a forum
into my current website but the sheer vastness of it is intimidating.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Anyone built a forum system yet?

2009-01-19 Thread Miles J

Bump over weekend.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Anyone built a forum system yet?

2009-01-16 Thread brian

A "who's online" feature was discussed here just in the past week. I
think the idea was to use the DB for sessions. That would make it
pretty simple to find out who was logged in.

For the thread thing, I suppose you could have a threads_users table
and update it each time a thread is requested.

On Fri, Jan 16, 2009 at 10:07 PM, Miles J  wrote:
>
> If so, how did you do the following:
>
> - Determining if a user has read a thread or leave it unread, also
> marking all threads as read
> - Whos online (thinking of using a model for a memory table)
> - User groups (supermod, admin, etc), did you use ACL or custom system?
> >
>

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Anyone built a forum system yet?

2009-01-16 Thread Miles J

If so, how did you do the following:

- Determining if a user has read a thread or leave it unread, also
marking all threads as read
- Whos online (thinking of using a model for a memory table)
- User groups (supermod, admin, etc), did you use ACL or custom system?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---