Child Board Post Numbers

Started by Grudge, August 04, 2003, 04:18:28 PM

Previous topic - Next topic

Grudge

I don't know if this has been posted or not but on the English support main board one of the child boards has a thread in it which currently has 6 replies (as I type). However, the parents board for that child board (ie the English support board from the main forum page) only shows 1 topic and 1 post.

Surely the amount of posts shown in the post column for a parent board should be the sum of all the posts made on the child board?

I apologise if this was mentioned previously...
I'm only a half geek really...

[Unknown]

Hmm.. I never thought of that.

Currently, they are boards - I mean, that's how many topics and posts are in that board.  It doesn't count child boards... but, I s'pose it could...

-[Unknown]

Grudge

Ahhh... I see

I didn't realise you could psot in that board as well!! That's excellent!

It may be useful to include the child boards though. I mean if all the child boards are really budy but the parent board is empty new people to the forum may not even try the parent board not realising how many posts actually reside below it.

Example, parent board has 500 posts yet child boards sum to 100,000. User is much more likely to try the board if they know the board is active...

Otherwise - For each listed child board (on the main forum menu) why not indicate the amount of posts in each child board in brackets beside the child boards name - or if not posts topics.

e.g
QuoteChild Boards: Install and Upgrade Help, Administration and Functionality, Convertors and Importers
could become
QuoteChild Boards: Install and Upgrade Help (24), Administration and Functionality(74), Convertors and Importers(26)

I'm only a half geek really...

[Unknown]

The reason I'm hesitant to do this is that there are two ways:

1. Count it at runtime, this would be slower and would only count the posts of one child board down... ie:
 Board
    Child 1
        Chuild 2
Child 2 would not be counted.

2. Count it in the database under the parent, but then what happens when you move topics and reassign parents?

-[Unknown]

Grudge

Ummm... well - if you were going to do the original suggestion you could recussively add posts to all parents of the child when the user posts. Obviously I haven't got the source but I mean like:
while(parent($board)){
$board=parent($board)
SET posts=posts+1 where board=$board;
}

Where parent would be a function giving the parent of the board.

I know this would add a little time to the posting of a post in a child board but I would imagine this would be negligible - at least it wouldn't involve run-time querys.

Obviously when you change the parent of a board you would just do a query doing a mass lower of the current parents counts by the total count of the child board, and a mass increment of the new parents board.

I guess doing the other method (displaying posts in brackets after each child boards title) wouldn't count any second child boards (although how many people would really go this far into subboards?) - but would it actually add extra time at runtime? If I assume that you retrieve the board name from a yabbse_boards style prefix AND the topic/post count for the board is under the same prefix then you could retrieve the child boardname and the post count in the same query - surely the increase in time would be neglible if at all?

I admidt I know nothing about what is in this new version so I am probably completly wrong on all this so am willing to accept anything you say :D
I'm only a half geek really...

Advertisement: