[ABD] Referrals FX

Any abandoned MODs will be moved to this forum.

WARNING: MODs in this forum are not currently being supported or maintained by the original MOD author. Proceed at your own risk.
Forum rules
IMPORTANT: MOD Development Forum rules

WARNING: MODs in this forum are not currently being supported nor updated by the original MOD author. Proceed at your own risk.
comkidwizzer3
Registered User
Posts: 375
Joined: Fri Jul 13, 2007 8:24 am
Location: $user->data['user_location'];
Contact:

Re: [DEV] Referrals FX

Post by comkidwizzer3 »

coogs wrote:Your option one is not possible, well it technically is, but you would have to recode ucp_register.php and ucp_register.html ;)

I saw this in vBulletin so migh be possible in this too
i think it can be done let's ee what's FladeX says
Just because you saw it in vBulletin doesn't mean it is possible in phpBB3, but if you read what I wrote, I said it is possible, but you would have to recode ucp_register.php, which may also break loads of other pages and bring in security vulnerabilities.
~My MODs~
Login After Register - v1.0.0 | Custom Ranks MOD - RC

~!Hasher!~
User avatar
FladeX
Registered User
Posts: 244
Joined: Tue Jul 08, 2008 10:38 am
Location: Russia, Saransk
Name: Max Istlyaev
Contact:

Re: [DEV] Referrals FX

Post by FladeX »

Version 1.0.1 is available! :geek:

Changelog:
  • Check existing referrer user
  • Display count and list of referrals in user profile
  • Display count of referrals in viewtopic
For install see install.xml
For update from previous version see update_from_100_to_ver_101.xml

Download link see in the first post.

Mod change to [beta] mode.
karot wrote:hey how can i put list of referrals on user's profile ?
Update mod to 1.0.1 version ;)
and sorry for my bad english [ phpBB Adept ]
My mods: Sitemap FX, Referrals FX, Topiclist FX, Alphabet FX, Polls Results FX.
User avatar
1234homie
Registered User
Posts: 439
Joined: Fri Sep 26, 2008 3:17 pm

Re: [BETA] Referrals FX

Post by 1234homie »

I don't know but I think that:

Code: Select all

	// Referrals FX mod start
	if (isset($_COOKIE[$config['cookie_name'] . '_r']))
	{
		if ($_COOKIE[$config['cookie_name'] . '_r'] > 0)
		{
			$referrer_id = (int) $_COOKIE[$config['cookie_name'] . '_r'];

			$sql = 'SELECT user_id
				FROM ' . USERS_TABLE . '
				WHERE user_id = ' . $referrer_id;
			$result = $db->sql_query($sql);
			$row = $db->sql_fetchrow($result);
			$db->sql_freeresult($result);
			if ($row)
			{
				$sql = 'SELECT user_referrals
					FROM ' . USERS_TABLE . '
					WHERE user_id = ' . $referrer_id;
				$result = $db->sql_query($sql);
				$row = $db->sql_fetchrow($result);
				$db->sql_freeresult($result);

				$referrer_referrals = (int) $row['user_referrals'] + 1;

				$sql = 'UPDATE ' . USERS_TABLE . '
					SET user_referrals = ' . $referrer_referrals . '
					WHERE ' . $db->sql_in_set('user_id', $referrer_id);
				$db->sql_query($sql);

				$sql = 'INSERT INTO ' . REFERRALS_TABLE . ' ' . $db->sql_build_array('INSERT', array(
					'referrer_id'		=> (int) $referrer_id,
					'referral_id'		=> (int) $user_id)
				);
				$db->sql_query($sql);
			}
		}
	}
	// Referrals FX mod end
can be like more optimized for large boards (its execute -1query):

