Simple Machines Community Forum

SMF Support => SMF 2.0.x Support => Topic started by: Galaxy Computers on January 12, 2011, 10:51:00 PM

Title: Parent Boards and Child Boards
Post by: Galaxy Computers on January 12, 2011, 10:51:00 PM
I would like to know is it possible to have your parent boards inside the main boards act like child boards?
Title: Re: Parent Boards and Child Boards
Post by: hadesflames on January 12, 2011, 11:43:29 PM
What exactly do you mean?

How do I ask support questions the smart way? (http://docs.simplemachines.org/index.php?topic=494.0)
How can I get my problems solved faster? (http://docs.simplemachines.org/index.php?topic=493.0)
Title: Re: Parent Boards and Child Boards
Post by: Galaxy Computers on January 12, 2011, 11:51:53 PM
Well since I was having problems with post and topic counts on all child boards. I was want to know if you can do this on the parent boards:

main board index:

Texas
sub parent-Amarillo
sub parent-Dallas

and so forth...
Title: Re: Parent Boards and Child Boards
Post by: hadesflames on January 12, 2011, 11:56:22 PM
Wouldn't you just prefer to try to fix the problem with child boards, rather than emulate those problems further? =P

First off, have you tried going to Admin > Maintenance > Forum Maintenance... and then clicked "Run task now" under "Recount all forum totals and statistics"?
Title: Re: Parent Boards and Child Boards
Post by: Galaxy Computers on January 12, 2011, 11:59:57 PM
I have done that but it didn't work... You can test it out at my test site at http://www.mgs-test.com
Title: Re: Parent Boards and Child Boards
Post by: hadesflames on January 13, 2011, 12:06:20 AM
Your test forum seems to be working all right from what I can see, what exactly is wrong with the topic counter in your child boards on your main forum?
Title: Re: Parent Boards and Child Boards
Post by: Galaxy Computers on January 13, 2011, 12:07:36 AM
That is my problem,,, it doesn't show the total post and topic counts from rest of the child boards.  Plus also on the right it doesn' show what has posted in the child boards its just show a blank.
Title: Re: Parent Boards and Child Boards
Post by: hadesflames on January 13, 2011, 12:12:24 AM
Oh...That's not a problem. The board "Texas" shows 0 topics and 0 posts because the board "Texas" has no topics or posts. Texas is its own board, and the counter doesn't count the topics/posts in its child boards. I think what you may want is to use categories if you're not going to have posts in your parent boards. Just go to

Admin > Forum > Boards...

Then click on "Create New Category" where you can make a category like, say "Texas" then make the child board "Amarillo" a parent board of the "Texas" category.
Title: Re: Parent Boards and Child Boards
Post by: Galaxy Computers on January 13, 2011, 12:17:19 AM
do you meant like change the category "Classifieds" to Texas and put Amarillo under it?
Title: Re: Parent Boards and Child Boards
Post by: hadesflames on January 13, 2011, 12:26:55 AM
Oh, I see what you're trying to do. I think it would be better to rename the "Classifieds" category to "Texas Classifieds" then post the boards there. Then if you happen to have classifieds for other states or areas, just make a new category like "Florida Classifieds" and add more boards to that category.

Alternatively, you would need a mod to get the parent board to show all topic and post counts, including its childs'.
Title: Re: Parent Boards and Child Boards
Post by: Galaxy Computers on January 13, 2011, 12:29:45 AM
Is there a mod for it,,, if there is where can I find it?
Title: Re: Parent Boards and Child Boards
Post by: Illori on January 13, 2011, 05:49:38 AM
there is no mod, and i dont think there will be a mod due to the effect it would have on server performance, if that was not an issue to start it would be part of the core already.
Title: Re: Parent Boards and Child Boards
Post by: Galaxy Computers on January 14, 2011, 12:13:02 AM
if anyone like to know this is what I am wanting to do....

main board name of the category will be "Classifieds"
main board "Texas" when they click on "Texas" they will have a multiple cities like:
Amarillo
Dallas
Lubbock and so on.
then when they click on any city they will have more multiple choices like:
Auto's
Real Estates an so on.

The childboards will work but the problem is that the total topics and total post counts will not show up on the main board and who place the latest post.
Title: Re: Parent Boards and Child Boards
Post by: Arantor on January 14, 2011, 12:37:33 AM
Immediate child boards (Texas > Amarillo) can be taken care of, but grandchild boards can't for performance reasons (there's a reason SMF doesn't offer the option)
Title: Re: Parent Boards and Child Boards
Post by: Galaxy Computers on January 14, 2011, 12:38:52 AM
Does anyone have any options?
Title: Re: Parent Boards and Child Boards
Post by: Arantor on January 14, 2011, 12:47:52 AM
Oh, I have options, I just refuse to divulge them since it sounds like you're going to have a lot of boards, and the changes required to make grandchild boards display the way you want will MASSIVELY slow down both the list of boards and the list of child boards when inside a given board.
Title: Re: Parent Boards and Child Boards
Post by: Galaxy Computers on January 14, 2011, 06:46:47 AM
Please be more specific?
Title: Re: Parent Boards and Child Boards
Post by: Arantor on January 14, 2011, 07:00:29 AM
Right now, the query that evaluates the board index, and also the list of child boards within a board (like you can see at the start of http://www.simplemachines.org/community/index.php?board=5.0 to show you the children of that board only) is a single, very big, very complex query in Subs-BoardIndex.php. Same query runs both.

It's explicitly set up in the query to never go more than one level deeper than where you are in the hierarchy. So at the top of the hierarchy (board index) you evaluate all the boards at that level (i.e. the top level boards) and all their immediate children.

Then, when you descend into a top level board (like Chit Chat, mentioned above), the immediate children are displayed, and their immediate children would be processed too.

Better example:
Board 1
|
+--- Board 2
           |
          +--- Board 3
                     |
                    +--- Board 4
                               |
                               +--- Board 5

From the board index, board 1 and board 2 will be evaluated (top level plus immediate child). When you're inside board 1 looking at all the threads, board 2 will be displayed and board 3 will be considered for the stats.

If you add a lot of boards, this gets expensive, so it only ever considers that limited subset for performance. You sound like you're going to have a LOT of boards, and forcing it to go deeper into the hierarchy than it has to will slow everything down.
Title: Re: Parent Boards and Child Boards
Post by: Galaxy Computers on January 14, 2011, 08:54:19 AM
so what is the best way to this route since I am planning on doing an online classifieds forum?
Title: Re: Parent Boards and Child Boards
Post by: Arantor on January 14, 2011, 08:57:52 AM
Not using boards to do it?

Loathe as I am to suggest this, because the person concerned took $250 of my money and caused a lot of bad blood between me and him for it, I would suggest http://www.smfhacks.com/smf-classifieds.php but I can't even go there to get a list of the features because he banned half of the UK in an half-assed attempt to get rid of me. I can't vouch for this mod, though, because I can't use it due to the aforementioned. But hey it might solve the problem.
Title: Re: Parent Boards and Child Boards
Post by: Galaxy Computers on January 14, 2011, 09:02:06 AM
Quote from: Arantor on January 14, 2011, 08:57:52 AM
Not using boards to do it?

Loathe as I am to suggest this, because the person concerned took $250 of my money and caused a lot of bad blood between me and him for it, I would suggest http://www.smfhacks.com/smf-classifieds.php but I can't even go there to get a list of the features because he banned half of the UK in an half-assed attempt to get rid of me. I can't vouch for this mod, though, because I can't use it due to the aforementioned. But hey it might solve the problem.

That is more like for auction classifieds ads that is not want I want.
Title: Re: Parent Boards and Child Boards
Post by: Arantor on January 14, 2011, 09:03:26 AM
Well, I'm not a mind reader, I don't know what you are trying to achieve and 'classified forums' covers so many different things.
Title: Re: Parent Boards and Child Boards
Post by: Road Rash Jr. on January 14, 2011, 09:21:01 AM
Alternately check this out http://www.open-classifieds.com/ (http://www.open-classifieds.com/)
or do a google search for free classified programs