Page 20 of 35

Re: [RC] Auto Groups 0.2.2

Posted: Mon Oct 01, 2007 11:40 pm
by notsa
freddyk87 wrote:So this mod does that?
Lol you gotta excuse my nooby ways here very new to phpbb

lol no prob mate i meant no disrespect mate i'm a noob too i'm a convert from IPB Yaaaa phpBB :D :D

Re: [RC] Auto Groups 0.2.2

Posted: Tue Oct 02, 2007 1:23 am
by freddyk87
I'm semi converted IPB is my main site phpbb is a project im working on :D

Re: [RC] Auto Groups 0.2.3

Posted: Tue Oct 02, 2007 2:03 am
by A_Jelly_Doughnut
MOD updated to 0.2.3. See first post for download link; updates from 0.1.1 and higher versions are in the /contrib/ directory.

Re: [RC] Auto Groups 0.2.3

Posted: Tue Oct 02, 2007 2:25 am
by RedTrinity
A_Jelly_Doughnut wrote:MOD updated to 0.2.3. See first post for download link; updates from 0.1.1 and higher versions are in the /contrib/ directory.
Cannot find this line in functions_user.php:

Code: Select all

// now we have all the information to insert auto users into the table if required
Checked a fresh copy and couldn't find it either :(

Re: [RC] Auto Groups 0.2.3

Posted: Tue Oct 02, 2007 2:27 am
by spacefish
A_Jelly_Doughnut wrote:MOD updated to 0.2.3. See first post for download link; updates from 0.1.1 and higher versions are in the /contrib/ directory.
You rock - thanks! :mrgreen: :lol:

Re: [RC] Auto Groups 0.2.3

Posted: Tue Oct 02, 2007 2:38 am
by A_Jelly_Doughnut
It should be there if you are looking at a 0.2.2 file only.

Some more code below that line:

Code: Select all

		if (isset($auto_add_users) && sizeof($auto_add_users))
		{
			group_user_add($group_id, $auto_add_users, false, false, $make_default, 0, 0, false, 1);

			unset($auto_add_users);
		}

Re: [RC] Auto Groups 0.2.3

Posted: Tue Oct 02, 2007 2:41 am
by RedTrinity
A_Jelly_Doughnut wrote:It should be there if you are looking at a 0.2.2 file only.

Some more code below that line:

Code: Select all

		if (isset($auto_add_users) && sizeof($auto_add_users))
		{
			group_user_add($group_id, $auto_add_users, false, false, $make_default, 0, 0, false, 1);

			unset($auto_add_users);
		}
Thanks Jelly - I checked the normal install file and found where the code was to be added, for some reason that block of code wasn't there :S But it is now!

Might double check edits again this arvo to make sure everything is in order.

Thanks again for the update, its a great MOD :)

Re: [RC] Auto Groups 0.2.3

Posted: Tue Oct 02, 2007 7:58 am
by spacefish
Urgh! On a fresh install of 0.2.3, I get:
"Fatal error: Call to undefined function: auto_groups_create() in /Library/WebServer/Documents/forum4/includes/functions_user.php on line 2341"

Here's the area of code - line 2341 being the second line here:

Code: Select all

$make_default = false;
		$auto_add_users = auto_groups_create($group_id, $make_default);

		// now we have all the information to insert auto users into the table if required
		if (isset($auto_add_users) && sizeof($auto_add_users))
		{
			group_user_add($group_id, $auto_add_users, false, false, $make_default, 0, 0, false, 1);

			unset($auto_add_users);
		}
		// end auto groups mod
I've checked and re-checked the edits ... and installed on 2 different test boards. I get the same error with each install. :?


BTW, I noticed that in the upgrade instructions from 0.2.2 - 0.2.3, the first 2 lines of that code was added after the "// now we have all the information to insert auto users into the table if required". It probably doesn't make too much difference here, but for future updates it'll make it easier for people to look for/find the same block of code. :)

Re: [RC] Auto Groups 0.2.3

Posted: Tue Oct 02, 2007 10:39 am
by ChriZathens
Ok, I did the update from 0.2.2 to 0.2.3...
EDIT: Removed previous error : my mistake... :oops:
I get the same error as mentioned

Code: Select all

Fatal error: Call to undefined function: auto_groups_create() in C:\WM\www\phpBB3\includes\functions_user.php on line 2397
Settings seem to be saved, though...

Re: [RC] Auto Groups 0.2.3

Posted: Tue Oct 02, 2007 12:02 pm
by A_Jelly_Doughnut
My apologies...I packed the wrong version into my ZIP file. I did catch this error, just didn't end up with the right one online.

If you're getting this error, open /includes/functions_user.php, find

Code: Select all

		$make_default = false;
and add before

Code: Select all

		if (!function_exists('auto_group'))
		{
			global $phpEx;
			include($phpbb_root_path . 'includes/functions_autogroup.'.$phpEx);
		}
I have now updated the .zip file on my website to include the correct XML.

Re: [RC] Auto Groups 0.2.3

Posted: Tue Oct 02, 2007 1:44 pm
by ChriZathens
Great !!! It works fine, now!!!
Just remember to update the instructions in contrib folder, too...

Re: [RC] Auto Groups 0.2.3

Posted: Tue Oct 02, 2007 2:51 pm
by ChriZathens
For the past 30 minutes I've been testing it...
I have the following problem( I've mentioned before about this when using ver 0.2.2)
I have a group with min post count of 10..
If a user is not a member there, they can't start new topics in a specific forum..
I login from IE7 with a user who has 9 posts... (I'm logged as admin from Firefox)
The user can't see New Topic button.. As soon as he posts a reply and raises to 10 posts, then he can see the New Topic button and create a new topic...
With the user logged in with IE7 I change the value (beeing an admin in Firefox) from min 10 posts to min 20.
A refresh in IE7 I expected should result to disappearing the button again, since I changed min post count from 10 to 20... But It does not act like this.
I verified that user is no longer member of the group, so at this part it works OK..

While testing, once I realised that if the user logs out and then back in, the button is correctly invisible.
Some other times, even after a logout, the button still remains visible :shock:
I'm confused here....

Re: [RC] Auto Groups 0.2.3

Posted: Wed Oct 03, 2007 3:39 am
by A_Jelly_Doughnut
I'm confused too...I know I wrote code to fix that...but it didn't make it into this package.

I have about a dozen copies of this MOD laying around...must have gotten my files confused.

Re: [RC] Auto Groups 0.2.3

Posted: Thu Oct 04, 2007 2:40 am
by RedTrinity
Hi Jelly,

I was wondering if you would mind taking a look at my functions_user.php file? I am getting the following error when trying to alter groups atm:
[phpBB Debug] PHP Notice: in file /includes/functions_autogroup.php on line 214: Missing argument 2 for auto_groups_create(), called in /includes/functions_user.php on line 2348 and defined

Warning: Cannot modify header information - headers already sent by (output started at /home/****/public_html/phpbb3/includes/functions.php:3739) in /home/****/public_html/phpbb3/adm/index.php on line 163
I have just gone to check the latest edits and am getting lost - I really don't know what should be there and what shouldn't and I have made a bit of a mess of things I think :( I swore I had upgraded regularly to the latest version but then found code missing and there which should be etc.... argh!

The file is here: http://www.theparentingsanctuary.net/functions_user.txt

Thanks in advance for any help! :)

Re: [RC] Auto Groups 0.2.3

Posted: Thu Oct 04, 2007 3:24 am
by A_Jelly_Doughnut
Looks like you missed one of the changes in the update. This

Code: Select all

      if (!function_exists('auto_groups_create'))
      {
         global $phpEx;
         include($phpbb_root_path . 'includes/functions_autogroup.'.$phpEx);
      }
		$auto_add_users = auto_groups_create($group_attributes);
should be

Code: Select all

		// auto groups MOD
		// since we're changing a group, find users who belong in the new group
		if (!function_exists('auto_groups_create'))
		{
			global $phpEx;
			include($phpbb_root_path . 'includes/functions_autogroup.'.$phpEx);
		}

		$make_default = false;
		$auto_add_users = auto_groups_create($group_id, $make_default);

		// now we have all the information to insert auto users into the table if required
		if (isset($auto_add_users) && sizeof($auto_add_users))
		{
			group_user_add($group_id, $auto_add_users, false, false, $make_default, 0, 0, false, 1);

			unset($auto_add_users);
		}
		// end auto groups mod