Edit a mod

Discussion forum for MOD Writers regarding MOD Development.
Locked
yuriman
Registered User
Posts: 12
Joined: Tue Jan 09, 2007 8:00 pm

Edit a mod

Post by yuriman »

I didnt know where to post this, so i posted it here.
I want to add some code the this mod "Advanced PayPal Donation MOD" http://www.phpbb.com/community/viewtopi ... 0&t=555227.
So i want to get a custom profile field ive created from it. I know how to get the users id but not the custom profile field.
Can anyone please help me with this.

Code: Select all

			if ($this->data['mc_gross'] >= $minimum_amount)
			{
				if (!function_exists('group_user_add'))
				{
					global $phpbb_root_path, $phpEx;

					include($phpbb_root_path . 'includes/functions_user.' . $phpEx);
				}

				// if they meet or exceed the minimum amount, add the user to the supporters group and set as default.
				group_user_add($config['paypal_supporters_group_id'], array($this->sender_data['user_id']), array($this->sender_data['username']), $config['paypal_supporters_group'], true);
			}
There the user is added to the group i should run a SQL query to another DB and i need the data from a custom profile field.

yuriman
Registered User
Posts: 12
Joined: Tue Jan 09, 2007 8:00 pm

Re: Edit a mod

Post by yuriman »

Can somebody please help me with this.
Field type: Single text field
Field identification: steamid

I need to know a way to get the users SteamID.

Best Regards

Drummer
Registered User
Posts: 199
Joined: Wed Jul 21, 2010 11:49 am

Re: Edit a mod

Post by Drummer »

What does the code you pasted have to do with this custom profile field?

yuriman
Registered User
Posts: 12
Joined: Tue Jan 09, 2007 8:00 pm

Re: Edit a mod

Post by yuriman »

Cause the code part there the mod adds you to a group i should run another code and im not good with modding phpbb

Drummer
Registered User
Posts: 199
Joined: Wed Jul 21, 2010 11:49 am

Re: Edit a mod

Post by Drummer »

Still unclear.
If you wanna know the name of the custom profile fields table, use the constants PROFILE_FIELDS_TABLE, and PROFILE_FIELDS_DATA_TABLE.

yuriman
Registered User
Posts: 12
Joined: Tue Jan 09, 2007 8:00 pm

Re: Edit a mod

Post by yuriman »

Ok this is what i want to do.
Ive created a custom profile field called steamid.
When someone donated over 5 dollars the guy gets added to a group (already in the mod), but i want to get the data thats in a custom profile field. To add another function.

yuriman
Registered User
Posts: 12
Joined: Tue Jan 09, 2007 8:00 pm

Re: Edit a mod

Post by yuriman »

Nobody knows how to get the value in a custom profile field?

Locked

Return to “[3.0.x] MOD Writers Discussion”