Code: Select all

	// Referrals FX mod start
	if (isset($_COOKIE[$config['cookie_name'] . '_r']))
	{
		if ($_COOKIE[$config['cookie_name'] . '_r'] > 0)
		{
			$referrer_id = (int) $_COOKIE[$config['cookie_name'] . '_r'];

			$sql = 'SELECT user_referrals
				FROM ' . USERS_TABLE . '
				WHERE user_id = ' . $referrer_id;
			$result = $db->sql_query($sql);
			if ($row = $db->sql_fetchrow($result))
			{
				$referrer_referrals = (int) $row['user_referrals'] + 1;

				$sql = 'UPDATE ' . USERS_TABLE . '
					SET user_referrals = ' . $referrer_referrals . '
					WHERE ' . $db->sql_in_set('user_id', $referrer_id);
				$db->sql_query($sql);

				$sql = 'INSERT INTO ' . REFERRALS_TABLE . ' ' . $db->sql_build_array('INSERT', array(
					'referrer_id'		=> (int) $referrer_id,
					'referral_id'		=> (int) $user_id)
				);
				$db->sql_query($sql);
			}
			$db->sql_freeresult($result);
		}
	}
	// Referrals FX mod end
Andrewsha
Registered User
Posts: 47
Joined: Tue Jun 09, 2009 8:16 am
Location: Moscow
Contact:

Re: [DEV] Referrals FX

Post by Andrewsha »

FladeX wrote:Yes, in next version. I use Ultimate Points by femu, and try to integrate this with my referrals system.
Hello, FladeX!
How are things with Ultimate Points by femu?
It would be nice to have setting "how many point for registered by referral"
Thanks for your work!
Anyasha
Registered User
Posts: 704
Joined: Mon Aug 07, 2006 4:02 am
Name: Anyasha

Re: [DEV] Referrals FX

Post by Anyasha »

Andrewsha wrote:
FladeX wrote:Yes, in next version. I use Ultimate Points by femu, and try to integrate this with my referrals system.
Hello, FladeX!
How are things with Ultimate Points by femu?
It would be nice to have setting "how many point for registered by referral"
Thanks for your work!
That would be amazing. :o
Kiss me, I'm Polish!
User avatar
FladeX
Registered User
Posts: 244
Joined: Tue Jul 08, 2008 10:38 am
Location: Russia, Saransk
Name: Max Istlyaev
Contact:

Re: [BETA] Referrals FX

Post by FladeX »

Any other suggestions? :)
and sorry for my bad english [ phpBB Adept ]
My mods: Sitemap FX, Referrals FX, Topiclist FX, Alphabet FX, Polls Results FX.
Andrewsha
Registered User
Posts: 47
Joined: Tue Jun 09, 2009 8:16 am
Location: Moscow
Contact:

Re: [BETA] Referrals FX

Post by Andrewsha »

It would be nice to have setting "how many point for registered by referral"
It would be nice to have option something like that:
- points at once after registered by referral
- points after N-posts
- points after N-topics

It may be useful in case when users will create clones to get more points for themselves.
User avatar
eunaumtenhoid
Registered User
Posts: 998
Joined: Wed Jun 03, 2009 12:46 am
Location: ????

Re: [BETA] Referrals FX

Post by eunaumtenhoid »

