I had the same question 1 month ago here on BP and nobody responded , hope that somebody will respond you because I have a csv file with 20K nightclubs and I would like to create 20K groups where every club will have their forum , review , blog , gallery , wiki =docs . I would like to add there some groups profile custom fields where I should add custom fields to describe every club , but there’s no fully working plugin yet , Groups Extras from @slaffik seems to be left, Groups Frontpage has only a few fields.
I guessing there were no responses as the question/request is far from a straightforward one and there isn’t a means to do this within BP.
In theory you can achieve whatever you like as long as your prepared to manipulate the DB at the sql level and undoubtedly it would be possible to create a sql script to handle this, but writing and testing it is likely an involved process.
As to whether BP can handle this many records? don’t see why not ( although these are huge amounts of groups to be having to sort through on the site, and I wonder how effectively one would be able to search through them) unless some query within BP would cause issues, MySQL should handle records/rows with ease, excessive tables are another story.
This is the sort of job for someone quite experienced I would think, however there are some import plugins that might get you halfway there, thinking of boonebgorges Ning importer where there are probably ‘bits’ that could be used and modified
Thanks for the feedback and I’m hoping for a little bit more.
4ella if I do come up with a solution I will send it to you.
Generally, for this purpose, there will be no need for direct SQL manipulation. The general idea:
`$data = fgetcsv( $csv );
foreach( $data as $d ) {
$args = array() // do some stuff with the $d array to set up args
$group_id = groups_create_group( $args );
groups_update_groupmeta( $group_id, ‘whatever’, $d[4] ); // again, whatever you want
}`
Thanks Boone. Can it possibly be that simple though?
Well, it’s not *that* simple. You still have to assemble the $args array, which will take a few more lines of code. And setting a bunch of groupmeta, depending on the complexity of your CSV, may take a while as well. But yes, in essence, this is the idea.
knew Boone would have the answer, I was only wrong on the assumed complexity of the task, now it just needs to be turned into a plugin with dashboard interface :0
Boone do you see any problems with the high volume of groups on the site?
Would you do this a different way other than a group for every stock?
Any ideas on the group avatar problem?
The whole purpose of this is to have a mini Yahoo finance or Google finance with a page for each stock and a forum for people to discuss the stock. I can see 1 forum with 7000 threads, but I can’t see 1 group with 7000 wiki pages or docs.
I don’t see a problem with that number of groups.
You can see how BP handles group avatars in groups_screen_group_admin_avatar() (bp-groups.php) and the avatar functions it uses. This process is a bit tricky, and is probably going to be the biggest challenge of the whole thing. My advice is to look at the way the BP names group avatar files, and write a bash script that renames your images according to this pattern. BP’s crop functions are slow and not really meant for this kind of mass creation process.
Some GROUPS import plugin would be great because the force of the buddypress and similar social network is mainly in Groups , groups represents local business as companies , sport clubs , company divisions , theaters , museums , schools (Groups =classes) . Members represents employees & athletes & students .
Many local activities , many associations has a list of those clubs & companies & schools in their CSV files , they would use it very nicely with buddypress , then they can use BP powerful forums for their employees , maps , reviews , docs , galleries .
I have a csv lists of bars , nightclubs from all over the world (200K) , with custom fields like :
name
country
province
city
address
phone
email
basic club description
and one Group profile picture =logo
which serves for everybody – girls searching for jobs (I am using Docs for explanation info ) , clients searching for reviews , photo galleries , club owners searching for both – girls working there , clients coming there , many BP webmasters are using Groups for similar purposes , many people who doesn’t know buddypress yet and has those huge csv lists would be potentially a new BP users , especially because of that great feature (bulk Groups import plugin).
Nobody will want to create one group for 5 minutes , they would like to import basic xxx groups to set up basic database and to give an example to the new group admins creators =(club owners as admins) in my case , maybe they would also like to sync it with their excel database in future.
I understand that BP developers have a lot of work to do , so I don’t ask that kind of code or plugin urgently , but if it is not too difficult (only you know it if it is , because for me 3 lines of simple code seems to be very difficult ) , would be nice to have it for all of us = BP users , if it is a quite difficult take it pls only as e new plugin suggestion .
I you need that sort of functionality you always have the option of hiring a BP developer to create it for you, waiting for someone to code up a free plugin might be a long wait.
It is very complicated to build a general purpose tool for something like group imports. The data that people have in CSV format varies extremely widely from case to case. The amount of extra coding that would be needed to build an all-purpose import tool (in contrast with a single-use, custom-built tool) is enormous. For the purposes that 4ella describes, a custom script would need to have maybe 50-100 lines of code. A plugin that can handle all possible cases would need many thousands, plus a complex UI.
That’s not to say that it shouldn’t be done, just that it’s not easy. Generally, it will be worth your while to pay a competent developer a few hundred dollars to do this one-time import for you.
I see , thank you very much for both of your answers , I have nothing against the payment to developers , they deserve their money , I paid and pay and will always pay them very gladly all the time.
This code & plugin would be very useful for me to start better and launch my website quicker and maybe start to earn something, but I don’t think I can allow to pay several hundred $ for something I would use only once and which needs to be upgraded to be useful in future again.
As the most of the people who uses GPL scripts for free I too prefer to find some most easy and less expensive way for extra features , I am also trying to find some solutions which are buying plugins for less money selling to mass of the people which costs let’s say $20 – $50 , are constantly upgraded , supported , and the price is divided in mass of people , that’s why we have all forums , blogs to ask , to suggest the new plugin , that’s why I have asked how difficult it would be for developers and how important it should be for others to create that code – script – plugin , now I know how much would it cost and if somebody else who find it important and useful as me would like to divide that costs with me to be in the limit of 100$ per person I don’t have nothing against of buying it .
Sadly plugin development has no real earnings model that works, if only half the people that downloaded the more popular plugins – downloaded in the thousands quite often – contributed $1.00 it would at least perhaps spur the authors on but it doesn’t appear to happen.
You might club together with the OP and perhaps approach a developer?