Well, you can add manualy every member to your new group.
But if you are choosing somewhere, to who to show block/module/forumcategory or whatever, then there is also possibility to choose members, so you wouldn't need an extra group in that case.
Place this in a file like group_add.php in your root directory,<?php
/**************************************************************
* Backup your database first
* This will include suspended members
* This assumes Anonymous is your first member
* Run the program one time only in your root directory
* Check the cms_bbuser_group table BEFORE and AFTER
* If it looks incorrect, restore that table from the backup
* Delete the file after using it
*
* USE AT YOUR OWN RISK - NO GUARANTEES GIVEN
**************************************************************/
include('includes/cmsinit.inc');
$group_id = 99; // Change this number to your new group number
$members = 99; // Change this number to your number of members
for ($i = 2; $i <= $members; $i++) {
$db->sql_query("INSERT INTO ".$prefix."_bbuser_group (group_id, user_id, user_pending)
VALUES ('$group_id', '$i', 0)");
echo 'Member '.$i.' added to Group '.$group_id.'<br />';
}
echo '<br />Finished - check the above listing and your cms_bbuser_group table';
Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
douglas.wilhelmOffline
Joined: Oct 06, 2006
Posts: 142
<?php
/**************************************************************
* Backup your database first
* This will include suspended members
* This assumes Anonymous is your first member
* Run the program one time only in your root directory
* Check the cms_bbuser_group table BEFORE and AFTER
* If it looks incorrect, restore that table from the backup
* Delete the file after using it
*
* USE AT YOUR OWN RISK - NO GUARANTEES GIVEN
**************************************************************/
include('includes/cmsinit.inc');
$group_id = 10; // Change this number to your new group number
$members = 266; // Change this number to your number of members
for ($i = 2; $i <= $members; $i++) {
$db->sql_query("INSERT INTO ".$prefix."_bbuser_group (group_id, user_id, user_pending)
VALUES ('$group_id', '$i', 0)");
echo 'Member '.$i.' added to Group '.$group_id.'<br />';
}
echo '<br />Finished - check the above listing and your cms_bbuser_group table';
Here is what my file looks like... I only added the group number and the number of members...
I was also interested in adding the one step option that was posted as well but was not sure where to add that in the script...
"INSERT INTO ".$prefix."_bbuser_group (group_id, user_id, user_pending)
SELECT $group_id, user_id, 0 FROM ".$prefix."_users
Thank you very much for any help...
Regards,
-- The only easy day was yesterday! --
Sweetbomb
Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
Linux - 2.6.14.7/MySQL - 4.1.20/PHP 4.3.11/DF - 9.1.2.1
DJ MazeOffline
Joined: Apr 19, 2004
Posts: 6367
Location: http://tinyurl.com/5z8dmv
<?php
/**************************************************************
* Backup your database first
* This will include suspended members
* This assumes Anonymous is your first member
* Run the program one time only in your root directory
* Check the cms_bbuser_group table BEFORE and AFTER
* If it looks incorrect, restore that table from the backup
* Delete the file after using it
*
* USE AT YOUR OWN RISK - NO GUARANTEES GIVEN
**************************************************************/
include('includes/cmsinit.inc');
$group_id = 10; // Change this number to your new group number
$db->sql_query("INSERT INTO {$prefix}_bbuser_group (group_id, user_id, user_pending)
SELECT $group_id, user_id, 0 FROM {$prefix}_users");
echo '<br />Finished - check the above listing and your cms_bbuser_group table';
Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
Fedora 25 / Apache 2.4.27 / MariaDB 10.1.26 / PHP 7.1.10 / Mercurial
SweetbombOffline
Joined: Jan 07, 2007
Posts: 37
Location: Rhode Island