i have anythings sugestions:
  • Referral Tracking: Cookie now tracks referrals so new referrals can browse before joining without loss of the refer_id.
  • ACP Configurable Referral Center: Referral Center for users. Acp configurable view options.
  • ACP Configurable: Configure most aspects right from the ACP. Enable or disable entire mod with one setting.
  • Member Credit for Referrals: Keeps track of member referrals. Current and Lifetime!
  • ACP Configurable: Configure most aspects right from the ACP. Enable or disable entire mod with one setting. Choose which Admin ID to recieve PM's from members.
  • Rewards System: Rewards System for Cash Mod or Points System. Will add rewards for referrals based on cash mod or a points system. ACP configurable for type of reward.
  • Rewards System Configuration: Enable or disable the rewards system if you choose not to use cash mod. Configure Rewards Amount for referrals. Reset Monthly Top 10 List. Configure Rewards Top 10 list in ACP for Defining duration, Monthly, Promotional etc.
  • Bogus Referrals Management: User Managment allows you to send Multiple users a Email notice before deletion of user accounts which have not activated their account or have a zero post count. When Rewards System is Enabled, while deleting a member/bad referral it will remove the referral reward from the referring members reward type for the referral as well as the referral credit.
  • Email and Board URL Configuration: Control the main body language of the warning email and new section in emails to describe what your board is about. Forum link for invite email now controlled in ACP.
  • Profile View & Header Configuration: Enable or disable the header links and control the language in the view profile from the ACP.
  • Includes Invite Email: Sends email with referral link to register for referral credit including the "ruid".
  • Monthly or Promotional Top 10 List: Top 10 list with the ability to be reset without affecting Forum All Time Top Referrals List.
  • All Time Top 10 Referrals List: Displays the top 10 referring members for the life of the forum.
My translations of the extensions for Brazilian Portuguese
https://github.com/phpBBTraducoes
Scofield112
Registered User
Posts: 87
Joined: Sat Feb 02, 2008 11:39 am

Re: [BETA] Referrals FX

Post by Scofield112 »

Great mod ! I am waiting for the release :)
Top 10 Referrals in index_body.html (Forum statistics) would be amazing.
And if user register by my referr link ( for example my name is - admin), so he should have in profil: "Invited by: Admin" :mrgreen: :mrgreen:
Sorry for my bad English :)
Image
Image
misfit69
Registered User
Posts: 65
Joined: Fri Sep 11, 2009 4:25 am
Contact:

Re: [BETA] Referrals FX

Post by misfit69 »

Also keeping an eye on this mod working with the points systems. Looks very, very promising. ;)
anniejackson
Registered User
Posts: 32
Joined: Sun Sep 13, 2009 8:19 am

Re: [BETA] Referrals FX

Post by anniejackson »

I feel a little bit stupid here but...I installed this mod. I see now at the bottom of phpbb "referer system by..." but I can not figure out how users refer each other. Where is link so that they can refer people?
misfit69
Registered User
Posts: 65
Joined: Fri Sep 11, 2009 4:25 am
Contact:

Re: [BETA] Referrals FX

Post by misfit69 »

Per the other referrals I've seen, there's a place to type in your referral when you register. No clue if that's the case here but that's where I would start. Try creating a new user and see if it shows up there.
User avatar
keith10456
Registered User
Posts: 2315
Joined: Thu Feb 24, 2005 6:55 pm
Contact:

Re: [BETA] Referrals FX

Post by keith10456 »

Suggestion:

Upon a member registering from a referral, the referrer and referee are automatically Friends.
anniejackson
Registered User
Posts: 32
Joined: Sun Sep 13, 2009 8:19 am

Re: [BETA] Referrals FX

Post by anniejackson »

misfit69 wrote:Per the other referrals I've seen, there's a place to type in your referral when you register. No clue if that's the case here but that's where I would start. Try creating a new user and see if it shows up there.
ahh okay thanks :)
User avatar
FladeX
Registered User
Posts: 244
Joined: Tue Jul 08, 2008 10:38 am
Location: Russia, Saransk
Name: Max Istlyaev
Contact:

Re: [BETA] Referrals FX

Post by FladeX »

anniejackson wrote:I feel a little bit stupid here but...I installed this mod. I see now at the bottom of phpbb "referer system by..." but I can not figure out how users refer each other. Where is link so that they can refer people?
See it in UCP - ucp.php?i=main&mode=referrals_fx ;)
and sorry for my bad english [ phpBB Adept ]
My mods: Sitemap FX, Referrals FX, Topiclist FX, Alphabet FX, Polls Results FX.
Locked

Return to “[3.0.x] Abandoned MODs”