How to create 400 boards?

Started by Dogger, May 23, 2009, 05:41:55 AM

Previous topic - Next topic

Dogger

Hi,

How is the easiest way to create 20 boards, each containing 20 child boards? (totally 400 boards).
Maybe there is a script/tool that can manage that?

Or else: which mysql tables and fields does a script need to write to, to create the boards?

PS. The reason for asking is that I plan to set up a slightly different kind of forum, and it would take too long time to create all those boards manually.


 

Sven17


Relemar

Dogger, paitence is a virtue. It will take time, but it's best to do it yourself :)

Dogger

Quote from: Relemar on May 23, 2009, 06:31:52 AM
Dogger, paitence is a virtue. It will take time, but it's best to do it yourself :)
No, it's not...  It is better to write a php script - OR use some existing tool - that does the job in 10 seconds instead of 10 hours of typing.

Tristan Perry

Quote from: Dogger on May 23, 2009, 07:28:04 AM
Quote from: Relemar on May 23, 2009, 06:31:52 AM
Dogger, paitence is a virtue. It will take time, but it's best to do it yourself :)
No, it's not...  It is better to write a php script - OR use some existing tool - that does the job in 10 seconds instead of 10 hours of typing.
There's no existing tool to do this. Hence why Relemar is saying patience is a virtue ;)

Dogger

All this talk about virtue, are you religious or what?

Maybe I should re-phrase the question:
How to insert lots of prepared boards directly into db? 

I really hope some member of the support team (Dragooon, for example) can answer that question, as he did in the same brilliant manner as in one of my previous thread:
http://www.simplemachines.org/community/index.php?topic=214094.msg1364707#msg1364707

sAce

ok, off topic,

400 boards !!! u sure using the right script for right content ?
------------------------

on topic
even if do add this at one, u ll have to rename all, and re do the desc n all, so wats the point ?

Dogger


I believe the solution is as simple as with inserting postings.
Tomorrow I will look into Subs-Boards.php, and createBoard(), that will probably solve it.

JBlaze

Dogger, there is no existing script that can do this for you. Also, even if there was, you would still have to manually customize each board.

Believe it or not, the Admin panel is the easiest way to create boards.
Jason Clemons
Former Team Member 2009 - 2012

Dogger


JBlaze, if the script uses the same board functions as the admin panel uses, and if the boards properties and position are set correctly when the boards are created, then they don't need to be manually customized afterwards.
It was possible to do this with postings, then it should be possible with boards as well.
Well, we'll see tomorrow (if I got the time then).

H

There is no preexsting tool that will do this however with a bit of php you can automate the creation
-H
Former Support Team Lead
                              I recommend:
Namecheap (domains)
Fastmail (e-mail)
Linode (VPS)
                             

Dogger

Quote from: H on May 23, 2009, 10:31:43 AM
There is no preexsting tool that will do this however with a bit of php you can automate the creation
Ah positive thinking, at last!

weekend camper

Quote from: Dogger on May 23, 2009, 07:49:58 AM

I really hope some member of the support team (Dragooon, for example) can answer that question, as he did in the same brilliant manner as in one of my previous thread:
http://www.simplemachines.org/community/index.php?topic=214094.msg1364707#msg1364707

Just for clarity, Dragooon isn't staff, he's is a charter member though.  Unless he is not getting the recognition on his account?


@OP, good post, I might have to reference it in the future.

Fustrate

If you're good with PHP, you can look in /Sources/Subs-Boards.php and use the createBoard() function... pseudo:

<?php
include_once('./SSI.php');
include_once(
'./Sources/Subs-Boards.php');

$options = array(
...
);

createBoard($options);
?>


You'd have to do a giant loop, with the array changing every time. You can look at how the array is filled in ManageBoards.php, and search for the first occurrence of createBoard() and how it's used.

(and weekend camper is correct - Dragooon is a beta tester and a charter member, but not official staff. He does know his stuff very well, though ;) )
Steven Hoffman
Former Team Member, 2009-2012

Dogger

Fustrate:
yes, it's (almost) the same programming as when inserting posts.
I've analyzed how the array $boardOptions is filled by placing a log file output to createBoard(), and tested it for the creation of the very first board, a new board, and a child board.
CreateBoard() returns the ID for the newly created board, so then it's straight forward combining it to a loop that's using my own data (board names and positions) to create the boards.


OldSwede

eaven if you would do it thru phpmyadmin (importing) categories and boards
you still have to write a lot and be very precisely!
so it is no more job to do it the usual way.

Fustrate

Quote from: Dogger on May 26, 2009, 01:53:43 AM
Fustrate:
yes, it's (almost) the same programming as when inserting posts.
I've analyzed how the array $boardOptions is filled by placing a log file output to createBoard(), and tested it for the creation of the very first board, a new board, and a child board.
CreateBoard() returns the ID for the newly created board, so then it's straight forward combining it to a loop that's using my own data (board names and positions) to create the boards.

Sounds like you're all squared away, then :) any clue on why you have so many boards?
Steven Hoffman
Former Team Member, 2009-2012

Dogger

Quote from: OldSwede on May 26, 2009, 02:01:05 AM
eaven if you would do it thru phpmyadmin (importing) categories and boards
you still have to write a lot and be very precisely!
so it is no more job to do it the usual way.
No I don't.
Yes it is.

Dogger

Quote from: Fustrate on May 26, 2009, 02:14:15 AM
Sounds like you're all squared away, then :) any clue on why you have so many boards?
Categories and sub categories in physics, mathematics and other sciencies.

Advertisement: