[MODDB] Auto Groups 0.2.3

A place for MOD Authors to post and receive feedback on MODs still in development. No MODs within this forum should be used within a live environment!
Anti-Spam Guide
Locked
notsa
Registered User
Posts: 253
Joined: Sat Jul 28, 2007 7:37 pm

Re: [RC] Auto Groups 0.2.2

Post by notsa » Mon Oct 01, 2007 11:40 pm

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

freddyk87
Registered User
Posts: 11
Joined: Mon Sep 24, 2007 7:53 am

Re: [RC] Auto Groups 0.2.2

Post by freddyk87 » Tue Oct 02, 2007 1:23 am

I'm semi converted IPB is my main site phpbb is a project im working on :D

User avatar
A_Jelly_Doughnut
Former Team Member
Posts: 34457
Joined: Sat Jan 18, 2003 1:26 am
Location: Where the Rivers Run
Contact:

Re: [RC] Auto Groups 0.2.3

Post by A_Jelly_Doughnut » Tue Oct 02, 2007 2:03 am

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.
A Donut's Blog
"Bach's Prelude (Cello Suite No. 1) is driving Indiana country roads in Autumn" - Ann Kish

RedTrinity
Registered User
Posts: 1327
Joined: Sat May 06, 2006 3:32 am

Re: [RC] Auto Groups 0.2.3

Post by RedTrinity » Tue Oct 02, 2007 2:25 am

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 :(

User avatar
spacefish
Registered User
Posts: 173
Joined: Mon Oct 09, 2006 8:48 am

Re: [RC] Auto Groups 0.2.3

Post by spacefish » Tue Oct 02, 2007 2:27 am

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:

User avatar
A_Jelly_Doughnut
Former Team Member
Posts: 34457
Joined: Sat Jan 18, 2003 1:26 am
Location: Where the Rivers Run
Contact:

Re: [RC] Auto Groups 0.2.3

Post by A_Jelly_Doughnut » Tue Oct 02, 2007 2:38 am

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);
		}
A Donut's Blog
"Bach's Prelude (Cello Suite No. 1) is driving Indiana country roads in Autumn" - Ann Kish

RedTrinity
Registered User
Posts: 1327
Joined: Sat May 06, 2006 3:32 am

Re: [RC] Auto Groups 0.2.3

Post by RedTrinity » Tue Oct 02, 2007 2:41 am

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 :)

User avatar
spacefish
Registered User
Posts: 173
Joined: Mon Oct 09, 2006 8:48 am

Re: [RC] Auto Groups 0.2.3

Post by spacefish » Tue Oct 02, 2007 7:58 am

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. :)

User avatar
ChriZathens
Registered User
Posts: 1477
Joined: Tue Apr 18, 2006 9:11 pm
Location: Athens, Greece
Name: Chris

Re: [RC] Auto Groups 0.2.3

Post by ChriZathens » Tue Oct 02, 2007 10:39 am

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...
My mods in MODDB:
Add Homepage link in header - Change user activity post limit - Post number in viewtopic
If you need support click on the support tab there and post your question.
Do not PM me - chances of viewing my PMs are way thinner than viewing the support question in the customization DB...

User avatar
A_Jelly_Doughnut
Former Team Member
Posts: 34457
Joined: Sat Jan 18, 2003 1:26 am
Location: Where the Rivers Run
Contact:

Re: [RC] Auto Groups 0.2.3

Post by A_Jelly_Doughnut » Tue Oct 02, 2007 12:02 pm

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.
A Donut's Blog
"Bach's Prelude (Cello Suite No. 1) is driving Indiana country roads in Autumn" - Ann Kish

User avatar
ChriZathens
Registered User
Posts: 1477
Joined: Tue Apr 18, 2006 9:11 pm
Location: Athens, Greece
Name: Chris

Re: [RC] Auto Groups 0.2.3

Post by ChriZathens » Tue Oct 02, 2007 1:44 pm

Great !!! It works fine, now!!!
Just remember to update the instructions in contrib folder, too...
My mods in MODDB:
Add Homepage link in header - Change user activity post limit - Post number in viewtopic
If you need support click on the support tab there and post your question.
Do not PM me - chances of viewing my PMs are way thinner than viewing the support question in the customization DB...

User avatar
ChriZathens
Registered User
Posts: 1477
Joined: Tue Apr 18, 2006 9:11 pm
Location: Athens, Greece
Name: Chris

Re: [RC] Auto Groups 0.2.3

Post by ChriZathens » Tue Oct 02, 2007 2:51 pm

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....
My mods in MODDB:
Add Homepage link in header - Change user activity post limit - Post number in viewtopic
If you need support click on the support tab there and post your question.
Do not PM me - chances of viewing my PMs are way thinner than viewing the support question in the customization DB...

User avatar
A_Jelly_Doughnut
Former Team Member
Posts: 34457
Joined: Sat Jan 18, 2003 1:26 am
Location: Where the Rivers Run
Contact:

Re: [RC] Auto Groups 0.2.3

Post by A_Jelly_Doughnut » Wed Oct 03, 2007 3:39 am

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.
A Donut's Blog
"Bach's Prelude (Cello Suite No. 1) is driving Indiana country roads in Autumn" - Ann Kish

RedTrinity
Registered User
Posts: 1327
Joined: Sat May 06, 2006 3:32 am

Re: [RC] Auto Groups 0.2.3

Post by RedTrinity » Thu Oct 04, 2007 2:40 am

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! :)

User avatar
A_Jelly_Doughnut
Former Team Member
Posts: 34457
Joined: Sat Jan 18, 2003 1:26 am
Location: Where the Rivers Run
Contact:

Re: [RC] Auto Groups 0.2.3

Post by A_Jelly_Doughnut » Thu Oct 04, 2007 3:24 am

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
A Donut's Blog
"Bach's Prelude (Cello Suite No. 1) is driving Indiana country roads in Autumn" - Ann Kish

Locked

Return to “[3.0.x] MODs in Development”