News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

Parent Boards and Child Boards

Started by Galaxy Computers, January 12, 2011, 10:51:00 PM

Previous topic - Next topic

Galaxy Computers

I would like to know is it possible to have your parent boards inside the main boards act like child boards?
Wade Morris
Amarillo, Texas

Morris Technologies Computer Support Forum

hadesflames


Galaxy Computers

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...
Wade Morris
Amarillo, Texas

Morris Technologies Computer Support Forum

hadesflames

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"?

Galaxy Computers

I have done that but it didn't work... You can test it out at my test site at http://www.mgs-test.com
Wade Morris
Amarillo, Texas

Morris Technologies Computer Support Forum

hadesflames

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?

Galaxy Computers

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.
Wade Morris
Amarillo, Texas

Morris Technologies Computer Support Forum

hadesflames

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.

Galaxy Computers

do you meant like change the category "Classifieds" to Texas and put Amarillo under it?
Wade Morris
Amarillo, Texas

Morris Technologies Computer Support Forum

hadesflames

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

Galaxy Computers

Is there a mod for it,,, if there is where can I find it?
Wade Morris
Amarillo, Texas

Morris Technologies Computer Support Forum

Illori

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.

Galaxy Computers

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.
Wade Morris
Amarillo, Texas

Morris Technologies Computer Support Forum

Arantor

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)

Galaxy Computers

Wade Morris
Amarillo, Texas

Morris Technologies Computer Support Forum

Arantor

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.

Galaxy Computers

Wade Morris
Amarillo, Texas

Morris Technologies Computer Support Forum

Arantor

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.

Galaxy Computers

so what is the best way to this route since I am planning on doing an online classifieds forum?
Wade Morris
Amarillo, Texas

Morris Technologies Computer Support Forum

Arantor

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.

Advertisement: