Simple Machines Community Forum

Customizing SMF => Modifications and Packages => Topic started by: SMFHacks.com Team on March 03, 2008, 01:02:01 PM

Title: Referral System
Post by: SMFHacks.com Team on March 03, 2008, 01:02:01 PM
Link to Mod (https://custom.simplemachines.org/mods/index.php?mod=1114)

Referral System

Supports SMF 2.0.x and SMF 1.1.x

This mod allows you track how many people a member has referred to the forum.
Tracks by either a cookie or the username entered on registration.

3.2
+Clicking on the referral number in posts or profile now shows a list of users. That user referred.

3.1
+Added easy copyright removal ordering system

3.0.1
!Fixed spelling of referrals
!Fixed link tracking for referrals

New Version 3.0
+Rewrote the modification from the ground up.
+Settings to control where referrals are shown
Title: Re: Referrals Mod
Post by: edi67 on March 03, 2008, 03:33:25 PM
let me try
Title: Re: Referrals Mod
Post by: Hoochie Coochie Man on March 03, 2008, 06:20:34 PM
Good job! Thanks for this great mod.
Title: Re: Referrals Mod
Post by: Nibogo on March 03, 2008, 07:26:21 PM
how i can update the v1.4 to the 2.0 version?
Title: Re: Referrals Mod
Post by: shadow82x on March 03, 2008, 07:42:19 PM
I believe this mod is only supported on SMF2.0 beta or above. Which is only downloadable for charter.members. Use Karlbenson's mod for the SMF1.1 branch.
Title: Re: Referrals Mod
Post by: karlbenson on March 03, 2008, 07:55:29 PM
No that is incorrect.
This mod is for 1.1.x ONLY.
Its just that this version of the mod is 2.0

It will not work for SMF 2.0 betas.  I believe YodaOfDarkness will be working on a version for smf 2.0 in the future.
Title: Re: Referrals Mod
Post by: paypalcommunity on March 04, 2008, 06:10:24 AM
thats... it works good to me
Title: Re: Referrals Mod
Post by: JoshieDaMan on March 05, 2008, 09:09:59 AM
It has 2 files in it.

Installing this package will perform the following actions:
   Type    Action    Description
1.    Execute Modification    ./index.php    Test successful
2.    Execute Modification    ./Sources/Load.php    Test successful
3.    Execute Modification    ./Sources/Register.php    Test successful
4.    Execute Modification    ./Sources/Stats.php    Test successful
5.    Execute Modification    ./Sources/Profile.php    Test successful
6.    Execute Modification    ./Themes/default/Register.template.php    Test successful
7.    Execute Modification    ./Themes/default/Display.template.php    Test successful
8.    Execute Modification    ./Themes/default/Xml.template.php    Test successful
9.    Execute Modification    ./Themes/default/Stats.template.php    Test successful
10.    Execute Modification    ./Themes/default/Stats.template.php    Test failed
11.    Execute Modification    ./Themes/default/Profile.template.php    Test successful
12.    Execute Modification    ./Themes/default/languages/Modifications.english.php    Test successful
13.    Execute Modification    ./Themes/default/languages/Modifications.english-utf8.php    Skipping file
14.    Execute Modification    ./Themes/default/languages/Modifications.english_british.php    Skipping file
15.    Execute Modification    ./Themes/default/languages/Modifications.english_british-utf8.php    Skipping file

Then profile and stats went all empty saying it wouldn't load. So I had to restore the backup twice when I was trying this.
Title: Re: Referrals Mod
Post by: Eliana Tamerin on March 05, 2008, 02:29:42 PM
Problem: The 'Find Referrer' link on the registration page opens in the same window. It needs to open in a popup window like other [?] links so that it doesn't disrupt the registration process.

This occurs in Firefox and Firefox-based browsers, but not IE or Opera (they open in popup windows). Popup blocker is off and did not register any popups being submitted from my site when it was turned on. Firefox v 2.0.0.12.
Title: Re: Referrals Mod
Post by: karlbenson on March 06, 2008, 12:39:43 AM
Eliana Tamerin it should use a popup.  In fact the code it uses is from smf. :(
Title: Re: Referrals Mod
Post by: Eliana Tamerin on March 06, 2008, 01:04:09 AM
I don't know. I'm a bit tired, but here's the code from the register.template.php:

echo ' <tr>
<td width="40%"><b>', $txt['referrals_who'] ,'</b>
<div class="smalltext">', $txt['referrals_who_description'], '</div></td>
<td><input name="referredby" type="text" size="30" value="', ( !empty($context['referrals']['referred_by_name']) ? $context['referrals']['referred_by_name'] : '' ) ,'" />
<a href="', $scripturl, '?action=findmember;input=referredby;sesc=', $context['session_id'], '" onclick="document.getElementById(\'referredby\').value=\'\';document.getElementById(\'referredon\').innerHTML =\'&nbsp;\';return reqWin(this.href, 350, 400);"><img src="', $settings['images_url'], '/icons/assist.gif" border="0" alt="', $txt['referrals_findreferrer'] ,'" /> ', $txt['referrals_findreferrer'] ,'</a><br /><span id="referredon" class="smalltext">', ( !empty($context['referrals']['referred_date']) ? $txt['referrals_on'].' '.$context['referrals']['referred_date'] : '' ) ,'</span></td>
</tr>';


I tried taking the space out of the link (here: $context['session_id'], '" onclick=), but it didn't make a different. Here's what I currently have:

echo ' <tr>
<td width="40%"><b>', $txt['referrals_who'] ,'</b>
<div class="smalltext">', $txt['referrals_who_description'], '</div></td>
<td><input name="referredby" type="text" size="30" value="', ( !empty($context['referrals']['referred_by_name']) ? $context['referrals']['referred_by_name'] : '' ) ,'" />
<a href="', $scripturl, '?action=findmember;input=referredby;sesc=', $context['session_id'], '"onclick="document.getElementById(\'referredby\').value=\'\';document.getElementById(\'referredon\').innerHTML =\'&nbsp;\';return reqWin(this.href, 350, 400);"><img src="', $settings['images_url'], '/icons/assist.gif" border="0" alt="', $txt['referrals_findreferrer'] ,'" /> ', $txt['referrals_findreferrer'] ,'</a><br /><span id="referredon" class="smalltext">', ( !empty($context['referrals']['referred_date']) ? $txt['referrals_on'].' '.$context['referrals']['referred_date'] : '' ) ,'</span></td>
</tr>';


You can try it for yourself. I tried in both Firefox and Flock: http://intonarnia.com/index.php?action=register

And if it works for you, I'll be satisfied and ignore it, must just be mine for some odd reason.
Title: Re: Referrals Mod
Post by: karlbenson on March 06, 2008, 01:21:11 AM
Your right it doesn't appear to be working properly in Firefox.

Eliana, do you have the same problem with the Find Members inside SMF. (eg admin > banned) or admin > Boards > modify boards (for the moderator)
Title: Re: Referrals Mod
Post by: Eliana Tamerin on March 06, 2008, 01:23:43 AM
No on both counts. They both appear as popups without redirecting the current page.
Title: Re: Referrals Mod
Post by: Fustrate on March 06, 2008, 02:06:08 AM
I too looked at this problem... and besides the height/width attributes in the referrals mod popup, there aren't any differences that I can find.
Title: Re: Referrals Mod
Post by: ~Kikoish~ on March 07, 2008, 01:33:05 AM
It's not working with my forum. There's an error. I tried the Modification Parser but still there's an error:

QuoteparseArchive(): No package-info.xml in this mod! Is it corrupted?

How to fix this?

Title: Re: Referrals Mod
Post by: Spamiam on March 07, 2008, 09:38:56 AM
I received the same thing. This mod is tossing in a LOT of errors into the errors log. Apparently one for every person who looks at every post.

I tried the uninstall but got a failed on ./Themes/default/Display.template.php. I can't find out where to alter that file manually.

The error log says:
8: Undefined index: referralsno
File: /home/amstew/public_html/Themes/default/Display.template.php (main sub template - eval?)
Line: 340

HUNDREDS of pages of that, and fills back up as fast as I can delete them. :(
Title: Re: Referrals Mod
Post by: ~Kikoish~ on March 09, 2008, 10:26:12 PM
How to edit the referrals?
Title: Re: Referrals Mod
Post by: JoshieDaMan on March 09, 2008, 11:01:52 PM
9.    Execute Modification    ./Themes/default/Stats.template.php    Test successful
10.    Execute Modification    ./Themes/default/Stats.template.php    Test failed

Probably skipped my first post in this topic but how I can get this 2nd stats.template.php to be passed, or at least is this a duplicate file?
Title: Re: Referrals Mod
Post by: Eliana Tamerin on March 09, 2008, 11:16:18 PM
There are two counts of Stats.template.php modifications. Here's mine.

9.     Execute Modification     ./Themes/default/Stats.template.php     Test successful
10.    Execute Modification    ./Themes/default/Stats.template.php    Test successful

Try editing the file manually then installing it.




Any ideas on the Firefox popup window problem? Perhaps there's some missing javascript in the head of the register.template.php file.
Title: Re: Referrals Mod
Post by: Fustrate on March 09, 2008, 11:39:12 PM
Quote from: Spamiam on March 07, 2008, 09:38:56 AM
I received the same thing. This mod is tossing in a LOT of errors into the errors log. Apparently one for every person who looks at every post.

I tried the uninstall but got a failed on ./Themes/default/Display.template.php. I can't find out where to alter that file manually.

The error log says:
8: Undefined index: referralsno
File: /home/amstew/public_html/Themes/default/Display.template.php (main sub template - eval?)
Line: 340

HUNDREDS of pages of that, and fills back up as fast as I can delete them. :(


Go into $themedir/Display.template.php and search for referralsno
replace it with referrals_no

The error isn't in the package, so I'm assuming you ahd an earlier version installed, which didn't change for some reason.

As for the basic install errors: the mod parser isn't working right now, so here's what to do:
Open Stats.template.php
Search for something LIKE:
foreach ($context['top_boards'] as $board)
echo '
<tr>
<td width="60%" valign="top">', $board['link'], '</td>
<td width="20%" align="left" valign="top">', $board['num_posts'] > 0 ? '<img src="' . $settings['images_url'] . '/bar.gif" width="' . $board['post_percent'] . '" height="15" alt="" />' : '&nbsp;', '</td>
<td width="20%" align="right" valign="top">', $board['num_posts'], '</td>
</tr>

AFTER that, add:
// Start of Referrals Mod Stats
echo '
</table>
</td>
</tr><tr>
<td class="catbg" colspan="2" width="50%"><b>'.$txt['referrals_top5referrers'].'</b></td>
<td class="catbg" colspan="2" width="50%"><b>'.$txt['referrals_top5referrersbyposts'].'</b></td>
</tr><tr>
<td class="windowbg" width="20" valign="middle" align="center"><img src="', $settings['images_url'], '/stats_info.gif" width="20" height="20" alt="" /></td>
<td class="windowbg2" width="50%" valign="top">
<table border="0" cellpadding="1" cellspacing="0" width="100%">';
if (empty($context['totalreferrals']))
echo '<tr>
<td valign="top" style="text-align:center">'. $txt['referrals_noneyet'] . '</td>
</tr>';
else
{
foreach ($context['top_referrers'] as $referrer)
echo '
<tr>
<td width="60%" valign="top">', $referrer['link'], '</td>
<td width="20%" align="left" valign="top">', $referrer['referrals_no'] > 0 ? '<img src="' . $settings['images_url'] . '/bar.gif" width="' . $referrer['referrals_percent'] . '" height="15" alt="" />' : '&nbsp;', '</td>
<td width="20%" align="right" valign="top">', $referrer['referrals_no'], '</td>
</tr>';
}

echo '
</table>
</td>
<td class="windowbg" width="20" valign="middle" align="center"><img src="', $settings['images_url'], '/stats_info.gif" width="20" height="20" alt="" /></td>
<td class="windowbg2" width="50%" valign="top">
<table border="0" cellpadding="1" cellspacing="0" width="100%">';
unset($referrer);
if (empty($context['totalreferralsposts']))
echo '<tr>
<td valign="top" style="text-align:center">'. $txt['referrals_noneyet'] . '</td>
</tr>';
else
{
foreach ($context['top_referrers_by_posts'] as $referrer)
echo '
<tr>
<td width="60%" valign="top">', $referrer['link'], '</td>
<td width="20%" align="left" valign="top">', $referrer['posts'] > 0 ? '<img src="' . $settings['images_url'] . '/bar.gif" width="' . $referrer['referralsposts_percent'] . '" height="15" alt="" />' : '&nbsp;', '</td>
<td width="20%" align="right" valign="top">', $referrer['posts'], '</td>
</tr>';
}
// End of Referrals Mod Stats

Title: Re: Referrals Mod
Post by: biftek on March 10, 2008, 12:55:28 AM
i asked in the other ref mod thread but didn't get answer so i'll ask it here
can anyone help me out in making it so that only the user can see their ref link on the summary
Title: Re: Referrals Mod
Post by: perplexed on March 10, 2008, 07:58:26 AM
Quote from: karlbenson on March 06, 2008, 01:21:11 AM
Your right it doesn't appear to be working properly in Firefox.

Eliana, do you have the same problem with the Find Members inside SMF. (eg admin > banned) or admin > Boards > modify boards (for the moderator)

Quote from: Eliana Tamerin on March 06, 2008, 01:23:43 AM
No on both counts. They both appear as popups without redirecting the current page.


Has there been a solution for this yet as I have it too?




Also, when I click on the 'find member' link to look for members this is what it says:

QuoteWarning!
Only registered members are allowed to access this section.
Please login below or register an account with My Test Site. 
Login
Username: 
Password: 
Minutes to stay logged in: 
Always stay logged in: 

Forgot your password?


which is kinda pointless considering they are trying to register at the time and don't have an account yet!
Title: Re: Referrals Mod
Post by: JoshieDaMan on March 10, 2008, 10:59:41 PM
Quote from: Eliana Tamerin on March 09, 2008, 11:16:18 PM
There are two counts of Stats.template.php modifications. Here's mine.

9.     Execute Modification     ./Themes/default/Stats.template.php     Test successful
10.    Execute Modification    ./Themes/default/Stats.template.php    Test successful

Try editing the file manually then installing it.




Any ideas on the Firefox popup window problem? Perhaps there's some missing javascript in the head of the register.template.php file.
No idea how to do manual. I tried smf phraser it won't display.
Title: Re: Referrals Mod
Post by: Eliana Tamerin on March 10, 2008, 11:12:45 PM
Unzip the package and open the install.xml file. Then scroll down to where it says stats.template.php and follow the instructions from there. Remember that in the xml format, AFTER means before.
Title: Re: Referrals Mod
Post by: Fustrate on March 11, 2008, 01:41:55 AM
Look on the last page - I posted how to do the edits yourself.
Title: Re: Referrals Mod
Post by: JoshieDaMan on March 11, 2008, 06:18:52 PM
Unknown column 'referralsno' in 'field list'
File: public_html/Sources/Stats.php
Line: 258

At stats.

AND

Unknown column 'mem.referralsno' in 'field list'
File: /public_html/Sources/Load.php
Line: 923

In profile.
Title: Re: Referrals Mod
Post by: Fustrate on March 11, 2008, 07:44:17 PM
-_- go into the Sources directory

Open Load.php and Stats.php

search for 'referralsno'
replace with 'referrals_no'
Title: Re: Referrals Mod
Post by: perplexed on March 11, 2008, 08:42:43 PM
Quote from: perplexed on March 10, 2008, 07:58:26 AM
Quote from: karlbenson on March 06, 2008, 01:21:11 AM
Your right it doesn't appear to be working properly in Firefox.

Eliana, do you have the same problem with the Find Members inside SMF. (eg admin > banned) or admin > Boards > modify boards (for the moderator)

Quote from: Eliana Tamerin on March 06, 2008, 01:23:43 AM
No on both counts. They both appear as popups without redirecting the current page.


Has there been a solution for this yet as I have it too?




Also, when I click on the 'find member' link to look for members this is what it says:

QuoteWarning!
Only registered members are allowed to access this section.
Please login below or register an account with My Test Site. 
Login
Username: 
Password: 
Minutes to stay logged in: 
Always stay logged in: 

Forgot your password?


which is kinda pointless considering they are trying to register at the time and don't have an account yet!


any help with these two issues yet?

thanks
Title: Re: Referrals Mod
Post by: weightman on March 12, 2008, 11:05:48 AM
I don't think I have any other mods affecting the registration process. I got the error below last night in the log. I checked to see if this happened from entering an incorrect visual verification code and that doesn't appear to be the cause. I was hoping someone would know how to fix. Thanks in advance:

8: Undefined index: visual_verification_code
File: /home/xxxxxx/public_html/smf/Sources/Register.php
Line: 171

Lines 170-172 from Register.php:

// Check whether the visual verification code was entered correctly.
if ((empty($modSettings['disable_visual_verification']) || $modSettings['disable_visual_verification'] != 1) && (empty($_REQUEST['visual_verification_code']) || strtoupper($_REQUEST['visual_verification_code']) !== $_SESSION['visual_verification_code']))
{
Title: Re: Referrals Mod
Post by: Fustrate on March 12, 2008, 07:38:38 PM
Quote from: perplexed on March 11, 2008, 08:42:43 PMany help with these two issues yet?

thanks

For the first one, I'm still looking at that... tried a few different fixes, but they still did the same thing.
Second... do any other member finding popups work/not work for unregistered users? Are you using any mod that changes the url format (i.e. SEO urls)? No security checks stand in the way, besides one that should be passed easily.

and weightman... this mod doesn't touch the verification code. Can't help you there... do you know if the member got registered after that?
Title: Re: Referrals Mod
Post by: Eliana Tamerin on March 12, 2008, 07:41:07 PM
No SEO urls installed here. And where might there be any other member-finding popups? I know that's not my issue (they worked fine for me, just opened in the current window instead of a popup) but it might help to test on my forum as well.

Yoda, you did make sure that it wasn't calling a js function that wasn't there, right? Maybe something didn't get loaded in the header?
Title: Re: Referrals Mod
Post by: Fustrate on March 12, 2008, 07:58:38 PM
That might be a good point... but since it works in IE, I'm not too sure that's it.
Title: Re: Referrals Mod
Post by: Eliana Tamerin on March 12, 2008, 08:01:15 PM
Can't hurt to check? Might be something that IE just glosses over and lets work anyways, while Firefox makes it adhere to strictly? Or some line that is only required for firefox to work, since it works with Opera and IE? I'm not sure.
Title: Re: Referrals Mod
Post by: Fustrate on March 12, 2008, 08:05:27 PM
You hit it right on the nose with the first sentence :) Firefox is choking on the multiple things the onclick="" wants to do. Working on fixing that now...

Found the fix :)

In Register.template.php:
Find
<input name="referredby"
Change to
<input name="referredby" id="referredby"

It was trying to grab an element without an ID by it's non-existant ID ;)

I'm going to upload a new version in a minute or two.
Title: Re: Referrals Mod
Post by: Eliana Tamerin on March 12, 2008, 08:23:05 PM
It's always one tiny little thing, isn't it? Grr for standards that have to be met. :P

That fix works perfectly. Thanks Yoda!
Title: Re: Referrals Mod
Post by: weightman on March 13, 2008, 11:53:17 AM
Quoteand weightman... this mod doesn't touch the verification code. Can't help you there... do you know if the member got registered after that?

Gotcha. I am not sure if they registered but don't think so. Still, I have tested the registration process, before and after your latest bug fix (thanks for that!) and it seems to work fine with no errors. If it happens again, I will seek support in general support.

Thanks again
Title: Re: Referrals Mod
Post by: weightman on March 13, 2008, 07:35:38 PM
In your profile, does the "Copy" button for the referral link work for anyone else? Mine doesn't in either IE7 or FF3b4.
Title: Re: Referrals Mod
Post by: Fustrate on March 13, 2008, 08:47:11 PM
I tested all four, and it only choked on Opera. I'll see what I can do (if anything even needs to be done - Eliana says that hers works...)
Title: Re: Referrals Mod
Post by: Eliana Tamerin on March 13, 2008, 08:49:53 PM
Works for me in FF2, IE7 and Opera here.

Make sure your JS is enabled.
Title: Re: Referrals Mod
Post by: weightman on March 14, 2008, 12:02:19 PM
Hmmm, js is enabled. I'll try and get someone else to test it so I can see if its my computer or the site itself and then report back.

Thanks
Title: Re: Referrals Mod
Post by: Eliana Tamerin on March 14, 2008, 12:08:07 PM
Test it here: http://intonarnia.com/index.php?action=profile;u=1
Title: Re: Referrals Mod
Post by: weightman on March 14, 2008, 12:13:44 PM
Yea, it works on your site for me. So, it looks like its not working on my site. My first guess is that it would be a conflict with the chess mod since I read about other problems that mod is having with other mods that use JS. If no one has any idea in this thread, I will post there.

Thanks very much
Title: Re: Referrals Mod
Post by: JoshieDaMan on March 20, 2008, 10:45:23 PM
Uninstall Actions
Uninstall Actions "Referrals Mod":
Installing this package will perform the following actions:
   Type    Action    Description
1.    Execute Modification    ./Sources/Load.php    Test successful
2.    Execute Modification    ./Sources/Register.php    Test successful
3.    Execute Modification    ./Sources/Stats.php    Test failed
4.    Execute Modification    ./Sources/Profile.php    Test successful
5.    Execute Modification    ./Themes/default/Register.template.php    Test successful
6.    Execute Modification    ./Themes/default/Display.template.php    Test successful
7.    Execute Modification    ./Themes/default/Stats.template.php    Test failed
8.    Execute Modification    ./Themes/default/Stats.template.php    Test failed
9.    Execute Modification    ./Themes/default/Profile.template.php    Test successful
10.    Execute Modification    ./Themes/default/languages/Modifications.english.php    Test failed

To uninstall the old version of referral mod so I could upgrade it. How get them to success?
Title: Re: Referrals Mod
Post by: JoshieDaMan on March 20, 2008, 10:52:23 PM
Database Error
Duplicate column name 'referrals_no'
File: /home/public_html/Packages/temp/Referrals_Mod_v2.0.1/install.php
Line: 31
Title: Re: Referrals Mod
Post by: Fustrate on March 21, 2008, 01:17:35 AM
Joshie, first things first. You need to manually uninstall the parts that failed, just like if you were manually installing it (but backwards).

I'll look into the install.php error in an hour or so - gotta finish up some work that's got a deadline coming up tomorrow.
Title: Re: Referrals Mod
Post by: JoshieDaMan on March 21, 2008, 03:36:14 AM
I looked into this, and I tried to delete it so I could start over and it says I have no permission to delete, and I as well cmod it to 777 so I could try to delete it, and it still won't let me delete that folder.
Title: Re: Referrals Mod
Post by: Fustrate on March 21, 2008, 05:08:40 AM
That's a PHP error that you can't get around, but it won't affect uninstalling.

Have you ever installed a package manually before? You'll just need to reverse the changes made to Stats.php, Modifications.english.php, and Stats.template.php yourself - after you've uninstalled the mod through the package manager.
Title: Re: Referrals Mod
Post by: Sabre™ on March 21, 2008, 05:50:04 AM
I cannot see the manual edits via the package parser.
This is the result:
parseArchive(): No package-info.xml in this mod! Is it corrupted?

The mod installed via the package manager, but failed in the Display Template.
I installed anyway, then went to manually install the changes via package parser, with the above results.

Can somebody please post the manual installation for the display template?
And also any other edits needed to install this into custom themes.
I have already added the profile edit for custom themes, so that isnt needed :)

Thank You in advance :)

Also..  Are there permissions for this mod, to select who can see each persons referrals?
And to block others from seeing your referral code, to stop any form of abuse
eg..  Being posted on  "unsavory"  sites etc.
Title: Re: Referrals Mod
Post by: Fustrate on March 21, 2008, 11:02:46 PM
Whenever you make changes this way, first make sure the package installer didn't do it first! Duplicate code creates errors!



Register.template.php
Search for:
// Are there age restrictions in place?
if (!empty($modSettings['coppaAge']))

Add this BEFORE it:

echo ' <tr>
<td width="40%"><b>', $txt['referrals_who'] ,'</b>
<div class="smalltext">', $txt['referrals_who_description'], '</div></td>
<td><input name="referredby" id="referredby" type="text" size="30" value="', ( !empty($context['referrals']['referred_by_name']) ? $context['referrals']['referred_by_name'] : '' ) ,'" />
<a href="', $scripturl, '?action=findmember;input=referredby;sesc=', $context['session_id'], '" onclick="document.getElementById(\'referredby\').value=\'\';document.getElementById(\'referredon\').innerHTML =\'&nbsp;\';return reqWin(this.href, 350, 400);"><img src="', $settings['images_url'], '/icons/assist.gif" border="0" alt="', $txt['referrals_findreferrer'] ,'" /> ', $txt['referrals_findreferrer'] ,'</a><br /><span id="referredon" class="smalltext">', ( !empty($context['referrals']['referred_date']) ? $txt['referrals_on'].' '.$context['referrals']['referred_date'] : '' ) ,'</span></td>
</tr>';










Display.template.php
Search for:
// Show how many posts they have made.
echo '
', $txt[26], ': ', $message['member']['posts'], '<br />

Add this AFTER it:
', $txt['referrals_referrals'].' '.$message['member']['referrals_no'].'<br />









Xml.template.php
Search for:
<day date="', $day['year'], '-', $day['month'], '-', $day['day'], '" new_topics="', $day['new_topics'], '" new_posts="', $day['new_posts'], '" new_members="', $day['new_members'], '" most_members_online="', $day['most_members_online'], '"', empty($modSettings['hitStats']) ? '' : ' hits="' . $day['hits'] . '"', ' />';
REPLACE it with:
<day date="', $day['year'], '-', $day['month'], '-', $day['day'], '" new_topics="', $day['new_topics'], '" new_posts="', $day['new_posts'], '" new_members="', $day['new_members'], '" most_members_online="', $day['most_members_online'], '" referrals="', $day['referrals'], '"', empty($modSettings['hitStats']) ? '' : ' hits="' . $day['hits'] . '"', ' />';










Stats.template.php
Search for:
foreach ($context['top_boards'] as $board)
echo '
<tr>
<td width="60%" valign="top">', $board['link'], '</td>
<td width="20%" align="left" valign="top">', $board['num_posts'] > 0 ? '<img src="' . $settings['images_url'] . '/bar.gif" width="' . $board['post_percent'] . '" height="15" alt="" />' : '&nbsp;', '</td>
<td width="20%" align="right" valign="top">', $board['num_posts'], '</td>
</tr>';

Add this AFTER it:

// Start of Referrals Mod Stats
echo '
</table>
</td>
</tr><tr>
<td class="catbg" colspan="2" width="50%"><b>'.$txt['referrals_top5referrers'].'</b></td>
<td class="catbg" colspan="2" width="50%"><b>'.$txt['referrals_top5referrersbyposts'].'</b></td>
</tr><tr>
<td class="windowbg" width="20" valign="middle" align="center"><img src="', $settings['images_url'], '/stats_info.gif" width="20" height="20" alt="" /></td>
<td class="windowbg2" width="50%" valign="top">
<table border="0" cellpadding="1" cellspacing="0" width="100%">';
if (empty($context['totalreferrals']))
echo '<tr>
<td valign="top" style="text-align:center">'. $txt['referrals_noneyet'] . '</td>
</tr>';
else
{
foreach ($context['top_referrers'] as $referrer)
echo '
<tr>
<td width="60%" valign="top">', $referrer['link'], '</td>
<td width="20%" align="left" valign="top">', $referrer['referrals_no'] > 0 ? '<img src="' . $settings['images_url'] . '/bar.gif" width="' . $referrer['referrals_percent'] . '" height="15" alt="" />' : '&nbsp;', '</td>
<td width="20%" align="right" valign="top">', $referrer['referrals_no'], '</td>
</tr>';
}

echo '
</table>
</td>
<td class="windowbg" width="20" valign="middle" align="center"><img src="', $settings['images_url'], '/stats_info.gif" width="20" height="20" alt="" /></td>
<td class="windowbg2" width="50%" valign="top">
<table border="0" cellpadding="1" cellspacing="0" width="100%">';
unset($referrer);
if (empty($context['totalreferralsposts']))
echo '<tr>
<td valign="top" style="text-align:center">'. $txt['referrals_noneyet'] . '</td>
</tr>';
else
{
foreach ($context['top_referrers_by_posts'] as $referrer)
echo '
<tr>
<td width="60%" valign="top">', $referrer['link'], '</td>
<td width="20%" align="left" valign="top">', $referrer['posts'] > 0 ? '<img src="' . $settings['images_url'] . '/bar.gif" width="' . $referrer['referralsposts_percent'] . '" height="15" alt="" />' : '&nbsp;', '</td>
<td width="20%" align="right" valign="top">', $referrer['posts'], '</td>
</tr>';
}
// End of Referrals Mod Stats



Search for:
<td width="15%">', $txt['smf_stats_7'], '</td>
<td width="15%">', $txt['smf_stats_8'], '</td>
<td width="15%">', $txt['smf_stats_9'], '</td>
<td width="15%">', $txt['smf_stats_14'], '</td>

REPLACE it with:
<td width="10%">', $txt['smf_stats_7'], '</td>
<td width="10%">', $txt['smf_stats_8'], '</td>
<td width="10%">', $txt['smf_stats_9'], '</td>
<td width="10%">', $txt['smf_stats_14'], '</td>
<td width="10%">',$txt['referrals_referralsstats'],'</td>



Search for:
<th align="center" width="15%">', $month['new_topics'], '</th>
<th align="center" width="15%">', $month['new_posts'], '</th>
<th align="center" width="15%">', $month['new_members'], '</th>
<th align="center" width="15%">', $month['most_members_online'], '</th>

REPLACE it with:
<th align="center" width="10%">', $month['new_topics'], '</th>
<th align="center" width="10%">', $month['new_posts'], '</th>
<th align="center" width="10%">', $month['new_members'], '</th>
<th align="center" width="10%">', $month['most_members_online'], '</th>
<th align="center" width="10%">', $month['referrals'], '</th>


Search for:
<td align="center">', $day['most_members_online'], '</td>
Add this AFTER it:
<td align="center">', $day['referrals'], '</td>]]></add>


Search for:
var dataCells = [
"date",
"new_topics",
"new_posts",
"new_members",
"most_members_online"

Add this AFTER it (don't forget the comma on the first line... so it's "most_members_online",):
,
"referrals",



Search for:
dataCells[5] = "hits";
dataCells[6] = "hits";





Profile.template.php
Search for:
// Messenger type information.
echo '
<tr>
<td colspan="2"><hr size="1" width="100%" class="hrcolor" /></td>
</tr><tr>
<td><b>', $txt[513], ':</b></td>
<td>', $context['member']['icq']['link_text'], '</td>

Add this BEFORE it:
// Adds the referral/referred user information to the profile summary
echo '<tr><td colspan="2"><hr size="1" width="100%" class="hrcolor" /></td></tr>
<tr>
<td><b>'.$txt['referrals_referrals'].'</b></td>
<td>'.$context['member']['referrals_no'] .'  ';

// Show in dropdown usersname of those referred
if(!empty($context['member']['referredmembers']))
{

echo '<select onchange="location=options[selectedIndex].value;">
<option>'.$txt['referrals_membersreferred'].'</option>';
foreach($context['member']['referredmembers'] as $x)
echo $x;

// Tidy up
unset($x);
echo '</select>';
}
echo' </td>
</tr>
<tr>
<td><b>'.$txt['referrals_referrals_hits'].'</b></td>
<td>'.$context['member']['referrals_hits'].'</td>
</tr>';
if (!empty($context['member']['referred_by']))
{
echo' <tr>
<td><b>'.$txt['referrals_referred_by'].'</b></td>
<td>'.$context['member']['referred_bylink'].' '.$txt['referrals_on'].' '. date("jS M Y",$context['member']['referred_on']).'
</td>
</tr>';

}

echo '<tr>
<td colspan="2"><b>'.$txt['referrals_link'].'</b></td>
</tr>
<tr><td colspan="2" style="text-align:center;">
<script language="JavaScript" type="text/javascript"><!--//
function copy_referrallink()
{
// Create element (if does not exist)
if(!document.getElementById(\'clipboard\'))
{
var copydiv = document.createElement(\'div\');
copydiv.id = \'clipboard\';
document.body.appendChild(copydiv);
}

// Clear element
document.getElementById(\'clipboard\').innerHTML = \'\';
// Copy Referral Link
document.getElementById(\'clipboard\').innerHTML = \'<embed src="referrals_copytoclipboard.swf" FlashVars="clipboard=\'+encodeURIComponent(document.getElementById(\'referrallink\').value)+\'" width="0" height="0" type="application/x-shockwave-flash"></embed>\';
}
//--></script>
<input type="text" id="referrallink" value="'.$scripturl.'?referredby='. $context['member']['id'] .'" readonly="true" style="width:250px;" />
<a href="javascript:void(0);" rel="nofollow" onclick="javascript:copy_referrallink();return false;" title="'.$txt['referrallink_copy'].'">'.$txt['referrallink_copy'].'</a>
</td>
</tr>';

Title: Re: Referrals Mod
Post by: Sabre™ on March 22, 2008, 05:53:59 AM
Mate...

You are a good man :)
I thank you very much, for the effort and time you put in to post these edits :)

+k


Is there a way to move the referrals link code, to another area?
eg.   The  "account related settings"  area in your profile.
So nobody else can access/see your personal code.

Thank You
Title: Re: Referrals Mod
Post by: Fustrate on March 22, 2008, 11:30:27 AM
I don't quite see how that would help... remember, the 'code' is the same for everyone, just with your user id at the end. If my ID is 26, and my referral link is ?referredby=26, and I know your ID is 63, it's easy to assume that your link will just end in 63.

I'll look into it, though, just gotta do some other things first. Graduating is kind of a priority right now ;)
Title: Re: Referrals Mod
Post by: Sabre™ on March 22, 2008, 06:01:26 PM
LOL..
Yea true, I forgot the code was the same for everyone  (http://www.postsmile.net/img/19/1967.gif)

Good luck with your studies mate (http://smilies.sofrayt.com/fsc/write%20a%20letter.gif)
When you graduate, then its all plain sailing from there, then you can spend your days like me (http://i147.photobucket.com/albums/r315/elusivelyyours/smilies%203/slappeav.gif)
and your nights like the 1337 staff here!!!  (http://www.getsmile.com/emoticons/energizer-smileys-51935/computer3.gif)
(http://www.postsmile.net/img/19/1968.gif)
Just kiddin :D :D :D

All the best :)
Title: Re: Referrals Mod
Post by: thenerd on March 26, 2008, 01:24:35 PM
Hi folks,

I am trying to install this mod on SMF 1.1.4 with a theme called Minerva. I get the following errors just before installation:

Installing this package will perform the following actions:
Type Action Description
1. Execute Modification ./index.php Test failed
2. Execute Modification ./Sources/Load.php Test successful
3. Execute Modification ./Sources/Register.php Test successful
4. Execute Modification ./Sources/Stats.php Test successful
5. Execute Modification ./Sources/Profile.php Test successful
6. Execute Modification ./Themes/default/Register.template.php Test successful
7. Execute Modification ./Themes/default/Display.template.php Test successful
8. Execute Modification ./Themes/default/Xml.template.php Test successful
9. Execute Modification ./Themes/default/Stats.template.php Test successful
10. Execute Modification ./Themes/default/Stats.template.php Test successful
11. Execute Modification ./Themes/default/Profile.template.php Test successful
12. Execute Modification ./Themes/default/languages/Modifications.english.php Test successful
13. Execute Modification ./Themes/default/languages/Modifications.english-utf8.php Skipping file
14. Execute Modification ./Themes/default/languages/Modifications.english_british.php Skipping file
15. Execute Modification ./Themes/default/languages/Modifications.english_british-utf8.php Skipping file
16. Extract File ./Sources/Referrals.php
17. Extract File ./referrals_copytoclipboard.swf
18. Execute Code install.php


Any ideas what I need to do to fix it?

Thanks
Title: Re: Referrals Mod
Post by: Eliana Tamerin on March 26, 2008, 01:55:42 PM
Manually install the mod onto the index.php file.

Open up the file and find this line:
// Load the current user's permissions.
loadPermissions();


Then add this after it:
// Referrals Mod - Check For Referrals
global $context, $sourcedir;
if($context['user']['is_guest'] && (!empty($_GET['referredby']) || !empty($_COOKIE['smf_referrals'])))
{
require_once($sourcedir . '/Referrals.php');
checkReferral();
}


Then just continue on with the installation and ignore the error on the index.php file.
Title: Re: Referrals Mod
Post by: thenerd on March 26, 2008, 06:27:34 PM
Thanks Eliana Tamerin that worked!

Cheers!
Title: Re: Referrals Mod
Post by: Pip2andahalf on March 30, 2008, 07:12:10 PM
This thing works on the profiles, but for some reason the referrals arenot showing up on the posts. I am using Babylon theme. Any help please?

Also, is there a way to make the link on the profile visible only to the user when looking at their own profile?

Thanks!

Pip
Title: Re: Referrals Mod
Post by: Fustrate on March 30, 2008, 07:19:38 PM
Edit Themes/babylon/Display.php and make the edits I posted above for that file.

For the second thing, there's really no point in hiding it, because everyone automatically knows everyone else's (discussed in a post above).
Title: Re: Referrals Mod
Post by: DR3NCH on April 06, 2008, 01:39:01 PM
The following code appears at the top of my forums:

Code (http://www.the-garbagecan.net/forums) Select

$txt['referrals_findreferrer'] = 'Find Referrer'; $txt['referrals_who'] = 'Referral Information:'; $txt['referrallink_copy'] = '[Copy]'; $txt['referrals_who_description'] = 'Did someone refer you to this site?'; $txt['referrals_on'] = 'On'; $txt['referrals_referrer_not_found'] = 'The referring user could not be found. Please double-check the name of the referrer. Or leave it blank.'; $txt['referrals_youwerereferred_by'] = 'By'; $txt['referrals_referrals'] = 'Referrals:'; $txt['referrals_referrals_hits'] = 'Referral Link Hits:'; $txt['referrals_noneyet'] = 'None Yet!'; $txt['referrals_top5referrers'] = 'Top 5 Referrers (By Referrals)'; $txt['referrals_top5referrersbyposts'] = 'Top 5 Referrers (By Referred Members Posts)'; $txt['referrals_referralsstats'] = 'Referrals'; $txt['referrals_referred_by'] = 'Referred By:'; $txt['referrals_link'] = 'Referrals Link:'; $txt['referrals_membersreferred'] = 'Members Referred';


I've uninstalled the package, erased the files from my server, and I've reinstalled all of the themes my forums use but this code still remains.

How do I remove this?
How do I remove it?
Title: Re: Referrals Mod
Post by: Eliana Tamerin on April 06, 2008, 01:50:54 PM
Open up your /Themes/languages/Modifications.english.php file.

Find that line (it's after ?>). Move it above the ?> and save it.

Should be fine then.
Title: Re: Referrals Mod
Post by: DR3NCH on April 06, 2008, 02:04:37 PM
Quote from: Eliana Tamerin on April 06, 2008, 01:50:54 PM
Open up your /Themes/languages/Modifications.english.php file.

Find that line (it's after ?>). Move it above the ?> and save it.

Should be fine then.

There is no directory or file called what you're discribing on my server.

EDIT:  Nevermind, I figured it out by myself like I should have.
Title: Re: Referrals Mod
Post by: Jirsh on April 10, 2008, 04:23:00 PM
I have edited display.template.php as instructed but the referrals dont show on the posts? Help please

// Show how many posts they have made.
// echo '
// ', $txt[26], ': ', $message['member']['posts'], '<br />', $txt['referrals_referrals'].' '.$message['member']['referrals_no'].'<br />
// <br />';
Title: Re: Referrals Mod
Post by: ne.miguelito on April 15, 2008, 09:21:27 PM
Please help me, I have instaled  this mod and if I register a user and delete the acount, the number of referals on my acount doesn´t decrease...

Thanks for the mod.

Regards.
Title: Re: Referrals Mod
Post by: Fustrate on April 16, 2008, 01:15:55 AM
I'm torn on whether or not to add that into the code... even if a user decides not to continue on the forum and cancels their account, I still think that the referrer should get credit for having referred a member.

If you really want this, I guess I can code it for you this weekend... I have absolutely no spare time right now :(
Title: Re: Referrals Mod
Post by: ne.miguelito on April 16, 2008, 06:14:00 AM
Yes I prefer that when an acount are deleted, the number of referals on my acount should decrease.

Ok, i´m wating for your modification, thanks for everything.

Regards
Title: Re: Referrals Mod
Post by: ne.miguelito on April 18, 2008, 08:27:53 AM
Somebody knows a script to allow to do the reset to all referals, it can be in sql...
Title: Re: Referrals Mod
Post by: malcomxar on April 18, 2008, 09:11:04 PM
Thanks, great mod works perfectly :)
Title: Re: Referrals Mod
Post by: Fustrate on April 18, 2008, 10:47:07 PM
thanks, malcomxar :)

ne.miguelito - here's some quick SQL for it...
UPDATE `smf_members` SET `referrals_no` = 0, `referrals_hits` = 0, `referred_by` = 0, `referred_on` = 0 WHERE `id_member` > 0
change smf_ to your database prefix.
Title: Re: Referrals Mod
Post by: ne.miguelito on April 19, 2008, 08:00:11 AM
Thank you, its a great mod... don't forget the another question...


Regards
Title: Re: Referrals Mod
Post by: starz on April 26, 2008, 10:59:22 PM
is there anywhere in the admin panel to view referral stats?
Title: Re: Referrals Mod
Post by: Fustrate on April 27, 2008, 12:25:17 AM
no, just the statistics page that general members see.
Title: Re: Referrals Mod
Post by: starz on April 27, 2008, 09:23:45 AM
where's the statistics page?  i cant find it. :(

nvm, i found it.  yay!
Title: Re: Referrals Mod
Post by: forummaker on May 02, 2008, 08:53:11 AM
I'm not sure which mod that I installed that created this error after a new member registers. It should tell the new registered member that an email has been sent to them, instead they get this message;

Database Error
Please try again. If you come back to this error screen, report the error to an administrator.

I've tried to uninstall the referral mod to see if it was creating the error, but when I try and uninstall the mod I get this error:

1.     Execute Modification     ./index.php     Test failed
2.    Execute Modification    ./Sources/Load.php    Test successful
3.    Execute Modification    ./Sources/Register.php    Test successful
4.    Execute Modification    ./Sources/Stats.php    Test successful
5.    Execute Modification    ./Sources/Profile.php    Test successful
6. so, on and so on........7. 8. 9. .....
It's just the index.php test failed thats an issue for the uninstall.
Thanks for any help on this.

Modified:
I'm not sure whats going on now. Everything seems to be working now.....hmmm.
Title: Re: Referrals Mod
Post by: forummaker on May 05, 2008, 08:53:00 PM
Now a different issue. Everything was working fine, but now when a new member registers, the popup window doesn't popup, it loads in the same window. This causes a problem because after selecting the member that referred you, there's no place for it to go. There use to be a popup window that would show up, and when you click on the person that referred you it would fill that in on the registration page. I wonder if somehow something changed in the referrals.php? Love this mod. Any suggestions on a fix? Thanks.
Title: Re: Referrals Mod
Post by: Fustrate on May 07, 2008, 09:25:52 PM
Are you using the latest version of the mod? If I recall, we fixed that issue a while ago. Anyways, can I get the url to your forum? I'll go see what exactly it's doing so that I can find a fix for you.
Title: Re: Referrals Mod
Post by: markvon on May 11, 2008, 11:49:33 AM
i have tried installing this great mod, but i get the following error:

7.     Execute Modification     ./Themes/default/Display.template.php     Test failed

What can i do?
Title: Re: Referrals Mod
Post by: Fustrate on May 11, 2008, 12:43:25 PM
You'll need to do that part of the modification by editing the Display.template.php file yourself. Use the dropdown list on the mod download page to select your SMF version, and it'll show you exactly what to edit in every page (but you'll just need to do Display.template.php)
Title: Re: Referrals Mod
Post by: markvon on May 11, 2008, 01:22:21 PM
thanks yoda. I have followed your instructions, but now i get a bigger problem.

In the forum, at my profile, i have two instances of posts. For instance, taking this forum as an example:

YodaofDarkness
Charter Member
Full Member
Offline
Gender:
Posts: 414
Referrals: 0

Posts: 414

Why is it repeated?
Title: Re: Referrals Mod
Post by: Fustrate on May 11, 2008, 05:16:50 PM
look for a repeated variable in Display.template.php... two lines that look the same.
Title: Re: Referrals Mod
Post by: ekfaysal on May 21, 2008, 02:38:29 AM
any chance for update to smf 2 beta 3
Title: Re: Referrals Mod
Post by: Filipina on May 21, 2008, 02:34:29 PM
I love this MOD concept :)

I installed it yesterday.  I had a sign up which indicated a referral from another member.  I checked and the member that got credited with the referral has not been on the site since February.  So I am confused how that happened?  I see that each member has a link code they can use to refer people to the site.  Since that link is not clickable, it blew my theory that maybe the new registration clicked off her profile.  Any ideas, just curious :)
Title: Re: Referrals Mod
Post by: Fustrate on May 21, 2008, 07:23:40 PM
I'm hoping to finish upgrading this by next weekend... When I'll pretty much be done with high school.

@ Filipina: ya, they probably just copied and pasted out of that profile OR they entered the person's name when they registered.
Title: Re: Referrals Mod
Post by: Sabre™ on May 21, 2008, 08:38:48 PM
Request.

Could you add a code here to make it only viewable to THAT user??
I know i know...  There's no point  yadda yadda yadda...
Im finding that its those that dont know how to get your member id, that abuse the feature. In "fun"   ::)
Those that know how, are mature enough not to participate in such actions.
It is a security comfort for newbie users ;)

The option wouldnt hurt no?
Title: Re: Referrals Mod
Post by: Fustrate on May 22, 2008, 11:54:17 AM
Fine, fine, I give in. I'll look at the code and post a little modification for you to do. Gimme a little while though, I'm home sick but conveniently finishing a project due tomorrow...
Title: Re: Referrals Mod
Post by: Sabre™ on May 22, 2008, 01:00:33 PM
Quote from: YodaOfDarkness on May 22, 2008, 11:54:17 AM
Fine, fine, I give in.
Wooohooo!!
One for the annoying people!! lol  ;)
Cheers Yoda. Your efforts are always appreciated buddy :)

Quote from: YodaOfDarkness on May 22, 2008, 11:54:17 AM
Gimme a little while though, I'm home sick but conveniently finishing a project due tomorrow...
But of course mate.
There is no rush, and your health and studies always come first!!
I'll be back in an hour.
lol  :P
Im just glad youre doing it. Be it a week or 2 weeks, knowing that it'll be ready when you are, is good enough.
Get better soon, and good luck with your exams!!
Title: Re: Referrals Mod
Post by: TJTELLEZ9 on May 24, 2008, 01:47:28 PM
How can I reset the mod stats?  I have tried removal of the mod etc, but it still doesnt work..
Title: Re: Referrals Mod
Post by: Fustrate on May 24, 2008, 03:34:00 PM
When you remove the mod, also go into the database and remove the following columns from smf_members:
Title: Re: Referrals Mod
Post by: Pranav on May 25, 2008, 03:15:48 AM
Can this be integrated with Shop Mod and make the system automatically give points to the person who referred(at a certain amount of posts)?
And only enable referring for members who have posts above, say, 20 or so? :)


Title: Re: Referrals Mod
Post by: Eliana Tamerin on May 25, 2008, 09:48:22 AM
It is already, check the Register.template.php file with the shop mod installed. ;)
Title: Re: Referrals Mod
Post by: Fustrate on May 25, 2008, 12:47:07 PM
You mean Sources/Register.php ;)
search for the word "shop"
Title: Re: Referrals Mod
Post by: Eliana Tamerin on May 25, 2008, 02:34:50 PM
Oops, Yoda has the right one.

I knew it was there somewhere, just forgot exactly where. Thanks.
Title: Re: Referrals Mod
Post by: Pranav on May 26, 2008, 01:31:43 AM
Quote from: Eliana Tamerin on May 25, 2008, 09:48:22 AM
It is already, check the Register.template.php file with the shop mod installed. ;)

Great! :D I removed "//" from this line
Quote// updateMemberData($referrer, array('money' => 'money + 100'));

and changed it to

QuoteupdateMemberData($referrer, array('money' => 'money + 20'));
Is this 'money + 100' to give money to the user for referring, where 100 is the amount of credits? :)

BTW, can we also limit a user from referring until they have 20 posts or so? :) Also, is it possible to only give money to the referrer, if the referred user has reached a certain amount of posts?
And once the referred user has reached a certain amount of posts, don't give money to the referrer yet and make it undergo the administrator to prevent fraud? :)

Thanks! :)
Title: Re: Referrals Mod
Post by: Bust_Ed on June 05, 2008, 10:27:34 AM
Are there any stats, showing monthly top referrer?
Title: Re: Referrals Mod
Post by: LiamTheDuck on June 15, 2008, 11:28:13 AM
Any chance of 2.0 beta 3.1 update? because my Forum needs this as it is great! :P
Title: Re: Referrals Mod
Post by: Eliana Tamerin on June 15, 2008, 06:47:17 PM
I'm guessing an update for 2.0 probably won't come until at 2.0 is at least in RC versions.
Title: Re: Referrals Mod
Post by: Harvester on July 09, 2008, 02:19:39 PM
Help PPlease

I went to install this mod and I recieved the error "Error in Package Installation"

this is the list of actions that followed:

QuoteInstalling this package will perform the following actions:  Type Action Description
1. Execute Modification ./index.php Test successful
2. Execute Modification ./Sources/Load.php Test successful
3. Execute Modification ./Sources/Register.php Test successful
4. Execute Modification ./Sources/Stats.php Test successful
5. Execute Modification ./Sources/Profile.php Test successful
6. Execute Modification ./Themes/default/Register.template.php Test successful
7. Execute Modification ./Themes/default/Display.template.php Test failed  
8. Execute Modification ./Themes/default/Xml.template.php Test successful
9. Execute Modification ./Themes/default/Stats.template.php Test successful
10. Execute Modification ./Themes/default/Stats.template.php Test successful
11. Execute Modification ./Themes/default/Profile.template.php Test successful
12. Execute Modification ./Themes/default/languages/Modifications.english.php Test successful
13. Execute Modification ./Themes/default/languages/Modifications.english-utf8.php Skipping file
14. Execute Modification ./Themes/default/languages/Modifications.english_british.php Skipping file
15. Execute Modification ./Themes/default/languages/Modifications.english_british-utf8.php Skipping file
16. Extract File ./Sources/Referrals.php 
17. Extract File ./referrals_copytoclipboard.swf 
18. Execute Code install.php

Please help as Id really like to get this mod on my site.

Thank you, Jared
Title: Re: Referrals Mod
Post by: Fustrate on July 09, 2008, 03:20:18 PM
Install it through the Package Manager, and then go edit Display.template.php with the following:

Code (FIND) Select
// Show how many posts they have made.
echo '
', $txt[26], ': ', $message['member']['posts'], '<br />

Code (ADD AFTER) Select

', $txt['referrals_referrals'].' '.$message['member']['referrals_no'].'<br />
Title: Re: Referrals Mod
Post by: Harvester on July 09, 2008, 04:47:36 PM
Why is it doing that? Because of the other mods I have installed which have changed Display.template from default?

thats the only edit in Display.template?

Thank you Yoda :D
Title: Re: Referrals Mod
Post by: Fustrate on July 09, 2008, 07:06:33 PM
Yes, it's most likely due to other mods, and that is the only change this mod does to Display.template.php :)

I've done a straight 'translation' of the code for SMF 2.0, but haven't had any time to test it yet. Once SMF Beta 4 is released, the version for 2.0 will be released within a day or two.

EDIT: Finally got to test it, and I only made one error when translating it for 2.0 (without even looking at the 2.0 files, because I haven't migrated everything over to my mac yet :D) Expect it the day after Beta 4 so I can make any theme changes needed.
Title: Re: Referrals Mod
Post by: GawdSpeed on July 10, 2008, 11:27:04 AM
I installed this mod and everything is good, except the [Copy] button doesn't work on my profile. It doesn't copy anything at all.
Title: Re: Referrals Mod
Post by: Fustrate on July 10, 2008, 12:16:20 PM
What browser are you using?
Title: Re: Referrals Mod
Post by: weightman on July 10, 2008, 12:44:24 PM
QuoteI installed this mod and everything is good, except the [Copy] button doesn't work on my profile. It doesn't copy anything at all.

I have the same problem, tested in several browsers....am thinking its a mod conflict.
Title: Re: Referrals Mod
Post by: Fustrate on July 10, 2008, 02:04:11 PM
Link to your forum? I'll go check it out.
Title: Re: Referrals Mod
Post by: weightman on July 10, 2008, 05:30:47 PM
I believe you already looked at my issue and didn't see the problem. I only mentioned it because now someone else has it. But, here is the forum:

http://weightliftingexchange.com/index.php?option=com_smf&Itemid=39

Thanks!
Title: Re: Referrals Mod
Post by: Fustrate on July 11, 2008, 06:52:25 PM
If anyone wants to help test the 2.0 version, I'd appreciate if you'd follow this link to my testing forum:
http://www.fustrate.com/test/index.php?referredby=1

and register. I just need to make sure it's still functioning as it should.

@weightman: Try removing amp; from &amp; and just leave the & - see if that does the trick. Better yet, I think you should be able to remove them from $scripturl in Settings.php
Title: Re: Referrals Mod
Post by: Sudhakar Arjunan on July 11, 2008, 09:02:10 PM
Any idea, what would be specail in v2.0.

And try to shows most top referred in forum info center below recent topics.
Another Idea, Show the top referred of the day.

Thank you for this excellent mod.
Title: Re: Referrals Mod
Post by: Harvester on July 14, 2008, 03:07:58 PM
I seem to  have it installed and working fine. Thank you Yoda. Only thing I notice not working is the "copy" button that is found on a members profile. I click it but it isnt copying.
Title: Re: Referrals Mod
Post by: Fustrate on July 14, 2008, 08:41:38 PM
Copying has been a problem for some people... trying to work on that now.
Title: Re: Referrals Mod
Post by: weightman on July 14, 2008, 09:08:41 PM
YodaOfDarkness, in case its a conflict with another mod, here is a list of all of mine. I know it might not help too much because I use so many. I know SMFChess uses Javascript but feeble, the author of that mod, didn't see a conflict though. And, the problem with the copy came before I added the drafts mod. Thanks very much for looking in to it. Maybe more people would use it if the copy works. I am actually surprised a few people have used it anyway having to enter the box and hit crtl-A and crtl-c or clicking if they are slower or giving up if they don't know how to copy and paste which still seems very common.

1.     Website Button      1.1.4      
2.    Treasury    2.12    
3.    Drafts (for 1.1.5)    1.07    
4.    SMF Gallery Pro Upgrade    1.3.10    
5.    SMFChess    1.0    
6.    Referrals Mod    2.0.1
7.    Ad Managment    2.3    
8.    Googlebot & Spiders Mod    2.0.3    
9.    SMF Gallery Pro    1.3.4
10.    AddThis Social Bookmarks    1.0
11.    Signature Area BBCode Buttons    1.5    
12.    Auto Embed Video/Audio Clips    3.1.1    
13.    FlashChat Integration    1.0    
14.    MCLegendII    1.1    
15.    Topic description    1.1    
16.    Expand Pages Mod    1.0    
17.    Todays Birthday    0.1    
18.    Inline Attachments    1.0.4.2    
19.    SMF 1.0.13 / 1.1.5 / 2.0 b3.1 Update    1.0
20.    SMF Gallery Pro SSI    1.1    
21.    RSS Feed Icon    1.1
22.    Automatic_Karma    1.0    
23.    FontandSizeDropdown_1.2    1.3    
24.    Buy Me A Beer    1.3    
25.    SMF Staff Page    1.5.1    
26.    Ignore Boards    2.0.1    
27.    Popup PM Message - Uses The Same Window    1.3    
28.    New Topic Button    1.0    
29.    User Email System    1.2
30.    Fix Message Empty Error For Embed Video Mods    1.0
Title: Re: Referrals Mod
Post by: Fustrate on July 14, 2008, 10:19:55 PM
I'm not sure it's the fault of any other mod... right now I'm looking at alternative ways to accomplish this. I might ever just change it to a [Select] button like the [code] blocks use, and just let you copy it yourself (which is almost as hard as using the internets!) :D

EDIT: Okay, I've added [Select] by default into the 2.0 version...



1.1.x Instructions

Here's what to add in script.js:
// Get the text in a code tag.
function referralSelectText()
{
// Hmm... think the ID will be "referrallink"?
var codeArea = document.getElementById("referrallink");

if (!codeArea)
return false;

// Start off with my favourite, internet explorer.
if (document.body.createTextRange)
{
var curRange = document.body.createTextRange();
curRange.moveToElementText(codeArea);
curRange.select();
}
// Firefox et al.
else if (window.getSelection)
{
var curSelection = window.getSelection();
// Safari is special!
if (curSelection.setBaseAndExtent)
{
curSelection.setBaseAndExtent(codeArea, 0, codeArea, 1);
}
else
{
var curRange = document.createRange();
curRange.selectNodeContents(codeArea);

curSelection.removeAllRanges();
curSelection.addRange(curRange);
}
}

return false;
}

which is pretty much a straight code rip from 2.0 - kudos to the devs.

Also change the onclick= for the copy link in Profile.template.php to:
onclick="return referralSelectText();"

and change the $txt['referrallink_copy'] in Modifications.english.php to "[Select]"
Title: Re: Referrals Mod
Post by: Harvester on July 15, 2008, 06:34:18 AM
should 1.1.5 users use this modication for the select button too?
Title: Re: Referrals Mod
Post by: toups on July 15, 2008, 08:01:50 AM
Greetings, I just installed this mod, everything worked fine.. only thing is all the text where it would supposed to be (in the profile, while registering, in posts) is invisible.. I have added the new text into modifications.english.php where they are defined for those in my theme.. but it's still not working.  Could someone help?
Title: Re: Referrals Mod
Post by: Harvester on July 15, 2008, 08:13:22 AM
Quote from: toups on July 15, 2008, 08:01:50 AM
Greetings, I just installed this mod, everything worked fine.. only thing is all the text where it would supposed to be (in the profile, while registering, in posts) is invisible.. I have added the new text into modifications.english.php where they are defined for those in my theme.. but it's still not working.  Could someone help?

could it have something to do with the color of the text? if you click and highlight the area what happens? do you see text then?
Title: Re: Referrals Mod
Post by: toups on July 15, 2008, 08:29:36 AM
Quote from: Harvester on July 15, 2008, 08:13:22 AM
Quote from: toups on July 15, 2008, 08:01:50 AM
Greetings, I just installed this mod, everything worked fine.. only thing is all the text where it would supposed to be (in the profile, while registering, in posts) is invisible.. I have added the new text into modifications.english.php where they are defined for those in my theme.. but it's still not working.  Could someone help?

could it have something to do with the color of the text? if you click and highlight the area what happens? do you see text then?

Negative, the text isn't even there.. not sure why either.. it's defined in modifications.english.php and is there.. should be working :\

See for yourself: http://www.open-designs.org/index.php?action=register

To the left of the bottom box below image verification should have the text 'Did someone refer you to this site?'
and yet.. nothing.
Title: Re: Referrals Mod
Post by: Harvester on July 15, 2008, 08:34:11 AM
oh yeah. I see what ya mean. the input box and all is there but no label. hmm 
Title: Re: Referrals Mod
Post by: toups on July 15, 2008, 08:43:34 AM
Quote from: Harvester on July 15, 2008, 08:34:11 AM
oh yeah. I see what ya mean. the input box and all is there but no label. hmm
Exactly.. Hmm indeed.. I could just replace the $txt['referrals_who_description'] and such things in those with static text.. which would work.. but my forum error log would get mad at me methinks >.<
Title: Re: Referrals Mod
Post by: toups on July 15, 2008, 04:24:03 PM
anybody have any clue? :\
Title: Re: Referrals Mod
Post by: weightman on July 15, 2008, 05:17:37 PM
YodaOfDarkness, I made the edits you posted but it still doesn't select and/or copy the link. Could it be the second edit?:

QuoteAlso change the onclick= for the copy link in Profile.template.php to:
onclick="return referralSelectText();"

I took that to mean replace:

onclick="javascript:copy_referrallink();return false;"

with

onclick="return referralSelectText();"

Thanks very much,

Forum link where you are an approved member:
http://weightliftingexchange.com/index.php?option=com_smf&Itemid=39
Title: Re: Referrals Mod
Post by: Fustrate on July 15, 2008, 09:29:05 PM
weightman: I have no clue why it doesn't work, it's got me puzzled.

toups: I clicked the register link and everything looked fine - did you fix this?
Title: Re: Referrals Mod
Post by: toups on July 16, 2008, 07:46:54 AM
Quote from: YodaOfDarkness on July 15, 2008, 09:29:05 PM
weightman: I have no clue why it doesn't work, it's got me puzzled.

toups: I clicked the register link and everything looked fine - did you fix this?
Yes, still not sure what happened, manually went back and re-installed the mod by manual coding through the parse instructions.. and apparently it worked.. honestly didn't see any changes, I used find to find that should had already been there.. and it was all there.. could have been something to do with my cache on the website and when I re-uploaded the files it finally worked? Dunno, not going to complain.. working now lol
Title: Re: Referrals Mod
Post by: toups on July 17, 2008, 11:49:54 AM
One question for you yoda, not sure if it's possible.. would it be possible to only give money (shop mod) to the referrer for the referral if the referrer makes 1 post first?  I'm getting a lot of people by others referring them to get more credits (shop money) but half of them just come, register, then the member gets their credits so the person doesn't even stay.

Would be a lot better if the person didn't get paid for the referral until that member was active by posting at least once or something.. let me know if possible!
Title: Re: Referrals Mod
Post by: Fustrate on July 18, 2008, 01:39:08 PM
Yes, that's possible. You'll need to add a new row in the members table in your database, with these specifications:
Name: referrals_gave_prize
Type: int
Size: 1
Not Null
Default: 0


and in Subs-Post.php, find:
      updateMemberData($posterOptions['id'], array('posts' => '+'));

add this after it:
      // Referrals Easter Eggs (instead of those in Register.php). Not a guest, posts count here, etc.
      // Give it on the 5th post by default - or change to whatever you'd like.
      $target = 5;
      if($user_info['posts'] == $target){
         loadMemberData($posterOptions['id']);
         $memCon = loadMemberContext($posterOptions['id']);
         
         if($memCon['referrals_gave_prize'] != 1){
            // Reward with Karma
            // updateMemberData($memCon['referred_by'], array('karmaGood' => 'karmaGood + 25'));
   
            // Using SMF Shop?  Give them money
            // updateMemberData($memCon['referred_by'], array('money' => 'money + 100'));

            // And make sure they don't double dip in the future (delete a post, post again)
            updateMemberData($memCon['referred_by'], array('referrals_gave_prize' => '1'));
         }
      }


I haven't tested this, so it might not work. I don't see why it wouldn't, though...
Title: Re: Referrals Mod
Post by: toups on July 18, 2008, 06:59:10 PM
Quote from: YodaOfDarkness on July 18, 2008, 01:39:08 PM
Yes, that's possible. You'll need to add a new row in the members table in your database, with these specifications:
Name: referrals_gave_prize
Type: int
Size: 1
Not Null
Default: 0


and in Subs-Post.php, find:
      updateMemberData($posterOptions['id'], array('posts' => '+'));

add this after it:
      // Referrals Easter Eggs (instead of those in Register.php). Not a guest, posts count here, etc.
      // Give it on the 5th post by default - or change to whatever you'd like.
      $target = 5;
      if($user_info['posts'] == $target){
         loadMemberData($posterOptions['id']);
         $memCon = loadMemberContext($posterOptions['id']);
        
         // Reward with Karma
         // updateMemberData($memCon['referred_by'], array('karmaGood' => 'karmaGood + 25'));
  
         // Using SMF Shop?  Give them money
         // updateMemberData($memCon['referred_by'], array('money' => 'money + 100'));
      }


I haven't tested this, so it might not work. I don't see why it wouldn't, though...

And I would comment out the other code that gives them money currently? I think in register.php or something?

or actually better yet.. would this work using both..:
Leave the current money given for getting a referral.. then bonus money if that referral member posts and becomes active? say 5 for getting a referral then 5 more once they become active?

Not sure if both would work together.. lmk if it would! Thanks!
Title: Re: Referrals Mod
Post by: Fustrate on July 18, 2008, 08:09:31 PM
Yes, it would work. Forgot one thing in the code... I'll update it.

EDIT: My last post is now updated.
Title: Re: Referrals Mod
Post by: toups on July 19, 2008, 08:02:09 AM
Quote from: YodaOfDarkness on July 18, 2008, 08:09:31 PM
Yes, it would work. Forgot one thing in the code... I'll update it.

EDIT: My last post is now updated.

Well I put it in, seems to be working :D Thanks.
Title: Re: Referrals Mod
Post by: toups on July 20, 2008, 09:52:26 AM
Yoda, is it possible to have the referrals on the Memberlist also? Along with the
Status  Username  Email  Website  ICQ  AIM  YIM  MSN  Position  Date Registered  Posts

Have 1 for Referrals on that list with the #?
Title: Re: Referrals Mod
Post by: ArkServer on July 20, 2008, 11:03:16 AM
Quote from: toups on July 20, 2008, 09:52:26 AM
Yoda, is it possible to have the referrals on the Memberlist also? Along with the
Status  Username  Email  Website  ICQ  AIM  YIM  MSN  Position  Date Registered  Posts

Have 1 for Referrals on that list with the #?

This sounds like a good thin to have in this mod, i like your idea.
Title: Re: Referrals Mod
Post by: Fustrate on July 20, 2008, 08:21:45 PM
yes, that is possible.

In Sources/Memberlist.php, replace
'posts' => array(
'label' => $txt[21],
'width' => '115',
'colspan' => '2'
)

with
'posts' => array(
'label' => $txt[21],
'width' => '115',
'colspan' => '2'
),
'referrals_no' => array(
'label' => $txt['referrals_referralsstats'],
'width' => '25'
),

MAKE SURE YOU REPLACE, DON'T JUST ADD THE LAST 4 LINES
and
'posts' => array(
'down' => 'mem.posts DESC',
'up' => 'mem.posts ASC'
)

REPLACE with
'posts' => array(
'down' => 'mem.posts DESC',
'up' => 'mem.posts ASC'
),
'referrals_no' => array(
'down' => 'mem.referrals_no DESC',
'up' => 'mem.referrals_no ASC'
),


In Themes/(your theme)/Memberlist.template.php, find
<td class="windowbg" width="100" align="left">
', $member['posts'] > 0 ? '<img src="' . $settings['images_url'] . '/bar.gif" width="' . $member['post_percent'] . '" height="15" alt="" />' : '', '
</td>

and add this after it:
<td class="windowbg2">', $member['referrals_no'], '</td>
and replace every number 12 with a 13 in that whole function (template_main)
Title: Re: Referrals Mod
Post by: crustybum on July 21, 2008, 03:03:34 PM
Help i am in big doo doo, i installed this mod, now we cat post or anything..just get this

Unknown column 'mem.referrals_no' in 'field list'
File: /home/content/c/r/u/crusty1/html/theforum/Sources/Load.php
Line: 896

Note: It appears that your database may require an upgrade. Your forum's files are currently at version SMF 1.1.5, while your database is at version 1.1.4. The above error might possibly go away if you execute the latest version of upgrade.php.

Anyone :(
Title: Re: Referrals Mod
Post by: Fustrate on July 21, 2008, 05:20:41 PM
can you copy and paste everything around line 896 in Load.php? Specifically after the "db_query(".
Title: Re: Referrals Mod
Post by: crustybum on July 22, 2008, 01:56:03 AM
OK i managed to re install it, although it said there were errors i continued,    It seems ok, but have yet to fully test it on a dummy run (will try later) what i have noticed is that in profile the referral line is duplicated twice.. :-\

Chris
Title: Re: Referrals Mod
Post by: Fustrate on July 22, 2008, 02:11:49 AM
eaiset way to fix that is to go into Profile.template.php and seach for "referrals", and delete any duplicate code blocks.
Title: Re: Referrals Mod
Post by: crustybum on July 22, 2008, 02:18:10 AM
Thanks, i will try that later, Just did a dummy run with "test" member but the referral didnt show up  :-\ when i logged back in...
Title: Re: Referrals Mod
Post by: crustybum on July 22, 2008, 05:26:44 AM
I just cant see where the duplicate code is, what am i looking for?

Chris
Title: Re: Referrals Mod
Post by: Apllicmz on July 22, 2008, 08:35:44 PM
Nice work
Update portuguese and brazilian uft8

<file name="$languagedir/Modifications.portuguese.php" error="skip">
<operation>
<search position="end" />
<add><![CDATA[
$txt['referrals_findreferrer'] = 'Encontre Referrer';
$txt['referrals_who'] = 'Consulta Informações:';
$txt['referrallink_copy'] = '[Copiar]';
$txt['referrals_who_description'] = 'Será que alguém se referiu a este site?';
$txt['referrals_on'] = 'On';
$txt['referrals_referrer_not_found'] = 'O referindo membro não pode ser encontrada. Verifique bem o nome que referenciou. Ou deixe-o em branco.';
$txt['referrals_youwerereferred_by'] = 'Por';
$txt['referrals_referrals'] = 'Referências:';
$txt['referrals_referrals_hits'] = 'Referral Link Hits:';
$txt['referrals_noneyet'] = 'Nenhum ainda!';
$txt['referrals_top5referrers'] = 'Top 5 referencia (Por Referências)';
$txt['referrals_top5referrersbyposts'] = 'Top 5 referencia (por membros referidos postes)';
$txt['referrals_referralsstats'] = 'Refencials';
$txt['referrals_referred_by'] = 'Referidos por:';
$txt['referrals_link'] = 'Referências Link:';
$txt['referrals_membersreferred'] = 'Membros referidos';

]]></add>
</operation>
</file>

<file name="$languagedir/Modifications.brazilian.php" error="skip">
<operation>
<search position="end" />
<add><![CDATA[
$txt['referrals_findreferrer'] = 'Encontre Referrer';
$txt['referrals_who'] = 'Consulta Informações:';
$txt['referrallink_copy'] = '[Copiar]';
$txt['referrals_who_description'] = 'Será que alguém se referiu a este site?';
$txt['referrals_on'] = 'On';
$txt['referrals_referrer_not_found'] = 'O referindo membro não pode ser encontrada. Verifique bem o nome que referenciou. Ou deixe-o em branco.';
$txt['referrals_youwerereferred_by'] = 'Por';
$txt['referrals_referrals'] = 'Referências:';
$txt['referrals_referrals_hits'] = 'Referral Link Hits:';
$txt['referrals_noneyet'] = 'Nenhum ainda!';
$txt['referrals_top5referrers'] = 'Top 5 referencia (Por Referências)';
$txt['referrals_top5referrersbyposts'] = 'Top 5 referencia (por membros referidos postes)';
$txt['referrals_referralsstats'] = 'Refencials';
$txt['referrals_referred_by'] = 'Referidos por:';
$txt['referrals_link'] = 'Referências Link:';
$txt['referrals_membersreferred'] = 'Membros referidos';

]]></add>
</operation>
</file>


<file name="$languagedir/Modifications.portuguese-utf8.php" error="skip">
<operation>
<search position="end" />
<add><![CDATA[
$txt['referrals_findreferrer'] = 'Encontre Referido';
$txt['referrals_who'] = 'Consulta Informa&ccedil;&otilde;es:';
$txt['referrallink_copy'] = '[Copiar]';
$txt['referrals_who_description'] = 'Ser&aacute; que algu&eacute;m se referiu a este site?';
$txt['referrals_on'] = 'On';
$txt['referrals_referrer_not_found'] = 'O referindo membro n&atilde;o pode ser encontrada. Verifique bem o nome que referenciou. Ou deixe-o em branco.';
$txt['referrals_youwerereferred_by'] = 'Por';
$txt['referrals_referrals'] = 'Refer&ecirc;ncias:';
$txt['referrals_referrals_hits'] = 'Referral Link Hits:';
$txt['referrals_noneyet'] = 'Nenhum ainda!';
$txt['referrals_top5referrers'] = 'Top 5 refer&ecirc;ncia (Por Refer&ecirc;ncias)';
$txt['referrals_top5referrersbyposts'] = 'Top 5 refer&ecirc;ncia (por membros referidos postes)';
$txt['referrals_referralsstats'] = 'Refencials';
$txt['referrals_referred_by'] = 'Referidos por:';
$txt['referrals_link'] = 'Refer&ecirc;ncias Link:';
$txt['referrals_membersreferred'] = 'Membros referidos';

]]></add>
</operation>
</file>

<file name="$languagedir/Modifications.brazilian-utf8.php" error="skip">
<operation>
<search position="end" />
<add><![CDATA[
$txt['referrals_findreferrer'] = 'Encontre Referido';
$txt['referrals_who'] = 'Consulta Informa&ccedil;&otilde;es:';
$txt['referrallink_copy'] = '[Copiar]';
$txt['referrals_who_description'] = 'Ser&aacute; que algu&eacute;m se referiu a este site?';
$txt['referrals_on'] = 'On';
$txt['referrals_referrer_not_found'] = 'O referindo membro n&atilde;o pode ser encontrada. Verifique bem o nome que referenciou. Ou deixe-o em branco.';
$txt['referrals_youwerereferred_by'] = 'Por';
$txt['referrals_referrals'] = 'Refer&ecirc;ncias:';
$txt['referrals_referrals_hits'] = 'Referral Link Hits:';
$txt['referrals_noneyet'] = 'Nenhum ainda!';
$txt['referrals_top5referrers'] = 'Top 5 refer&ecirc;ncia (Por Refer&ecirc;ncias)';
$txt['referrals_top5referrersbyposts'] = 'Top 5 refer&ecirc;ncia (por membros referidos postes)';
$txt['referrals_referralsstats'] = 'Refencials';
$txt['referrals_referred_by'] = 'Referidos por:';
$txt['referrals_link'] = 'Refer&ecirc;ncias Link:';
$txt['referrals_membersreferred'] = 'Membros referidos';

]]></add>
</operation>
</file>
Title: Re: Referrals Mod
Post by: crustybum on July 23, 2008, 06:15:05 AM
ok managed to remove the duplicate code, noticed i also have it duplicated in the "stats" section, where do i remove the duplicate code for that one? one more thing is there a solution for the "copy" button yet as it dosnt work.

Chris
Title: Re: Referrals Mod
Post by: Fustrate on July 23, 2008, 11:18:16 AM
That would be in Stats.template.php

Make sure you check all of these if you have duplicates:

Sources:
Profile.php
Stats.php
Themes:
Profile.template.php
Stats.template.php
Display.template.php
XML.template.php

There are a few more, but they're a lot less likely to matter.
Title: Re: Referrals Mod
Post by: Adish - (F.L.A.M.E.R) on July 26, 2008, 11:45:11 AM
is non editable refferel possible as it was in the other refferl mod which was compatilble with 1.1.4 ?

like change this imge:-
(http://img292.imageshack.us/img292/8421/refferlzl8.png)

to:-
(http://img413.imageshack.us/img413/2193/autoreferza2.jpg)

This feature is useful for me as no1 can edit it and many users tell me that they dont get the credits for their refferl as users remove the name from the box.


Thanks for your help...
Title: Re: Referrals Mod
Post by: Fustrate on July 26, 2008, 02:39:42 PM
Untested, but should work:

Find in Register.template.php
echo ' <tr>
<td width="40%"><b>', $txt['referrals_who'] ,'</b>
<div class="smalltext">', $txt['referrals_who_description'], '</div></td>
<td><input name="referredby" id="referredby" type="text" size="30" value="', ( !empty($context['referrals']['referred_by_name']) ? $context['referrals']['referred_by_name'] : '' ) ,'" />
<a href="', $scripturl, '?action=findmember;input=referredby;sesc=', $context['session_id'], '" onclick="document.getElementById(\'referredby\').value=\'\';document.getElementById(\'referredon\').innerHTML =\'&nbsp;\';return reqWin(this.href, 350, 400);"><img src="', $settings['images_url'], '/icons/assist.gif" border="0" alt="', $txt['referrals_findreferrer'] ,'" /> ', $txt['referrals_findreferrer'] ,'</a><br /><span id="referredon" class="smalltext">', ( !empty($context['referrals']['referred_date']) ? $txt['referrals_on'].' '.$context['referrals']['referred_date'] : '' ) ,'</span></td>
</tr>';


Replace with
echo ' <tr>
<td width="40%"><b>', $txt['referrals_who'] ,'</b>
<div class="smalltext">', $txt['referrals_who_description'], '</div></td>
<td>
<input name="referredby" id="referredby" type="text" size="30" value="', (!empty($context['referrals']['referred_by_name']) ? $context['referrals']['referred_by_name'] . '" readonly="readonly" />' : '" />
<a href="' . $scripturl . '?action=findmember;input=referredby;sesc=' . $context['session_id'] . '" onclick="document.getElementById(\'referredby\').value=\'\';document.getElementById(\'referredon\').innerHTML =\'&nbsp;\';return reqWin(this.href, 350, 400);"><img src="' . $settings['images_url'] . '/icons/assist.gif" border="0" alt="' . $txt['referrals_findreferrer'] . '" /> ' . $txt['referrals_findreferrer'] . '</a><br />
<span id="referredon" class="smalltext">' . ( !empty($context['referrals']['referred_date']) ? $txt['referrals_on'] . ' ' . $context['referrals']['referred_date'] : '' )  . '</span>', '
</td>
</tr>';


It's also possible to lock it on the back end, but that's pretty rare that someone will go through the trouble to edit it in the first place with the new code.
Title: Re: Referrals Mod
Post by: Adish - (F.L.A.M.E.R) on July 26, 2008, 03:05:11 PM
Ok thanks.. I am testing it and I will let you know.. :D
Title: Re: Referrals Mod
Post by: Adish - (F.L.A.M.E.R) on July 26, 2008, 03:09:44 PM
oo wait... 1st this main error...

parseArchive(): No package-info.xml in this mod! Is it corrupted?

What is the solution for this..???

Thanks..
Title: Re: Referrals Mod
Post by: Adish - (F.L.A.M.E.R) on July 26, 2008, 03:18:01 PM
hey is it possible to have a page in admin panel where it gives the list of all the refferes ?? Just referrers and the numbers.. and it can be edited up ..??
Title: Re: Referrals Mod
Post by: Adish - (F.L.A.M.E.R) on July 26, 2008, 03:21:56 PM
The code might have worked but as i click on register this is what it appears.. I guess some code error...

Template Parse Error!
It seems something has gone sour on the forum with the template system. This problem should only be temporary, so please come back later and try again. If you continue to see this message, please contact the administrator.

You can also try refreshing this page.
Title: Re: Referrals Mod
Post by: Fustrate on July 26, 2008, 04:57:48 PM
Replace what I told you to put in before with
if(!empty($context['referrals']['referred_by_name'])
echo '
<tr>
<td width="40%"><b>', $txt['referrals_who'] ,'</b>
<div class="smalltext">', $txt['referrals_who_description'], '</div></td>
<td>
<input name="referredby" id="referredby" type="text" size="30" value="', $context['referrals']['referred_by_name'], '" readonly="readonly" /><br />
<span id="referredon" class="smalltext">', $txt['referrals_on'], ' ', $context['referrals']['referred_date'], '</span>
</td>
</tr>';

else
echo '
<tr>
<td width="40%"><b>', $txt['referrals_who'] ,'</b>
<div class="smalltext">', $txt['referrals_who_description'], '</div></td>
<td>
<input name="referredby" id="referredby" type="text" size="30" value="" />
<a href="', $scripturl, '?action=findmember;input=referredby;sesc=', $context['session_id'], '" onclick="document.getElementById(\'referredby\').value=\'\';document.getElementById(\'referredon\').innerHTML =\'&nbsp;\';return reqWin(this.href, 350, 400);"><img src="', $settings['images_url'], '/icons/assist.gif" border="0" alt="', $txt['referrals_findreferrer'] ,'" /> ', $txt['referrals_findreferrer'], '</a>
</td>
</tr>';


Title: Re: Referrals Mod
Post by: Adish - (F.L.A.M.E.R) on July 26, 2008, 05:03:44 PM
Still the same error...
Title: Re: Referrals Mod
Post by: Adish - (F.L.A.M.E.R) on July 26, 2008, 05:09:24 PM
Hmm just a prob I noticed...
check out the attachment...


Acorrding to the referel link it should show up nothing but it shows that user by default..

Dunno how it happened but just happened...
Title: Re: Referrals Mod
Post by: Fustrate on July 26, 2008, 05:16:40 PM
Can you attach your Register.template.php to a post so I can see the whole thing?
Title: Re: Referrals Mod
Post by: Adish - (F.L.A.M.E.R) on July 26, 2008, 05:37:00 PM
yea sure...
Title: Re: Referrals Mod
Post by: Fustrate on July 26, 2008, 06:22:42 PM
err, you never did the last thing I said

attached is the fixed file
Title: Re: Referrals Mod
Post by: Adish - (F.L.A.M.E.R) on July 26, 2008, 06:28:53 PM
still the same thing.. :( it says the same again and again....  :'( :'( :'( :'(
Title: Re: Referrals Mod
Post by: Fustrate on July 26, 2008, 06:49:23 PM
Forgot a )

attached
Title: Re: Referrals Mod
Post by: Adish - (F.L.A.M.E.R) on July 26, 2008, 07:01:22 PM
ok finally worked bu the problem in the image still remains.. :(:(
Title: Re: Referrals Mod
Post by: Fustrate on July 26, 2008, 07:04:45 PM
it's saved in a cookie after you go to the link at all. just trust that it works as it should.
Title: Re: Referrals Mod
Post by: Adish - (F.L.A.M.E.R) on July 26, 2008, 07:09:26 PM
oo ..phew... thats kwl now... that was gr8 work and help from you... thanks a million...!! hope i dont get anything else :D
Title: Re: Referrals Mod
Post by: Adish - (F.L.A.M.E.R) on July 26, 2008, 07:12:18 PM
and yep it had saved a cookie... worked well.. i cleared cookies and got it all right..  ;) ;) ;)
Title: Re: Referrals Mod
Post by: fext on July 30, 2008, 01:43:22 PM
How would
Quote from: YodaOfDarkness on July 26, 2008, 07:04:45 PM
it's saved in a cookie after you go to the link at all. just trust that it works as it should.

Hi Yoda,

Great mod!

I have a couple of questions regarding the mod.

1. I tried to apply the register.template file and uploaded to default theme folder but my DarkBreak theme does not reflect the change - do i need to alter something in the custom theme?

2. Earlier in this thread there was a reference with how to show referrals on member list - i tried the edits and instead of it showing referrals (there are none at the moment) the Referrals part took the values from the Topics values but only showed the graph of the topics e.g.

BEFORE mod:

Topics:
345        | GRAPH HERE

AFTER MOD:

Referrals | Topics
345        | GRAPH HERE

3. I have an issue with finding members when testing the 'find member' link - would there be a way for it to have a dropdown and show a dynamic list of all the members or is there another way of doing this - i have a guest page view mod so guest can only see the site 10 times before it tells you to login or register - problem being when a popup is show while searching for members they count as page views - now if your searching thru say 50 members and only 5 display per page in the popup... well you get what i am saying :P

Would there be an easier way for new registrants to get  member details?

On the site when sending a message when you type in a member name it suto fills the text field with suggested member names and narrows the name down the more characters you enter - why does this not work on the referrals mod?

4. Would there be a way for me to input into member profiles referrals they made prior to the mod as i was keeping track via the 'Custom Profile Fields' mod so i still have a list of who got what members on the site - could i somehow input these details into the referrals mod?

Sorry for so many questions but those are some issues i am having - otherwise a fantastic mod :)
Title: Re: Referrals Mod
Post by: roguehosting on August 02, 2008, 12:48:14 PM
I installed refferals mod 2.0.1 on smf 1.1.5 and last step was install.php.It says it may not run,which showed to be true.
So instead that it is offered query tables,but how do i add that?I tryed using phpmyadmin sql query function but it reports errors.How do i import those tables?Now beacuse of that profile report missing mysql query.
Title: Re: Referrals Mod
Post by: Fustrate on August 04, 2008, 08:47:00 PM
Sorry it took so long to reply... life kinda got in the way =\

roguehosting, execute these queries in phpMyAdmin:
ALTER TABLE smf_members ADD COLUMN referrals_no mediumint(8) NOT NULL default '0'
ALTER TABLE smf_members ADD COLUMN referrals_hits mediumint(10) NOT NULL default '0'
ALTER TABLE smf_members ADD COLUMN referred_by mediumint(8) NOT NULL default '0'
ALTER TABLE smf_members ADD COLUMN referred_on int(10) NOT NULL default '0'
ALTER TABLE smf_log_activity ADD COLUMN referrals smallint(5) NOT NULL default '0'

(one line per query, five total - replace smf_ with your $db_prefix if you changed from the default)

Youngie:

1. If your DarkBreak theme has it's own Register.template.php then you'll have to manually do the edits to that theme too.

2. I'm guessing you forgot to change the numbers that were mentioned at the end of the post.

3. It would probably be easiest if you asked the Page View mod author if there is a way to exclude certain pages from being counted... I'll go look through the old thread for this mod though, because I did in fact write some code that would put in a dropdown box. Best to check with that mod author though ;)

The auto-fill on this site is part of SMF 2.0 and is already implemented in the 2.0 version of this mod... but I don't believe it's in the 1.1.x line.

4. To add those in, you'd have to do it manually through queries in phpMyAdmin. I'll look into writing a script that you can use to make it faster, though...
Title: Re: Referrals Mod
Post by: Kylezz on August 05, 2008, 12:00:36 AM
Can somebody post pictures, and what version of smf is this for? 1.1.5?
Title: Re: Referrals Mod
Post by: Fustrate on August 05, 2008, 12:55:22 AM
Pictures are on the right side of this page:
http://custom.simplemachines.org/mods/index.php?mod=1114

and it's currently for 1.1.4/5 and the 2.0 version is done, but will be released shortly after 2.0 Beta 4
Title: Re: Referrals Mod
Post by: fext on August 05, 2008, 02:10:06 PM
Quote from: YodaOfDarkness on August 04, 2008, 08:47:00 PM
Sorry it took so long to reply... life kinda got in the way =\

Youngie:

1. If your DarkBreak theme has it's own Register.template.php then you'll have to manually do the edits to that theme too.

2. I'm guessing you forgot to change the numbers that were mentioned at the end of the post.

3. It would probably be easiest if you asked the Page View mod author if there is a way to exclude certain pages from being counted... I'll go look through the old thread for this mod though, because I did in fact write some code that would put in a dropdown box. Best to check with that mod author though ;)

The auto-fill on this site is part of SMF 2.0 and is already implemented in the 2.0 version of this mod... but I don't believe it's in the 1.1.x line.

4. To add those in, you'd have to do it manually through queries in phpMyAdmin. I'll look into writing a script that you can use to make it faster, though...

Hi Yoda,

Thanks for the fast respones :)

1. There is no Register.Template.php for my theme
2. I did not notice those numbers BUT there was no 'Memberlist.template.php' for my theme - i made edits to the one for the default theme and it seemed to work ok - it did not have numbers for the function within though.
3. The guy that made the page views mod does not accept PMs regarding his MODs - i will have to ask in the support thread - i have enquired about the PM issue - i would really like to be able to style the Popup windows myself but i would prefer another way of displaying help other than popups :P

I would love it if you could shed some light on the dropdown idea though :)

4. I was thinking the same but not via queries - i was going to do it manually lol - bit laborious.

Thanks for your help bro.
Title: Re: Referrals Mod
Post by: Fustrate on August 05, 2008, 04:12:08 PM
http://www.simplemachines.org/community/index.php?topic=174132.msg1136448#msg1136448

I'm not sure how well it fits in with the current mod... might need a bit of adjusting.
Title: Re: Referrals Mod
Post by: God Of Mana on August 05, 2008, 04:18:14 PM
Great mod!
It would be even better if there was some shop integration. (ie) Cash gain from refferals.
Title: Re: Referrals Mod
Post by: Eliana Tamerin on August 05, 2008, 04:28:38 PM
There is, search this topic.
Title: Re: Referrals Mod
Post by: roguehosting on August 05, 2008, 05:51:57 PM
Weird,i dont see any changes on forum.I probaly skipped templates files or maybe i forgot to upload it.Atleast i hope.
Another question:does smf have portal mod?I ask beacuse i would like to when someone click on refferal link to lead him to portal page and tracks his cookie so i wonder is that possible.
Title: Re: Referrals Mod
Post by: Eliana Tamerin on August 05, 2008, 06:14:59 PM
While that's not the purpose of this thread, I'll point you towards some:

Simpleportal (http://custom.simplemachines.org/mods/index.php?mod=1104)
TinyPortal (http://tinyportal.net)
Sphinx (http://dynscs.com/)
MKPortal (http://www.mkportal.it/)
And then various bridges for CMSes such as Drupal, Mambo and Xoops.

If you are still curious about some of these, I suggest you start your own topic about them in Portals, Bridges and Integrations (http://www.simplemachines.org/community/index.php?board=33.0), or ask in the SimplePortal support topic/TinyPortal website.
Title: Re: Referrals Mod
Post by: fext on August 05, 2008, 06:37:05 PM
Quote from: YodaOfDarkness on August 05, 2008, 04:12:08 PM
http://www.simplemachines.org/community/index.php?topic=174132.msg1136448#msg1136448

I'm not sure how well it fits in with the current mod... might need a bit of adjusting.

The code refs those point to are nowhere to be found in my Register.Template.php in my default theme?

As i said before there is no Register.Template.php for my DarkBreak theme

Sorry bro for hassling you :( but do you think the coode could get updated for current version of default theme?

Meybe if i provide the files that require the edits or you post up changes to share with others that may need them? I personally htink a dropdwon would be much better for the mod :)
Title: Re: Referrals Mod
Post by: The Saviour on August 10, 2008, 10:16:36 AM
When clicking the link to my Forum Stats, I receive the following error:

Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in .../Themes/default/Stats.template.php on line 243

Here is line 243:

243:       if (!empty($modSettings['hitStats']))

Attached is the Stats.template.php file converted to a .txt file so any edits you supply can easily be found by me.

Any help is greatly appreciated...
Title: Re: Referrals Mod
Post by: The Saviour on August 10, 2008, 10:44:42 AM
Update...

Nevermind...fixed it, myself.
Title: Re: Referrals Mod
Post by: dwd2000 on August 10, 2008, 02:30:31 PM
Quote from: F.L.A.M.E.R on July 26, 2008, 03:18:01 PM
hey is it possible to have a page in admin panel where it gives the list of all the referrers ?? Just referrers and the numbers.. and it can be edited up ..??

Just the admin list page would be nice.
Title: Re: Referrals Mod
Post by: Adish - (F.L.A.M.E.R) on August 13, 2008, 09:25:53 AM
I am now using 2.0 beta version with this mod, Well, you know its a bit advanced and kind of different. But it got me like 20 test failed as it checks for each and every edit...

just have a look:-

1.  Execute Modification  ./index.php  Test successful
1. Add After ./index.php Test successful
* 2. Execute Modification ./Sources/Load.php Test failed
1. Add After ./Sources/Load.php Test failed
2. Add After ./Sources/Load.php Test failed
3. Add After ./Sources/Load.php Test failed
4. Add After ./Sources/Load.php Test failed
* 3. Execute Modification ./Sources/Register.php Test failed
1. Replace ./Sources/Register.php Test failed
* 4. Execute Modification ./Sources/Stats.php Test failed
1. Add After ./Sources/Stats.php Test failed
2. Add After ./Sources/Stats.php Test failed
3. Add After ./Sources/Stats.php Test failed
4. Add After ./Sources/Stats.php Test failed
5. Add After ./Sources/Stats.php Test failed
* 5. Execute Modification ./Sources/Profile.php Test failed
1. Add Before ./Sources/Profile.php Test failed
* 6. Execute Modification ./Themes/default/Register.template.php Test successful
1. Add Before ./Themes/default/Register.template.php Test successful
* 7. Execute Modification ./Themes/default/Display.template.php Test failed
1. Add After ./Themes/default/Display.template.php Test failed
* 8. Execute Modification ./Themes/default/Xml.template.php Test successful
1. Replace ./Themes/default/Xml.template.php Test successful
* 9. Execute Modification ./Themes/default/Stats.template.php Test failed
1. Add After ./Themes/default/Stats.template.php Test successful
2. Replace ./Themes/default/Stats.template.php Test failed
3. Replace ./Themes/default/Stats.template.php Test failed
4. Add After ./Themes/default/Stats.template.php Test successful
5. Add After ./Themes/default/Stats.template.php Test failed
6. Replace ./Themes/default/Stats.template.php Test failed
* 10. Execute Modification ./Themes/default/Profile.template.php Test failed
1. Add Before ./Themes/default/Profile.template.php Test failed
* 11. Execute Modification ./Themes/default/languages/Modifications.english.php Test successful
1. Add Before ./Themes/default/languages/Modifications.english.php Test successful
12. Execute Modification ./Themes/default/languages/Modifications.english-utf8.php Skipping file
13. Execute Modification ./Themes/default/languages/Modifications.english_british.php Skipping file
14. Execute Modification ./Themes/default/languages/Modifications.english_british-utf8.php Skipping file
15. Extract File ./Sources/Referrals.php
16. Extract File ./referrals_copytoclipboard.swf
17. Execute Code install.php



I think you might have got the idea....
Title: Re: Referrals Mod
Post by: Fustrate on August 13, 2008, 02:23:16 PM
Are you using beta 3.1? I just now tried on a clean install, and there were no errors.
Title: Re: Referrals Mod
Post by: Adish - (F.L.A.M.E.R) on August 13, 2008, 03:44:47 PM
yep.. thats the latest version being installed on the latest version of the forum... dunno what is kind of wrong here...
Title: Re: Referrals Mod
Post by: Adish - (F.L.A.M.E.R) on August 20, 2008, 01:34:36 PM
error in forum error log in 1.1.5

Apply Filter: Only show the errors with the same message
8: Undefined index: referred_bylink
File: /home/stalkers/public_html/Themes/default/languages/Post.english.php (summary sub template - eval?)
Line: 235

How shall i solve it ?

Thank you.
Title: Re: Referrals Mod - 2.0 Version Released!
Post by: Fustrate on August 22, 2008, 06:42:42 PM
Err, this mod doesn't touch Post.english.php - does that error come up when you view a profile though?

and I've released the 2.0 versions... referrals2_0.tar.gz is for Beta 3.1 and below, referrals2_0-beta4.tar.gz is for Beta 4
Title: Re: Referrals Mod - 2.0 Version Released!
Post by: Adish - (F.L.A.M.E.R) on August 22, 2008, 07:34:09 PM
smf beta 4 isnt out yet... well whatever... how shall i solve this....?
Title: Re: Referrals Mod - 2.0 Version Released!
Post by: Fustrate on August 22, 2008, 07:55:04 PM
Charter Members have beta 4 :D

I need to know what page is causing that error - is it your profile? Viewing a post? Posting? Every page?
Title: Re: Referrals Mod - 2.0 Version Released!
Post by: Adish - (F.L.A.M.E.R) on August 23, 2008, 08:49:01 AM
yep.. thats on the profile page... and well i changed my profile to ultimate profile and now the refferels have gone missing from there... any idea how can i fix both the problems ?
Title: Re: Referrals Mod - 2.0 Version Released!
Post by: Sudhakar Arjunan on August 25, 2008, 12:45:45 AM
Hi i have refer mod earlier version.

Give me some idea to inbuilt the code to show referral code and referred members in the ultimate profile mod.

Or if earlier had a discussion about it, kindly take me to the page.
Title: Re: Referrals Mod - 2.0 Version Released!
Post by: Fustrate on August 25, 2008, 12:55:29 AM
Quote from: F.L.A.M.E.R on August 23, 2008, 08:49:01 AM
yep.. thats on the profile page... and well i changed my profile to ultimate profile and now the refferels have gone missing from there... any idea how can i fix both the problems ?
Quote from: asudhakar on August 25, 2008, 12:45:45 AM
Hi i have refer mod earlier version.

Give me some idea to inbuilt the code to show referral code and referred members in the ultimate profile mod.

Or if earlier had a discussion about it, kindly take me to the page.

You'd need to ask the owner of the ultimate profile mod. I've never worked with that mod before, sorry.

If you need to know what variables to use, I can provide those...
Title: Re: Referrals Mod - 2.0 Version Released!
Post by: Sudhakar Arjunan on August 25, 2008, 01:39:51 AM
Yes you are right.

The Ultimate mod is no longer supported i hope.

You give me the variables i have to use to show in the profile page.

So that using the codes you mention like one in parser . I could try embedding in the ultimate profile as seen here.

http://forum.itacumens.com/index.php?action=profile;u=1.

Thanks in Advance Author.
Title: Re: Referrals Mod - 2.0 Version Released!
Post by: weightman on August 25, 2008, 01:57:50 AM
The ultimate profile mod was a disaster for me- very buggy with no real support.
Title: Re: Referrals Mod - 2.0 Version Released!
Post by: Fustrate on August 25, 2008, 02:03:56 AM
I have no idea what exactly you need from this, but this is the code that displays referrals:
        // Adds the referral/referred user information to the profile summary
        echo '<tr><td colspan="2"><hr size="1" width="100%" class="hrcolor" /></td></tr>   
                <tr>
                    <td><b>'.$txt['referrals_referrals'].'</b></td>
                    <td>'.$context['member']['referrals_no'] .'  ';
       
        // Show in dropdown usersname of those referred
        if(!empty($context['member']['referredmembers']))
        {
       
            echo '<select onchange="location=options[selectedIndex].value;">
                <option>'.$txt['referrals_membersreferred'].'</option>';
            foreach($context['member']['referredmembers'] as $x)
                echo $x;

            // Tidy up
            unset($x);
            echo '</select>';
        }
        echo'        </td>
                </tr>
                <tr>
                    <td><b>'.$txt['referrals_referrals_hits'].'</b></td>
                    <td>'.$context['member']['referrals_hits'].'</td>
                </tr>';
        if (!empty($context['member']['referred_by']))
        {
            echo'            <tr>
                    <td><b>'.$txt['referrals_referred_by'].'</b></td>
                    <td>'.$context['member']['referred_bylink'].' '.$txt['referrals_on'].' '. date("jS M Y",$context['member']['referred_on']).'
                    </td>
                </tr>';
       
        }
       
        echo '<tr>
                    <td colspan="2"><b>'.$txt['referrals_link'].'</b></td>
            </tr>
            <tr><td colspan="2" style="text-align:center;">
                <script language="JavaScript" type="text/javascript"><!--//
                    function copy_referrallink()
                    {
                        // Create element (if does not exist)
                        if(!document.getElementById(\'clipboard\'))
                        {
                            var copydiv = document.createElement(\'div\');
                            copydiv.id = \'clipboard\';
                            document.body.appendChild(copydiv);
                        }
                       
                        // Clear element
                        document.getElementById(\'clipboard\').innerHTML = \'\';
                        // Copy Referral Link
                        document.getElementById(\'clipboard\').innerHTML = \'<embed src="referrals_copytoclipboard.swf" FlashVars="clipboard=\'+encodeURIComponent(document.getElementById(\'referrallink\').value)+\'" width="0" height="0" type="application/x-shockwave-flash"></embed>\';
                    }
                //--></script>
            <input type="text" id="referrallink" value="'.$scripturl.'?referredby='. $context['member']['id'] .'" readonly="true" style="width:250px;" />
            <a href="javascript:void(0);" rel="nofollow" onclick="javascript:copy_referrallink();return false;" title="'.$txt['referrallink_copy'].'">'.$txt['referrallink_copy'].'</a>
            </td>
        </tr>';   
Title: Re: Referrals Mod - 2.0 Version Released!
Post by: Sudhakar Arjunan on August 25, 2008, 12:36:58 PM
Hi Thanks for the Code.

Just check this page. http://forum.itacumens.com/index.php?action=profile;u=1

I got some error using the code. I have used this code.

Give me some edit to it.


// The Referral Mod - Author - YodaOfDarkness

echo '
<table border="0" cellpadding="4" cellspacing="1" class="bordercolor" width="100%" id="blog">
<tr>
<td class="titlebg" height="26" align="center">Referrals</td>
</tr>
<tr>
<td class="windowbg">';

// Adds the referral/referred user information to the profile summary
echo '<tr><td colspan="2"><hr size="1" width="100%" class="hrcolor" /></td></tr>
<tr>
<td><b>'.$txt['referrals_referrals'].'</b></td>
<td>'.$context['member']['referrals_no'] .'  ';

// Show in dropdown usersname of those referred
if(!empty($context['member']['referredmembers']))
{

echo '<select onchange="location=options[selectedIndex].value;">
<option>'.$txt['referrals_membersreferred'].'</option>';
foreach($context['member']['referredmembers'] as $x)
echo $x;

// Tidy up
unset($x);
echo '</select>';
}
echo' </td>
</tr>
<tr>
<td><b>'.$txt['referrals_referrals_hits'].'</b></td>
<td>'.$context['member']['referrals_hits'].'</td>
</tr>';
if (!empty($context['member']['referred_by']))
{
echo' <tr>
<td><b>'.$txt['referrals_referred_by'].'</b></td>
<td>'.$context['member']['referred_bylink'].' '.$txt['referrals_on'].' '. date("jS M Y",$context['member']['referred_on']).'
</td>
</tr>';

}

echo '<tr>
<td colspan="2"><b>'.$txt['referrals_link'].'</b></td>
</tr>
<tr><td colspan="2" style="text-align:center;">
<script language="JavaScript" type="text/javascript"><!--//
function copy_referrallink()
{
// Create element (if does not exist)
if(!document.getElementById(\'clipboard\'))
{
var copydiv = document.createElement(\'div\');
copydiv.id = \'clipboard\';
document.body.appendChild(copydiv);
}

// Clear element
document.getElementById(\'clipboard\').innerHTML = \'\';
// Copy Referral Link
document.getElementById(\'clipboard\').innerHTML = \'<embed src="referrals_copytoclipboard.swf" FlashVars="clipboard=\'+encodeURIComponent(document.getElementById(\'referrallink\').value)+\'" width="0" height="0" type="application/x-shockwave-flash"></embed>\';
}
//--></script>
<input type="text" id="referrallink" value="'.$scripturl.'?referredby='. $context['member']['id'] .'" readonly="true" style="width:250px;" />
<a href="javascript:void(0);" rel="nofollow" onclick="javascript:copy_referrallink();return false;" title="'.$txt['referrallink_copy'].'">'.$txt['referrallink_copy'].'</a>
</td>
</tr>';

echo '
</td>
</tr>
</table>
<br />';
Title: Re: Referrals Mod - 2.0 Version Released!
Post by: Fustrate on August 25, 2008, 01:05:19 PM
      // The Referral Mod - Author - YodaOfDarkness
           
      echo '
         <table border="0" cellpadding="4" cellspacing="1" class="bordercolor" width="100%" id="blog">
         <tr>
            <td class="titlebg" colspan="2" height="26" align="center">Referrals</td>
         </tr>';
               
      // Adds the referral/referred user information to the profile summary
      echo '<tr><td colspan="2"><hr size="1" width="100%" class="hrcolor" /></td></tr>   
            <tr>
               <td><b>'.$txt['referrals_referrals'].'</b></td>
               <td>'.$context['member']['referrals_no'] .'  ';
     
      // Show in dropdown usersname of those referred
      if(!empty($context['member']['referredmembers']))
      {
     
         echo '<select onchange="location=options[selectedIndex].value;">
            <option>'.$txt['referrals_membersreferred'].'</option>';
         foreach($context['member']['referredmembers'] as $x)
            echo $x;

         // Tidy up
         unset($x);
         echo '</select>';
      }
      echo'      </td>
            </tr>
            <tr>
               <td><b>'.$txt['referrals_referrals_hits'].'</b></td>
               <td>'.$context['member']['referrals_hits'].'</td>
            </tr>';
      if (!empty($context['member']['referred_by']))
      {
         echo'         <tr>
               <td><b>'.$txt['referrals_referred_by'].'</b></td>
               <td>'.$context['member']['referred_bylink'].' '.$txt['referrals_on'].' '. date("jS M Y",$context['member']['referred_on']).'
               </td>
            </tr>';
     
      }
     
      echo '<tr>
               <td colspan="2"><b>'.$txt['referrals_link'].'</b></td>
         </tr>
         <tr><td colspan="2" style="text-align:center;">
            <script language="JavaScript" type="text/javascript"><!--//
               function copy_referrallink()
               {
                  // Create element (if does not exist)
                  if(!document.getElementById(\'clipboard\'))
                  {
                     var copydiv = document.createElement(\'div\');
                     copydiv.id = \'clipboard\';
                     document.body.appendChild(copydiv);
                  }
                 
                  // Clear element
                  document.getElementById(\'clipboard\').innerHTML = \'\';
                  // Copy Referral Link
                  document.getElementById(\'clipboard\').innerHTML = \'<embed src="referrals_copytoclipboard.swf" FlashVars="clipboard=\'+encodeURIComponent(document.getElementById(\'referrallink\').value)+\'" width="0" height="0" type="application/x-shockwave-flash"></embed>\';
               }
            //--></script>
         <input type="text" id="referrallink" value="'.$scripturl.'?referredby='. $context['member']['id'] .'" readonly="true" style="width:250px;" />
         <a href="javascript:void(0);" rel="nofollow" onclick="javascript:copy_referrallink();return false;" title="'.$txt['referrallink_copy'].'">'.$txt['referrallink_copy'].'</a>
         </td>
      </tr>';   
     
      echo '
               </td>
            </tr>
         </table>
         <br />';

Title: Re: Referrals Mod - 2.0 Version Released!
Post by: Sudhakar Arjunan on August 25, 2008, 01:53:10 PM
Got Seated Perfectly.

Thanks a lot Author for this kind help.

Even thank a lot for the excellent mod too.
Title: Re: Referrals Mod - 2.0 Version Released!
Post by: stanwww on August 26, 2008, 04:54:33 PM
I try the mod in v.1.1.5. But, the mod does not work. Nothing changes in the profile area. Anyone may help?

Stanley
Title: Re: Referrals Mod - 2.0 Version Released!
Post by: Fustrate on August 26, 2008, 07:19:15 PM
Are you using a custom theme? You'll need to make the theme edits in your custom theme's Profile.template.php following the guidelines on the page found at...

http://custom.simplemachines.org/mods/index.php?mod=1114
Look under "Download This Mod"
Select the first radio button on the right side, next to "Referrals_Mod_v2.0.1.zip (15KB)"
Select "1.1.5" from the dropdown list underneath those options
And on the following page, search for "Profile.template.php"

Damn, they really need to let us link directly to the instructions page...
Title: Re: Referrals Mod - 2.0 Version Released!
Post by: edi67 on August 30, 2008, 11:53:23 AM
excellent
Title: Re: Referrals Mod - 2.0 Version Released!
Post by: ke4obt on August 31, 2008, 02:21:05 AM
maybe I missed it, but when it comes to showing the URL and the copy button, I want it so that only the Admin and the user who's profile it's on will see that - not another user.
My forum is basically closed - you don't see diddly squat unless you log in, so the referral for a "new" user isn't going to be used FROM the site. I'd like it so that the registered user can see/copy his own referral URL to paste it in his/her e-mail, blog, etc. But also, so that the referrals tally is still showing in their profile. I don't want Johnny being able to see Jimmy's referral URL, much less copy it.
Does this make sense? Is it possible? Please tell me it's possible AND not too difficult to do!! :D
Thanks in advance,
Flip
Title: Re: Referrals Mod - 2.0 Version Released!
Post by: Aeoni on September 04, 2008, 10:09:19 AM
I'm using this mod whilst using the Ultimate Profile mod.

The code has been added to UltimateProfile.template.php to make the referrer information show, but the background for the newly added referrer area is a different colour to the rest of the ultimate profile.

Any suggestions?

(php file attached)
Title: Re: Referrals Mod - 2.0 Version Released!
Post by: Fustrate on September 04, 2008, 10:20:09 AM
attached
Title: Re: Referrals Mod - 2.0 Version Released!
Post by: Aeoni on September 04, 2008, 10:26:01 AM
Flawless. Correct colour, and the individual elemts, like pictures, media etc now line up correctly.


Thanks :)
Title: Re: Referrals Mod - 2.0 Version Released!
Post by: Fustrate on September 04, 2008, 03:48:49 PM
Sorry for the one-word post, had to rush off to class (and now I have to rush off to work :D)

Glad to hear it worked
Title: Re: Referrals Mod - 2.0 Version Released!
Post by: CorpRebel on September 06, 2008, 09:23:19 PM
Probably a silly question but ...

I just installed this Referrals Mod v2.0 thru the SMF pkg installer feature. Everything seemed to install okay. It (the referral link) shows up in my test profile.

Is there an admin type control panel for this mod in the SMF admin area so I can see who does the most referrals? I'm not having any luck finding one in my admin area. I need to see everyone's referral stats or this mod becomes unusable to me.

Thanx!

Rick aka CorpRebel  8)

P.S. Just want to say thanx to you guys and gals that put out all these mods. They're VERY helpful! Alot more organized here.
Title: Re: Referrals Mod - 2.0 Version Released!
Post by: Fustrate on September 07, 2008, 10:58:34 AM
So you want a list, 50 to a page, of your members ordered by how many referrals they have? I've been meaning to add that into the code... might as well, seeing how it's gotten a few requests.

For now, there are two little stat boxes added in your forum statistics page, which list the top fives.
Title: Re: Referrals Mod - 2.0 Version Released!
Post by: CorpRebel on September 07, 2008, 01:08:52 PM
Quote from: YodaOfDarkness on September 07, 2008, 10:58:34 AM
So you want a list, 50 to a page, of your members ordered by how many referrals they have? I've been meaning to add that into the code... might as well, seeing how it's gotten a few requests.

That would be super KOOL for what I'm gonna be using it for. It helps the admin keep track of users that bring visitors to the site. Thx!

QuoteFor now, there are two little stat boxes added in your forum statistics page, which list the top fives.

Being new to the SMF software, I guess I need to look for this. heh heh


Thanx Again!

Rick aka CorpRebel  8)
Title: Re: Referrals Mod - 2.0 Version Released!
Post by: chadon on September 07, 2008, 03:25:21 PM
It seems there is a problem with the package files in the download section. I can't see the preview images and can't download the zip file.
Sorry Simple machines must be down. No mod or theme can be downloaded.
Title: Re: Referrals Mod - 2.0 Version Released!
Post by: enigma87 on September 08, 2008, 03:04:08 AM
I would like to make a page with banners that have the referral links automaticlally in the html code i give with each banner. So can u tell me where i need to get the referral link for each user from?
Title: Re: Referrals Mod - 2.0 Version Released!
Post by: Fustrate on September 08, 2008, 03:14:24 AM
Either go to their profile (it's in the front page of it) or if you have their user ID, the link is http://www.yoursite.com/forum/index.php?referredby=123 where 123 is their user ID.
Title: Re: Referrals Mod - 2.0 Version Released!
Post by: enigma87 on September 08, 2008, 03:23:20 AM
Oops I know how to see another user's referral link, I wanna code a page such that, when i visit the banners page, the banner html code shows my referral link, When another person does that, he sees his own referral link... So i need the variable that gives "referredby=$something" where $something is the user's ID. I tried to look thru profile.php and i could not find where the code for printing out the referral link is....
Title: Re: Referrals Mod - 2.0 Version Released!
Post by: Fustrate on September 08, 2008, 03:56:19 AM
Quote from: enigma87 on September 08, 2008, 03:23:20 AM
Oops I know how to see another user's referral link, I wanna code a page such that, when i visit the banners page, the banner html code shows my referral link, When another person does that, he sees his own referral link... So i need the variable that gives "referredby=$something" where $something is the user's ID. I tried to look thru profile.php and i could not find where the code for printing out the referral link is....
$user_info['id'] or $context['user']['id'] should work if you're inside SMF

If not, just use
include_once('./SSI.php');
beforehand
Title: Re: Referrals Mod - 2.0 Version Released!
Post by: enigma87 on September 08, 2008, 04:01:08 AM
Thanks! Thats what i was lookin for!
Title: Re: Referrals Mod - 2.0 Version Released!
Post by: Kalimas on September 09, 2008, 12:11:57 AM
Love the mod, but I have a quick question.

I had been using an older version quite a few months ago. I recently did a fresh install of the forums and transferred the database over. The rest of the forum, however, is entirely fresh. I'd like to keep my old referral data (which should still be in the database).

If I were to go about installing this newer version of the mod, would it pull the info from the old tables? If not, how exactly would I go about doing that?

Thanks in advance.
Title: Re: Referrals Mod - 2.0 Version Released!
Post by: Fustrate on September 09, 2008, 12:27:04 AM
You should back up your database first, but the mod should work with your old data. If not, just restore the database and I can help a little more :)
Title: Re: Referrals Mod - 2.0 Version Released!
Post by: LHT on September 09, 2008, 03:58:13 AM
"Sorry, but this modification does not appear to be compatible with the selected version."

when i choose 1.1.5 or 1.1.6. do you have the manual edit for that? the package won't install over the package manager
Title: Re: Referrals Mod - 2.0 Version Released!
Post by: fiver on September 09, 2008, 12:04:30 PM
Hi Yoda,

I'm still using Referral Mod 1.4 and updated the forum to SMF116. Should I uninstall the old mod before installing your latest?

Also, I have each referrer receiving 50 karma points for each new member referred. Is it possible also to add the figures in "Top 5 Referrers (By Referred Members Posts)" and add that into the Karma?

Thanks.
Title: Re: Referrals Mod - 2.0 Version Released!
Post by: Fustrate on September 09, 2008, 12:35:23 PM
Quote from: fivearts on September 09, 2008, 12:04:30 PM
Hi Yoda,

I'm still using Referral Mod 1.4 and updated the forum to SMF116. Should I uninstall the old mod before installing your latest?

Also, I have each referrer receiving 50 karma points for each new member referred. Is it possible also to add the figures in "Top 5 Referrers (By Referred Members Posts)" and add that into the Karma?

Thanks.

I'd recommend backing up your database first, and then uninstalling/upgrading/reinstalling. If your referrals data somehow goes missing, it's just a simple matter of restoring the database... though I'm not sure if any database changes were made between 1.1.4 and 1.1.6 - don't think so.

I don't quite understand your request on the second part though :(
Title: Re: Referrals Mod - 2.0 Version Released!
Post by: fiver on September 09, 2008, 12:46:46 PM
I think it was Karlbenson who helped with some coding so that whenever someone registered, the referer gets 50 karma point.
http://www.simplemachines.org/community/index.php?topic=184291.msg1227263#msg1227263 (http://www.simplemachines.org/community/index.php?topic=184291.msg1227263#msg1227263)

As there are also figures on the stats that shows "by referred members posts", what I hope to do is - each time the referred member post, the referer gets 1 karma point, in addition to that 50 karma points.
Title: Re: Referrals Mod - 2.0 Version Released!
Post by: Fustrate on September 09, 2008, 12:57:38 PM
I'll look into that tonight, I've done it with one of my other mods but I have to finish this essay that's due in an hour ;)
Title: Re: Referrals Mod - 2.0 Version Released!
Post by: fiver on September 09, 2008, 01:18:18 PM
Thanks Yoda,

Just found the right post with the code that I've been using since Jan.

http://www.simplemachines.org/community/index.php?topic=215612.msg1374328#msg1374328 (http://www.simplemachines.org/community/index.php?topic=215612.msg1374328#msg1374328)
Title: Re: Referrals Mod - 2.0 Version Released!
Post by: CorpRebel on September 09, 2008, 02:44:10 PM
Quote from: YodaOfDarkness on September 09, 2008, 12:57:38 PM... but I have to finish this essay that's due in an hour ;)

Good Luck with that essay! I hated those damn things back in my 'school' days.  ;D

Rick aka CorpRebel  8)
Title: Re: Referrals Mod - 2.0 Version Released!
Post by: Fustrate on September 09, 2008, 03:42:38 PM
Just got back from class... forgot the damn thing on my printer, but luckily she's accepting it by email ;) off to work now, hopefully I won't forget my timesheet on the printer too...
Title: Re: Referrals Mod - 2.0 Version Released!
Post by: EdwinK on September 10, 2008, 01:49:24 PM
Can someone tell me what the latest version of this mod is? Downloaded and installde 2.1.1, but package manager tells me it's outdated. Is there a newer version voor 1.1.6?
Title: Re: Referrals Mod - 2.0 Version Released!
Post by: CorpRebel on September 10, 2008, 02:23:40 PM
Quote from: EdwinK on September 10, 2008, 01:49:24 PM
Can someone tell me what the latest version of this mod is? Downloaded and installde 2.1.1, but package manager tells me it's outdated. Is there a newer version voor 1.1.6?

On the referrals mod page it still shows it as v2.0.1. And the only download link I see for the mod (for SMF1.1.x)  is  referrals_1-1.tar.gz (10KB). It's what I have installed for SMF v1.1.6. Working fine for me. And I installed it thru the package installer.

He's mentioned that he's working a few more features in for the next update, though. Looking forward to those.  ;)


Rick aka CorpRebel  8)
Title: Re: Referrals Mod - 2.0 Version Released!
Post by: Wasabite on September 12, 2008, 09:48:42 AM
I don't know for you, but I would use a more subtle word than "referredby" because I know that some people don't like to feel that they are used by other people to get something. What I mean is that it's maybe too obvious that it's a referral link XD
Title: Re: Referrals Mod - 2.0 Version Released!
Post by: Sabre™ on September 12, 2008, 05:32:48 PM
If you dont like the text, you can always go into your language file and change it to whatever you like :)
There are companies that produce a similar product, and they also use the  "referred by"  text.
To each their own.. ;)
Title: Re: Referrals Mod - 2.0 Version Released!
Post by: Fustrate on September 12, 2008, 05:36:29 PM
You'd actually need to change it in index.php, Referrals.php, and Register.php
Title: Re: Referrals Mod - 2.0 Version Released!
Post by: Sabre™ on September 12, 2008, 05:39:44 PM
lol  Yeah, thats what I meant :P  ahahaa
I didnt wanna have to go and look where, so mentioning you can change it, was enough.

Atleast you filled in the gaps lol
Title: Re: Referrals Mod - 2.0 Version Released!
Post by: Fustrate on September 12, 2008, 05:46:37 PM
:P I'm not even sure I got it all right... you also have to change it in the profile to show the correct link

I'd leave it how it is... anything else is just deceiving.
Title: Re: Referrals Mod - 2.0 Version Released!
Post by: Sabre™ on September 12, 2008, 05:51:22 PM
Yea mate, I dunno about deceiving by changing the description, all depends on the change I guess.. but I agree to just leave it.
If it aint broke, dont fix it. :)
Or else, you might have the other saying to express..
If it aint broke, I can fix it till it is!
lol

The only thing I changed, was to move the users link to the profile area, where only they could see it.

I know...  this "hiding" it has come up often lol, but if it is to make a user feel comfortable, then thats what I needed to do ;)
Title: Re: Referrals Mod - 2.0 Version Released!
Post by: Fustrate on September 12, 2008, 05:56:24 PM
Can someone please explain to me what's so bad about being able to see another person's referral link? Anyone with a brain can figure it out...
Title: Re: Referrals Mod - 2.0 Version Released!
Post by: Sabre™ on September 12, 2008, 06:13:01 PM
I guess its to do with them feeling they have a privacy thing, control of their details that is revealed to the public.
Not everyone knows how to find this, or do that, so wont understand.
Basically if I have more than a handful of people concerned about about something, if it is a reasonable request, I find it my duty to ease their minds :)

No matter how often you mention that it is their ID number, and how to find it for each user... to people new to online activities, and some veterans, this doesnt help to make them feel secure/at ease.
With the web being soo large, and hearing of peoples accounts/details etc being hi jacked, feeling secure at the site you frequent is a tiny request.

I guess, you show people only what you want them to see.

But who knows.. lol
Everyone is different, so you expect different reactions to certain things.
Tis the way of the force young skywalker lol ;)
Title: Re: Referrals Mod - 2.0 Version Released!
Post by: Fustrate on September 12, 2008, 06:49:01 PM
When I found out your referral link, what am I going to do with it... get you more referrals?

oh and for anyone reading this... it's already in Profile.template.php, all you have to do is remove the // at the beginning of the line before it.
Title: Re: Referrals Mod - 2.0 Version Released!
Post by: Sabre™ on September 12, 2008, 06:58:28 PM
Quote from: Sabre™ on September 12, 2008, 06:13:01 PM
Not everyone knows how to find this, or do that, so wont understand.
......... I find it my duty to ease their minds

Dont get up tight mate :)
Some people like red wine, and some white. ;)
It doesnt matter does it?  Noones gonna lose sleep over it lol
Title: Re: Referrals Mod - 2.0 Version Released!
Post by: Fustrate on September 12, 2008, 08:57:49 PM
/me gets irritated :D
Title: Re: Referrals Mod - 2.0 Version Released!
Post by: Darkness_ on September 14, 2008, 04:42:19 PM
@YodaOfDarkness: can't their be something done to let see in the profile something like,  invited by:
Title: Re: Referrals Mod - 2.0 Version Released!
Post by: Fustrate on September 14, 2008, 04:44:22 PM
Yes, it's very possible. I'm working on another mod right now, though, so it'll have to wait a few days.
Title: Re: Referrals Mod - 2.0 Version Released!
Post by: Darkness_ on September 14, 2008, 06:35:22 PM
Okey, thanks for your fast reaction.
Your mods are very good.

Keep on the good work
Title: Re: Referrals Mod - 2.0 Version Released!
Post by: Darkness_ on September 15, 2008, 03:44:15 PM
A little refer again :$

Could it be possible to make a page.
Where we can see, who invited how many.
And where we can see the dates of registration off users that have been invited
Title: Re: Referrals Mod - 2.0 Version Released!
Post by: Fustrate on September 15, 2008, 05:36:25 PM
Next version, guys. next version. I've got seven mods I'm working on, and since this one works as it should, it's near the back of the line.
Title: Re: Referrals Mod - 2.0 Version Released!
Post by: _Anthony_ on September 15, 2008, 10:21:33 PM
Uhm, is there any way i can reset this every month?
I want to hold contests...
Title: Re: Referrals Mod - 2.0 Version Released!
Post by: Fustrate on September 15, 2008, 11:13:45 PM
Sure, in phpMyAdmin run this query:
UPDATE smf_members
SET referrals_no = '', referrals_hits = '', referred_by = '', referred_on = ''
WHERE 1=1

If that fails, remove the _s and try again.



Title: Re: Referrals Mod - 2.0 Version Released!
Post by: General_Naga on September 19, 2008, 03:42:25 AM
Quote from: MrMoney on September 15, 2008, 10:21:33 PM
Uhm, is there any way i can reset this every month?
I want to hold contests...

Snap, an idea for the next version perhaps is a monthly stats table?

Back to the current version though I'm having problems with my stats page. The mod installed beautifully but when I look at my Forum History the Page View stats seem to have jumped column in the expanded view. How can I fix this?
Thanks for any help + a great mod
Title: Re: Referrals Mod - 2.0 Version Released!
Post by: Darkness_ on September 23, 2008, 07:15:35 AM
YodaofDarkness when could you help me out for a statistics page?
Title: Re: Referrals Mod - 2.0 Version Released!
Post by: Fustrate on September 23, 2008, 11:46:02 AM
I'm still quite busy with other things, so all of the extra things for this mod will have to wait.

As for using a name to refer (like you asked in that other thread) it's do-able, I'll try to post it later today.
Title: Re: Referrals Mod - 2.0 Version Released!
Post by: Darkness_ on September 23, 2008, 01:40:35 PM
okey Thank you, but uhmm I've installed this mod already sow the statistics that I now have won't change would they?
Title: Re: Referrals Mod - 2.0 Version Released!
Post by: General_Naga on September 23, 2008, 02:38:26 PM
Quote from: YodaOfDarkness on September 23, 2008, 11:46:02 AM
I'm still quite busy with other things, so all of the extra things for this mod will have to wait.

Any thoughts on solving the stats page bug though?
Title: Re: Referrals Mod - 2.0 Version Released!
Post by: Fustrate on September 23, 2008, 07:26:28 PM
picture please :)
Title: Re: Referrals Mod - 2.0 Version Released!
Post by: General_Naga on September 24, 2008, 05:38:47 AM
Appoligies, I should have posted one the first time :)

I'm running a custom theme but I have checked and the same thing happens on the standard theme.

(http://i57.photobucket.com/albums/g215/cadellin/eg1.jpg) (http://i57.photobucket.com/albums/g215/cadellin/eg1.jpg)
Title: Re: Referrals Mod - 2.0 Version Released!
Post by: Fustrate on September 24, 2008, 01:54:53 PM
Attach your Stats.template.php file
Title: Re: Referrals Mod - 2.0 Version Released!
Post by: General_Naga on September 24, 2008, 04:01:38 PM
Here you go.

Thanks for looking into it.
Title: Re: Referrals Mod - 2.0 Version Released!
Post by: Fustrate on September 26, 2008, 02:57:56 AM
Has anyone been referred yet? I need to also take a look at Stats.php to see if anything is wrong in there, the template file looks fine as it is. I'm just worried that there isn't a total for each year... and that would get set in the source file.
Title: Re: Referrals Mod - 2.0 Version Released!
Post by: General_Naga on September 26, 2008, 03:28:03 AM
 :D No-one has been referred yet, as I wanted to get it fixed before pointing it out to the membership. I'll make a test referrer though to see what happens.

Stats.php Attached.

Thanks once again for looking into this Yoda
Title: Re: Referrals Mod - 2.0 Version Released!
Post by: Fustrate on September 26, 2008, 04:25:58 AM
Try this new one, see if it works
Title: Re: Referrals Mod - 2.0 Version Released!
Post by: General_Naga on September 26, 2008, 02:29:57 PM
No joy I'm afraid. Using that Stats.php results in the stats page being a blank white page.
Title: Re: Referrals Mod - 2.0 Version Released!
Post by: Fustrate on September 26, 2008, 02:34:48 PM
Any errors in the error log? I'll check again to make sure I didn't miss anything, but I have 20 more minutes here at work and then I'll be able to get home ;)
Title: Re: Referrals Mod - 2.0 Version Released!
Post by: General_Naga on September 26, 2008, 06:14:54 PM
Short answer yes there are there's 32901 this week. I really need to work out what
Quote/Themes/default/GenericMenu.template.php (body_below sub template - eval?)
means!

EDIT:

I owe you an apology Yoda. I just tried your file for a second time after clearing the log and it worked beautifully! I have no idea what I did last time. Must have had a corrupted upload to the FTP or something.

Thanks for all the help you've given.
Title: Re: Referrals Mod - 2.0 Version Released!
Post by: Fustrate on September 26, 2008, 06:16:55 PM
No problem, thanks for finding that error!
Title: Re: Referrals Mod - 2.0 Version Released!
Post by: Darkness_ on September 29, 2008, 03:06:18 PM
Yoda will it take much time, when could you help out?
Title: Re: Referrals Mod - 2.0 Version Released!
Post by: humantaperecorder on October 06, 2008, 03:32:32 AM
Hi there YodaOfDarkness

I'm sorry for this elementary question because, from the comments in this thread, I can see you're busy (on other mods).

My question:

I can't seem to install the latest version of the Referrals Mod. I'm a relative newbie to SMF and not a coder so I think I might be making a really simple mistake. I'll explain what I've done:

I went to the mod page and downloaded the referrals_2-0.tar.gz file.

I then went into my Package Manager and selected Download Packages and browsed to where it was on my machine. I just uploaded it as-is (i.e. as a "tar.gz" file)... Is that correct? Should I have unpacked it first?

The Package Manager told me it had uploaded. I clicked on Apply Mod...

...and got the following error:

The package you are trying to download or install is either corrupt or not compatible with this version of SMF.

I just updated my SMF to 1.1.6

I tried downloading the file again, deleting the mod, and attempting to reinstall in the same fashion. Same error.

Not sure what I'm doing wrong.

Can anyone help this not very techy noob?   :(

------------------------------

So, I went back and downloaded the referrals_1-1.tar.gz file, deleted the other one and installed this one.

It worked, although it showed me the list in the jpg attached. I can see that some of the files it has skipped are language files, but I dont' know if it should have just not given me any message at all for the three at the bottom... ???

Anyway, I guess it works, but why wouldn't the latest version install? I've put this on a test installation site and I'd obviously like the most up-to-date version if I can for my real site. If not, no problem, i'll use the v1-1.

Any thoughts?

------------------------------------

Also, I set up a few dummy users and clicked on their referral links but it doesn't seem to have added the Stats function

As is shown here (http://custom.simplemachines.org/mods/index.php?action=download;mod=1114;id=50546;image)

Or the referrer link under the avatar:

Like in this pic (http://custom.simplemachines.org/mods/index.php?action=download;mod=1114;id=50548;image)

It did, however, show this one:

Referrer's name and date of referral (http://custom.simplemachines.org/mods/index.php?action=download;mod=1114;id=50542;image)


It's also not showing up the text, numbers or dropdown menu in the bottom half of this pic:

Stats for each person (http://custom.simplemachines.org/mods/index.php?action=download;mod=1114;id=50544;image).

It's just showing the link to copy. But not the little [copy] link.

-----------------------------

Wow... a much longer post than i'd anticipated and way too many questions, methinks!

But if anyone has a few moments and can help out, that would be terrific.

I'd really, really appreciate it!

Thanks!  :D
Title: Re: Referrals Mod - 2.0 Version Released!
Post by: Fustrate on October 06, 2008, 03:42:24 AM
Are you using a custom theme, or one other than the default? 99.9% of the time that's the problem :)

http://custom.simplemachines.org/mods/index.php?action=parse;mod=1114;attach=66634;smf_version=1.1.6
You can manually do the theme edits shown on that page for the following files:
Display.template.php
Profile.template.php
Stats.template.php
which shouldn't take too much time, if you pay close attention. The files that were skipped during installation don't matter, and the last three items always work as they should.
Title: Re: Referrals Mod - 2.0 Version Released!
Post by: humantaperecorder on October 06, 2008, 03:54:11 AM
Dude, do you ever sleep?  :P I mean I only posted that, like, 10 minutes ago!

Thanks for the link. I went there and had a skim... I'm not afraid to mod templates. I just don't know what I should be doing in this case or why.

In answer to your question re: Themes... yes, I'm using the Alak theme.

Question: Should I do the following?

1. Make a copy of these three files as they currently are

Display.template.php
Profile.template.php
Stats.template.php

(Just FTP them back to my desktop from where they are. Actually, come to think of it... where are they? Where will I find these files in the first place?)


2.  Follow the instructions regarding "Find" and "Add" for each of those files (on the page you linked to above).

Can I just do this using the FileManager in my cPanel?


3.  Save and hope it works.  ;D


Or is it more complicated?
Title: Re: Referrals Mod - 2.0 Version Released!
Post by: Fustrate on October 06, 2008, 04:00:49 AM
Nope, sleep is boring.

Anyways, the files will be in something like /Themes/alak/ which will contain those three files (and more).

Due to the way mod packages are parsed in the 1.1.x series, theme changes only get made to the default theme and nothing else. It's been improved to change all themes in 2.0, and even then it doesn't always work.

Oh, and 1-1 is the latest version for SMF 1.1.x, the 2-0 file is the newer version for the SMF 2.0 betas :)
Title: Re: Referrals Mod - 2.0 Version Released!
Post by: humantaperecorder on October 06, 2008, 04:18:47 AM
Thanks very much. I wasn't sure if I should be modding the Alak templates or the Default ones. Thanks for clearing that up.

Re: sleep... LOL! After my first few years at university I came up with the motto "Sleep is over-rated!" which has kept burning the midnight oil ever since. It's like university never stopped.  ;D

Thanks again. I'll see how I go.

Also, that thing about 1-1 and 2-0 is not clear. Perhaps you should make a note of that on the Mod's download page because it defaults you to download the 2-0 version, which I guess everyone (like me) just assumes is the most up-to-date version.

Best,
HTR
Title: Re: Referrals Mod - 2.0 Version Released!
Post by: Fustrate on October 06, 2008, 04:20:11 AM
Ya, I'll probably just rename the files to referrals_smf1-1.tar.gz and referrals_smf2-0.tar.gz, I'd guess that that would be easier to catch.

Mkay, I'm gonna go be bored... g'night!
Title: Re: Referrals Mod - 2.0 Version Released!
Post by: humantaperecorder on October 06, 2008, 04:29:03 AM
Heya, YodaOfDarkness

I looked in the Alak theme's folder and could only find the

Display.template.php

Neither of the other two.

Profile.template.php
Stats.template.php
Title: Re: Referrals Mod - 2.0 Version Released!
Post by: Fustrate on October 06, 2008, 04:37:56 AM
I admit it. I'm still awake.

Okay, make the changes to Display.template.php, and then make sure those three files did get edited in the /Themes/default/ folder.
Title: Re: Referrals Mod - 2.0 Version Released!
Post by: humantaperecorder on October 06, 2008, 04:44:37 AM
Heya!  ;)

In the default theme folder, there are "two" copies of the three files:

Display.template.php
Display.template.php~
Profile.template.php
Profile.template.php~
Stats.template.php
Stats.template.php~

Does this mean they've been modified? (Coz I have no idea what that tilda represents!)

Cheers.

P.S. Still hunting down that line of code in the Display.template.php file in the Alak theme's directory... slippery little buggers, eh?
Title: Re: Referrals Mod - 2.0 Version Released!
Post by: humantaperecorder on October 06, 2008, 04:53:13 AM
Okay, got it!


// Show how many posts they have made.
                                 echo '
                                                    <li class="posts">', $txt[26], ': ', $message['member']['posts'], '</li>';



Should I change it so that it reads like this:


// Show how many posts they have made.
                                 echo '
                                                    <li class="posts">', $txt[26], ': ', $message['member']['posts'], '<br />
', $txt['referrals_referrals'].' '.$message['member']['referrals_no'].'<br /></li>';


Not sure about those line breaks in there, to be honest...
The first one isn't in the Alak template (but it appears in the page the modification appears on (above)... and so I'm not sure whether I should put the second one in, then, either...


Cheers!
Title: Re: Referrals Mod - 2.0 Version Released!
Post by: Fustrate on October 06, 2008, 10:24:36 AM
well, try it out and see if it works. If not, just remove some linebreaks.
Title: Re: Referrals Mod - 2.0 Version Released!
Post by: djrem on October 07, 2008, 11:54:31 PM
Many thanks for your mod, however in firefox, i cant get the drop down list of members that one has reffered to display.

my site is:
Www.voguefm.co.uk/forum/index.php

i have ultimate profile but when i disable, it is not showing on my default profile either, just as you see there.
Title: Re: Referrals Mod - 2.0 Version Released!
Post by: Fustrate on October 08, 2008, 12:08:51 AM
Can you show me exactly what code you're using? And does it work in any other browser?
Title: Re: Referrals Mod - 2.0 Version Released!
Post by: djrem on October 09, 2008, 08:31:26 AM
which files would you like me to upload?

ultimateprofiletemplate.php
profiletemplate.php
and anything from the Sources?

Many thanks in advanced for your response
Title: Re: Referrals Mod - 2.0 Version Released!
Post by: Fustrate on October 09, 2008, 10:31:15 AM
Both of them, if neither is working :)
Title: Re: Referrals Mod - 2.0 Version Released!
Post by: djrem on October 09, 2008, 01:39:04 PM
Here is a profile:
http://voguefm.co.uk/forum/profile/MrRem

I have them attached :)

Title: Re: Referrals Mod - 2.0 Version Released!
Post by: Hoodie on October 12, 2008, 06:55:32 AM
Not exactly sure if this has been discussed..  When someone clicks the name of their referrer in the search box, can we get the pop-up window to close?  I noticed if you click a name and then search again and click another name, two names will show up on the registration page..
Title: Re: Referrals Mod - 2.0 Version Released!
Post by: Fustrate on October 12, 2008, 12:49:13 PM
CCCC: Not that I am aware of, that would have to be a change in the way SMF itself works.

djrem: is there an UltimateProfile.php file in /Sources/ ? Sorry for the late response on this...
Title: Re: Referrals Mod - 2.0 Version Released!
Post by: humantaperecorder on October 16, 2008, 08:52:09 AM
Hi there YodaOfDarkness/Spookness (Halloween, huh?)

Hope you're well.

Still can't get it to display correctly.

I just took a look at the Display.template.php file in the Alak theme's folder and modified it as per the instructions.

I modified both with and without line-breaks; still nothing. No change.

I also looked at default/Display.template.php as well as the other two in the default folder and they all appear to have been modified okay with the installation of the package.

Any ideas?   ???

------------------------------------------

Also, I still don't know why I have the following duplication of files. What is the difference between the ones with the tilda and the ones without? Could this be causing the problem?


Display.template.php
Display.template.php~
Profile.template.php
Profile.template.php~
Stats.template.php
Stats.template.php~

Thanks very much. You're help is definitely appreciated.

HTR
Title: Re: Referrals Mod - 2.0 Version Released!
Post by: Fustrate on October 16, 2008, 10:19:19 PM
The ones with tildes (~) at the end are backups from before you installed your most recent modification. It a mod edits Display.php, Load.php, and index.php, it will create copies of those files before it actually modifies them so that if something goes wrong, you can restore them.

Anyways try taking out the linebreaks and using two seperate <li></li>s, to force them to go to seperate lines.
Title: Re: Referrals Mod - 2.0 Version Released!
Post by: Sudhakar Arjunan on October 17, 2008, 09:02:25 AM
Hi Yoda of spookness,

I have two forum on using 1.1.6 - forum.sitename.com

Another one using 2.0.4 - discuss.sitename.com

I have installed new 2.0.4 compactable referral mod in discuss 2.0.4 forum.

I have copied the tables in 1.1.6 and updated those tables in discuss 2.0.4 forum.

Now it shows all the users perfectly and everywhere it shows perfectly.

But when guest like to register with some referral, they get a error msg saying - Invalid argument is sent.

And without referral the registration went smooth.
Title: Re: Referrals Mod - 2.0 Version Released!
Post by: Fustrate on October 17, 2008, 07:31:53 PM
did you update the column names in the 2.0 table? If I recall correctly, 1.1.6 uses columnName whereas 2.0 uses column_name. Check to make sure they're all in that format (word_word not wordWord)
Title: Re: Referrals Mod - 2.0 Version Released!
Post by: mackay12 on October 17, 2008, 09:12:42 PM
im getting the message this package is not valid or corrupt.
Title: Re: Referrals Mod - 2.0 Version Released!
Post by: Fustrate on October 18, 2008, 02:40:20 AM
Are you using the correct mod package (1.1.x vs. 2.0)?
Title: Re: Referrals Mod - 2.0 Version Released!
Post by: Sudhakar Arjunan on October 18, 2008, 03:28:18 PM
Quote from: YodaOfSpookness on October 17, 2008, 07:31:53 PM
did you update the column names in the 2.0 table? If I recall correctly, 1.1.6 uses columnName whereas 2.0 uses column_name. Check to make sure they're all in that format (word_word not wordWord)

Hi YodaOfSpookness,

I have checked and the smf_members table shows all the referrals options field name as well as all were perfectly displayed in my phpmyadmin.

In my forum also, it shows referral link and all such, Problem only in registration feed.

But one thing, even though it shows, invalid argument supplied.

But the user is created. without any referral under it.
Title: Re: Referrals Mod - 2.0 Version Released!
Post by: Fustrate on October 18, 2008, 03:30:31 PM
What's the exact error on the invalid argument? Does it tell you what column, and in what file (it'll be Register.php)
Title: Re: Referrals Mod - 2.0 Version Released!
Post by: Sudhakar Arjunan on October 18, 2008, 03:36:23 PM
An Error Has Occurred!
Wrong value type sent to the database. Integer expected. 


It shows error.

But when i search the board page, it shows the user is registered, and found there is no referral under it.
Title: Re: Referrals Mod - 2.0 Version Released!
Post by: Sudhakar Arjunan on October 18, 2008, 04:00:01 PM
Apply Filter: Only show the errors of this type  Type of error: Critical
Apply Filter: Only show the error messages of this URL http://discuss.itacumens.com/index.php?action=register2
Apply Filter: Only show the errors with the same message
Wrong value type sent to the database. Integer expected.
Function: updateMemberData
Apply Filter: Only show the errors from this file
File: /home/itacumen/public_html/discuss/Sources/Subs.php
Line: 553
Title: Re: Referrals Mod - 2.0 Version Released!
Post by: Fustrate on October 18, 2008, 05:07:19 PM
It's not actually an error in Subs.php - it's in Register.php.

attach your Register.php file to post and I'll take a look.
Title: Re: Referrals Mod - 2.0 Version Released!
Post by: Sudhakar Arjunan on October 18, 2008, 05:31:45 PM
Yes Thank you YodaOfSpookness.

Here goes my register php file.
Title: Re: Referrals Mod - 2.0 Version Released!
Post by: General_Naga on October 19, 2008, 06:10:51 AM
Quote from: asudhakar on October 18, 2008, 04:00:01 PM
Wrong value type sent to the database. Integer expected.

I'm getting this error... none of the others though

btw. nice new name Yoda :)
Title: Re: Referrals Mod - 2.0 Version Released!
Post by: Fustrate on October 19, 2008, 03:26:01 PM
It's a long shot, but try this:

In Subs.php, find
'notify_announcements', 'notify_send_body', 'notify_regularity', 'notify_types',
and replace with
'notify_announcements', 'notify_send_body', 'notify_regularity', 'notify_types', 'referrals_no',

Title: Re: Referrals Mod - 2.0 Version Released!
Post by: glennk on October 19, 2008, 03:53:38 PM
Sorry - posted in wrong topic
Title: Re: Referrals Mod - 2.0 Version Released!
Post by: Sudhakar Arjunan on October 20, 2008, 10:03:59 AM
Quote from: YodaOfSpookness on October 19, 2008, 03:26:01 PM
It's a long shot, but try this:

In Subs.php, find
'notify_announcements', 'notify_send_body', 'notify_regularity', 'notify_types',
and replace with
'notify_announcements', 'notify_send_body', 'notify_regularity', 'notify_types', 'referrals_no',



Hi am not sure whether you have updates this edit for me.

I have checked inside my subs.php file and found the edit already made.

I have posted register.php - do help me as soon.
Title: Re: Referrals Mod - 2.0 Version Released!
Post by: Sudhakar Arjunan on October 21, 2008, 01:47:21 AM
Hi YodaOfSpookness,

I have attached my register file as you have requested.

Kindly help me i have got loads of errors by using it.

http://www.simplemachines.org/community/index.php?topic=226191.msg1757890#msg1757890
Title: Re: Referrals Mod - 2.0 Version Released!
Post by: Fustrate on October 21, 2008, 02:49:42 AM
Time to check your database. There's no error in that Register.php file, I checked all of the pertinent code.

Can you go into your members table (usually smf_members) and tell me if there's a column named referrals_no? Is it an int (TINYINT, MEDIUMINT, INT, BIGINT, etc.)?
Title: Re: Referrals Mod - 2.0 Version Released!
Post by: Sudhakar Arjunan on October 21, 2008, 12:54:36 PM
Quote from: YodaOfSpookness on October 21, 2008, 02:49:42 AM
Time to check your database. There's no error in that Register.php file, I checked all of the pertinent code.

Can you go into your members table (usually smf_members) and tell me if there's a column named referrals_no? Is it an int (TINYINT, MEDIUMINT, INT, BIGINT, etc.)?

Thanks for taking your time to help me .

Oldiesmann helped to transfer from smf 1.1.6 to smf 2.0.4.

So i have two tables named smf203_members and smf_members.

But i understand is all the value in register and retrival is done only on smf_members.

So here is the fields under smf_members field.

referrals_no     mediumint(8)              No     0           Browse distinct values        Change        Drop        Primary        Unique        Index       Fulltext
referrals_hits    mediumint(10)          No    0       Browse distinct values    Change    Drop    Primary    Unique    Index    Fulltext
referred_by    mediumint(8)          No    0       Browse distinct values    Change    Drop    Primary    Unique    Index    Fulltext
referred_on    int(10)          No    0
Title: Re: Referrals Mod - 2.0 Version Released!
Post by: Sudhakar Arjunan on October 21, 2008, 02:30:27 PM
I have to mention this error also at stats page, One time stats visits generated - 26 errors like num post, link and referrals etc.

http://discuss.itacumens.com/index.php?action=stats
Apply Filter: Only show the errors with the same message
8: Undefined index: referrals
Apply Filter: Only show the errors from this file
File: /home/itacumen/public_html/discuss/Themes/default/Stats.template.php (main sub template - eval?)
Line: 291
Title: Re: Referrals Mod - 2.0 Version Released!
Post by: djrem on October 22, 2008, 12:00:57 AM
Quote from: YodaOfSpookness on October 12, 2008, 12:49:13 PM
CCCC: Not that I am aware of, that would have to be a change in the way SMF itself works.

djrem: is there an UltimateProfile.php file in /Sources/ ? Sorry for the late response on this...

there is no ultimate profile file in sources.

my site is here:
http://www.voguefm.co.uk/forum/profile/MrRem

as you can see, other mods are working fine :S
Title: Re: Referrals Mod - 2.0 Version Released!
Post by: Sudhakar Arjunan on October 23, 2008, 12:58:37 PM
HI YodaOfSpookness,

Here goes the information you have requested. I find on my smf members table.

referrals_no     mediumint(              No     0           Browse distinct values        Change        Drop        Primary        Unique        Index       Fulltext
referrals_hits    mediumint(10)          No    0       Browse distinct values    Change    Drop    Primary    Unique    Index    Fulltext
referred_by    mediumint(          No    0       Browse distinct values    Change    Drop    Primary    Unique    Index    Fulltext
referred_on    int(10)          No    0
Title: Re: Referrals Mod - 2.0 Version Released!
Post by: Senkusha on October 23, 2008, 03:00:45 PM
Hi, I attempted to install the 2.1.1 version but I don't see the  "Apply Mod" link for SMF 2.0 b4?

Any ideas?

Thanks!
Title: Re: Referrals Mod - 2.0 Version Released!
Post by: Sudhakar Arjunan on October 25, 2008, 01:12:22 AM
In addition to the above stated problem.

Whenever i visit my stats page,

8: Undefined index: referrals
Apply Filter: Only show the errors from this file
File: /home/itacumen/public_html/discuss/Themes/default/Stats.template.php (main sub template - eval?)
Line: 291

Kinldy help me to figure it out.
Title: Re: Referrals Mod - 2.0 Version Released!
Post by: Fustrate on October 25, 2008, 02:53:27 PM
Did the changes get made to /Sources/Stats.php? Open the file and search for 'referrals'.

Senkusha: This mod hasn't been fully upgraded for SMF 2.0 Beta 4 yet. I'll have time to do some actual work on this next weekend, after I finish two essays and a term paper this week.
Title: Re: Referrals Mod - 2.0 Version Released!
Post by: Sudhakar Arjunan on October 25, 2008, 03:51:53 PM
Quote from: YodaOfSpookness on October 25, 2008, 02:53:27 PM
Did the changes get made to /Sources/Stats.php? Open the file and search for 'referrals'.

Hi YodaOfSpookness,

Am not sure , whether you have asked me to check some thing inside the stats.php.

But i have compared with the parser and found that all the codes were perfectly matched inside the stats.php file. No errors in the modification applied.

Hope the error will be there only in database, because i have copied all the tables from old smf 1.1.6 to new smf 2.0.4 with the help of Oldiesmann.
Title: Re: Referrals Mod - 2.0 Version Released!
Post by: psynx on October 27, 2008, 01:35:51 AM
i need help here pls. i got an error after installing it in my smf 1.1.6

is it fine to continue installing this even though i got test failed on ./Themes/default/Display.template.php?

(http://d.imagehost.org/0997/error.jpg)
Title: Re: Referrals Mod - 2.0 Version Released!
Post by: Fustrate on October 27, 2008, 01:55:28 AM
Yes it is, you'll just need to make that edit by hand.

Open Display.template.php, find:
// Show how many posts they have made.
echo '
', $txt[26], ': ', $message['member']['posts'], '<br />

or something that resembles that (search for $message['member']['posts'] in particular) and add this AFTER it:

', $txt['referrals_referrals'].' '.$message['member']['referrals_no'].'<br />
Title: Re: Referrals Mod - 2.0 Version Released!
Post by: Sudhakar Arjunan on October 27, 2008, 02:24:30 AM
Wating for an update YodaOfSpookness

http://www.simplemachines.org/community/index.php?topic=226191.msg1768113#msg1768113
Title: Re: Referrals Mod - 2.0 Version Released!
Post by: psynx on October 27, 2008, 06:27:04 AM
Quote from: YodaOfSpookness on October 27, 2008, 01:55:28 AM
Yes it is, you'll just need to make that edit by hand.

Open Display.template.php, find:
// Show how many posts they have made.
echo '
', $txt[26], ': ', $message['member']['posts'], '<br />

or something that resembles that (search for $message['member']['posts'] in particular) and add this AFTER it:

', $txt['referrals_referrals'].' '.$message['member']['referrals_no'].'<br />


Oops! im using Dilber MC theme and it doesn't have a display.template.ph file.

how do i fix this now?
Title: Re: Referrals Mod - 2.0 Version Released!
Post by: Fustrate on October 27, 2008, 03:15:06 PM
You just don't need to do that edit then... but you'll need to make sure it's done in /Themes/default/Display.template.php, which was where it was giving you the error.

asudhakar: I can't find a simple solution right now, you're going to have to wait for the Beta 4-compatible version, which should come some time next week.
Title: Re: Referrals Mod - 2.0 Version Released!
Post by: Sabre™ on October 27, 2008, 03:49:10 PM
Hi Yoda,
could you look at the code entered into my Ultimateprofile.template when you have time please mate?

I keep getting this error
8: Undefined index: referrals_no
File: /Themes/default/languages/Who.english.php (summary2 sub template - eval?)
Line: 252


After running a query, I found the correct line at 252 within my ultimate profile template.
8: Undefined index: referrals_no
File: /Themes/default/UltimateProfile.template.php (summary2 sub template - eval?)
Line: 252


Ive tried and cannot work it out.
Thank you for any assistance mate :)

Title: Re: Referrals Mod - 2.0 Version Released!
Post by: psynx on October 28, 2008, 01:46:33 AM
Quote from: YodaOfSpookness on October 27, 2008, 03:15:06 PM
You just don't need to do that edit then... but you'll need to make sure it's done in /Themes/default/Display.template.php, which was where it was giving you the error.

i see. thanks.
Title: Re: Referrals Mod - 2.0 Version Released!
Post by: Fustrate on October 28, 2008, 03:53:38 AM
Quote from: Sabre™ on October 27, 2008, 03:49:10 PM
Hi Yoda,
could you look at the code entered into my Ultimateprofile.template when you have time please mate?

I keep getting this error
8: Undefined index: referrals_no
File: /Themes/default/languages/Who.english.php (summary2 sub template - eval?)
Line: 252


After running a query, I found the correct line at 252 within my ultimate profile template.
8: Undefined index: referrals_no
File: /Themes/default/UltimateProfile.template.php (summary2 sub template - eval?)
Line: 252


Ive tried and cannot work it out.
Thank you for any assistance mate :)


Quote from: Sabre™ on October 27, 2008, 03:49:10 PM
Hi Yoda,
could you look at the code entered into my Ultimateprofile.template when you have time please mate?

I keep getting this error
8: Undefined index: referrals_no
File: /Themes/default/languages/Who.english.php (summary2 sub template - eval?)
Line: 252


After running a query, I found the correct line at 252 within my ultimate profile template.
8: Undefined index: referrals_no
File: /Themes/default/UltimateProfile.template.php (summary2 sub template - eval?)
Line: 252


Ive tried and cannot work it out.
Thank you for any assistance mate :)


It's not a problem in your template file. The template is perfectly fine.

Open /Sources/Load.php, and search for referrals_no. Does it have a line something like this (doing it from memory, so it won't be exactly right):
     'referrals_no' => comma_format($row['referrals_no']),
might not have the comma_format... but it should be something close to that.
Title: Re: Referrals Mod - 2.0 Version Released!
Post by: Sabre™ on October 28, 2008, 06:38:03 AM
Thanks mate.
It seems my backup was corrupt or something, as that isnt the only line missing.
I have almost complete mod codes gone in different templates!  >:(
Its gonna be a loong couple of days.

Cheers again Yoda. Sorry to ask you for assistance on your time out. :)

regards
Title: Re: Referrals Mod - 2.0 Version Released!
Post by: Sudhakar Arjunan on October 28, 2008, 01:08:08 PM
Quote from: YodaOfSpookness on October 27, 2008, 03:15:06 PM
asudhakar: I can't find a simple solution right now, you're going to have to wait for the Beta 4-compatible version, which should come some time next week.


yes .  :(  :'(
Title: Re: Referrals Mod - 2.0 Version Released!
Post by: General_Naga on November 05, 2008, 05:42:40 AM
Would it be possible to refer people to a different page (e.g. the site homepage) and still count the referral?

I seem to remember using SSI you can get page views on external pages to count towards the stats so would it count the refferal if you changed the referral address to a page with that SSI?
Title: Re: Referrals Mod - 2.0 Version Released!
Post by: Sudhakar Arjunan on November 07, 2008, 06:38:07 AM
Quote from: YodaOfSpookness on October 27, 2008, 03:15:06 PM
asudhakar: I can't find a simple solution right now, you're going to have to wait for the Beta 4-compatible version, which should come some time next week.

Hi YodaOfDarkness,

am still have the problem.
Title: Re: Referrals Mod - 2.0 Version Released!
Post by: Sudhakar Arjunan on November 14, 2008, 12:04:12 PM
Hope the Mod Author will be available with us from tomorrow, as mentioned he will be free tomorrow.

I have missed many registrations due to the referral error.

Checked the Database manually and no error on it.
Title: Re: Referrals Mod - 2.0 Version Released!
Post by: Burke ♞ Knight on November 15, 2008, 10:15:59 AM
Indeed, I'm looking for a fix for the same register problem:

QuoteWhen people register to 2 of my forums, they get:

QuoteAn Error Has Occurred!
Wrong value type sent to the database. Integer expected.

This also shows up in my error logs:

Quotehttp://www.burkeknight.info/index.php?action=register2
Wrong value type sent to the database. Integer expected.
Function: updateMemberData
File: burkeknight.info/Sources/Subs.php
Line: 564

Any ideas on how to fix this, without having to reinstall the forums?
Both are SMF 2.0 Beta 4

EDIT:

This only seems to happen on sites with the referrals mod.
My other sites without it, are fine.
I have since removed the Referrals mod, but since the registration did take, I am unable to test...lol (Can't register from same pc at same time)
Title: Re: Referrals Mod - 2.0 Version Released!
Post by: Triponic on November 15, 2008, 05:54:31 PM
can anyone please help me? I just installed smf 1.1.7 with a bunch of mods including this one (also tinyportal and pretty urls but I disabled the actions= rewriting urls), the installation process went smoothly (even though Im using a custom theme and didnt edit anything but I didnt get any error in the apply mod part) but when a user tries to register after I installed it, they get this:

Please try again. If you come back to this error screen, report the error to an administrator.

and if they hit back and try again it says the username is already taken.What can I do?
Title: Re: Referrals Mod - 2.0 Version Released!
Post by: Sabre™ on November 15, 2008, 06:02:13 PM
Ahh dang!!
I had this too, but I don't recall the steps taken to resolve it, as it was awhile ago.
Have you tried uninstalling the mod, then reinstalling a fresh copy?

Sorry I couldn't be of more assistance.
The mod author maybe able to replicate this, or know whats up.
Thats why they call him Yoda lol ;)

I have a board where guests can post and mention this, just incase this, or another problem occures.

Good luck :)
Title: Re: Referrals Mod - 2.0 Version Released!
Post by: Burke ♞ Knight on November 15, 2008, 06:10:11 PM
I had similar trouble, with 2.0 Beta 4 install.
The reason the username exists, is because the member did register successfully (at least on my sites), yet the referral was messed up. Tell your members to try logging in.

As admin, you can look at the member list in the admin panel, to see if the registration did work.
Title: Re: Referrals Mod - 2.0 Version Released!
Post by: Triponic on November 15, 2008, 06:17:22 PM
yes the registration was successful but it will confuse new users when they register :S I'll try uninstalling it and reapplying it see how I go :) thanks guys

Edit: Nope, still get the same error :(
Title: Re: Referrals Mod - 2.0 Version Released!
Post by: Triponic on November 16, 2008, 05:49:13 PM
tried changing a few things but that just caused horrible errors on the site so better rest my noobie skills and wait for Yoda to get back :P
Title: Re: Referrals Mod - 2.0 Version Released!
Post by: lorena91 on November 18, 2008, 09:49:17 AM
I'm having the same problem (Please try again. If you...)  as the person above...did you manage to fix it...how? does anyone know the solution?, my forum is new and i need to get some traffic in with this mod before the forum dies =(
Title: Re: Referrals Mod - 2.0 Version Released!
Post by: Triponic on November 18, 2008, 08:00:44 PM
actually mine fixed itself...just like many other mods after some time I tried reinstalling it and it worked :S, give it a try in a day or so and it might work :)
Title: Re: Referrals Mod - 2.0 Version Released!
Post by: wgn_white on November 23, 2008, 11:52:46 PM
Hi...

I want to ask...

I'm running a referral contest here at my forum, http://forum.kamoteworks.com/

How to see the top referrals and if possible show it publicly in the homepage of the forum...

Thanks in advance...

And how to fix the [Copy] button?
When we click the [Copy] button, the url look like this...

< a href="', $scripturl, '?action=logout;sesc=', $context['session_id']
Title: Re: Referrals Mod - 2.0 Version Released!
Post by: Sudhakar Arjunan on November 24, 2008, 12:38:42 PM
Yes YodaOfDarkness ( Author ), we will be waiting for it. Take Care.
Title: Re: Referrals Mod - 2.0 Version Released!
Post by: WAHS on November 28, 2008, 04:54:40 AM
I'm having the same error....

"Database Error
Please try again. If you come back to this error screen, report the error to an administrator. "

It was find when i install it on previous SMF version untill 1.1.7, I got the register problem. Either I fill in the referrer name or leave it blank, I got the above message.
Title: Re: Referrals Mod - 2.0 Version Released!
Post by: psynx on November 30, 2008, 11:19:32 PM
hello Yoda,

gudDay. Can you help me please? i have shop mod and ref mod in my forum. what i want is when my member refer, he/she gets credits automatically also. at this moment i am giving my members free credits manually, this is a little bit tiring you knw

Title: Re: Referrals Mod - 2.0 Version Released!
Post by: Sabre™ on November 30, 2008, 11:53:55 PM
In your sources/register.php  that option exists  ;)
Uncomment the line by removing  //  from the beginning of the line
// @ Hidden Easter Eggs @
// Use to give rewards for each referral hit

// Reward with Karma
// updateMemberData($referrer, array('karmaGood' => 'karmaGood + 25'));

// Using SMF Shop?  Give them money
// updateMemberData($referrer, array('money' => 'money + 100'));


You can open the karma, or shop credit options
Title: Re: Referrals Mod - 2.0 Version Released!
Post by: psynx on December 01, 2008, 08:19:29 AM
oh thank you!

i didn't know that.  thanks.
Title: Re: Referrals Mod - 2.0 Version Released!
Post by: mrtrc266 on December 04, 2008, 05:22:59 PM
QuoteIf you're using a non-custom theme I recommend the Modification Parser by Daniel 15 to get the manual theme edits required.
Quote

This parer only goes up to SMF 1.1.3

Just n FYI
Title: Re: Referrals Mod - 2.0 Version Released!
Post by: Sabre™ on December 04, 2008, 06:08:22 PM
Yep, that one hasnt been updated.
There are other sites that have an SMF mod parser, but since the ones here on site have been fixed, there is really no need to use any other.

The mod parsers on this site are where you download the package, in case you missed it.
You select your version of SMF, and click submit, that is when It will show you all the changes you need to make for manual edits.
Title: Re: Referrals Mod - 2.0 Version Released!
Post by: harrat on December 05, 2008, 05:56:01 PM
I have a feature suggestion for this mod that would work great in a lot of instances.

I would like to the referral mod integrate with 2.X subscription feature. Allowing each new referral to add time to a users current subscriptions, IE for every new Subscription from a referral link, the referrer would get 1+ month added to his or hers own subscription.

If this is something that could be looked into, even as a custom hack for the mod please let us know!

Thanks for the great mod.
Title: Re: Referrals Mod - 2.0 Version Released!
Post by: taha116 on December 14, 2008, 04:06:53 PM
Ok awseome MOD! How do i add a block with top 5 refers or top 5 referes (depending on refered posts) into Simple portal, can someone post the code
Title: Re: Referrals Mod - 2.0 Version Released!
Post by: anakmacan on December 19, 2008, 02:48:25 AM
Great  mod! im thinking of using it, for new year event :D

(http://www.simplemachines.org/community/custom_avatars/avatar_181131.png)
Oh wow is that you???? youre INCREDIBLY GORGEOUS!!  :P :P :P :P :P
Title: Re: Referrals Mod - 2.0 Version Released!
Post by: anakmacan on December 19, 2008, 02:50:55 AM
oh.. it's an anime.. *i just wearing my glasses..*
Title: Re: Referrals Mod - 2.0 Version Released!
Post by: taha116 on December 19, 2008, 11:31:36 AM
LOl ok
Title: Re: Referrals Mod - 2.0 Version Released!
Post by: anakmacan on December 19, 2008, 12:39:28 PM
Quote from: Eliana Tamerin on March 14, 2008, 12:08:07 PM
Test it here: http://intonarnia.com/index.php?action=profile;u=1

Oh woww, thats a great profile page :-o how did you make that?? :-oooo
Title: Re: Referrals Mod - 2.0 Version Released!
Post by: taha116 on December 19, 2008, 04:16:29 PM
Wow the design is awesoem how do i pull off sometinhg like that?, what plugins are used in this?
Title: Re: Referrals Mod - 2.0 Version Released!
Post by: Sabre™ on December 19, 2008, 04:32:41 PM
It is a combination of mods that I see there.
The main being the [Ultimate Profile Mod] (http://jovant.guruserve.com/test-forum/index.php?PHPSESSID=5ef8cu74k44v847s6la0q1ui72&), then I think the custom profile fields mod.
I have the Ultimate profile mod in a couple boards, and its defo something to try.
But it is only for smf 1.1.x at the mo, until smf2 is outta beta.
Title: Re: Referrals Mod - 2.0 Version Released!
Post by: taha116 on December 23, 2008, 09:18:30 PM
AWww man, Well I guess im gona have to wait... (for the ultimate profile mod)

BEta already has a custom profile fields ability so that wont be a problem
Title: Re: Referrals Mod - 2.0 Version Released!
Post by: KahneFan on December 24, 2008, 07:38:04 AM
Yadda, would it be possible to add a link to the top menu bar which will act similar to the Invite Mod (http://custom.simplemachines.org/mods/index.php?mod=653) so that members can just click that link, fill in an email and send off an invite (with their referral code)?
Title: Re: Referrals Mod - 2.0 Version Released!
Post by: Fustrate on December 24, 2008, 11:03:38 AM
Yes, it's possible. You just have to limit how many times a person can send one of those emails in a day, or else your domain might get blacklisted for spam.
Title: Re: Referrals Mod - 2.0 Version Released!
Post by: Sudhakar Arjunan on December 25, 2008, 01:16:08 AM
HI YodaofDarkness,

Have you saw my post http://www.simplemachines.org/community/index.php?topic=226191.msg1798246#msg1798246 .

I miss this excellent mod.

Give me a reply when you are free. Thank you .
Title: Re: Referrals Mod - 2.0 Version Released!
Post by: Fustrate on December 25, 2008, 01:22:59 AM
Open Sources/Subs.php, and look for

'notify_announcements', 'notify_send_body', 'notify_regularity', 'notify_types', 'referrals_no',


Is it there?
Title: Re: Referrals Mod - 2.0 Version Released!
Post by: Sudhakar Arjunan on December 25, 2008, 05:19:12 AM
Quote from: YodaOfDarkness on December 25, 2008, 01:22:59 AM
Open Sources/Subs.php, and look for

'notify_announcements', 'notify_send_body', 'notify_regularity', 'notify_types', 'referrals_no',


Is it there?

Hope the above edit to me, but i have uninstalled it earlier to avoid issues.
Title: Re: Referrals Mod - 2.0 Version Released!
Post by: Amun on December 27, 2008, 08:00:49 PM
Hey Yoda,

I installed the mod with no install errors(on 2.0 beta 4) everything looked okay, but the stats don't seem to be updating they are staying at 0 and I had asked a few ppl to click the referrals link to see if it was working or not, so atleast I know it has been clicked hehe... and the link hits still stayed at 0

Also I been having one of the same errors as A.SK in my log:

http://www.darkvoid.org/dvp2/index.php?action=stats
Apply Filter: Only show the errors with the same message
8: Undefined index: referrals
Apply Filter: Only show the errors from this file
File: /home/content/p/e/a/peacefrog/html/dvp2/Themes/default/Stats.template.php (eval?)
Line: 260

I checked the /sources/stats.php and the code seems to be there
Aswell as the subs.php as you suggested to him

Any other ideas ???

Much appreciated
Thanks
Title: Re: Referrals Mod - 2.0 Version Released!
Post by: KahneFan on December 29, 2008, 08:36:26 PM
Yadda, I was wondering if you may have had a chance to look @ the integer issue. I'm receiving the same error on 2.0b4. It allows the member to register, but seeing that message first may confuse them.

QuoteWrong value type sent to the database. Integer expected.
Title: Re: Referrals Mod - 2.0 Version Released!
Post by: Fustrate on December 29, 2008, 11:15:25 PM
Quote from: YodaOfDarkness on December 25, 2008, 01:22:59 AM
Open Sources/Subs.php, and look for

'notify_announcements', 'notify_send_body', 'notify_regularity', 'notify_types', 'referrals_no',


Is it there?
Can you check for that?

Demonslushy - I'm currently looking into that.
Title: Re: Referrals Mod - 2.0 Version Released!
Post by: KahneFan on December 30, 2008, 12:16:47 AM
This is what I have in that section...


$knownInts = array(
'date_registered', 'posts', 'id_group', 'last_login', 'instant_messages', 'unread_messages',
'new_pm', 'pm_prefs', 'gender', 'hide_email', 'show_online', 'pm_email_notify', 'karma_good', 'karma_bad',
'notify_announcements', 'notify_send_body', 'notify_regularity', 'notify_types', 'referrals_no',
'id_theme', 'is_activated', 'id_msg_last_visit', 'id_post_group', 'total_time_logged_in', 'warning',
);


Is that correct, or do I need to adjust something?
Title: Re: Referrals Mod - 2.0 Version Released!
Post by: Fustrate on January 01, 2009, 03:25:07 PM
2.0 Beta 4 Users

I just updated this mod. Use referrals2_2-1-2.tar.gz referrals2_2-1-3.tar.gz to either install or upgrade to the new version, and it will fix the registration error.

Portoguese was also added, thanks to DeviDarkL.
Title: Re: Referrals Mod - 2.0 Version Released!
Post by: KahneFan on January 02, 2009, 01:35:01 AM
In case anyone else encounters a problem unsinstalling; I had to uninstall SMF Media Gallery BEFORE I could uninstall referrals in order to reinstall referrals, then reinstall SMG.

BTW, just tried a test registry and no more error message. Thanks for the great mod Yoda!
Title: Re: Referrals Mod - 2.0 Version Released!
Post by: Sudhakar Arjunan on January 02, 2009, 02:09:54 PM
Quote from: YodaOfDarkness on January 01, 2009, 03:25:07 PM
2.0 Beta 4 Users

I just updated this mod. Use referrals2_2-1-2.tar.gz to either install or upgrade to the new version, and it will fix the registration error.

Portoguese was also added, thanks to DeviDarkL.

Excellent update.

Waiting for a long time.

Worked perfectly.

Thanks a lot YodaofDarkness.
Title: Re: Referrals Mod - 2.0 Version Released!
Post by: Sudhakar Arjunan on January 02, 2009, 02:13:40 PM
But i found the User who recently joined is not showed on the profile drop down.

but on number it shows the count properly.

Even on the new member list, it is not showing a tab called reffereb by him.

Got Error on the Stats page :

http://sitename.com/index.php?action=stats
Apply Filter: Only show the errors with the same message
8: Undefined index: referrals
Apply Filter: Only show the errors from this file
File: /home/sitefolder/public_html/forumfolder/Themes/default/Stats.template.php (main sub template - eval?)
Line: 291
Title: Re: Referrals Mod - 2.0 Version Released!
Post by: Fustrate on January 02, 2009, 06:12:08 PM
Fixed it in the new one - use referrals2_2-1-3.tar.gz to upgrade (or install).
Title: Re: Referrals Mod - 2.0 Version Released!
Post by: Sudhakar Arjunan on January 03, 2009, 05:35:44 AM
Quote from: YodaOfDarkness on January 02, 2009, 06:12:08 PM
Fixed it in the new one - use referrals2_2-1-3.tar.gz to upgrade (or install).

I have installed and got the error once, so i have attached the picture for your reference.
Title: Re: Referrals Mod - 2.0 Version Released!
Post by: Fustrate on January 03, 2009, 01:48:05 PM
I think you had it cached, and the refresh fixed it for you.
Title: Re: Referrals Mod - 2.0 Version Released!
Post by: KahneFan on January 04, 2009, 01:05:04 AM
Referrals are either short, or not working right? If you click on the profiles on my "More Stats" page for the members who have referred others, the members with [1] referral do not show a drop down list for the members that they referred. And members with [>1) show 1 less on their drop down (if not more). For example, I currently show 10 referrals (no link hit supposedly), but my drop down only shows 8 names listed. Another member with 3 referrals only has 2 names on the drop down. and the memebrs with 1 don't even have a drop down...

http://ipostyoupost.com/index.php?action=stats
Title: Re: Referrals Mod - 2.0 Version Released!
Post by: Fustrate on January 04, 2009, 01:40:51 AM
Can you go into your database, into the members table, sort by reffered_by, and see how many were referred by you? Is it 8 or 10?
Title: Re: Referrals Mod - 2.0 Version Released!
Post by: KahneFan on January 04, 2009, 02:23:31 AM
Per my current stats page

KahneFan: 10
Tony: 3
Elochai: 2
Eric: 1
dry3210: 1

Per my database
KahneFan: 8
Tony: 2
Elochai: 1
Eric: 0
dry3210: 0

Also, on a side note; I'm not sure if this has to do with this mod, custom profile fields or my theme, but look at the image below. It should have...

Referrals: 10
Forum Software: SMF

but it shows

Referrals: 10 Forum
Software: SMF

It needs a break between the referrals line and the custom field line.
Title: Re: Referrals Mod - 2.0 Version Released!
Post by: Fustrate on January 04, 2009, 02:44:56 AM
So go into the template file and put a <br /> in there ;)

Lemme write a file for you to run that will update your referrals_no to the correct number - how many members do you have?
Title: Re: Referrals Mod - 2.0 Version Released!
Post by: KahneFan on January 04, 2009, 02:54:25 AM
55 members.

And, I'm not sure which file that would be in Boardindex.template.php? Display.template.php?
Title: Re: Referrals Mod - 2.0 Version Released!
Post by: KahneFan on January 04, 2009, 02:56:08 AM
Display.template.php ;)
Title: Re: Referrals Mod - 2.0 Version Released!
Post by: Fustrate on January 04, 2009, 04:31:53 AM
err, you kinda need to attach it to a post :)

Back up your database, put this file in your forum's directory (with SSI.php) and run it. If something blows up, restore the database and tell me.
Title: Re: Referrals Mod - 2.0 Version Released!
Post by: KahneFan on January 04, 2009, 12:35:49 PM
Quote from: YodaOfDarkness on January 04, 2009, 04:31:53 AM
...If something blows up...

Thanks for scaring me  :o


Anywho, thiis is what I got...

Quote
Parse error: syntax error, unexpected T_STRING in /home/content/b/u/d/budaadmin/html/sites/ipost/referrals.php on line 1
Title: Re: Referrals Mod - 2.0 Version Released!
Post by: Fustrate on January 04, 2009, 03:16:37 PM
I forgot to save it with Windows linebreaks >_< here's the new one
Title: Re: Referrals Mod - 2.0 Version Released!
Post by: KahneFan on January 04, 2009, 03:30:18 PM
I got this message...
Quote
User #1 updated: 44

Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /home/content/b/u/d/budaadmin/html/sites/ipost/referrals.php on line 24
Need to do more? Click here.

And now the totals show...
KahneFan: 44
Tony: 3
Elochai: 2
Eric: 1
dry3210: 1
Title: Re: Referrals Mod - 2.0 Version Released!
Post by: Fustrate on January 04, 2009, 03:32:51 PM
Try this one (it didn't mess anything up, just those numbers):
Title: Re: Referrals Mod - 2.0 Version Released!
Post by: KahneFan on January 04, 2009, 04:29:09 PM
Quote
User # updated: 44

Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /home/content/b/u/d/budaadmin/html/sites/ipost/referrals.php on line 24
Need to do more? Click here.


Same results.
Title: Re: Referrals Mod - 2.0 Version Released!
Post by: mghq on January 04, 2009, 04:51:39 PM
Can you make a version for smf 1.1.7?
Title: Re: Referrals Mod - 2.0 Version Released!
Post by: KahneFan on January 05, 2009, 09:00:20 PM
Yoda, the #'s are still off and it appears we all gained 1 when the newest member joined.
Title: Re: Referrals Mod - 2.0 Version Released!
Post by: Fustrate on January 05, 2009, 10:17:48 PM
This one will be run twice - the first time, just go to /referrals.php, but the second time go to /referrals.php?do

the ?do part will actually do the updates, if the numbers shown the first time are correct.
Title: Re: Referrals Mod - 2.0 Version Released!
Post by: Fustrate on January 05, 2009, 11:14:12 PM
Quote from: mghq on January 04, 2009, 04:51:39 PM
Can you make a version for smf 1.1.7?
The installer has no restrictions - have you tried installing it on 1.1.7?
Title: Re: Referrals Mod
Post by: KahneFan on January 06, 2009, 12:57:10 AM
Quote from: YodaOfDarkness on January 05, 2009, 10:17:48 PM
This one will be run twice - the first time, just go to /referrals.php, but the second time go to /referrals.php?do

the ?do part will actually do the updates, if the numbers shown the first time are correct.

Hmmm, now I have members on the "top 5 by referrals" who, other than me, have 0 in their profile, but 2 on the list. And, other than me, the "top 5 by posts" actually lists the number that they've referred.

http://ipostyoupost.com/index.php?action=stats
Title: Re: Referrals Mod
Post by: Fustrate on January 06, 2009, 02:26:45 AM
Since you only have 55 members, I'd recommend fixing it by hand at this point. Just go into phpMyAdmin, make a list, and tally them up, and then just edit the new numbers in.
Title: Re: Referrals Mod
Post by: KahneFan on January 06, 2009, 02:34:00 AM
Can do :D

But, will the totals continue to be incorrect? They were +1 to begin with for a reason... right? (not being a smart @$$, a true question)
Title: Re: Referrals Mod
Post by: Fustrate on January 06, 2009, 02:40:38 AM
Nope, everyone should start at 0. Something went wacky in the code, but I think I fixed it now.
Title: Re: Referrals Mod
Post by: BOS4O on January 07, 2009, 06:58:21 AM
can you make .. when one user make a referral to gain a X shop point's ?
Title: Re: Referrals Mod
Post by: Fustrate on January 07, 2009, 01:23:20 PM
After you've installed the mod, open /Sources/Register.php and find this string:
QuoteUsing SMF Shop?  Give them money
and remove the // on the next line. You can also change 100 to any amount you'd like.
Title: Re: Referrals Mod
Post by: Sudhakar Arjunan on January 07, 2009, 09:36:48 PM
Quote from: YodaOfDarkness on January 03, 2009, 01:48:05 PM
I think you had it cached, and the refresh fixed it for you.

Yes i understood, but thats not correct. I got errors on my log whenever i refresh the screen to explore the referrals correctly.

http://www.simplemachines.org/community/index.php?topic=226191.msg1863298#msg1863298

Do check the above topic once more.

I went on seeing other sites using referral mod, look at the one i have quoted below,

Quote from: KahneFan on January 04, 2009, 01:05:04 AM

http://ipostyoupost.com/index.php?action=stats

Once i expand the current month stats, it does not shows the referral for me . On there site i refreshed and it showed the referral perfectly.

One more doubt, i have installed latest 2.1.3 do i have to undergo the reupdated which i say today because i found there are lot of updates on database happened in the updated.

Do a needful thing yoda.
Title: Re: Referrals Mod
Post by: Fustrate on January 07, 2009, 10:24:07 PM
I don't recall any database changes in the new version.

And I now see that the stats aren't updating at first because they're not being loaded with AJAX.
Title: Re: Referrals Mod
Post by: Sudhakar Arjunan on January 09, 2009, 05:48:00 AM
Quote from: YodaOfDarkness on January 07, 2009, 10:24:07 PM
I don't recall any database changes in the new version.

And I now see that the stats aren't updating at first because they're not being loaded with AJAX.

Thank you for finding it out.

Hope you will fix this as early on your free time.

Thanks in advance.
Title: Referrals mod does not work on SMF 2.0 Beta 4 Public
Post by: Netizen98 on January 11, 2009, 10:06:22 PM
After installing referrals mod latest version on SMF 2.0 Beta 4 Public; on Registration Page when I click "Find Referrer" link, it opens up a pop-up window for 'login', instead of 'search' window for finding a referrer. What should I do to fix this problem?
Title: Re: Referrals Mod
Post by: Fustrate on January 11, 2009, 10:16:52 PM
It probably has something to do with guest restrictions... are guests able to view the member list?
Title: Re: Referrals Mod
Post by: Netizen98 on January 11, 2009, 11:28:53 PM
I tried giving every possible access to guests & regular members. I still had the same result. I uninstalled all other mods & installed back only the referral mod, I still had same result. If the problem is access right why will the pop-up for login show up? Doesn't make sense.
Title: Re: Referrals Mod
Post by: Fustrate on January 12, 2009, 03:20:13 AM
Hmm... I've never come across this before. Lemme see if I can think of why that would happen...
Title: Re: Referrals Mod
Post by: Netizen98 on January 12, 2009, 08:22:09 AM
Installed  SMF 1.1.7 from scratch. Installed Referrals mod. Worked fine. However, as soon as I installed a couple of more mods on top of it, referrals mod started to behave exactly like it did on SMF 2.0 Beta Public 4 i.e. instead of search it started showing login pop-up window.
Title: Re: Referrals Mod
Post by: Fustrate on January 12, 2009, 10:18:14 AM
What other mods did you install?
Title: Re: Referrals Mod
Post by: Netizen98 on January 12, 2009, 12:04:52 PM
I tried several of them. For e.g. yesterday I tried installing Referrals first tested it, then installed ad management & advanced contact form. Then uninstalled the other two because referrals started giving problem. Now, even with just referrals left there it still gives problem. I tried with several other mods & yet got the same results. No one else seems to have this problem. In my forum folder pathname I have "~" but I don't think that could cause such problem, because everything else seems to work fine. As far as file access is concerned I am following the SMF installation exactly as given on this forum & CHMODs the reqd folders & files to 777 as suggested. Please give me any other ideas that I can try. Or better yet let me know where in the code to look for the place where it jumps to login window instead of search window after some install/uninstall operations.
Title: Re: Referrals Mod
Post by: Fustrate on January 12, 2009, 05:22:37 PM
Can you PM me a link to your forum? I looked through the code it uses, and there's no reason for it to want a password.
Title: Re: Referrals Mod
Post by: Netizen98 on January 12, 2009, 10:00:42 PM
I think I have discovered a cause that makes referral mod behave abnormally  ;) I was preparing a test forum to send you the link, however this time I did not have "~" in the path name. And I am not able to make the referrals mod fail! I guess the problem was using "~" in the pathname like "website.com/~test/forum". Can you confirm on your side? Also, do you see any reason why this would make the mod not to work as it is supposed to? My guess is that either referrals or some other mod is not able to handle the "~" in path name & makes changes in code that takes referrals mod in LALA land. But once that happens only way to restore referrals mod is re-installing SMF all over again. Does "~" have a special meaning in php/SMF/mods?
Title: Re: Referrals Mod
Post by: Fustrate on January 13, 2009, 02:36:46 AM
the tilde shouldn't have anything to do with it, and has no special meaning that I know of. The little search box has no permission checks in it, so I have no clue what could have caused it. Is everything good now?
Title: Re: Referrals Mod
Post by: Netizen98 on January 13, 2009, 07:15:29 AM
If the cause is not '~' then I am afraid that it might happen again. Could the flash banner I am trying use in place of logo_url be the cause of it? Or is it possible that referrals mod does not like some of the customization done in index.template or boardindex.template. Anyhow I will try out few more things and report back if I find something useful in a few days.
Title: Re: Referrals Mod
Post by: Fustrate on January 13, 2009, 01:38:42 PM
There's absolutely nothing that could cause it to do that. There aren't any permission checks in the code that would require a login box to be shown.

So does it show after you search a few times within the same popup box, or after a few consecutive visits? Can you tell me exactly how it happens?
Title: Re: Referrals Mod
Post by: akguide on January 13, 2009, 03:11:05 PM
Re:      Referrals Mod
« Reply #108 on: July 14, 2008, 10:19:55 PM »  On page 6 of this topic and having to do with selecting referrer's code by clicking on button in profile.   I read through this topic and could not determine if this worked?   If it did, great as  that is the only apparent issue  I am having, so if it does work my dumb question of the hour is where do I find "script.js:"  so I can make those edits?  Of course that might just be my problem, the script.js  but hey if you don't know one has to ask .. thanks :)

Thanks in advance and as always thank you for your time and this otherwise great addition to SMF.

AKGuide

Found script.js  now on the profile it says select next to the information one needs but it does not select the text after clicking but hey now they know what to do right?..lol    If you get the time and want to look at what files  let me know I'll find and post them.

AKGuide




Title: Re: Referrals Mod
Post by: Netizen98 on January 13, 2009, 03:13:47 PM
When it does happen it happens immediately (not after a few searches). I am not still sure if its interaction with other mods combined with ~ in the path name was causing it. Unfortunately at this moment I can not spend a lot of time specifically tracking it. However as & when I have more data I will post it here for you.  I think it is a great mod to have. Thanks for the effort.
Title: Re: Referrals Mod
Post by: Sudhakar Arjunan on January 16, 2009, 06:18:54 AM
Hi yoda,

I have two queries to discuss with ,

Have one issue as discussed with you earlier - http://www.simplemachines.org/community/index.php?topic=226191.msg1869613#msg1869613

New issue - Our forum users started complaining about there referrals issue.

They said without referring anyone, it shows they have referred many new users.

Say an example, a new comer on the site who has not even activated their account. to him it shows there is two referral for him.

When we click on the referral drop down, it does not show any name and its empty.
Title: Re: Referrals Mod
Post by: Fustrate on January 16, 2009, 06:25:43 AM
You're the second person to have this issue... I'm still trying to figure it out myself...

okay, either of you, try this. Find in /Sources/Register.php
trackStats(array('referrals' => '+'));

and add this AFTER it:

$time = date('g:i:s A \o\n F jS, Y', time()-7200);
$somecontent = "\n" . $time . (strlen($time) < 32 ? "\t\t" : "\t") .  $_SERVER['REMOTE_ADDR'] . " was reffered by #" . referrer;
$filename = './log.php';

if(is_writable($filename)){
if(!$handle = fopen($filename, 'a'))
$dev = null;
if(fwrite($handle, $somecontent) === FALSE)
$dev = null;
fclose($handle);
$dev = null;
} else {
$dev = null;
}


and create a file name log.php in your /Sources/ folder, CHMOD'd to 0777

let's see if it's merely being executed multiple times for some reason...
Title: Re: Referrals Mod
Post by: Sudhakar Arjunan on January 16, 2009, 06:29:03 AM
Quote from: YodaOfDarkness on January 16, 2009, 06:25:43 AM
You're the second person to have this issue... I'm still trying to figure it out myself...

I remember in the previous pages, after releasing the mod. You are help someone to clear this issue manually just because there are only less no of members in it.

But i do have 7500 Members on my board.

Now what could i do, even i have tried to recount all my post and stats through my maintenance . but that never helped me out.
Title: Re: Referrals Mod
Post by: Fustrate on January 16, 2009, 06:39:36 AM
I edited my prior post with instructions to test something... and does the total number of referrals in the stats page go up wildly too?
Title: Re: Referrals Mod
Post by: Sudhakar Arjunan on January 16, 2009, 06:59:15 AM
Quote from: YodaOfDarkness on January 16, 2009, 06:25:43 AM

and create a file name log.php in your /Sources/ folder, CHMOD'd to 0777

let's see if it's merely being executed multiple times for some reason...

I did all the edits, have did one registration, i have given admin as referral.

Then come to stats and checked , it has been increase to me as count 1 and one more user who reported me say userid - 1563 got 1 referral added but its not showing anything on the drop down box near referral.

Details about my forum i have send a personal message to you.
Title: Re: Referrals Mod
Post by: Sudhakar Arjunan on January 16, 2009, 10:16:35 AM
I got these errors after adding the edit you have given,

http://sitename.com/index.php?action=register2
Apply Filter: Only show the errors with the same message
8: Use of undefined constant referrer - assumed 'referrer'
Apply Filter: Only show the errors from this file
File: /home/sitename/public_html/forumfolder/Sources/Register.php
Line: 519
Title: Re: Referrals Mod
Post by: KahneFan on January 16, 2009, 10:48:26 AM
@A.SK - run the following in SQL...

Quote from: YodaOfDarkness on January 06, 2009, 01:34:41 PM
UPDATE smf_members
SET referrals_no = 0
WHERE 1=1

Then place the attached referrals.php in your root folder and do the following...

Quote from: YodaOfDarkness on January 05, 2009, 10:17:48 PM
This one will be run twice - the first time, just go to /referrals.php, but the second time go to /referrals.php?do

the ?do part will actually do the updates, if the numbers shown the first time are correct.

It will fix it momentarily, but it WILL give you the bad stats after your next registration (from what I can tell that's the trigger).
Title: Re: Referrals Mod
Post by: Sudhakar Arjunan on January 16, 2009, 12:28:59 PM
Quote from: KahneFan on January 16, 2009, 10:48:26 AM
@A.SK - run the following in SQL...


I am moving now , tomorrow morning sure i will do it.

Thanks  a lot for it.
Title: Re: Referrals Mod
Post by: Fustrate on January 16, 2009, 04:44:51 PM
Quote from: KahneFan on January 16, 2009, 10:48:26 AM
@A.SK - run the following in SQL...

Quote from: YodaOfDarkness on January 06, 2009, 01:34:41 PM
UPDATE smf_members
SET referrals_no = 0
WHERE 1=1

Then place the attached referrals.php in your root folder and do the following...

Quote from: YodaOfDarkness on January 05, 2009, 10:17:48 PM
This one will be run twice - the first time, just go to /referrals.php, but the second time go to /referrals.php?do

the ?do part will actually do the updates, if the numbers shown the first time are correct.

It will fix it momentarily, but it WILL give you the bad stats after your next registration (from what I can tell that's the trigger).
Ya, but I need to find the root of the problem... I wrote that as a temporary fix, but I can't expect you to run that file every day.

Can either of you message me on AIM? There's something I'd like to try, but it has to be a quick thing or nobody will be able to register.
Title: Re: Referrals Mod
Post by: KahneFan on January 16, 2009, 05:39:32 PM
I've added AIM, and I think I've added you. I'm on a different times, try to catch me sometime. Username: KahneFan2009
Title: Re: Referrals Mod
Post by: Sudhakar Arjunan on January 17, 2009, 12:22:37 PM
Quote from: KahneFan on January 16, 2009, 05:39:32 PM
I've added AIM, and I think I've added you. I'm on a different times, try to catch me sometime. Username: KahneFan2009

I have added you from my gmail account.

Today the hole day, my sql server was offline.

So the hole day i spent fixing the issues.

Now am going to start, tomorrow i will catch you. Thank you.
Title: Re: Referrals Mod
Post by: question on February 01, 2009, 05:41:09 PM
what the referrals_copytoclipboard.swf file used for

i am a bit afraid of putting a falsh file on my root directory

no offense to the developer ,

but is there a way we can verify what the swf file exactly do
in other words , is there a way to dissect it so we can determine it's function
or at least test it ?
Title: Re: Referrals Mod
Post by: Fustrate on February 01, 2009, 06:37:08 PM
that's the swf karlbenson put in so that you could copy the code to your clipboard... I'm thinking of removing it, not everything needs to be so automatic...

unfortunately, I do not have the pre-compiled version.
Title: Re: Referrals Mod
Post by: Sudhakar Arjunan on February 02, 2009, 02:10:12 AM
Thanks for all you helped me to bug this out.

But i have been forced to remove this excellent mod, since it shows wrong referral count to many new registered also.

The new registered member got all the referrals for the following registration on the site.
Title: Re: Referrals Mod
Post by: Fustrate on February 02, 2009, 02:17:35 AM
I never got a response from either one of you, so I've been working on other things. I'm going to do a test install of 2.0 + referrals, and see where it takes me.
Title: Re: Referrals Mod
Post by: Sudhakar Arjunan on February 02, 2009, 02:30:53 AM
Quote from: Fustrate on February 02, 2009, 02:17:35 AM
I never got a response from either one of you, so I've been working on other things. I'm going to do a test install of 2.0 + referrals, and see where it takes me.

This is one of the excellent and very useful mod for all forum.

I will do the testing for you.

I had issue, since my forum is loaded with 8000 users and 70000 topics.

Thats why i have to take this decision.

On my free time, i will install it on my test board and comment here.
Title: Re: Referrals Mod
Post by: Fustrate on February 02, 2009, 02:31:40 AM
I'm already installing it... and I need to do it myself, so I can see everything that's going on.
Title: Re: Referrals Mod
Post by: Low on February 03, 2009, 03:55:07 PM
I tried to install on a fresh 1.1.7 with default theme and it says "mod corrupt or damaged" or something along those lines.

I'd be really grateful if you could help.

Thanks
Title: Re: Referrals Mod
Post by: Bugpac ™ on February 09, 2009, 04:53:27 PM
Im running this on 2.04, seems everyone by default has one referral, i have one guy who has referd 2 members, his profile has a drop down showing them members, but it seems everyone is getting counts for every member referd, so all my members show a count of two referals, but the guy who actually referd them is the only one that has a drop down menu....

Here is my forum if anyone wants a look...

www.dtsfab.com
Title: Re: Referrals Mod
Post by: Fustrate on February 09, 2009, 08:59:49 PM
Something's up with the 2.0 version, I'm still trying to figure it out (in between testing and tweaking Member Awards, which hasn't really been updated since Beta 1).

Low - try downloading it straight from http://www.fustrate.com/dev/sources/Referrals%20Mod/Referrals_Mod_smf1-1-x/
Title: Re: Referrals Mod
Post by: Bugpac ™ on February 10, 2009, 10:44:31 AM
Is there anyway for me to manually add a referral to a member?
Title: Re: Referrals Mod
Post by: Vekseid on February 11, 2009, 04:33:30 AM
Anyone use this with 2.0 RC1 yet?
Title: Re: Referrals Mod
Post by: KahneFan on February 11, 2009, 10:14:07 AM
I tried to install it, but there was an error on the profile page since RC1 uses a different layout for the new profile page.
Title: Re: Referrals Mod
Post by: Fustrate on February 11, 2009, 10:42:33 AM
This one might work for RC1, it's 2.1.4 (and no, you can't upgrade from 2.1.3 to 2.1.4 - I changed a whole lotta code to try to make it work smoothly)
Title: Re: Referrals Mod
Post by: KahneFan on February 11, 2009, 11:27:43 AM
There are still errors with profile.template.php for RC1
Title: Re: Referrals Mod
Post by: Fustrate on February 11, 2009, 02:03:08 PM
-_- I'll fix that tonight after 6 PM Pacific.
Title: Re: Referrals Mod
Post by: Fustrate on February 12, 2009, 05:46:33 PM
Try this one for RC1... and as always, I can't guarantee it'll work :) Removed.
Title: Re: Referrals Mod
Post by: gremiopoker on February 13, 2009, 07:15:21 PM
 profile.template.php is perfect now...

but I have this error whem guest click REGISTER:

QuoteParse error: syntax error, unexpected T_ELSE in /home/XXXXXXXXXX/public_html/forum/Sources/Register.php on line 512

line 512 is "} else"
$regOptions['extra_register_vars']['referred_on'] = (int) time();
} else
fatal_lang_error('referrals_referrer_not_found', false);


and when I use referral link:

http://gremiopoker.com/forum/index.php?referredby=1

I got this error:

QuoteFatal error: Function name must be a string in /home/XXXX/public_html/forum/index.php on line 188

my line 188 is:
$request = $smcFunc['db_query']('', '

Any idea?

And thanks for your work

Sorry my english ;)

Ps. I alread have this referral mod in 1.1.7...but when I upgrade to 2.0 RC1 cant do it works...
Title: Re: Referrals Mod
Post by: Bugpac ™ on February 13, 2009, 09:36:40 PM
heck, id just like to see it work proper for 2.04  :)
Title: Re: Referrals Mod
Post by: Fustrate on February 14, 2009, 01:54:41 AM
Until 2.0 goes final, I'll only be supporting the latest beta or release candidate.

Here's another one to try - just uninstall the old one and try this one instead.
Title: Re: Referrals Mod
Post by: gremiopoker on February 14, 2009, 07:18:24 AM
I dont get the errors listed by me....is perfect :)

but have more little errors:

when guest click in REGISTER....using referral link.....referral field is empty

and if I try put manually the username on referral field i got this message:

QuoteThe referring user could not be found. Please double-check the name of the referrer. Or leave it blank.

thank you
Title: Re: Referrals Mod
Post by: lorogarcia on February 16, 2009, 02:48:35 PM
I have same problem.
I Install referrals_v2-2_RC1.zip and no run 100%, no count clicks to referal link and dont put the username in register field but the cookie exist, only run if put username and register
Title: Re: Referrals Mod
Post by: TJTELLEZ9 on February 17, 2009, 01:40:45 PM
Can you reset the referrals count?
Title: Re: Referrals Mod
Post by: Fustrate on February 17, 2009, 09:44:16 PM
I've been really busy lately, so sorry for the late responses.

TJTELLEZ9 - either run this SQL query:
UPDATE smf_members
SET refferals_no = 0
WHERE 1=1


or create a new PHP page (reset.php), put it in your forum's root directory, and put this in it:
<?php
include_once('./SSI.php');

if(isset(
$smcFunc)){
     
$smcFunc['db_query']('''
          UPDATE {db_prefix}members
          SET referrals_no = 0
          WHERE 1=1'
, array());
} else {
     
db_query("
          UPDATE 
{$db_prefix}members
          SET referrals_no = 0
          WHERE 1=1"
__FILE____LINE__);
}

echo 
'Done!';
?>

and navigate to it in your browser.



I'm still working on the RC1 version, sorry for the delays.
Title: Re: Referrals Mod
Post by: kevcol on February 19, 2009, 05:06:25 PM
BTW, I just changed my theme to one that worked, and for any other newbies, can find the stats page here: index.php?action=stats
Title: Re: Referrals Mod
Post by: Low on February 21, 2009, 07:08:26 PM
Quote from: Low on February 03, 2009, 03:55:07 PM
I tried to install on a fresh 1.1.7 with default theme and it says "mod corrupt or damaged" or something along those lines.

I'd be really grateful if you could help.

Thanks
bump
Title: Re: Referrals Mod
Post by: gremiopoker on February 23, 2009, 08:37:14 AM
Quote from: gremiopoker on February 14, 2009, 07:18:24 AM
I dont get the errors listed by me....is perfect :)

but have more little errors:

when guest click in REGISTER....using referral link.....referral field is empty

and if I try put manually the username on referral field i got this message:

QuoteThe referring user could not be found. Please double-check the name of the referrer. Or leave it blank.

thank you

bump...

And I put this Mod Requests:

[PAID] - Points system + good referral system - http://www.simplemachines.org/community/index.php?topic=293722.0


I can pay for this work ;)

Ty
Title: Using 2.0 Beta 4 - DS Natural Theme.
Post by: Gravitysuit on February 23, 2009, 08:16:30 PM
When I use the mod, it installs perfectly and works great.  HOWEVER, when someone does get a referral, EVERYONE gets a referral.

Example:
Joe refers Susie to come to the site.  Susie joins, Joe gets referral +1

Now everyone has referral +1.

Joe refers someone else, they join the site.  Joe gets referral +2

Now everyone has referral +2.  Not just in their profile, but also on the threads.

How can I fix this?
Title: Re: Referrals Mod
Post by: IshbOO on February 24, 2009, 12:21:54 AM
I've been reading this and I cannot seem to figure out my problem, I keep getting this error.

I'm using 1.1.8 smf

Guest       Today at 05:03:21 PM
Only show the error messages of this URL http://forum.jdmjunkee.com/index.php?action=register2
Only show the errors with the same message
Database Error: Unknown column 'IshbOO' in 'field list'
File: /home/ish1337/public_html/forum/Sources/Subs-Post.php
Line: 772

I tried to make an account and referr myself to test it out, I tried choosing from the search and typing manually.
it gives me an error saying something is wrong with the database, but it does still create the account.

also in the account I creadted it says refferred by IshbOO, but on my IshbOO profile, it does not say I referred them.
Title: Re: Referrals Mod
Post by: Fustrate on February 24, 2009, 02:29:14 AM
Quote from: Gravitysuit on February 23, 2009, 08:16:30 PM
When I use the mod, it installs perfectly and works great.  HOWEVER, when someone does get a referral, EVERYONE gets a referral.

Example:
Joe refers Susie to come to the site.  Susie joins, Joe gets referral +1

Now everyone has referral +1.

Joe refers someone else, they join the site.  Joe gets referral +2

Now everyone has referral +2.  Not just in their profile, but also on the threads.

How can I fix this?

Beta 4 or RC1?

and I'm working on this right now.
Title: Re: Referrals Mod
Post by: Gravitysuit on February 24, 2009, 09:01:39 AM
Quote from: Fustrate on February 24, 2009, 02:29:14 AMBeta 4 or RC1?

and I'm working on this right now.

Using 2.0 Beta 4 - DS Natural Theme.
Title: Re: Referrals Mod
Post by: IshbOO on February 25, 2009, 12:28:41 PM
anyone knwo why im getting that error, its been a few days still can't figure it out, i posted it like 3 posts above this one.

i think its only happening when someone trys to add a user for the registration page
Title: Re: Referrals Mod
Post by: IshbOO on February 26, 2009, 07:23:26 PM
looks like its working now, but i think it still may be giving me the error in the error log.
Title: Ynt: Using 2.0 Beta 4 - DS Natural Theme.
Post by: Gravitysuit on February 27, 2009, 12:15:54 PM
Quote from: Gravitysuit on February 23, 2009, 08:16:30 PM
When I use the mod, it installs perfectly and works great.  HOWEVER, when someone does get a referral, EVERYONE gets a referral.

Example:
Joe refers Susie to come to the site.  Susie joins, Joe gets referral +1

Now everyone has referral +1.

Joe refers someone else, they join the site.  Joe gets referral +2

Now everyone has referral +2.  Not just in their profile, but also on the threads.

How can I fix this?

So what was the verdict on this one?
Title: Re: Referrals Mod
Post by: Fustrate on February 28, 2009, 03:00:28 PM
http://www.simplemachines.org/community/index.php?topic=296223.new#new
Title: Re: Referrals Mod
Post by: ross85 on March 11, 2009, 01:03:45 AM
I am going to do a referral contest where for every member you refer you get one"ticket" into the drawing. Is there a way to view a master list of everyone who has referred and how many many?
Title: Re: Referrals Mod
Post by: islam2hamy on March 28, 2009, 07:56:20 AM
Thank you , very good mod ,

Arabic translation :

    <file name="$languagedir/Modifications.arabic-utf8.php" error="skip">
        <operation>
            <search position="end" />
            <add><![CDATA[   
$txt['referrals_findreferrer'] = 'إبحث عن عضو';
$txt['referrals_who'] = 'الإحالات/الدعوات:';
$txt['referrallink_copy'] = '[نسخ]';
$txt['referrals_who_description'] = 'إذا كنت تلقيت دعوه للتسجيل في هذا المنتدى من قبل عضو حالي , أدخل اسمه هنا.';
$txt['referrals_on'] = 'فى';
$txt['referrals_referrer_not_found'] = 'العضو الذى تبحث عنه غير موجود';
$txt['referrals_youwerereferred_by'] = 'بواسطة';
$txt['referrals_referrals'] = 'دعوات :';
$txt['referrals_referrals_hits'] = 'عدد زيارات رابط الدعوه الخاص بك:';
$txt['referrals_noneyet'] = 'ليس بعد!';
$txt['referrals_top5referrers'] = 'أعلى 5 داعين (حسب الإحالات)';
$txt['referrals_top5referrersbyposts'] = 'أعلى 5 داعين (حسب مشاركات المدعوين)';
$txt['referrals_referralsstats'] = 'دعوات';
$txt['referrals_referred_by'] = 'دعية بواسطة:';
$txt['referrals_link'] = 'رابط الاحاله/الدعوه الخاص بك:';
$txt['referrals_membersreferred'] = 'إحالات الأعضاء';

]]></add>
        </operation>
    </file>


please before put the translation in the file be sure that the file encode is UTF-8
Title: Re: Referrals Mod
Post by: Jessikard on March 31, 2009, 02:57:47 PM
is there a working version for smf 1.1.8 ?

i searched the whole thread but there´s nothing that helps
Title: Re: Referrals Mod
Post by: Fustrate on March 31, 2009, 03:12:22 PM
The 1.1.x version should work on 1.1.8
Title: Re: Referrals Mod
Post by: Jessikard on March 31, 2009, 03:22:04 PM
i get an error:
the package you tried to upload is damaged or invalid

theres no way to parse ist  >:(
Title: Re: Referrals Mod
Post by: KahneFan on April 03, 2009, 02:54:18 PM
Frustrate, I just installed the latest link you provided on my 2.0RC1 forum. I also use SP 2.2. When clicking the referral link, it brings me to just my articles for some reason, not my portal page, or my forum page. I'm not sure if this would be an SP issue, or a referrals issue...

http://ipostyoupost.com/index.php?referredby=1
Title: Re: Referrals Mod
Post by: Fustrate on April 03, 2009, 04:07:57 PM
There have been some issues with the RC1 version which I haven't been able to fix (and it's going to be simple to do, really)
Title: Re: Referrals Mod
Post by: KahneFan on April 03, 2009, 04:19:22 PM
Just to be sure "It is" or "It is not" going to be simple?

Also, is there a way to add a field to the memberlist page for a quick view of referrals? A "Reffered By" column?
Title: Re: Referrals Mod
Post by: Fustrate on April 03, 2009, 04:47:35 PM
it is, and there is
Title: Re: Referrals Mod
Post by: Shonick on April 08, 2009, 09:24:34 PM
Hi Fustrate,

I just installed the file you provided here on 2.0 RC1, it worked. However, it does not automatically log the referrer. Thus, on the registration page, they have to put the use of referrer in.

Could you please fix it, so it can log the referrer automatically?

thanks a lot.
Title: Re: Referrals Mod
Post by: Fustrate on April 08, 2009, 10:03:01 PM
I'm testing a new version, mostly rewritten... give me another hour and I'll update this.

EDIT: Okay, it installs fine and I'm not seeing any problems on registration or later. This is a combined 1.1.x/2.0 package, and you need to uninstall any old version before you install this one (don't worry, all data will be kept)
Title: Re: Referrals Mod
Post by: raiderray on April 09, 2009, 12:13:53 AM
I get the following error at the top of my message board directly after install:

Quote$txt['referrals_findreferrer'] = 'Find Referrer'; $txt['referrals_who'] = 'Referral Information:'; $txt['referrals_who_description'] = 'Did someone refer you to this site?'; $txt['referrals_on'] = 'On'; $txt['referrals_referrer_not_found'] = 'The referring user could not be found. Please double-check the name of the referrer. Or leave it blank.'; $txt['referrals_youwerereferred_by'] = 'By'; $txt['referrals_referrals'] = 'Referrals:'; $txt['referrals_referrals_hits'] = 'Referral Link Hits:'; $txt['referrals_noneyet'] = 'None Yet!'; $txt['referrals_top5referrers'] = 'Top 5 Referrers (By Referrals)'; $txt['referrals_top5referrersbyposts'] = 'Top 5 Referrers (By Referred Members Posts)'; $txt['referrals_referralsstats'] = 'Referrals'; $txt['referrals_referred_by'] = 'Referred By:'; $txt['referrals_link'] = 'Referrals Link:'; $txt['referrals_membersreferred'] = 'Members Referred';

I am using the default theme
Title: Re: Referrals Mod
Post by: Fustrate on April 09, 2009, 12:25:53 AM
go to Modifications.english.php (or whatever language you're using) and move the ?> to the end of the file.
Title: Re: Referrals Mod
Post by: raiderray on April 09, 2009, 12:48:53 AM
Yup, that did it. Testing now, so far so good....
Title: Re: Referrals Mod
Post by: SA™ on April 09, 2009, 01:11:46 AM
seems to be working great so far i have notice iots not updating

Referral Link Hits:

also my profile didnt look write

put the referals code befor

echo '
         </dl>';


pictures will explain it better
Title: Re: Referrals Mod
Post by: Fustrate on April 09, 2009, 01:35:16 AM
is it a custom Profile.template.php?

And I'll look into the referral hits one
Title: Re: Referrals Mod
Post by: SA™ on April 09, 2009, 02:07:18 AM
no it standard rc1 profile template
Title: Re: Referrals Mod
Post by: Filipina on April 10, 2009, 12:53:38 AM
Love this MOD thanks for updating it :)

I did a manual edit of every file and then I realized I have the Ultimate Profile Mod. Would an edit to the UltimateProfile.template.php file be enough to make it show in these profiles as well, or would I need additional edits of other files?  If it is just that file can you tell me what I would need to edit? Thanks for any assistance :)
Title: Re: Referrals Mod
Post by: Fustrate on April 10, 2009, 03:40:58 AM
I think there's something about that a few pages back... I'm in a hurry to finish some thing so I can't look, but it shouldn't be too far back from the end.
Title: Re: Referrals Mod
Post by: Shonick on April 10, 2009, 06:44:39 PM
Hi Fustrate,

I have the same problem as before, After uninstall and re-installed the new update. I have the same problem, the referrer name does not log automatically. They have to type it on the field.

Could you please check it again?

Thanks a lot

Title: Re: Referrals Mod
Post by: Fustrate on April 10, 2009, 11:54:30 PM
Quote from: viet on April 10, 2009, 06:44:39 PM
Hi Fustrate,

I have the same problem as before, After uninstall and re-installed the new update. I have the same problem, the referrer name does not log automatically. They have to type it on the field.

Could you please check it again?

Thanks a lot



1.1.x or 2.0 RC1? I'm also looking into referral hits
Title: Re: Referrals Mod
Post by: Filipina on April 10, 2009, 11:59:57 PM
Thanks Frustrate, I could not find the information but I was able to figure it out :)  I used the parser and added the code by hand on every page, and then just placed this code where I wanted it to show in the UltimateProfile.template.php file. I am no expert but this is the only code I needed for it to show and it looks like THIS (http://www.melindaspenpals.com/penpal-community/index.php?action=profile;u=1)

// Adds the referral/referred user information to the profile summary
echo '
<tr>
<td colspan="2"><hr size="1" width="100%" class="hrcolor" /></td>
</tr><tr>
<td><b>', $txt['referrals_referrals'], '</b></td>
<td>', $context['member']['referrals_no'], ' ';

// Show in dropdown of those referred
if(!empty($context['member']['referredmembers'])){
echo '<select onchange="location=options[selectedIndex].value;">
<option>', $txt['referrals_membersreferred'], '</option>';
foreach($context['member']['referredmembers'] as $x)
echo '
', $x;

echo '
</select>';
}

echo'
</td>
</tr><tr>
<td><b>', $txt['referrals_referrals_hits'], '</b></td>
<td>', $context['member']['referrals_hits'], '</td>
</tr>';
if (!empty($context['member']['referred_by']))
echo'
<tr>
<td><b>', $txt['referrals_referred_by'], '</b></td>
<td>', $context['member']['referred_bylink'], ' ', $txt['referrals_on'], ' ', date("jS M Y",$context['member']['referred_on']), '
</td>
</tr>';

echo '
<tr>
<td colspan="2"><b>', $txt['referrals_link'], '</b></td>
</tr>
<tr><td colspan="2" style="text-align:center;">
<input type="text" id="referrallink" value="', $scripturl, '?referredby=', $context['member']['id'], '" readonly="true" style="width:250px;" />
</td>
</tr>';
Title: Re: Referrals Mod
Post by: daveaite on April 11, 2009, 12:17:04 AM
Very nice mod. If you want to see a working version : http://buypoe.com
Title: Re: Referrals Mod
Post by: Filipina on April 11, 2009, 12:18:04 AM
Quote from: viet on April 10, 2009, 06:44:39 PM
Hi Fustrate,

I have the same problem as before, After uninstall and re-installed the new update. I have the same problem, the referrer name does not log automatically. They have to type it on the field.

Could you please check it again?

Thanks a lot

Yep just tested mine doesn't seem to fill in the field either on SMF 1.1.8
Title: Re: Referrals Mod
Post by: Fustrate on April 11, 2009, 12:41:13 AM
I'll test 1.1.8 right now
Title: Re: Referrals Mod
Post by: Shonick on April 11, 2009, 12:51:24 AM
I am using the  2.0 RC1, it does not log the referrer automatically. I guest, there is a problem with the cookie. When I use the direct link like   index.php?action=register&referralsid=1. it place admin in the field. But then, I click somewhere else. And click register again, it is gone.

So, I guest it has problem with the cookie thing.
Title: Re: Referrals Mod
Post by: Fustrate on April 11, 2009, 01:04:29 AM
I'll look into that.
Title: Re: Referrals Mod
Post by: gremiopoker on April 11, 2009, 04:36:44 PM
Quote from: gremiopoker on February 14, 2009, 07:18:24 AM
I dont get the errors listed by me....is perfect :)

but have more little errors:

when guest click in REGISTER....using referral link.....referral field is empty

and if I try put manually the username on referral field i got this message:

QuoteThe referring user could not be found. Please double-check the name of the referrer. Or leave it blank.

thank you

I got this error again in new version... Referrals Mod 2.2.2 

I am using RC1
Title: Re: Referrals Mod
Post by: Fustrate on April 11, 2009, 05:48:48 PM
this is pretty frustrating... I tested it multiple times on 1.1.8 and RC1 and didn't get any problems... but I'll rewrite it one more time from scratch.
Title: Re: Referrals Mod
Post by: Filipina on April 11, 2009, 07:37:52 PM
Frustrate, sorry for the frustration... we do appreciate your efforts :)
Title: Re: Referrals Mod
Post by: gremiopoker on April 11, 2009, 08:12:55 PM
Quote from: Filipina on April 11, 2009, 07:37:52 PM
Frustrate, sorry for the frustration... we do appreciate your efforts :)

2
Title: Re: Referrals Mod
Post by: Fustrate on April 12, 2009, 06:32:27 AM
New version has been posted and thoroughly tested... uninstall the old, and install the new.
Title: Re: Referrals Mod
Post by: Shonick on April 12, 2009, 09:18:13 AM
Thanks a lot for your input, however, this time, I got the error when I test it. What I did was unsintall that mod and reinstall the new version.
and go to this link http://mydomain.com/test/index.php?referredby=1

And I got the following error.

"Wrong value type sent to the database. Integer expected. (p_referrals_hits)"

Do you know where it come from?

Thanks a lot
Title: Re: Referrals Mod
Post by: Fustrate on April 12, 2009, 01:45:40 PM
try upgrading (don't uninstall - just upgrade) with this one...
Title: Re: Referrals Mod
Post by: Shonick on April 12, 2009, 02:45:11 PM
Do you meant upgrade from 2-2-3 to 2-2-4?

Thanks
Title: Re: Referrals Mod
Post by: Fustrate on April 12, 2009, 02:50:17 PM
yes, that's it. Tell me if it works after that.
Title: Re: Referrals Mod
Post by: Shonick on April 12, 2009, 02:53:42 PM
After upgrade the file, I don't have that error anymore, but, when I click on the register, the old thing happend again. The referrer does not log automatically.
Title: Re: Referrals Mod
Post by: cepsi on April 13, 2009, 03:04:56 PM
hi ive been afetr this mod for a few months, it works gr8 on my test site, but on my live site i have the awards mod installed and its causing a "Failed" in the package upload (on the display.template). I basically have two questions;

1. If i upload the package, when the test fails does that mean it simply wont write on the display template, and i can simply add teh code manually?

2. how can i add the code so that i get no parse error on the display template. My display template looks like this;

// Show how many posts they have made.
echo '
', $txt[26], ': ', $message['member']['posts'], '';

if (!empty($message['member']['options']['profile_postawards']))
{
$postawards = parse_bbc($message['member']['options']['profile_postawards']);
echo '<br />Awards: ' . $postawards . '';
}

echo ' <br />
<br />';


and i need to insert this for the refferal mod;


', $txt['referrals_referrals'], ' ', $message['member']['referrals_no'], '<br />


ty as always for any help :)
Title: Re: Referrals Mod
Post by: mrtrc266 on April 13, 2009, 03:50:19 PM
Hey Cepsi (Cepsi from RB by any chance?)

When you get a test failed it just means that it can't find the code it's supposed to change usually cuz another mod relocated or slightly changed what it's looking for.

Yes you can add the code manually using a Package Parser (http://resourcez.biz/PackageParser/). Just upload the Mod to the Parser, select what version SMF you have and then look for the file that gives you the failed test and make the change manually using a text editor. Notepad is not recommended. Notepad++  (http://notepad-plus.sourceforge.net/uk/site.htm)is great and won't change the formatting at all.

Hope that helps.
Title: Re: Referrals Mod
Post by: cepsi on April 13, 2009, 03:57:05 PM
QuoteYes you can add the code manually using a Package Parser. Just upload the Mod to the Parser, select what version SMF you have and then look for the file that gives you the failed test and make the change manually using a text editor. Notepad is not recommended. Notepad++ is great and won't change the formatting at all.

Hope that helps.

sweet thats all i needed. ive already parsed it and checked the code, i tried to install this mod a few months ago but got alot of errors, just DT this time though just wanted to make sure it wouldnt alter the DT when i uploaded it thru the package manager so i didnt have to do the whole lot manually. basic laziness  ;D

TY :)
Title: Re: Referrals Mod
Post by: Shonick on April 13, 2009, 04:22:45 PM
It work on 1.18 great but not on 2.0 RC1, hope Fustrate can fix it soon. The big problem is it does not log referrer automatically.
Title: Re: Referrals Mod
Post by: cepsi on April 13, 2009, 04:30:32 PM
QuoteHey Cepsi (Cepsi from RB by any chance?)

and yes but not there much anymore Troy  ;)
Title: Re: Referrals Mod
Post by: mrtrc266 on April 13, 2009, 05:24:36 PM
Quote from: cepsi on April 13, 2009, 04:30:32 PM
QuoteHey Cepsi (Cepsi from RB by any chance?)

and yes but not there much anymore Troy  ;)

LOL, very nice to see you here Cepsi. Yeah I have been slackin on RB as well, kinda got a little obsessed with the Mansion :D  Have fun with your forum and all the Mods ;)
Title: Re: Referrals Mod
Post by: cepsi on April 13, 2009, 06:13:44 PM
looks good man fussilet is the master of dark themes
Title: Re: Referrals Mod
Post by: mrtrc266 on April 13, 2009, 06:37:15 PM
Thanks, yeah he does an awesome job. Your sites lookin awesome too, I've been wanting to reg but I can't seem to slow down here LOL, just upgraded to RC1 and reinstallin all the Mods and still workin on the theme a little. I'll prob cya there soon though :)
Title: Re: Referrals Mod
Post by: Shonick on April 13, 2009, 10:35:52 PM
Quote from: viet on April 12, 2009, 02:53:42 PM
After upgrading the file, I don't have that error anymore, but, when I click on the register, the old thing happend again. The referrer does not log automatically.

Hi Fustrate,

Do you have any update yet?

thanks
Title: Re: Referrals Mod
Post by: Fustrate on April 13, 2009, 11:16:19 PM
rewriting a little of it :) this other mod for the Doc Team takes precedence.
Title: Re: Referrals Mod
Post by: Shonick on April 14, 2009, 01:53:07 AM
Do you know how long would it talk? I would like to know, so I can adjust the plan on my forum.

Thanks a lots
Title: Re: Referrals Mod
Post by: Fustrate on April 14, 2009, 02:29:20 AM
1 or 2 more days, unless you want to be the guinea pig :)
Title: Re: Referrals Mod
Post by: Shonick on April 14, 2009, 02:36:41 AM
It is great to hear that, and what is "guinea big"? (Sorry, English is my second language)

Thanks
Title: Re: Referrals Mod
Post by: Fustrate on April 14, 2009, 03:21:31 AM
"guinea pig" is a term for someone who is testing something before they know it's supposed to work... a beta tester, in other words.
Title: Re: Referrals Mod
Post by: Eclipse16V on April 14, 2009, 07:45:40 AM
Hi,

I have the same problem.
Quote from: viet on April 12, 2009, 02:53:42 PM
After upgrade the file, I don't have that error anymore, but, when I click on the register, the old thing happend again. The referrer does not log automatically.

after the upgrade to 2.2.4 it doesn´t work.
The same problem by viet. :-(
Title: Re: Referrals Mod
Post by: Shonick on April 14, 2009, 06:54:06 PM
Quote from: Fustrate on April 14, 2009, 03:21:31 AM
"guinea pig" is a term for someone who is testing something before they know it's supposed to work... a beta tester, in other words.
Quote from: Fustrate on April 14, 2009, 02:29:20 AM
1 or 2 more days, unless you want to be the guinea pig :)

Yes, sure. This is what I suppose to do too. :)
Title: Re: Referrals Mod
Post by: Fustrate on April 14, 2009, 07:24:54 PM
This uses a different variable to keep the information... uninstall the old, install the new. Sorry about all of this =\
Title: Re: Referrals Mod
Post by: Shonick on April 14, 2009, 07:41:29 PM
I'm sorry to inform you that, it does not work, I also get the message at the top
"Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /www/mydomain.com/v/i/e/t/viet/htdocs/test/index.php on line 178"
Title: Re: Referrals Mod
Post by: Fustrate on April 14, 2009, 08:01:26 PM
must've typed that when I fell asleep last night... you'd be surprised how often I have to "undo" in the morning after staying up all night coding ;)

go to that line in index.php, and remove the \ at the end of the line
if (isset($_GET['referredby']) || isset($_COOKIE['smf_referrals']))\
->
if (isset($_GET['referredby']) || isset($_COOKIE['smf_referrals']))
Title: Re: Referrals Mod
Post by: Shonick on April 14, 2009, 08:23:42 PM
Yes, I did change that already, still the problem does not solve, noname in the referrals field. When I locate this link

http://domain.com/test/index.php?referredby=1 and then click on register.

I know that the version 2.01 can log the referrer name in the field. You can also check that back, just an idea :)
Thanks.
Title: Re: Referrals Mod
Post by: Fustrate on April 14, 2009, 08:35:28 PM
I know the answer to this one :D

Register.template.php, find:
global $context, $settings, $options, $scripturl, $txt, $modSettings;
replace with
global $context, $settings, $options, $scripturl, $txt, $modSettings, $user_info;
Title: Re: Referrals Mod
Post by: Shonick on April 14, 2009, 08:39:46 PM
There is two, which one should I replace? first or second (default template)?
Title: Re: Referrals Mod
Post by: Fustrate on April 14, 2009, 08:40:14 PM
first
Title: Re: Referrals Mod
Post by: Shonick on April 14, 2009, 08:41:11 PM
Hihi, thanks. the second one is for admin
function template_admin_register()
I'm doing it right now
Title: Re: Referrals Mod
Post by: Shonick on April 14, 2009, 08:43:42 PM
Still does not work, nothing in the field. Anymore idea?
Title: Re: Referrals Mod
Post by: Fustrate on April 14, 2009, 09:05:16 PM
Issue solved... I hate regular expressions. Try this, it's worked fine in my testing.
Title: Re: Referrals Mod
Post by: Shonick on April 14, 2009, 09:18:33 PM
Hi Fustrate,

That is great. You not only solve that problem , but also improve one things. That is when I try to refresh the page. The hit counter still count 1 hit. In the old version, it does not count or count for each refresh.

Now, I can say that this version is almost perfect. :)

Thanks a lot

Have a good night Fustrate.
Title: Re: Referrals Mod
Post by: Fustrate on April 14, 2009, 09:19:46 PM
Thanks for helping me through this, and being patient. I'm hoping this version is stable :)
Title: Re: Referrals Mod
Post by: Shonick on April 14, 2009, 10:13:08 PM
that is no problem ,and thank you very much for great work and helpful. I am using it on my forum now.
Title: Re: Referrals Mod
Post by: Eclipse16V on April 15, 2009, 07:45:02 AM
Cool

It works.

Thanks Fustrate & viet   :D
Title: Re: Referrals Mod
Post by: jaa on April 18, 2009, 10:03:53 PM
How can i install it to my forum im using extreme6 theme. thanks
Title: Re: Referrals Mod
Post by: Fustrate on April 18, 2009, 10:15:04 PM
First install the mod, and then select your SMF version in the dropdown on the mod's download page, and click "Parse". Follow the instructions for all (name).template.php files, and if it's not in your theme, just skip it.
Title: Re: Referrals Mod
Post by: jaa on April 18, 2009, 11:03:43 PM
Thanks Fustrate, ill try it.. :)
Title: Re: Referrals Mod
Post by: Eclipse16V on April 22, 2009, 07:26:55 AM
Hi Fustrate,

I become this error when i will create a test account on my SMF 2.0RC1 with my as Referral (normal, not in the ACP):

QuoteThe database value you're trying to insert does not exist: referred_by

The Datebase is ok. :(
Title: Re: Referrals Mod
Post by: Fustrate on April 22, 2009, 11:00:53 AM
is there a referred_by column in your members table? You can check with phpMyAdmin or any other database management software.
Title: Re: Referrals Mod
Post by: genusis on April 22, 2009, 12:38:52 PM
hello I just installed this and tested it i get two errors, when a new user goes to the original site link with no referrals link and registers and writes in the referrals name i get this error

error, your db is not excepting referel_id.

when i use the referral link http://spirea.kozlowski.ws/forum/index.php?referredby=1
I get this error when registering

Wrong value type sent to the database. Integer expected. (p_referrals_no)

Any ideas on how to fix these, and thanl you if we can find a fix for this.



To help you out more i went and check my error report and heres the information it gives me

Only show the error messages of this member  Guest 

Reverse chronological order of list 

Today at 09:34:20 AM

Only show the error messages of this IP address \\\\\\\\\\\\\

Only show the error messages of this session 38e10c636aea877128e7894f77de5b8f
 
Only show the errors of this type Type of error: Critical

Only show the error messages of this URL http://spirea.kozlowski.ws/forum/index.php?action=register2

Only show the errors with the same message
Wrong value type sent to the database. Integer expected. (p_referrals_no)
Function: updatememberdata

Only show the errors from this file

File: forum/Sources/Subs.php
Line: 535

   
Only show the error messages of this member Guest

Reverse chronological order of list

Today at 09:17:34 AM

Only show the error messages of this IP address ////////////

Only show the error messages of this session ebde5b482b58979eb0882f2999e1f5ad

  Only show the errors of this type Type of error: Critical

Only show the error messages of this URL http://spirea.kozlowski.ws/forum/index.php?action=register2

Only show the errors with the same message

The database value you're trying to insert does not exist: referred_by
Function: registermember

Only show the errors from this file
File: forum/Sources/Subs-Members.php
Line: 743
Title: Re: Referrals Mod
Post by: Eclipse16V on April 22, 2009, 11:45:15 PM
Quote from: Fustrate on April 22, 2009, 11:00:53 AM
is there a referred_by column in your members table? You can check with phpMyAdmin or any other database management software.
Yes is it. All columns are in the member table.
Title: Re: Referrals Mod
Post by: genusis on April 23, 2009, 09:00:12 AM
@Eclipse16V

go into ./Sources/Load.php

Find

   if ($set == 'normal')
{
$select_columns = '


and under that look for
mem.referrals_no, mem.referred_by, mem.referred_on, mem.referrals_hits,


If there isn't one there add that.


then Find

elseif ($set == 'profile')
{
$select_columns = '

and under that look for
mem.referrals_no, mem.referrals_hits, mem.referred_on, mem.referred_by,

then find

elseif ($set == 'minimal')
{
$select_columns = '

under it look for
mem.referrals_no, mem.referred_by, mem.referrals_hits, mem.referred_on,

If there not there add those.

The look for

function loadReferral(){
replace the whole sub with

function loadReferral(){
global $smcFunc, $context, $user_info;

// Guests only!
if (!$user_info['is_guest'])
return;

if (isset($_GET['referredby'])){
// Sanitize - must be a valid number id
$referrer = (int) $_GET['referredby'];

// If not a valid id, then just return
if (empty($referrer)){
setcookie("smf_referrals", "", time() - 90000);
return;
}

$result = $smcFunc['db_query']('', '
SELECT real_name
FROM {db_prefix}members
WHERE id_member = {int:ref}',
array(
'ref' => $referrer
)
);

if ($smcFunc['db_num_rows']($result) < 1){
$smcFunc['db_free_result']($result);
setcookie("smf_referrals", "", time() - 90000);
return;
}

list ($name) = $smcFunc['db_fetch_row']($result);

$smcFunc['db_free_result']($result);

// If Cookie doesn't already exist, count it as a referral hit
if (empty($_COOKIE['smf_referrals'])){
// Increase referral hits by 1 for the referrer
updateMemberData($referrer, array('referrals_hits' => '+'));

# @ Hidden Easter Eggs @
# Use to give rewards for each referral hit
# Uncomment the line by removing // from the beginning of the line

# Reward with Karma
// updateMemberData($referrer, array('karma_good' => 'karma_good + 25'));

# Using SMF Shop? Give them money
// updateMemberData($referrer, array('money' => 'money + 100'));
}

// Set a ReferralCookie (overriding any existing one to extend the 60 days)
setcookie("smf_referrals", ($referrer . '#' . time()), (time() + (86400 * 60)));

// $user_info has more staying power at this point
$user_info['was_referred'] = array(
'referred_timestamp' => time(),
'referred_date' => timeformat(time()),
'referred_by_id' => $referrer,
'referred_by_name' => $name,
);
} else {
// Must contain hash, and not be empty
if (!eregi("([0-9]{1,8})#([0-9]{9,10})", $_COOKIE['smf_referrals'], $parts)){
setcookie("smf_referrals", "", time() - 90000);
return;
}

// Set a cookie, extending any existing one
setcookie("smf_referrals", $parts[0], (time() + (86400 * 60)));

$result = $smcFunc['db_query']('', '
SELECT real_name
FROM {db_prefix}members
WHERE id_member = {int:ref}',
array(
'ref' => $parts[1]
)
);

if ($smcFunc['db_num_rows']($result) < 1){
$smcFunc['db_free_result']($result);
setcookie("smf_referrals", "", time() - 90000);
return;
}

list ($name) = $smcFunc['db_fetch_row']($result);

$smcFunc['db_free_result']($result);

// $user_info has more staying power at this point
$user_info['was_referred'] = array(
'referred_timestamp' => $parts[2],
'referred_date' => timeformat($parts[2]),
'referred_by_id' => $parts[1],
'referred_by_name' => $name,
);
}
}


other than that that's should be all the is causing it.
Title: Re: Referrals Mod
Post by: Eclipse16V on April 24, 2009, 12:26:20 AM
@ genusis
What does it do?
It´s the same Code how the Code in the Mod.  ;)
I don´t replace because it is the same Code.
Title: Re: Referrals Mod
Post by: Fustrate on April 24, 2009, 12:38:33 AM
I've fixed both errors, just packaging it up now.

Upgrade to 2.2.6 now :)
Title: Re: Referrals Mod
Post by: Eclipse16V on April 24, 2009, 03:54:01 AM
Thanks
With 2.2.6 it run.

Cool  :D
Title: Re: Referrals Mod
Post by: Eclipse16V on April 24, 2009, 03:58:27 AM
Here is it in German:

// Referrals MOD
$txt['referrals_findreferrer'] = 'Werber suchen';
$txt['referrals_who'] = 'Geworben von:';
$txt['referrals_who_description'] = 'Wurdest Du von einem User geworben? Hier bitte eintragen oder einen User suchen.';
$txt['referrals_on'] = 'Am';
$txt['referrals_referrer_not_found'] = 'Der User der dich geworben hat, konnte nicht gefunden werden. Bitte &uuml;berprüfe deine Eingabe noch einmal oder einfach dieses Feld leer lassen.';
$txt['referrals_youwerereferred_by'] = 'von';
$txt['referrals_referrals'] = 'Geworbene User:';
$txt['referrals_referrals_hits'] = 'Werbelink Aufrufe:';
$txt['referrals_noneyet'] = 'Zurzeit keine Informationen vorhanden';
$txt['referrals_top5referrers'] = 'Top 5 Werber (Geworbene User)';
$txt['referrals_top5referrersbyposts'] = 'Top 5 Geworbene (Beitr&auml;ge geworbener User)';
$txt['referrals_referralsstats'] = 'Referrals';
$txt['referrals_referred_by'] = 'Geworben von:';
$txt['referrals_link'] = 'Werbelink:';
$txt['referrals_membersreferred'] = 'Geworbene User';
Title: Re: Referrals Mod
Post by: Fustrate on April 24, 2009, 10:32:58 AM
Thanks :) I'll add it to the package when I get home in a few hours
Title: Re: Referrals Mod
Post by: genusis on April 24, 2009, 08:17:53 PM
thanks man, @Eclipse16V  well i asked for it just to make sure because i know when i changed one variable in that area it caused that error for me XD.
Title: Re: Referrals Mod
Post by: Filipina on April 25, 2009, 03:07:14 AM
http://www.melindaspenpals.com/penpal-community/index.php?action=stats

off the top of your head do you have any idea why i am seeing this extra table trying to show on my stats page.  It is racking my brain  :)

// Start of Referrals Mod Stats
echo '
</table>
</td>
</tr><tr>
<td class="catbg" colspan="2" width="50%"><b>', $txt['referrals_top5referrers'], '</b></td>
<td class="catbg" colspan="2" width="50%"><b>', $txt['referrals_top5referrersbyposts'], '</b></td>
</tr><tr>
<td class="windowbg" width="20" valign="middle" align="center"><img src="', $settings['images_url'], '/stats_info.gif" width="20" height="20" alt="" /></td>
<td class="windowbg2" width="50%" valign="top">
<table border="0" cellpadding="1" cellspacing="0" width="100%">';

if (empty($context['total_referrals']))
echo '
<tr>
<td valign="top" style="text-align:center">', $txt['referrals_noneyet'], '</td>
</tr>';
else
foreach ($context['top_referrers'] as $referrer)
echo '
<tr>
<td width="60%" valign="top">', $referrer['link'], '</td>
<td width="20%" align="left" valign="top">', $referrer['referrals_no'] > 0 ? '<img src="' . $settings['images_url'] . '/bar.gif" width="' . $referrer['referrals_percent'] . '" height="15" alt="" />' : '&nbsp;', '</td>
<td width="20%" align="right" valign="top">', $referrer['referrals_no'], '</td>
</tr>';

echo '
</table>
</td>
<td class="windowbg" width="20" valign="middle" align="center"><img src="', $settings['images_url'], '/stats_info.gif" width="20" height="20" alt="" /></td>
<td class="windowbg2" width="50%" valign="top">
<table border="0" cellpadding="1" cellspacing="0" width="100%">';

if (empty($context['total_referrals_posts']))
echo '
<tr>
<td valign="top" style="text-align:center">', $txt['referrals_noneyet'], '</td>
</tr>';
else
foreach ($context['top_referrers_by_posts'] as $referrer)
echo '
<tr>
<td width="60%" valign="top">', $referrer['link'], '</td>
<td width="20%" align="left" valign="top">', $referrer['posts'] > 0 ? '<img src="' . $settings['images_url'] . '/bar.gif" width="' . $referrer['referralsposts_percent'] . '" height="15" alt="" />' : '&nbsp;', '</td>
<td width="20%" align="right" valign="top">', $referrer['posts'], '</td>
</tr>';


EDIT

one more thing I cannot figure out when someone uses this link below they end up somewhere strange... hmmmm could this be because of my Simple Portal and any idea how I can change where they land to either the forum main page or the Portal Front? Thanks for any assistance :)

http://www.melindaspenpals.com/penpal-community/index.php?referredby=1

Title: Re: Referrals Mod
Post by: Filipina on April 25, 2009, 11:49:11 AM
Ok I got the errors on the stats page fixed but I notice I only have one row of referral stats while I notice the picture on the MOD page shows two rows of referrals stats. Could it be because I do not have any stats to show for the second row so there is none?

Besides that the only other thing is maybe i need to alter the referral link due to the Portal? Thanks :)
Title: Re: Referrals Mod
Post by: Fustrate on April 25, 2009, 01:34:50 PM
Being a Simple Portal beta tester, I have no clue how it works :) odd, eh? I'm going to have to start beta testing so that I can answer your question... and about the first thing, are you sure the edits were done to Stats.php and Stats.template.php?
Title: Re: Referrals Mod
Post by: Filipina on April 25, 2009, 05:24:00 PM
Quote from: Fustrate on April 25, 2009, 01:34:50 PM
and about the first thing, are you sure the edits were done to Stats.php and Stats.template.php?

Thanks.... yes i just double checked using the parser and made the edits again and I am still missing the bottom row of referral stats... i must be screwing something up but cannot figure it out.

Would it be ok to attach the files here for review?  Let me know thanks
Title: Re: Referrals Mod
Post by: Fustrate on April 25, 2009, 05:26:09 PM
so you're talking about the "Posts by reffered members"-ish column?
Title: Re: Referrals Mod
Post by: Moneymaker13 on April 25, 2009, 07:20:23 PM
You said something like you can see the "Top Five Referrers"?

Where can I see that?
Title: Re: Referrals Mod
Post by: Fustrate on April 25, 2009, 07:22:59 PM
?action=stats
Title: Re: Referrals Mod
Post by: Filipina on April 25, 2009, 10:35:45 PM
wow frustrate so sorry i thought there were 4 different stats but i looked at the picture again and there is  "Top 5 Referrers (By Referrals)"  and "Top 5 Referrers (By Referred Members Posts)" and I already have this!  I looked at the image you had on the mod page wrong sorry, so all is fine.

If you are able to come up with something with the referral link let me know... I thought of just trying to change it to "index.php?action=forum?referredby=1" instead of "index.php?referredby=1" but something tells me it is not that easy :)
Title: Re: Referrals Mod
Post by: Fustrate on April 25, 2009, 10:45:05 PM
actually, that looks like it should work just fine. You can edit that in Profile.php or Profile.template.php, just seach for "referredby" and change the link format there.
Title: Re: Referrals Mod
Post by: Filipina on April 25, 2009, 10:58:46 PM
Unfotunately I tried it that way in FF and it doesn't fill in the name on registration... then i did it the regular way as the mod is designed and the referral name filled in  :(
Title: Re: Referrals Mod
Post by: Sudhakar Arjunan on April 26, 2009, 02:23:25 PM
After installing on my smf 2.0

I got this error throughout my local fourm

Fatal error: Cannot redeclare loadreferral() (previously declared in C:\wamp\www\smf\Sources\Subs.php:3968) in C:\wamp\www\smf\Sources\Load.php on line 2682
Title: Re: Referrals Mod
Post by: Fustrate on April 26, 2009, 02:25:54 PM
Did you uninstall the old version first? Remove the function from Subs.php if you didn't.
Title: Re: Referrals Mod
Post by: Sudhakar Arjunan on April 26, 2009, 03:08:24 PM
I am not sure . Hope i have already installed the old version.

And had overwritten the new version. Led me to this issue.

Went in to subs.php page and removed this line

      'referrals_no', 'referrals_hits', 'referrals_no',

Still the forum was not loading.
Title: Re: Referrals Mod
Post by: Fustrate on April 26, 2009, 04:04:13 PM
That wasn't what you were supposed to remove. It's a whole loadReferrals function at the end of the file.
Title: Re: Referrals Mod
Post by: Sudhakar Arjunan on April 27, 2009, 02:36:10 PM
Quote from: Fustrate on April 26, 2009, 04:04:13 PM
That wasn't what you were supposed to remove. It's a whole loadReferrals function at the end of the file.

Oops !!!

will try out today and update you.
Title: Re: Referrals Mod
Post by: MIAUS on April 29, 2009, 06:46:55 PM
Great Mod! Works like a charm! Thanks a lot :)

Here are the German translations:

$txt['referrals_findreferrer'] = 'Mitglied suchen';
$txt['referrals_who'] = 'Empfehlungen:';
$txt['referrals_who_description'] = 'Hat dir jemand diese Seite empfohlen?';
$txt['referrals_on'] = 'An';
$txt['referrals_referrer_not_found'] = 'Mitgliedsname existiert nicht. Bitte nochmal den Mitgliedsnamen überpr&uuml;fen oder das Feld leer lassen.';
$txt['referrals_youwerereferred_by'] = 'von';
$txt['referrals_referrals'] = 'Empfehlungen:';
$txt['referrals_referrals_hits'] = 'Anzahl Klicks auf Empfehlungslink:';
$txt['referrals_noneyet'] = 'Noch keine!';
$txt['referrals_top5referrers'] = 'Top 5 Werber (Nach Empfehlungen)';
$txt['referrals_top5referrersbyposts'] = 'Top 5 Werber (Nach Posts der geworbenen Mitglieder)';
$txt['referrals_referralsstats'] = 'Empfehlungen';
$txt['referrals_referred_by'] = 'Geworben von:';
$txt['referrals_link'] = 'Empfehlungs Link:';
$txt['referrals_membersreferred'] = 'Geworbene Mitglieder';
Title: Re: Referrals Mod
Post by: Sudhakar Arjunan on May 01, 2009, 10:53:16 AM
Quote from: Fustrate on April 26, 2009, 04:04:13 PM
That wasn't what you were supposed to remove. It's a whole loadReferrals function at the end of the file.

That worked good. I got my test forum back.

After removing the load code, what process will not work on my referral mod.
Title: Re: Referrals Mod
Post by: Fustrate on May 01, 2009, 12:11:42 PM
Err, it should work fine now. The code that you removed from Load.php is now in Subs.php, where it should be.
Title: Re: Referrals Mod
Post by: Sudhakar Arjunan on May 02, 2009, 03:14:18 PM
Quote from: Fustrate on April 26, 2009, 02:25:54 PM
Did you uninstall the old version first? Remove the function from Subs.php if you didn't.

I have removed it only on subs.php as you said and i have not touched it on load.php.

Oh... Now what to do.
Title: Re: Referrals Mod
Post by: Fustrate on May 02, 2009, 03:37:19 PM
Can you explain exactly what the problem is? I'm getting a little confused here...
Title: Re: Referrals Mod
Post by: Sudhakar Arjunan on May 02, 2009, 04:38:38 PM
Quote from: Fustrate on May 02, 2009, 03:37:19 PM
Can you explain exactly what the problem is? I'm getting a little confused here...

Earlier you said to remove the load code which is there at bottom of the page subs.php.

I did .

Now i had a doubt, why we have to remove it and what functionally will be missed when we remove the code.

you said, both the codes at subs.php and load.php were same. And said the code is working on subs.php.

but i have removed only the code which is there on subs.php and not on load.php
Title: Re: Referrals Mod
Post by: Fustrate on May 02, 2009, 06:20:23 PM
It's fine. The current version uses the one in Load.php, but the previous version had it in Subs.php. I moved it there because it is a function that loads something, hence it should be in Load.php. That's all.
Title: Re: Referrals Mod
Post by: Goodman854 on May 02, 2009, 08:49:09 PM
7.     Execute Modification     ./Themes/default/Display.template.php     Test failed
Any suggestions?
Title: Re: Referrals Mod
Post by: Fustrate on May 02, 2009, 09:08:37 PM
You need to do that edit by hand. On the mod download page, select your SMF version on the upper right and click "Parse". Find the edit that failed, and then do that edit to /Themes/default/Display.template.php.

If you're using a custom theme, you'll also need to do all applicable theme edits from that parse page to your theme's files, too.
Title: Re: Referrals Mod
Post by: KIMBAL on May 03, 2009, 06:33:34 AM
Hi Brilliant Mod e1 loves it on my forum.

I have 1 member whos refferal link wont work any ideas why

Thanks in advance
Title: Re: Referrals Mod
Post by: Fustrate on May 03, 2009, 07:43:57 AM
It will only work once per person referred... so they won't keep getting additional "Referral Hits" for the same person. Is that what you mean?
Title: Re: Referrals Mod
Post by: KIMBAL on May 03, 2009, 09:01:13 AM
No i mean it was working as it should and all of a sudden for this one member the link stopped working and they had to give the referree just a normal forum link and not a refer system link
Title: Re: Referrals Mod
Post by: Goodman854 on May 03, 2009, 11:29:50 PM
Quote from: Fustrate on May 02, 2009, 09:08:37 PM
You need to do that edit by hand. On the mod download page, select your SMF version on the upper right and click "Parse". Find the edit that failed, and then do that edit to /Themes/default/Display.template.php.

If you're using a custom theme, you'll also need to do all applicable theme edits from that parse page to your theme's files, too.
Tried that didn't work
Title: Re: Referrals Mod
Post by: mattchewone on May 07, 2009, 12:25:55 PM
I have had a member try to register but couldnt due to the referrals. So i thought i would give it a go myself and i entered a valid username and clicked submit and i got this:

QuoteThe database value you're trying to insert does not exist: referred_by

What could it be?
Title: Re: Referrals Mod
Post by: Shonick on May 09, 2009, 07:59:42 PM
Hi Fustrate,

Please check it, when I check the referrals stats. When someone use referrals link to register, it does not update the stats.

For example, someone has 5 referrals. The stats always show 0. Meaning they have no referrals
Title: Re: Referrals Mod
Post by: Fustrate on May 09, 2009, 09:29:01 PM
Any errors in the error log?

Sorry for not responding in this topic for a while... I've been really busy :(
Title: Re: Referrals Mod
Post by: Shonick on May 10, 2009, 12:21:02 PM
I'm talking about the old version 2.2.5. I update to the new version it was working fine. But the old state still does not update.

I meant, when a user aleady has 5 referrals, it showed 0. Now I update to the new version 2.2.6, it still shows 0, but when he got 1 more referrals he got 1 on the stats. so that meant he have 6 referrals in total but only 1 on the stats.

When I check he log, the 2.2.5 version, I did not see any critital error. but on 2.2.6 I have a critial error

Wrong value type sent to the database. Integer expected. (p_referrals_no)
Function: updateMemberData
line 535

Is there any way I can make the state show correctly?

thanks
Title: Re: Referrals Mod
Post by: mattchewone on May 11, 2009, 02:25:04 PM
Here we go just seen this -

Guest    May 07, 2009, 05:24:29 pm
79.76.225.213      a315764354dfdf2ac05a6c7c8d1b8a0e
    Type of error: Critical
http://www.ppforums.co.uk/index.php?action=register2
The database value you're trying to insert does not exist: referred_by
Function: registerMember
File: /xxxx/xxxx/SMF/www/Sources/Subs-Members.php
Line: 745
Title: Re: Referrals Mod
Post by: Goodman854 on May 11, 2009, 10:22:12 PM
7.     Execute Modification     ./Themes/default/Display.template.php     Test failed
Any suggestions?
I did manual edit still no go.
Title: Re: Referrals Mod
Post by: Xavi-Nena on May 16, 2009, 11:30:25 PM
I have this on 1.1.8 it installed fine no errors via package manager however I cannot get the referral link to show in the profiles? I am using ultimate profile mod, is there anyway way to fix this so that the referral link shows?
Title: Re: Referrals Mod
Post by: Xavi-Nena on May 16, 2009, 11:39:24 PM
also when trying to register as a new member this is what i get:

The referring user could not be found. Please double-check the name of the referrer. Or leave it blank.
Title: Re: Referrals Mod
Post by: Converser on May 24, 2009, 10:43:01 AM
I'm having trouble installing the mod. Everything works fine, referrals are counted the find member thing on Reg works.

But none of the text shows up anywhere. Like, in the profile page for members, it shows how many referrals and referral hits, as well as a drop down menu with referred members. But it doesn't have the text that says Referals: or Referal Link:

It also doesn;t show up alongside the posts a member makes. It installed fine, and where it didn't I made the manual changes so I don't know why it's not working.
Title: Re: Referrals Mod
Post by: Sabre™ on May 25, 2009, 05:14:31 AM
If you are using the english language files, check that the code has been added to your Modifications.english.php, or if you are using utf8, then check your Modifications.english-utf8.php.
If you are using a custom theme, check if it has its own language files, and add the code required.

Hopefully that helps :)
Title: Re: Referrals Mod
Post by: Converser on May 25, 2009, 03:08:35 PM
That worked! Thanks. I was using a different theme, but it's all working now.
Title: Re: Referrals Mod
Post by: Eclipse16V on May 28, 2009, 07:27:45 AM
Hi,
I have a problem with this Mod.
Look at the Attachment.
The lines are shifted and the views are not displayed between there are all 0.

SMF 2.0 RC1 and SMF 2.0 RC1-1
Referrals Mod 2.2.6
Title: Re: Referrals Mod
Post by: Fustrate on May 31, 2009, 01:28:47 AM
Quote from: Eclipse16V on May 28, 2009, 07:27:45 AM
Hi,
I have a problem with this Mod.
Look at the Attachment.
The lines are shifted and the views are not displayed between there are all 0.

SMF 2.0 RC1 and SMF 2.0 RC1-1
Referrals Mod 2.2.6
Err, there's no attachment...
Title: Re: Referrals Mod
Post by: Eclipse16V on May 31, 2009, 08:43:20 AM
Ohhhh,
sorry

Edit:
The Ref. View Counter is ok.
There is no error. The Refs are form the reg. site.
Only the Ref. Counter is not ok.
Hi displayed me 3 User and in the dropdown are 2 User.
Title: Re: Referrals Mod
Post by: Fustrate on May 31, 2009, 12:57:52 PM
Does this person have 3 or 2 people referred actually?
Title: Re: Referrals Mod
Post by: Eclipse16V on May 31, 2009, 01:17:13 PM
Yes, it was a account from me and I creat a new test user over the ref. link.
Title: Re: Referrals Mod
Post by: JBlaze on June 04, 2009, 08:22:50 AM
Well, since I can't bug you in IRC right now, I guess I gotta do it here... :P

Members are complaining that when redirected to the site via the referral link, for some reason the site doesn't show properly.
(i.e. Only the header and main menu show.)

Also, they say that in their profile, the link area won't show.

SMF 2.0 RC1-1
Default Theme
yadda yadda yadda

No rush. Let me know what you need to see. Most likely it's a IE thing as most of my members use that damn waste of software :)
Title: Re: Referrals Mod
Post by: primetime on June 11, 2009, 08:43:20 AM
I would like to show the "Top Referrers" in a simple portal block. Does anyone know how I could achieve this?


Thank you,
Prime
Title: Re: Referrals Mod
Post by: Shades. on June 11, 2009, 08:17:16 PM
Is this mod compatible with smf 2.0 RC1-1?
Title: Re: Referrals Mod
Post by: KahneFan on June 12, 2009, 12:04:31 AM
It appears to be working fine with my 1-1. I had to roll my version back while I installed it, but then I rolled it back to 1-1 after install.

When you go to your mod list, at the bottom is a button/link for "Advanced", if you click that, you can delete the "-1" and hit "Apply". Then install the mod. After install, go back to advanced and add the "-1" back.
Title: Re: Referrals Mod
Post by: SosniTo.sk on June 15, 2009, 03:39:59 PM
Hi, all,
I have installed this mod and I have a problem with its use.
Me did not change the database table, and now he writes me this error:

http://www.sosnito.sk/index.php?action=stats (http://www.sosnito.sk/index.php?action=stats)
QuoteUnknown column 'referrals' in 'field list'

Please give me the SQL command, which I would only entered into phpmyadmin.
Title: Re: Referrals Mod
Post by: Kyzer on June 16, 2009, 08:51:52 PM
Thanks, been looking for this, just found it lol,now if they just used your rep system i could +Rep you :D
Title: Re: Referrals Mod
Post by: Xavi-Nena on June 19, 2009, 06:42:55 AM
Ok I am using Ultimate Profile and having a hard time making the code for the profile page blend with the same table/header style...any suggestions?

Here is the chunk of code on my profile page included is the code for this mod however it is not in the same format as the other chunks of profile info:

// Do the containing table and table header.
echo '
<table border="0" cellpadding="4" cellspacing="1" align="center" id="profile_info" width="100%">';

// Do the left hand column - where all the important user info is displayed.
echo '
<tr>
<td width="50%" id="profile_left" valign="top">
<table border="0" cellpadding="4" cellspacing="1" class="bordercolor" width="100%" id="summary">
<tr>
<td class="titlebg" height="26" align="center">
<img src="', $settings['images_url'], '/icons/profile_sm.gif" alt="" align="top" />&nbsp;
', $txt['summary'], ' - ', $context['member']['name'], '
</td>
</tr>
<tr>
<td class="windowbg">
<table border="0" cellspacing="0" cellpadding="2" width="100%">
<tr>
<td width="30%" align="center">
', $context['member']['avatar']['image'], '<br /><br />
<i>', $settings['use_image_buttons'] ? '<img src="' . $context['member']['online']['image_href'] . '" alt="' . $context['member']['online']['text'] . '" align="middle" />' : $context['member']['online']['text'], $settings['use_image_buttons'] ? '<span class="smalltext"> ' . $context['member']['online']['text'] . '</span>' : '', '</i>
</td>
<td>
<table border="0" cellspacing="0" cellpadding="2" width="100%">
<tr>
<td><b>', $txt[68], ': </b></td>
<td>', $context['member']['name'], '</td>
</tr>';
if (!empty($modSettings['titlesEnable']) && $context['member']['title'] != '')
{
echo '
<tr>
<td><b>', $txt['title1'], ': </b></td>
<td>', $context['member']['title'], '</td>
</tr>';
}
echo '
<tr>
<td colspan="2" style="padding-bottom: 1em;"><i>', $context['member']['blurb'], '</i></td>
</tr>
<tr>
<td><b>', $txt[86], ': </b></td>
<td>', $context['member']['posts'], ' (', $context['member']['posts_per_day'], ' ', $txt['posts_per_day'], ')</td>
</tr><tr>
<td><b>', $txt[87], ': </b></td>
<td>', (!empty($context['member']['group']) ? $context['member']['group'] : $context['member']['post_group']), '</td>

</tr>
', !empty($context['member']['options']['mood_stars']) ? '</tr><tr>

<td><b>' . $txt['stars_mood']. '</b></td>

<td>' . $context['member']['options']['mood_stars'] . '</td>' : '', '
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>

<br />

<table border="0" cellpadding="4" cellspacing="1" class="bordercolor" width="100%" id="info1">
<tr>
<td class="windowbg">
<table border="0" cellspacing="0" cellpadding="2" width="100%">
<tr>
<td><b>', $txt[231], ': </b></td>
<td>', $context['member']['gender']['image'] ,' ', $context['member']['gender']['name'], '</td>
</tr>
<tr>
<td><b>', $txt[420], ':</b></td>
<td>', $context['member']['age'] . ($context['member']['today_is_birthday'] ? ' &nbsp; <img src="' . $settings['images_url'] . '/bdaycake.gif" width="40" alt="" />' : ''), '</td>
</tr>
<tr>
<td><b>', $txt[227], ':</b></td>
<td>', $context['member']['location'], '</td>
</tr>
<tr>
<td><b>', $txt[233], ': </b></td>
<td>', $context['member']['registered'], '</td>
</tr>
<tr>
<td><b>', $txt['lastLoggedIn'], ': </b></td>
<td>', $context['member']['last_login'], '</td>
</tr>
</table>
</td>
</tr>
</table>
<br>';


// Adds the referral/referred user information to the profile summary
echo '
<tr>
<td colspan="2"><hr size="1" width="100%" class="hrcolor" /></td>
</tr>
<tr>
<td><b>', $txt['referrals_referrals'], '</b></td>
<td>', $context['member']['referrals_no'];

// Show in dropdown of those referred
if (!empty($context['member']['referred_members'])){
echo '  <select onchange="location=options[selectedIndex].value;">
<option>', $txt['referrals_membersreferred'], '</option>';

foreach($context['member']['referred_members'] as $referred)
echo '
', $referred;

echo '
</select>';
}

echo '
</td>
</tr>
<tr>
<td><b>', $txt['referrals_referrals_hits'], '</b></td>
<td>', $context['member']['referrals_hits'], '</td>
</tr>';

if (!empty($context['member']['referred_by']))
echo'
<tr>
<td><b>', $txt['referrals_referred_by'], '</b></td>
<td>', $context['member']['referred_by_link'], ' ', $txt['referrals_on'], ' ', date("jS M Y",$context['member']['referred_on']), '</td>
</tr>';

echo '
<tr>
<td colspan="2"><b>', $txt['referrals_link'], '</b></td>
</tr>
<tr>
<td colspan="2" style="text-align: center;">
<input type="text" id="referral_link" value="', $scripturl, '?referredby=', $context['member']['id'], '" readonly="true" style="width:250px;" />
</td>
</tr>';

// Messenger type information.
Title: Re: Referrals Mod
Post by: Xavi-Nena on June 19, 2009, 07:05:00 AM
never mind i found my answer here http://www.simplemachines.org/community/index.php?topic=183574.msg1673883;topicseen#msg1673883
Title: Re: Referrals Mod
Post by: TurtleKicker on June 19, 2009, 09:20:31 PM
Just installed this (2.2.6) into SMF 1.1.9 and it's partially working. When someone registers via referral, under their profile it properly shows who they were referred by. But if you go to the referrer's profile, it says 0 referrals.
Title: Re: Referrals Mod
Post by: Fustrate on June 21, 2009, 02:07:48 PM
Quote from: SosniTo.sk on June 15, 2009, 03:39:59 PM
Hi, all,
I have installed this mod and I have a problem with its use.
Me did not change the database table, and now he writes me this error:

http://www.sosnito.sk/index.php?action=stats (http://www.sosnito.sk/index.php?action=stats)
QuoteUnknown column 'referrals' in 'field list'

Please give me the SQL command, which I would only entered into phpmyadmin.
Which SMF version are you using?

sremick: I'll look into that now.
Title: Re: Referrals Mod
Post by: SosniTo.sk on June 22, 2009, 12:55:22 AM
I use SMF 1.1.9
Title: Re: Referrals Mod
Post by: _Anthony_ on June 22, 2009, 03:13:02 AM
Thanks for the mod Fustrate
Title: Re: Referrals Mod
Post by: Fustrate on June 22, 2009, 01:21:25 PM
Quote from: SosniTo.sk on June 22, 2009, 12:55:22 AM
I use SMF 1.1.9
Check your {db_prefix}log_activity table for a column named 'referrals'. If it's not there, run this query:
ALTER TABLE {$db_prefix}log_activity
ADD COLUMN referrals int(8) NOT NULL default '0'

and replace {$db_prefix} with your actual database prefix (usually smf_)

sremick: I can't reproduce the error... both the number and the hits update correctly for me.
Title: Re: Referrals Mod
Post by: TurtleKicker on June 23, 2009, 01:20:49 PM
Quote from: Fustrate on June 22, 2009, 01:21:25 PMsremick: I can't reproduce the error... both the number and the hits update correctly for me.
So where do we go from here? Any files I can send you? Need to make this work.

I'll PM you details and links so you can see for yourself.
Title: Re: Referrals Mod
Post by: zanyuki on June 24, 2009, 12:57:26 AM
Would you guys have any support for RC1-1?
Title: Re: Referrals Mod
Post by: Fustrate on June 27, 2009, 12:24:25 PM
Yes, this should work on RC1-1.
Title: Re: Referrals Mod
Post by: Vekseid on June 30, 2009, 02:15:04 AM
It works fine in 1.1, except for ajax loads in the statistics page.
Title: Re: Referrals Mod
Post by: TurtleKicker on June 30, 2009, 03:09:28 AM
Quote from: Vekseid on June 30, 2009, 02:15:04 AM
It works fine in 1.1, except for ajax loads in the statistics page.

Not quite, for me at least. While a referred user's profile shows who they were referred by, referring users' profiles don't show the users they've referred.
Title: Re: Referrals Mod
Post by: [Core] on June 30, 2009, 05:28:43 AM
Great mod thanks.
Title: Re: Referrals Mod
Post by: TurtleKicker on July 03, 2009, 10:58:17 PM
I'd like to amend my problem. Now that I've gotten some more referrals, I think my problem is similar to those described by some other people recently.

I had been saying that a person's own page wouldn't show who they referred, while the referred person's page did show who referred them. This was correct while the referring person only had 1 referred person.

Now that one of them has referred 2 people, the behavior is a bit different. The referring person's profile gives a "1" for the count, but the pulldown correctly shows the two people they've referred.

So basically the problem is: the counter code is off by one, and so nothing appears until a person has referred at least 2 people. This should be a simple fix.
Title: Re: Referrals Mod
Post by: dragoon944 on July 04, 2009, 01:07:20 PM
My screen has gone blank and i have no back up of my forum, what should i do?
Title: Re: Referrals Mod
Post by: TheListener on July 07, 2009, 12:11:20 AM
Quote from: Fustrate on June 27, 2009, 12:24:25 PM
Yes, this should work on RC1-1.

Have tried to install this mod on my forum which is blackrain vg2 theme on RC1.1

The package you are trying to download or install is either corrupt or not compatible with this version of SMF.
Title: Re: Referrals Mod
Post by: Fustrate on July 07, 2009, 05:54:15 PM
I've uploaded a new package that just senses if it's 1.1 or 2.0
Title: Re: Referrals Mod
Post by: TheListener on July 07, 2009, 06:19:27 PM
Had an error on install on display template php.

Went to manually edit the file and the required text was not there.
Title: Re: Referrals Mod
Post by: biohazardjoker on July 08, 2009, 12:25:36 AM
i have a big erro dont let my user to register now please help i choose the option of karma rewards for the refferers

check the file and help me please
Title: Re: Referrals Mod
Post by: checkmater on July 09, 2009, 01:30:35 AM
Nice mod!!! Thanks!
Title: Re: Referrals Mod
Post by: Sabre™ on July 09, 2009, 01:52:45 AM
Quote from: dragoon944 on July 04, 2009, 01:07:20 PM
My screen has gone blank and i have no back up of my forum, what should i do?

Read [THIS] (http://docs.simplemachines.org/index.php?topic=494)
Which page(s) show the white screen?
As much information possible is the best way to receive assistance :)

Title: Re: Referrals Mod
Post by: Xavi-Nena on July 10, 2009, 12:12:18 AM
Is there a way to add who has referred a member after the new member has already joined? If so how?

For example if Member A refers 3 new members but the link code was not valid yet because I hadnt worked the kinks out, but now it is working, is there a way to give Member A credit for the 3 new members.
Title: Re: Referrals Mod
Post by: collins465 on July 10, 2009, 12:47:21 PM
i will like to install this mod, but i am using smf 1.1.9 with babylon themes. i am a newbie i dont know anything about editing in php, i have gone through the whole replies here and my head is filled up.

i need someone to help me out and give me directions on how to installl it without have problems.

i have attached my babylon  index.template.php incase editing is needed

thanks alot
Title: Re: Referrals Mod
Post by: webgeekph on July 13, 2009, 02:09:26 AM
after upgrading from 2.0 RC1-0 to  2.0 RC1-1 
i encounter this error please help me how to fixed this & can you help me how to disable all mod by file edits?

Fatal error: Cannot redeclare loadreferral() (previously declared in /home/webgeekph/beta.webgeekph.com/Sources/Load.php:2575) in /home/webgeekph/beta.webgeekph.com/Sources/Load.php on line 2773

checkout this http://beta.webgeekph.com
Title: Re: Referrals Mod
Post by: zanyuki on July 16, 2009, 10:30:02 AM
Hi!

Great mod so far.

Do we have support for RC1.2?
Title: Re: Referrals Mod
Post by: aalex on July 17, 2009, 09:31:00 AM
I have a problem in a forum that this mod USA or other functionality with msm noticed that the members appear in the profile above, and not in my .. how can I add this in your profile?


see attached images



Title: Re: Referrals Mod
Post by: aalex on July 18, 2009, 02:06:27 PM
and friends think that this problem has gone before now appears, but does not appear very well ..


I am now is with another problem, the mod does not count some of the members listed as shown in the image:

(http://www.uploadimagens.com/upload/c635a71279e375c9dc92c77d166a4008.gif)


my version smf2.0rc1-1
Title: Re: Referrals Mod
Post by: Fustrate on July 20, 2009, 02:03:08 PM
I'm going to get another team member to look at this, since I'm stumped.
Title: Re: Referrals Mod
Post by: Fustrate on July 20, 2009, 02:52:53 PM
Did you have a lot of members delete their accounts after registering and giving a referral?
Title: Re: Referrals Mod
Post by: aalex on July 21, 2009, 06:04:34 PM
not quite understand friend, but it is so I have the mod installed, and he is counting wrong, how to see in the image
Title: Re: Referrals Mod
Post by: silber112 on July 22, 2009, 01:30:45 AM
I am using      2.0.1  how can i update?¿

Do I have to unistal it and instal the new one? Is the old data going to be delited if i do it?
Title: Re: Referrals Mod
Post by: Gaurav Arora on July 30, 2009, 01:49:52 PM
Quote from: Shadow82x on March 03, 2008, 07:42:19 PM
I believe this mod is only supported on SMF2.0 beta or above. Which is only downloadable for charter.members. Use Karlbenson's mod for the SMF1.1 branch.

Could you please provide me the link of this mod.

I have tried the upgraded one but it tested as error.
Title: Re: Referrals Mod
Post by: Gaurav Arora on July 30, 2009, 01:54:07 PM
I have tried to installed this mod and ended with some Test execution fails:

Installations actions for "Referrals Mod":
Installing this package will perform the following actions:
Type   Action   Description
1.   Execute Code   install_1-1.php   
2.   Execute Modification   ./index.php   Test successful
3.   Execute Modification   ./Sources/Load.php   Test successful
4.   Execute Modification   ./Sources/Profile.php   Test successful
5.   Execute Modification   ./Sources/Register.php   Test successful
6.   Execute Modification   ./Sources/Stats.php   Test successful
7.   Execute Modification   ./Themes/default/Display.template.php   Test failed
8.   Execute Modification   ./Themes/default/Profile.template.php   Test successful
9.   Execute Modification   ./Themes/default/Register.template.php   Test successful
10.   Execute Modification   ./Themes/default/Stats.template.php   Test successful
11.   Execute Modification   ./Themes/default/Xml.template.php   Test successful
12.   Execute Modification   ./Themes/default/languages/Modifications.english.php   Test successful
13.   Execute Modification   ./Themes/default/languages/Modifications.english-utf8.php   Skipping file
14.   Execute Modification   ./Themes/default/languages/Modifications.english_british.php   Skipping file
15.   Execute Modification   ./Themes/default/languages/Modifications.english_british-utf8.php   Skipping file
16.   Execute Modification   ./Themes/default/languages/Modifications.spanish.php   Skipping file
17.   Execute Modification   ./Themes/default/languages/Modifications.spanish-utf8.php   Skipping file
18.   Execute Modification   ./Themes/default/languages/Modifications.spanish_es.php   Skipping file
19.   Execute Modification   ./Themes/default/languages/Modifications.spanish_es-utf8.php   Skipping file
20.   Execute Modification   ./Themes/default/languages/Modifications.spanish_latin.php   Test successful
21.   Execute Modification   ./Themes/default/languages/Modifications.spanish_latin-utf8.php   Skipping file
22.   Execute Modification   ./Themes/default/languages/Modifications.spanish-utf8.php   Skipping file
23.   Execute Modification   ./Themes/default/languages/Modifications.spanish.php   Skipping file
24.   Execute Modification   ./Themes/default/languages/Modifications.portuguese_pt.php   Skipping file
25.   Execute Modification   ./Themes/default/languages/Modifications.portuguese_pt-utf8.php   Skipping file
26.   Execute Modification   ./Themes/default/languages/Modifications.arabic-utf8.php   Skipping file
---

Can anyone help me to sort out this please?
Title: Re: Referrals Mod
Post by: Gaurav Arora on July 30, 2009, 03:53:35 PM
Thanks Fustrate

I have installed manually.

But still there are some issues:

1. It does not redirect to register page after : http://www.msdotnetheaven.com/forums/index.php?referredby=1
2. No Referall data available on member profile
3. No status report available for Referals

Can you please provide info
Title: Re: Referrals Mod
Post by: Gaurav Arora on July 30, 2009, 04:31:05 PM
No one is here for help :'(
Title: Re: Referrals Mod
Post by: Gaurav Arora on July 30, 2009, 09:16:20 PM
Thanks,

I found the reason I am using portal so, it works as: http://www.msdotnetheaven.com/forums/index.php?action=register;referredby=12


Thanks for support.
Now, everything is fine. :D ;) ;D 8)
Title: Re: Referrals Mod
Post by: Sabre™ on July 30, 2009, 09:26:48 PM
Isn't   index.php?action=register   the correct line with or without a portal?
Congrats on sorting it out mate :)
Title: Re: Referrals Mod
Post by: Fustrate on July 31, 2009, 02:36:37 AM
we sorted it out via PM, the plain referredby=# doesn't go to the forum, but adding ?action=register helps it go through (so would ?action=forum)
Title: Re: Referrals Mod
Post by: Xavi-Nena on August 02, 2009, 10:26:17 AM
Quote from: NenaGb on July 10, 2009, 12:12:18 AM
Is there a way to add who has referred a member after the new member has already joined? If so how?

For example if Member A refers 3 new members but the link code was not valid yet because I hadnt worked the kinks out, but now it is working, is there a way to give Member A credit for the 3 new members.

bump
Title: Re: Referrals Mod
Post by: Fustrate on August 02, 2009, 07:57:15 PM
go into your database, find Member A, increased their referrals_no by 3

find the 3 members, set their referred_by to Member A's id_member

Regarding the incorrect member counts, I'm no longer looking into that, as I can't reproduce it and neither can any other team member. Sorry =\
Title: Greek
Post by: dannys on August 05, 2009, 04:39:56 AM
greek


$txt['referrals_findreferrer'] = 'Βρείτε παραπομπέα';
$txt['referrals_who'] = 'Πληροφορίες παραπομπής:';
$txt['referrals_who_description'] = 'Ποίος σας παρέπεμψε σε αυτήν την περιοχή;';
$txt['referrals_on'] = 'Ενεργό';
$txt['referrals_referrer_not_found'] = 'Ο αναφερόμενος χρήστης δεν μπορούσε να βρεθεί. Παρακαλώ διπλοελέγξτε το όνομα του referrer. Ή αφήστε το κενό.
';
$txt['referrals_youwerereferred_by'] = 'Από';
$txt['referrals_referrals'] = 'Παραπομπές:';
$txt['referrals_referrals_hits'] = 'Σύνδεσμος χτυπημάτων παραπομπής:';
$txt['referrals_noneyet'] = 'Κανένας ακόμα!';
$txt['referrals_top5referrers'] = 'Κορυφαίοι 5 Referrers (από τις παραπομπές)';
$txt['referrals_top5referrersbyposts'] = 'Κορυφαίοι 5 Referrers (απο παραπεμπτικά θέματα μελών)';
$txt['referrals_referralsstats'] = 'Παραπομπές';
$txt['referrals_referred_by'] = 'Παραπέμφθηκε απο:';
$txt['referrals_link'] = 'Συνδεσμος παραπομπών';
$txt['referrals_membersreferred'] = 'Μέλοι απο παραπομπές';


i can't find referrer(word) on greek :P
Title: Re: Referrals Mod
Post by: fff on August 06, 2009, 11:16:41 AM
I tried to  install manually this mod but I didnt succeed.
I think that I did everything correctly.
But I can't open the topics in my forum because the following error message is showing:

Database Error
Unknown column 'mem.referrals_no' in 'field list'
File: /home/vhosts/trustedptc.ueuo.com/Sources/Load.php
Line: 893

What is the problem?
This is my 1.1.9 forum http://trustedptc.ueuo.com/
Title: Re: Referrals Mod
Post by: Fustrate on August 07, 2009, 02:35:06 AM
Take install_1-1.php from the package, upload it to your main forum directory (next to index.php and /Sources/ and /Themes/) and go to it in your browser. That should do all of the necessary DB stuff for you.


Thanks for the translation, dannys :) I'll add it when I get some spare time
Title: Re: Referrals Mod
Post by: ninaxboo on August 11, 2009, 05:02:31 PM
I did something kind of dumb I deleted the package without uninstaling it.
What can I do to get rid of the stats on the page?
Sorry
Title: Re: Referrals Mod
Post by: Sabre™ on August 11, 2009, 07:46:10 PM
You could either manually uninstall the mod, or go into your packages folder, and reupload the exact version of the referrals mod that was once there.
Then go into your Packages section in your admin panel and see if it is showing there.
If so, uninstall as normal if you so desire to.
Title: Re: Referrals Mod
Post by: rayosx on August 16, 2009, 02:25:05 AM
guys,
If I received this error

10. Execute Modification ./Themes/default/Register.template.php Test failed
  1. Add After ./Themes/default/Register.template.php Test successful
  2. Add Before ./Themes/default/Register.template.php Test failed


Do I need to install manually?  and install the replace code with  before the found code?

Please help


Title: Re: Referrals Mod
Post by: Bizzzoyd on August 16, 2009, 04:21:07 AM
I am new to all of this is there a link to a tutorial on how to set this up? Or can someone explain this to me i downloaded the WinRar file and they are XML Documents but which ones to i upload and where do i upload them? I am hosting with Hostgator if that matters at all.

Thanks!
Title: Re: Referrals Mod
Post by: sammykay on August 17, 2009, 11:10:41 PM
sorry if this has been answered, but on another smf forum site (that isnt mine), in their forum stats, they have 2 extra referral stats:

Top 10 Referrers (By Referrals) this month
and
Top 10 referrers (By referred members posts) this month

how do i get those 2 extra stats on my forum??
Title: Re: Referrals Mod
Post by: topmybux on August 17, 2009, 11:18:06 PM
Is there any way to add a post requirement to the ref mod so new users have to post atleast x number of post before they can official become a refered member?

Thanks
Title: Re: Referrals Mod
Post by: Fustrate on August 18, 2009, 03:37:56 AM
rayosx - yes.

Bizzzoyd - You need to upload the entire zip to the package manager in your admin panel. go to Packages > Download Packages and upload it there, and then follow the instructions (mostly just button pushing).

sammykay - were the edits made to Sources/Stats.php and Themes/yourtheme/Stats.template.php? If not, you'll need to make them by hand.

Lastly, I'm handing this modification over to JBlaze. All future questions on this mod should be directed to him, although I will retain "Additional Author" status.
Title: Re: Referrals Mod
Post by: zagrom on August 27, 2009, 10:04:25 PM
I have had some odd issues after manually adding the referral mod,
I haven't manually taken it off yet, but I have checked all the code
at least twice but Im not sure where the issues are coming from,

Examples of issues after install:
  -Cant "Preview" reply's
  -Some site images aren't loading (stats_posters.gif, stats_info.gif, ect)
  -And most all referral related thing seem incomplete,
(http://i255.photobucket.com/albums/hh134/Zagrom/Untitled-10-1.gif)

Any ideas would be great, and worse case I manually remove the code.
Thanks for any help
Title: Re: Referrals Mod
Post by: JBlaze on August 28, 2009, 02:52:29 AM
Try clearing your forum cache.

Admin -> Maintenance -> Routine -> Clear cache
Title: Re: Referrals Mod
Post by: zagrom on August 28, 2009, 10:40:55 AM
QuoteAdmin -> Maintenance -> Routine -> Clear cache

Is that in 2.x?   I don't see that option.
Sorry, forgot to mention Im in 1.1.10, I have performed all the
other sorta of maintenance tho without luck.
Title: Re: Referrals Mod
Post by: zagrom on September 03, 2009, 08:44:38 PM
Forget it, I just removed it..
Title: Re: Referrals Mod
Post by: Sabre™ on September 03, 2009, 09:02:35 PM
Although you removed the mod:
Did it work ok in the default theme?
Did you add the images to your custom themes 'images' folder?
You manually installed all of the code, so did you make the changes to your index.php? The one in the root of your forum, not in your themes folder.

Quote from: zagrom on September 03, 2009, 08:44:38 PM
Forget it, I just removed it..

p.s.
Some of the code is still installed in your templates ;)
If you'd like to give it another try, I could help you :)
It will cost you $350 American dollars, or one of   :)  <~~ these in your next post  ;D
Title: Re: Referrals Mod
Post by: DaBrute on September 26, 2009, 09:03:01 PM
How do I get to this section?
http://custom.simplemachines.org/mods/index.php?action=download;mod=1114;id=50546;image
Title: Re: Referrals Mod
Post by: JBlaze on September 26, 2009, 09:03:52 PM
http://www.mysite.com/index.php?action=stats ;D
Title: Re: Referrals Mod
Post by: DaBrute on September 26, 2009, 09:22:33 PM
Quote from: JBlaze on September 26, 2009, 09:03:52 PM
http://www.mysite.com/index.php?action=stats ;D
oh..i thought it was a link on the site to get it.
Title: Re: Referrals Mod
Post by: JBlaze on September 26, 2009, 10:44:34 PM
Quote from: DaBrute on September 26, 2009, 09:22:33 PM
Quote from: JBlaze on September 26, 2009, 09:03:52 PM
http://www.mysite.com/index.php?action=stats ;D
oh..i thought it was a link on the site to get it.

There is a link. Look on your board index in the forum stats area in the info center. There is a link called [More Stats]

Click that ;D
Title: Re: Referrals Mod
Post by: DaBrute on September 27, 2009, 01:50:33 AM
Quote from: JBlaze on September 26, 2009, 10:44:34 PM
Quote from: DaBrute on September 26, 2009, 09:22:33 PM
Quote from: JBlaze on September 26, 2009, 09:03:52 PM
http://www.mysite.com/index.php?action=stats ;D
oh..i thought it was a link on the site to get it.

There is a link. Look on your board index in the forum stats area in the info center. There is a link called [More Stats]

Click that ;D
good grief  lol  thanks
Title: Re: Referrals Mod
Post by: DaBrute on September 27, 2009, 08:07:03 AM
Quote from: DaBrute on September 27, 2009, 01:50:33 AM
Quote from: JBlaze on September 26, 2009, 10:44:34 PM
Quote from: DaBrute on September 26, 2009, 09:22:33 PM
Quote from: JBlaze on September 26, 2009, 09:03:52 PM
http://www.mysite.com/index.php?action=stats ;D
oh..i thought it was a link on the site to get it.

There is a link. Look on your board index in the forum stats area in the info center. There is a link called [More Stats]

Click that ;D
good grief  lol  thanks
this mod by default adds the admin name without using the referral code. anybody else notice this?
Title: Re: Referrals Mod
Post by: JBlaze on September 27, 2009, 10:46:36 AM
Could you explain a bit more?
Title: Re: Referrals Mod
Post by: DaBrute on September 27, 2009, 11:49:52 AM
Quote from: JBlaze on September 27, 2009, 10:46:36 AM
Could you explain a bit more?
ok lets say someone doesn't use the referral link?  When they go register the admin name is in the referral box by default.
Title: Re: Referrals Mod
Post by: gman123 on October 09, 2009, 04:31:16 PM
PLEASE help me I really want this mod to work on my forum but it doesn't work

It breaks my forum. Ideas?
EDIT:
(http://letsvidz.com/igusc/isc/images/187342Picture%209.png)

And it says:
682:       </td>
683:    </tr>
684: </table>';
685:    }
686:    if ($context['show_spellchecking'])
687:       echo '
688: <form action="', $scripturl, '?action=spellcheck" method="post" accept-charset="', $context['character_set'], '" name="spell_form" id="spell_form" target="spellWindow"><input type="hidden" name="spellstring" value="" /></form>';
689: }
690:

691: ?>

692:
693:
Title: Re: Referrals Mod
Post by: Sabre™ on October 09, 2009, 04:57:03 PM
It is most likely you've forgotten to add a  }
Attach your display.template.php for somebody to fix it for you.
Title: Re: Referrals Mod
Post by: gman123 on October 09, 2009, 07:48:22 PM
Quote from: Sabre™ on October 09, 2009, 04:57:03 PM
It is most likely you've forgotten to add a  }
Attach your display.template.php for somebody to fix it for you.
I didn't manually install it but ok. I'll attach it!
Title: Re: Referrals Mod
Post by: Sabre™ on October 09, 2009, 08:31:23 PM
Looking at that template, to put things short and simple, it is buggered, but not unfixable.
You have duplicate code, multiple code that has been canceled out, and a bit of work to do fixing it up.
None of which have anything to do with this mod.
This mod isn't even installed into that template.
I suggest going over it, and fixing it, then search your other templates to remove any other duplicates you have.
Title: Re: Referrals Mod
Post by: gman123 on October 09, 2009, 10:39:55 PM
Quote from: Sabre™ on October 09, 2009, 08:31:23 PM
Looking at that template, to put things short and simple, it is buggered, but not unfixable.
You have duplicate code, multiple code that has been canceled out, and a bit of work to do fixing it up.
None of which have anything to do with this mod.
This mod isn't even installed into that template.
I suggest going over it, and fixing it, then search your other templates to remove any other duplicates you have.

How come it didn't happen untill I installed this mod? Instantly?
Title: Re: Referrals Mod
Post by: Sabre™ on October 09, 2009, 11:14:56 PM
I dont know mate, did you install another mod before this one, before going to a topic and checking?
Because if you did, I can assure you that you would have received the same error.
I can tell this just by looking at your code.
When you install a mod, check the areas it adds itself to.
To be more specific about your error, it seems you have installed a mod that does something with ads.
It is contributing to only one of a couple errors in that template alone.
I have no time to help you with cleaning it up, as I'm going up the coast. Whatever mod that is, get them to look at your template and help you clean it up, otherwise I may look into it tomorrow night.
Bump this topic tomorrow if it isnt fixed, to remind me.

Good luck :)
Title: Re: Referrals Mod
Post by: gman123 on October 10, 2009, 01:09:57 AM
Quote from: Sabre™ on October 09, 2009, 11:14:56 PM
I dont know mate, did you install another mod before this one, before going to a topic and checking?
Because if you did, I can assure you that you would have received the same error.
I can tell this just by looking at your code.
When you install a mod, check the areas it adds itself to.
To be more specific about your error, it seems you have installed a mod that does something with ads.
It is contributing to only one of a couple errors in that template alone.
I have no time to help you with cleaning it up, as I'm going up the coast. Whatever mod that is, get them to look at your template and help you clean it up, otherwise I may look into it tomorrow night.
Bump this topic tomorrow if it isnt fixed, to remind me.

Good luck :)
Alright sorry. I dont really have enough knowledge in this field yet so when ever you can please try to fix it if you can. Thanks.

EDIT:
WOW I ACTUALLY FIXED IT! BUT still need some assistance.

I took the display from a forum on my other site and used it and added the stuff in. Hope nothings missing, what does display template effect? Just post?
Title: Re: Referrals Mod
Post by: Sabre™ on October 11, 2009, 08:21:02 PM
Congrats mate!
If you think some mods may not be installed into that template, try uninstalling the mods, ONLY if it says the display.template.php has failed, and then reinstall them. One by one.

This template displays how many referrals the person has under their post count.

Good job :)
Title: Re: Referrals Mod
Post by: gman123 on October 11, 2009, 11:20:26 PM
Quote from: Sabre™ on October 11, 2009, 08:21:02 PM
Congrats mate!
If you think some mods may not be installed into that template, try uninstalling the mods, ONLY if it says the display.template.php has failed, and then reinstall them. One by one.

This template displays how many referrals the person has under their post count.

Good job :)

Ya I guess it wasn't really any different then normal codeing stuff just figureding out were it goes or what it stands for but I'll post back if I need any thing. Thanks.
Title: Re: Referrals Mod
Post by: rtessar on October 21, 2009, 08:43:12 PM
I am creating a advertising social network using version SMF 2.0 RC1.2. I loaded the referral mod but nothing shows up. Is it supported for this version or is there another Referral mod I need to get.

Thank You in advance
Randy
Title: Re: Referrals Mod
Post by: johnsonbobby on October 24, 2009, 11:03:15 PM
hello , i installed this mod on my forums but when the link is clicked for the referal it takes you to a screen that only shows my shoutbox . the forum boards are missing . .
have a look .
http://berryaddict.net/forum/index.php?referredby=1
Title: Re: Referrals Mod
Post by: JBlaze on October 24, 2009, 11:56:07 PM
Quote from: rtessar on October 21, 2009, 08:43:12 PM
I am creating a advertising social network using version SMF 2.0 RC1.2. I loaded the referral mod but nothing shows up. Is it supported for this version or is there another Referral mod I need to get.

Thank You in advance
Randy

Can you provide some more specifics? Exactly what isn't showing up?


Quote from: johnsonbobby on October 24, 2009, 11:03:15 PM
hello , i installed this mod on my forums but when the link is clicked for the referal it takes you to a screen that only shows my shoutbox . the forum boards are missing . .
have a look .
http://berryaddict.net/forum/index.php?referredby=1

It does that on purpose. There is nothing set to display when $_REQUEST['referredby'] is set in the URL, so it just loads the site theme.
Title: Re: Referrals Mod
Post by: rtessar on October 25, 2009, 12:50:12 AM
Its shows up now in the stats area and if I create a link with my ID # it takes to the site, but its just the chat that shows up. I have a different them loaded but the default is what everyone starts with. It does not show up in the Profile pages for anyone. So no one knows its even there. It also shows  Referrals, twice under my name in the forums. Here is the link to my site.

http://www.angelsmerchantmall.com/amm_forum/index.php

Right now the site is still in testing mode with a few members helping out. Just not sure how to get it working properly without taking the site down. I have already received the dreaded Fatel Error page, but was able to fix it up til now.

Thank You
Randy
Title: Re: Referrals Mod
Post by: JBlaze on October 25, 2009, 12:58:25 AM
I see that you are using Ultimate Profile as well. I have not set up this mod to work with UP, so it would take some modification to make it show on the profile page.

I'll see what I can do. However, I am leaving in a few hours to go on vacation for about 2 weeks, so I won't be able to do it until then.
Title: Re: Referrals Mod
Post by: johnsonbobby on October 25, 2009, 01:34:25 AM
QuoteIt does that on purpose. There is nothing set to display when $_REQUEST['referredby'] is set in the URL, so it just loads the site theme.

is there a way to change this ?
Title: Re: Referrals Mod
Post by: LC on October 26, 2009, 11:41:04 PM
Quote from: JBlaze on October 25, 2009, 12:58:25 AM
I see that you are using Ultimate Profile as well. I have not set up this mod to work with UP, so it would take some modification to make it show on the profile page.

I'll see what I can do. However, I am leaving in a few hours to go on vacation for about 2 weeks, so I won't be able to do it until then.
I would love it if you did too! I use Ultimate Profile as well I was about to ask how to move the profile.template.php code in there so it shows up for the user. :)

Would make referring much more easy for them.

Have a nice vacation!
Title: Re: Referrals Mod
Post by: rtessar on October 27, 2009, 12:11:35 AM
OK sounds good, I would appreciate having it working with the Ultimate Profile. Hopefully your back in time and have it done for the Nov 15th opening I am planning.

Thank You
Randy
Title: Re: Referrals Mod
Post by: Sabre™ on October 27, 2009, 12:20:41 AM
EDIT:

If you cannot wait...

search for
// Messenger type information.

and add before it
// Adds the referral/referred user information to the profile summary
echo '
    <table border="0" cellpadding="4" cellspacing="1" class="bordercolor" width="100%" id="info1">
    <tr>
<td class="windowbg">
<table border="0" cellspacing="0" cellpadding="2" width="100%">
<tr>
<td colspan="2"><hr size="1" width="100%" class="hrcolor" /></td>
</tr>
<tr>
<td><b>', $txt['referrals_referrals'], '</b></td>
<td>', $context['member']['referrals_no'];

// Show in dropdown of those referred
if (!empty($context['member']['referred_members'])){
echo '  <select onchange="location=options[selectedIndex].value;">
<option>', $txt['referrals_membersreferred'], '</option>';

foreach($context['member']['referred_members'] as $referred)
echo '
', $referred;

echo '
</select>';
}

echo '
</td>
</tr>
<tr>
<td><b>', $txt['referrals_referrals_hits'], '</b></td>
<td>', $context['member']['referrals_hits'], '</td>
</tr>';

if (!empty($context['member']['referred_by']))
echo'
<tr>
<td><b>', $txt['referrals_referred_by'], '</b></td>
<td>', $context['member']['referred_by_link'], ' ', $txt['referrals_on'], ' ', date("jS M Y",$context['member']['referred_on']), '</td>
</tr>';

echo '
<tr>
<td colspan="2"><b>', $txt['referrals_link'], '</b></td>
</tr>
<tr>
<td colspan="2" style="text-align: center;">
<input type="text" id="referral_link" value="', $scripturl, '?referredby=', $context['member']['id'], '" readonly="true" style="width:250px;" />
</td>
</tr>
    </table>
</td>
</tr>
</table>';


or the modified package is attached.
I'll remove it when JBlaze gets back.
Title: Re: Referrals Mod
Post by: LC on October 27, 2009, 02:20:28 AM
Edit: Got it Working. Nice.  Thank you Sabre. :)
Title: Re: Referrals Mod
Post by: Sabre™ on October 27, 2009, 02:34:00 AM
Yes indeed, it only means that another piece of code has occupied/edited the area in which this one is searching for.
If you attach those two templates, I'll edit an install.xml to match those changes, so you can add it to your package and upload and uninstall it anytime through your package manager.

EDIT:
lol
My pleasure :)
Title: Re: Referrals Mod
Post by: LC on October 27, 2009, 02:34:46 AM
Quote from: Sabre™ on October 27, 2009, 02:34:00 AM
Yes indeed, it only means that another piece of code has occupied/edited the area in which this one is searching for.
If you attach those two templates, I'll edit an install.xml to match those changes, so you can add it to your package and upload and uninstall it anytime through your package manager.
Thank you. I got it working now. Hehe. :) You rock!
Title: Re: Referrals Mod
Post by: littleblue on October 28, 2009, 03:15:58 PM
Forgive me if this has been discussed already, I couldn't find anything via the search function.

I have version 2.2.6 installed on my 2.0 RC1.2 forum (no other mods so nothing can interfere) and it works smoothly - the only problem is that the referrals count isn't correct, or I just don't understand it at all?

Three people have registered via my referral link. I see them listed in the drop-down menu in my profile. But at the same time, my profile and that stats page say that I have seven referrals. Where does that number come from?

Otherwise, fantastic feature, thank you :)
Title: Re: Referrals Mod
Post by: Eclipse16V on October 28, 2009, 04:48:25 PM
Same problem
Title: Re: Referrals Mod
Post by: rtessar on October 28, 2009, 05:39:42 PM
well no matter what I do it still wont show up on the profile page. Just not having any luck.
Title: Re: Referrals Mod
Post by: Tomkinss on October 31, 2009, 12:52:11 PM
Please help:
Unknown column 'referrals' in 'field list'
Súbor: /webhosting/sosnito.sk/www/Sources/Stats.php
Riadok: 524


524:
GROUP BY stats_year, stats_month", __FILE__, __LINE__);
Title: Re: Referrals Mod
Post by: duder673 on November 05, 2009, 11:46:41 AM
This is a cool mod, is there any way that I could set it up so that members of my site could pass out urls that automatically tell me who referred them?

A lot of people forget to enter referral information I have noticed.
Title: Re: Referrals Mod
Post by: JBlaze on November 05, 2009, 05:02:04 PM
Quote from: duder673 on November 05, 2009, 11:46:41 AM
This is a cool mod, is there any way that I could set it up so that members of my site could pass out urls that automatically tell me who referred them?

A lot of people forget to enter referral information I have noticed.

In each members profile, there is a link that has ?referredby=2 where 2 is the id of that member. When someone clicks that link and registers, it automatically sets that id as the referrer.
Title: Re: Referrals Mod
Post by: kalibugan on November 05, 2009, 06:23:07 PM
help, some text are missing after i have successfully installed the mod. i highlighted in YELLOW where the text are suppose to appear.

(http://img694.imageshack.us/img694/4408/80286966.jpg)
(http://img30.imageshack.us/img30/3857/69680753.jpg)
(http://img30.imageshack.us/img30/4756/48869675.jpg)

- thanks!
Title: Re: Referrals Mod
Post by: JBlaze on November 05, 2009, 07:04:29 PM
Quote from: kalibugan on November 05, 2009, 06:23:07 PM
help, some text are missing after i have successfully installed the mod. i highlighted in YELLOW where the text are suppose to appear.

(http://img694.imageshack.us/img694/4408/80286966.jpg)
(http://img30.imageshack.us/img30/3857/69680753.jpg)
(http://img30.imageshack.us/img30/4756/48869675.jpg)

- thanks!

This mod doesn't have translations for your language. If you would like to submit a translation, then by all means please do so.
Title: Re: Referrals Mod
Post by: littleblue on November 06, 2009, 02:57:37 AM
Quote from: littleblue on October 28, 2009, 03:15:58 PM
Forgive me if this has been discussed already, I couldn't find anything via the search function.

I have version 2.2.6 installed on my 2.0 RC1.2 forum (no other mods so nothing can interfere) and it works smoothly - the only problem is that the referrals count isn't correct, or I just don't understand it at all?

Three people have registered via my referral link. I see them listed in the drop-down menu in my profile. But at the same time, my profile and that stats page say that I have seven referrals. Where does that number come from?

Otherwise, fantastic feature, thank you :)

Is this a known issue, and is there any fix for it?
Title: Re: Referrals Mod
Post by: TurtleKicker on November 12, 2009, 03:58:03 PM
Is there a known status for this mod on SMF2 RC2?
Title: Re: Referrals Mod
Post by: Spoogs on November 17, 2009, 03:47:24 AM
Quote from: sremick on November 12, 2009, 03:58:03 PM
Is there a known status for this mod on SMF2 RC2?
same question here
Title: Re: Referrals Mod
Post by: JBlaze on November 17, 2009, 05:01:52 AM
I'm slowly getting around to updating all mods to work with RC2. ;D
Title: Re: Referrals Mod
Post by: oistarbwoy on November 20, 2009, 06:46:02 PM
perhaps  am asking a stupid question so figive me if i am.

In the load template there is a part called hidden easter eggs where by removing he // you can set the referal mod to award karma and/or shop money. Its worded as referal link hits.

so i am wondering are the points awarded for everytime the referal link is clicked or everytime a sucsessfull referal sign up happens?

thanks ifanyone knows the answer.
Title: Re: Referrals Mod
Post by: JBlaze on November 21, 2009, 05:27:13 AM
The way the mod works by default is that a referral point is only given once someone signs up using the link someone gave them or by inputting their name on the registration screen.

The part you mention is left in the code for possible later use, or if you really know what you are doing. What this does is give a referral point for every time a member's link is clicked. This can be easily faked, so it is not a default option.
Title: Re: Referrals Mod
Post by: LC on November 22, 2009, 07:55:03 PM
Hey there, I am using the referrals mod on a custom themed 1.1.10 and the link the mod provides for people to promote with is only directing them to a page that does not exist on the forum, but is showing the menu, etc. Shouldn't this link take them to the register page?

I tried doing a search for this topic, but had no luck, sorry if I am asking something someone else has already.

You can see what I mean here.

http://ladychaosdnb.com/index.php?referredby=1

Is there a way I can fix this? if someone could point me in the right direction I'd be grateful.
Title: Re: Referrals Mod
Post by: oistarbwoy on November 23, 2009, 03:57:15 PM
Quote from: JBlaze on November 21, 2009, 05:27:13 AM
The way the mod works by default is that a referral point is only given once someone signs up using the link someone gave them or by inputting their name on the registration screen.

The part you mention is left in the code for possible later use, or if you really know what you are doing. What this does is give a referral point for every time a member's link is clicked. This can be easily faked, so it is not a default option.

oh well i actually wanted it to give 1 point every time somebody clicked their referal but when i removed the slashes nothing happened...

anyway i was also wondering how many points they get for a sign up aswell.
Title: Re: Referrals Mod
Post by: LC on November 23, 2009, 07:14:10 PM
Quote from: LadyChaos on November 22, 2009, 07:55:03 PM
Hey there, I am using the referrals mod on a custom themed 1.1.10 and the link the mod provides for people to promote with is only directing them to a page that does not exist on the forum, but is showing the menu, etc. Shouldn't this link take them to the register page?

I tried doing a search for this topic, but had no luck, sorry if I am asking something someone else has already.

You can see what I mean here.

http://ladychaosdnb.com/index.php?referredby=1

Is there a way I can fix this? if someone could point me in the right direction I'd be grateful.

Any help for this? It's been a day, I'd like to be able to use this mod properly.
Title: Re: Referrals Mod
Post by: JBlaze on November 23, 2009, 07:15:23 PM
I'm very busy. I don't see myself updating this mod for some time. Sorry.
Title: Re: Referrals Mod
Post by: LC on November 23, 2009, 07:18:15 PM
Quote from: JBlaze on November 23, 2009, 07:15:23 PM
I'm very busy. I don't see myself updating this mod for some time. Sorry.

Oh so this is an issue with the mod and not my Newb skills? Alright. Thanks anyway.
Title: Re: Referrals Mod
Post by: JBlaze on November 23, 2009, 07:20:13 PM
Quote from: LadyChaos on November 23, 2009, 07:18:15 PM
Quote from: JBlaze on November 23, 2009, 07:15:23 PM
I'm very busy. I don't see myself updating this mod for some time. Sorry.

Oh so this is an issue with the mod and not my Newb skills? Alright. Thanks anyway.

Yep. See: http://www.simplemachines.org/community/index.php?topic=226191.msg2326411#msg2326411
Title: Re: Referrals Mod
Post by: LC on November 23, 2009, 07:22:23 PM
Quote from: JBlaze on November 23, 2009, 07:20:13 PM
Quote from: LadyChaos on November 23, 2009, 07:18:15 PM
Quote from: JBlaze on November 23, 2009, 07:15:23 PM
I'm very busy. I don't see myself updating this mod for some time. Sorry.

Oh so this is an issue with the mod and not my Newb skills? Alright. Thanks anyway.

Yep. See: http://www.simplemachines.org/community/index.php?topic=226191.msg2326411#msg2326411

Oh. Well I will just have to put up with what it does then. I thought it was me. lol Thanks Jblaze.
Title: Re: Referrals Mod
Post by: Sabre™ on November 23, 2009, 07:57:02 PM
Try changing in your Profile.template.php or UltimateProfile.template.php
<input type="text" id="referral_link" value="', $scripturl, '?referredby=', $context['member']['id'], '" readonly="true" style="width:250px;" />

to
<input type="text" id="referral_link" value="', $scripturl, '?action=register;referredby=', $context['member']['id'], '" readonly="true" style="width:250px;" />
Title: Re: Referrals Mod
Post by: JBlaze on November 23, 2009, 08:00:33 PM
Quote from: Sabre™ on November 23, 2009, 07:57:02 PM
Try changing in your Profile.template.php or UltimateProfile.template.php
<input type="text" id="referral_link" value="', $scripturl, '?referredby=', $context['member']['id'], '" readonly="true" style="width:250px;" />

to
<input type="text" id="referral_link" value="', $scripturl, '?action=register;referredby=', $context['member']['id'], '" readonly="true" style="width:250px;" />


Yep. That will work :)
Title: Re: Referrals Mod
Post by: Sabre™ on November 23, 2009, 08:32:41 PM
Might be good to add that slight change in the next update, seems a bit more efficient, and also will result in one less question lol ;)
Title: Re: Referrals Mod
Post by: JBlaze on November 23, 2009, 08:36:47 PM
Will do when I get around to porting for RC2
Title: Re: Referrals Mod
Post by: LC on November 23, 2009, 10:52:51 PM
Quote from: Sabre™ on November 23, 2009, 07:57:02 PM
Try changing in your Profile.template.php or UltimateProfile.template.php
<input type="text" id="referral_link" value="', $scripturl, '?referredby=', $context['member']['id'], '" readonly="true" style="width:250px;" />

to
<input type="text" id="referral_link" value="', $scripturl, '?action=register;referredby=', $context['member']['id'], '" readonly="true" style="width:250px;" />

Thanks Sabre. It worked like a charm.  ;)
Title: Re: Referrals Mod
Post by: Eclipse16V on November 24, 2009, 07:46:50 AM
Please update it for SMF 2.0 RC2

Thx
Title: Re: Referrals Mod
Post by: 4b11l on December 03, 2009, 11:46:07 PM
Quote from: Eclipse16V on November 24, 2009, 07:46:50 AM
Please update it for SMF 2.0 RC2

Thx

Would love this too!
Title: Re: Referrals Mod
Post by: SactoEric on December 16, 2009, 03:20:40 PM
I just upgraded to 1.1.11 and installed Referrals Mod for the first time. Right now it's showing up twice in the profile, stats, registration, etc. I can't find any duplicate code and I've gone over it several times... When I first installed it I had some seemingly typical errors that have been resolved, but I can't find the root of this problem. And it may be completely obvious to a new set of eyes ;)

**Edit**
Please disregard. I downloaded the files from the server and found the duplicate code.
Title: Re: Referrals Mod
Post by: Amendoim on December 17, 2009, 11:14:56 AM
Plz make one actualization to the version SMF 2.0RC2

It is really importante

Tks
Title: Re: Referrals Mod
Post by: JBlaze on December 17, 2009, 02:56:40 PM
Quote from: Amendoim on December 17, 2009, 11:14:56 AM
Plz make one actualization to the version SMF 2.0RC2

It is really importante

Tks

I'm in the process of updating all my mods. Please be patient.
Title: Re: Referrals Mod
Post by: Amendoim on December 17, 2009, 04:22:15 PM
Quote from: JBlaze on December 17, 2009, 02:56:40 PM
Quote from: Amendoim on December 17, 2009, 11:14:56 AM
Plz make one actualization to the version SMF 2.0RC2

It is really importante

Tks

I'm in the process of updating all my mods. Please be patient.

Thank you first of all, I look forward to the update of the MOD, it displays need it urgent to carry out a project:)
Title: Re: Referrals Mod
Post by: smp420 on December 19, 2009, 03:07:10 AM
Quote from: Jingle Blaze on December 17, 2009, 02:56:40 PM
Quote from: Amendoim on December 17, 2009, 11:14:56 AM
Plz make one actualization to the version SMF 2.0RC2

It is really importante

Tks

I'm in the process of updating all my mods. Please be patient.

Thanks JB I really want this mod.
Title: Re: Referrals Mod v2.2.7 (Now supports RC2!)
Post by: JBlaze on December 20, 2009, 03:17:30 PM
Updated to support SMF 2.0 RC2
Title: Re: Referrals Mod v2.2.7 (Now supports RC2!)
Post by: Arantor on December 20, 2009, 03:34:22 PM
Congratulations :D
Title: Re: Referrals Mod v2.2.7 (Now supports RC2!)
Post by: Spoogs on December 20, 2009, 04:21:11 PM
Thanks for the update JB, been waiting for it :)

Alignment issue

Edit: also clicking select doesn't seem to select anything.
Title: Re: Referrals Mod v2.2.7 (Now supports RC2!)
Post by: smp420 on December 20, 2009, 05:00:40 PM
Also when I try registering I am getting a parse error.
Title: Re: Referrals Mod v2.2.7 (Now supports RC2!)
Post by: Arantor on December 20, 2009, 05:01:20 PM
Quote from: smp420 on December 20, 2009, 05:00:40 PM
Also when I try registering I am getting a parse error.

What error, exactly, do you get?
Title: Re: Referrals Mod v2.2.7 (Now supports RC2!)
Post by: ŦώεαЖзяŁ on December 20, 2009, 06:11:54 PM
I also get an error when trying to go to register:

QuoteTemplate Parse Error!
It seems something has gone sour on the forum with the template system. This problem should only be temporary, so please come back later and try again. If you continue to see this message, please contact the administrator.

You can also try refreshing this page.

I have many mods installed and a custom theme... but if you could point me to the places where the problem is most likely to be i would be happy to try to fix it, since I would really like to use this mod.
Title: Re: Referrals Mod v2.2.7 (Now supports RC2!)
Post by: ŦώεαЖзяŁ on December 20, 2009, 06:30:45 PM
I found a way to solve the problem, at least in my case. go to register.template.php in themes\default\ and find the section that has the referral information... all the way at the end, delete the

]]>

Porblem should be fixed.
Title: Re: Referrals Mod v2.2.7 (Now supports RC2!)
Post by: JBlaze on December 20, 2009, 06:40:03 PM
OK, new version patched.

If you have an error on uninstall on the Register.template.php file, you may have to FTP in and remove this.
// Our referrals place
echo '
<dl class="register_form" id="referrals">
<dt>
<strong>', $txt['referrals_who'], '</strong>
<span class="smalltext">', $txt['referrals_who_description'], '</span>
</dt>
<dd>
<input name="referredby" id="to_control" type="text" size="30" value="', (!empty($user_info['was_referred']['referred_by_name']) ? $user_info['was_referred']['referred_by_name'] : '') ,'" />
<div id="to_item_list_container"></div>
<em id="referredon" class="smalltext">', (!empty($user_info['was_referred']['referred_date']) ? $txt['referrals_on'] . ' ' . $user_info['was_referred']['referred_date'] : '' ) ,'</em>
</dd>
</dl>';

echo '
<script type="text/javascript" src="', $settings['default_theme_url'], '/scripts/referrals.js?rc2"></script>
<script type="text/javascript" src="', $settings['default_theme_url'], '/scripts/suggest.js?rc2"></script>
<script language="JavaScript" type="text/javascript"><!-- // -->
var oReferralSend = new smf_ReferralSend({
sSelf: \'oReferralSend\',
sSessionId: \'', $context['session_id'], '\',
sSessionVar: \'', $context['session_var'], '\',
sTextDeleteItem: \'', $txt['autosuggest_delete_item'], '\',
sToControlId: \'to_control\',
aToRecipients: [
]
});

function saveEntities()
{
var textFields = ["subject", "message"];
for (i in textFields)
if (document.forms.postmodify.elements[textFields[i]])
document.forms.postmodify[textFields[i]].value = document.forms.postmodify[textFields[i]].value.replace(/&#/g, "&#");
}
// </script>';


The reason is that there was a problem with the installation and a conflict with CDATA. Simply uninstall the old version and reinstall the new one.
Title: Re: Referrals Mod v2.2.7.1 (Now supports RC2!)
Post by: ŦώεαЖзяŁ on December 20, 2009, 07:39:58 PM
One problem in the registration form, i don't see the find referrer button.
Title: Re: Referrals Mod v2.2.7.1 (Now supports RC2!)
Post by: JBlaze on December 20, 2009, 09:25:49 PM
Quote from: TweakerL on December 20, 2009, 07:39:58 PM
One problem in the registration form, i don't see the find referrer button.
It has been replaced by SMF's Auto-Suggest. Just start typing a name into the referrers box on registration and a dropdown will display showing possible matches.
Title: Re: Referrals Mod v2.2.7.1 (Now supports RC2!)
Post by: Spoogs on December 20, 2009, 09:50:32 PM
Getting this error when trying to register 2.2.7 (also happened on fresh install)

QuoteTemplate Parse Error!

It seems something has gone sour on the forum with the template system. This problem should only be temporary, so please come back later and try again. If you continue to see this message, please contact the administrator.

You can also try refreshing this page.

Tried 2.2.7.1 and got this fail during install (only tried on fresh install)
Title: Re: Referrals Mod v2.2.7.1 (Now supports RC2!)
Post by: JBlaze on December 20, 2009, 10:13:56 PM
Quote from: Spoogs on December 20, 2009, 09:50:32 PM
Getting this error when trying to register 2.2.7 (also happened on fresh install)

QuoteTemplate Parse Error!

It seems something has gone sour on the forum with the template system. This problem should only be temporary, so please come back later and try again. If you continue to see this message, please contact the administrator.

You can also try refreshing this page.

Tried 2.2.7.1 and got this fail during install (only tried on fresh install)

The template parse error was fixed in 2.2.7.1. However, download the new package to fix the install error. There was an extra space input in the package that would make it fail on Profile.template.php
Title: Re: Referrals Mod v2.2.7.1 (Now supports RC2!)
Post by: Spoogs on December 20, 2009, 10:36:37 PM
Same thing happened again JB
Title: Re: Referrals Mod v2.2.7.1 (Now supports RC2!)
Post by: JBlaze on December 20, 2009, 10:40:47 PM
Maybe I should stop drinking when I'm modding...

Re-uploaded.
Title: Re: Referrals Mod v2.2.7.1 (Now supports RC2!)
Post by: Spoogs on December 20, 2009, 10:44:57 PM
That did it the trick... have another drink on me ;)
Title: Re: Referrals Mod v2.2.7.1 (Now supports RC2!)
Post by: JBlaze on December 20, 2009, 10:51:25 PM
Quote from: Spoogs on December 20, 2009, 10:44:57 PM
That did it the trick... have another drink on me ;)

Thanks ;)
Title: Re: Referrals Mod v2.2.7 (Now supports RC2!)
Post by: smp420 on December 21, 2009, 04:03:34 AM
Quote from: The Grinch on December 20, 2009, 05:01:20 PM
Quote from: smp420 on December 20, 2009, 05:00:40 PM
Also when I try registering I am getting a parse error.

What error, exactly, do you get?

I was getting the same error as TweakerL sorry I had to go and didn't have time to explain. Now with the update everything seems to work fine except the select button.
Title: Re: Referrals Mod v2.2.7 (Now supports RC2!)
Post by: Amendoim on December 21, 2009, 01:59:42 PM
Quote from: The Grinch on December 20, 2009, 03:34:22 PM
Congratulations :D

Tanks You Jingle Blaze :D
Title: Re: Referrals Mod v2.2.7.1 (Now supports RC2!)
Post by: JBlaze on December 21, 2009, 02:00:58 PM
You're welcome! ;D
Title: Re: Referrals Mod v2.2.7.1 (Now supports RC2!)
Post by: Eclipse16V on December 22, 2009, 12:23:32 AM
Ohhh yes
Thanks for this Update
Title: Re: Referrals Mod v2.2.7.1 (Now supports RC2!)
Post by: Amendoim on December 22, 2009, 01:34:33 PM
I am having a problem, so that someone tries to enter the link with that of another person, did not appear anything simply installed fine, latest version and still is not working .. Attached is a picture that proves it!
The Brand "selection" to select the link is also not running, select the contents of the link below, and not the own = /
Title: Re: Referrals Mod v2.2.7.1 (Now supports RC2!)
Post by: Spoogs on December 22, 2009, 01:40:23 PM
Its working fine for me.
Try refreshing the page and also check the profile of id=1 you should see a referral hit.
Title: Re: Referrals Mod v2.2.7.1 (Now supports RC2!)
Post by: Amendoim on December 22, 2009, 01:51:15 PM
with meso forum / index.php? referredby the forum goes to the site that the image ..
I do not know why, is not working right, moreover I do not know where it has a configuration referall Mod in the area of admin: S
Searched and found nothing
Title: Re: Referrals Mod v2.2.7.1 (Now supports RC2!)
Post by: Spoogs on December 22, 2009, 01:56:20 PM
There is no config for it, the info just shows up in each users profile summary area.
Title: Re: Referrals Mod v2.2.7.1 (Now supports RC2!)
Post by: Amendoim on December 22, 2009, 02:03:58 PM
a min some letters are not well visible in the statistics, all because of UTF versions ..

When the Mod, fuciona fine, unless you select the link in the profile, and try to register with a link to someone like that!
Title: Re: Referrals Mod
Post by: LC on December 22, 2009, 04:36:32 PM
Quote from: Amendoim on December 22, 2009, 01:34:33 PM
I am having a problem, so that someone tries to enter the link with that of another person, did not appear anything simply installed fine, latest version and still is not working .. Attached is a picture that proves it!
The Brand "selection" to select the link is also not running, select the contents of the link below, and not the own = /

I had the same issue. Here is the post for the possible solution.
Quote from: Sabre™ on November 23, 2009, 07:57:02 PM
Try changing in your Profile.template.php or UltimateProfile.template.php
<input type="text" id="referral_link" value="', $scripturl, '?referredby=', $context['member']['id'], '" readonly="true" style="width:250px;" />

to
<input type="text" id="referral_link" value="', $scripturl, '?action=register;referredby=', $context['member']['id'], '" readonly="true" style="width:250px;" />

Title: Re: Referrals Mod v2.2.7.1 (Now supports RC2!)
Post by: JBlaze on December 22, 2009, 06:12:12 PM
Sorry about the blank screen folks. Meant to fix the url in the latest release. I guess it slipped my mind O:)
Title: Re: Referrals Mod v2.2.7.1 (Now supports RC2!)
Post by: Spoogs on December 22, 2009, 06:14:53 PM
hmmm, ok maybe no more drinking then while modding then ;D
Title: Re: Referrals Mod v2.2.7.1 (Now supports RC2!)
Post by: JBlaze on December 22, 2009, 06:16:07 PM
Quote from: Spoogs on December 22, 2009, 06:14:53 PM
hmmm, ok maybe no more drinking then while modding then ;D

Yea lol. It's really a bad habit O:)
Title: Re: Referrals Mod
Post by: Amendoim on December 22, 2009, 06:52:01 PM
Quote from: LadyChaos on December 22, 2009, 04:36:32 PM
Quote from: Amendoim on December 22, 2009, 01:34:33 PM
I am having a problem, so that someone tries to enter the link with that of another person, did not appear anything simply installed fine, latest version and still is not working .. Attached is a picture that proves it!
The Brand "selection" to select the link is also not running, select the contents of the link below, and not the own = /

I had the same issue. Here is the post for the possible solution.
Quote from: Sabre™ on November 23, 2009, 07:57:02 PM
Try changing in your Profile.template.php or UltimateProfile.template.php
<input type="text" id="referral_link" value="', $scripturl, '?referredby=', $context['member']['id'], '" readonly="true" style="width:250px;" />

to
<input type="text" id="referral_link" value="', $scripturl, '?action=register;referredby=', $context['member']['id'], '" readonly="true" style="width:250px;" />


It is the work in it, I changed the code to record the action, but nothing has changed from white screen .. changed in Profile.template, since not having found the ultimateprofile.template!

I tried to change some things but not know where is the problem = /
Title: Re: Referrals Mod v2.2.7.1 (Now supports RC2!)
Post by: JBlaze on December 22, 2009, 07:13:03 PM
If your referral link is http://www.example.com/forum/index.php?action=register;referredby=1 then it will show the register page and fill in the referrer for you...

Also, if you are having problems with Ultimate Profile, then ask it its respective mod thread.
Title: Re: Referrals Mod v2.2.7.1 (Now supports RC2!)
Post by: LC on December 23, 2009, 02:08:17 AM
Quote from: JBlaze on December 22, 2009, 06:12:12 PM
Sorry about the blank screen folks. Meant to fix the url in the latest release. I guess it slipped my mind O:)

Offtopic but, what happened to Jingle Blaze? I liked that.
Title: Re: Referrals Mod v2.2.7.1 (Now supports RC2!)
Post by: Amendoim on December 23, 2009, 08:16:35 AM
Well, I add it to my Link Referred to the action = register and it worked ..

Now the problem is how do I add it the "Action = register" in all links of that?

I tried what was a few posts above in profile.template but nothing happened .. the ultimateprofile.template not find him ..
Title: Re: Referrals Mod v2.2.7.1 (Now supports RC2!)
Post by: JBlaze on December 23, 2009, 09:55:29 AM
Quote from: LadyChaos on December 23, 2009, 02:08:17 AM
Quote from: JBlaze on December 22, 2009, 06:12:12 PM
Sorry about the blank screen folks. Meant to fix the url in the latest release. I guess it slipped my mind O:)

Offtopic but, what happened to Jingle Blaze? I liked that.

Got too many PM's asking who I am lol. Figured I might as well just change it back :(
Title: Re: Referrals Mod v2.2.7.1 (Now supports RC2!)
Post by: Marcus Forsberg on December 23, 2009, 09:56:18 AM
Quote from: JBlaze on December 23, 2009, 09:55:29 AM
Quote from: LadyChaos on December 23, 2009, 02:08:17 AM
Quote from: JBlaze on December 22, 2009, 06:12:12 PM
Sorry about the blank screen folks. Meant to fix the url in the latest release. I guess it slipped my mind O:)

Offtopic but, what happened to Jingle Blaze? I liked that.

Got too many PM's asking who I am lol. Figured I might as well just change it back :(

/me actually had none. Might be because my real name remains in my signature.
Title: Re: Referrals Mod v2.2.7.1 (Now supports RC2!)
Post by: Arantor on December 23, 2009, 10:43:38 AM
No-one asked me, but several did figure it out and mentioned it playfully. But there aren't many people who spam as much as I do, heh.

Anyhow, back on topic?
Title: Re: Referrals Mod v2.2.7.1 (Now supports RC2!)
Post by: LC on December 23, 2009, 04:31:59 PM
Quote from: JBlaze on December 23, 2009, 09:55:29 AM
Quote from: LadyChaos on December 23, 2009, 02:08:17 AM
Quote from: JBlaze on December 22, 2009, 06:12:12 PM
Sorry about the blank screen folks. Meant to fix the url in the latest release. I guess it slipped my mind O:)

Offtopic but, what happened to Jingle Blaze? I liked that.

Got too many PM's asking who I am lol. Figured I might as well just change it back :(
Aww. :( That sucks.

@Yule Goat and The Grinch

Both of you were easy to figure out. ;P
Title: Re: Referrals Mod v2.2.7.1 (Now supports RC2!)
Post by: Spoogs on December 23, 2009, 04:36:22 PM
I believe JBlaze =JingleBlaze was way easier to figure out
Title: Re: Referrals Mod v2.2.7.1 (Now supports RC2!)
Post by: Eclipse16V on December 30, 2009, 03:03:18 PM
Hi,

i have an error in my Stats.template.php
Title: Re: Referrals Mod v2.2.7.1 (Now supports RC2!)
Post by: smp420 on December 30, 2009, 08:11:39 PM
Does anyone have a fix for the select button.
Title: Re: Referrals Mod v2.2.7.1 (Now supports RC2!)
Post by: Amendoim on January 01, 2010, 02:10:10 PM
Quote from: Amendoim on December 23, 2009, 08:16:35 AM
Well, I add it to my Link Referred to the action = register and it worked ..

Now the problem is how do I add it the "Action = register" in all links of that?

I tried what was a few posts above in profile.template but nothing happened .. the ultimateprofile.template not find him ..

Help Plz :x
Title: Re: Referrals Mod v2.2.7.1 (Now supports RC2!)
Post by: JBlaze on January 01, 2010, 02:13:46 PM
@Eclipse16v, I will fix that in the next update. It is a problem with the AJAX stats part.

@smp420, I'll be fixing that in the next update as well

@Amendoim, I have shown you how to fix it. All that is needed is for people to visit http://www.example.com/forum/index.php?action=register;referredby=id and it will work.
Title: Re: Referrals Mod v2.2.7.1 (Now supports RC2!)
Post by: Eclipse16V on January 01, 2010, 02:19:09 PM
@  JBlaze
Thanks
Title: Re: Referrals Mod v2.2.7.1 (Now supports RC2!)
Post by: smp420 on January 01, 2010, 03:22:13 PM
Quote from: JBlaze on January 01, 2010, 02:13:46 PM
@Eclipse16v, I will fix that in the next update. It is a problem with the AJAX stats part.

@smp420, I'll be fixing that in the next update as well

@Amendoim, I have shown you how to fix it. All that is needed is for people to visit http://www.example.com/forum/index.php?action=register;referredby=id and it will work.
Thanks. Any idea on how long it will be for the update. I dont know if I should use it as is for now or just wait.
Title: Re: Referrals Mod v2.2.7.1 (Now supports RC2!)
Post by: JBlaze on January 01, 2010, 05:07:22 PM
Shouldn't be long for the update. I am fairly busy so it won't be immediate.
Title: Re: Referrals Mod v2.2.7.1 (Now supports RC2!)
Post by: smp420 on January 01, 2010, 05:31:53 PM
Ok its not a big problem so I will just use it for now until the update is out.
Title: Re: Referrals Mod v2.2.7.1 (Now supports RC2!)
Post by: ŦώεαЖзяŁ on January 07, 2010, 04:07:41 PM
How to add action=register to the referral link:

open your profile template (Profile.template.php for default profiles or UltimateProfile.template.php for ultimate profile)

Search for referredby=

You'll find something like this:

Quote, $scripturl, '?referredby='

Change it to
Quote, $scripturl, '?action=register;referredby='

You're done, although personally I think that referring people to the front page rather than the register page is much better as often the person will not know what the forum is about and the front page will give them a better idea than sending them straight to the register page. Besides, it saves a cookie so should the person decide to register, the referral will still be there.

Fixing the select button:

The select button is actually unnecessary, by adding

Quoteonfocus="this.select()"

to the referral id input so that it looks like something like this:

Quote<input onfocus="this.select()" type="text" id="referral_link" value="', $scripturl, '?referredby=', $context['member']['id'], '" readonly="true" style="width:250px;" />

whenever the person clicks on the link, it will automatically select it for them. I'm sure it's even possible for it to automatically copy it to the clipboard too, just google somthing like javascript copy to clipboard and you'll find a way.
Title: Re: Referrals Mod v2.2.7.1 (Now supports RC2!)
Post by: ŦώεαЖзяŁ on January 07, 2010, 04:26:11 PM
Lol, I saw people's questions and started answering them and forgot to ask the question I came to ask...

So, i got a portal system for my site, (portamx) and I would like to show only the referral link for the person in php block... Any chance you can help me figure how to do it? I tried copying just the section from the profile template that shows it to the block, but it comes out blank... I'm relatively noob in php so i dunno what else to do XD. Help would be awesomely appreciated as I intend to use the same code to add the person's referral link to by website's browser toolbar :)
Title: Re: Referrals Mod v2.2.7.1 (Now supports RC2!)
Post by: Amendoim on January 07, 2010, 05:03:44 PM
Quote from: JBlaze on January 01, 2010, 02:13:46 PM
@Amendoim, I have shown you how to fix it. All that is needed is for people to visit http://www.example.com/forum/index.php?action=register;referredby=id and it will work.

Worked the same friend: D
Now, if own admistrador logged in as admin, select the link and try to enter the area will stop the records from the admin panel..  :P

Cumps

Quote from: ŦώεαЖзяŁ on January 07, 2010, 04:07:41 PM

Fixing the select button:

The select button is actually unnecessary, by adding

Quoteonfocus="this.select()"

to the referral id input so that it looks like something like this:

Quote<input onfocus="this.select()" type="text" id="referral_link" value="', $scripturl, '?referredby=', $context['member']['id'], '" readonly="true" style="width:250px;" />

whenever the person clicks on the link, it will automatically select it for them. I'm sure it's even possible for it to automatically copy it to the clipboard too, just google somthing like javascript copy to clipboard and you'll find a way.

It did not work friend, continues to select the area below "language" .. not even being added selects the link, something in the code this bad.  ???
Title: Re: Referrals Mod v2.2.7.1 (Now supports RC2!)
Post by: ŦώεαЖзяŁ on January 07, 2010, 05:22:18 PM
Quote from: Amendoim on January 07, 2010, 05:03:44 PM
It did not work friend, continues to select the area below "language" .. not even being added selects the link, something in the code this bad.  ???

If it's not working you're doing something wrong, or you have a stone age browser, or javascript is disabled >.>
Title: Re: Referrals Mod v2.2.7.1 (Now supports RC2!)
Post by: Amendoim on January 07, 2010, 05:29:43 PM
No, I'm using IE8, and I have the code like this:

<input onfocus = "this.select ()" type = "text" id = "referral_link" value = " ', $ scripturl,'? action = register; referredby = ', $ context [' member '] [ 'id'], ' "readonly =" true "style =" width: 250px; "/> [/ code]

It seems that everything is in order, now the Javascript as an asset in a forum? (computer installed recent version)

Thanks
Title: Re: Referrals Mod v2.2.7.1 (Now supports RC2!)
Post by: smp420 on January 07, 2010, 07:12:28 PM
The code works great and looks better than having a button, Amendoim you are clearly doing something wrong here is what I am using // Remove the # on the next line to make the link appear for the profile's owner ONLY!
# if ($context['user']['id'] == $context['member']['id'])
echo '
<dt>', $txt['referrals_link'], '</dt>
<dd>

<input onfocus="this.select()" type="text" id="referral_link" value="', $scripturl, '?action=register;referredby=', $context['member']['id'], '" readonly="true" style="width:250px;" />
</dd>';
Title: Re: Referrals Mod v2.2.7.1 (Now supports RC2!)
Post by: Amendoim on January 07, 2010, 07:21:01 PM
already noticed in your code .. he ate this well built, but will take the check mark from the link .. doing so not having problems with it :P
Title: Re: Referrals Mod v2.2.7.2 (Now supports RC2!)
Post by: JBlaze on January 07, 2010, 07:42:17 PM
Updated v2.2.7.2

2.2.7.2 - 7th January 2010
! Fixed select box
! Fixed referral link to point to register page
Title: Re: Referrals Mod v2.2.7.2 (Now supports RC2!)
Post by: ŦώεαЖзяŁ on January 07, 2010, 08:20:24 PM
@Amendoim, if you're still having trouble send me a PM, I speak Portuguese too :), might be easier for you to understand that way :)
Title: Re: Referrals Mod v2.2.7.2 (Now supports RC2!)
Post by: Spoogs on January 07, 2010, 09:16:09 PM
thanks for the updates

Not so sure about linking to the registration page tho, maybe this could be optional. I prefer linking to the home page.
Title: Re: Referrals Mod v2.2.7.2 (Now supports RC2!)
Post by: Karlsm on January 16, 2010, 01:47:56 PM
Hi all, I really like to install this mod but i get

./Themes/default/Register.template.php Test failed

upon installing.

Any ideas?
Title: Re: Referrals Mod v2.2.7.2 (Now supports RC2!)
Post by: JBlaze on January 16, 2010, 02:52:45 PM
@ Karlsm, most likely a conflict with another mod prevents the installer from finding the proper lines of code.

See: Manual Installation of Mods (http://docs.simplemachines.org/index.php?topic=402.0)
Title: Re: Referrals Mod v2.2.7.2 (Now supports RC2!)
Post by: Karlsm on January 16, 2010, 03:45:03 PM
Cheers

These are the installed mods i have on my forum. Without uninstalling the lot and trying your mod, do you think any of these off the top of your head could be conflicting with yours.  Did any of your users of this mod have a conflict with any of the below?

If not I will look at doing a manual edit.

I'm using 1.1.11 btw.

Mod Name Version 
1. SMF 1.0.15 / 1.1.7 Update 1.0 [ Uninstall ]
2. Signature Dropdown Choices 1.0 [ Uninstall ]
3. BK-SMF Sub-Board 1.5 [ Uninstall ]
4. Thank-O-Matic 1.2.5 [ Uninstall ]
5. Enhanced PM Warning Message 1.0 [ Uninstall ]
6. Prettier_Quotes 1.12 [ Uninstall ]
7. Quote Clear Line 1.0 [ Uninstall ]
8. BK-SMF News Box Mod 1.5 [ Uninstall ]
9. Date_Registerd on post 1.0 [ Uninstall ]
10. Reason For Editing Mod 1.14 [ Uninstall ]
11. Enhanced Profile Header 1.0 [ Uninstall ]
12. SMF 1.0.16 / 1.1.8 Update 1.0 [ Uninstall ]
13. Message for your guests 0.1 [ Uninstall ]
14. Auto Email Inactive Users 1.7 [ Uninstall ]
15. LocationOnReg 1.0 [ Uninstall ]
16. EmailValidator 1.0 [ Uninstall ]
17. Posters In Recent Posts 1.1 [ Uninstall ]
18. LocationOnPost 1.0 [ Uninstall ]
19. Go Up & Go Down 1.1 [ Uninstall ]
20. BK-SMF News Stay Mod 1.5 [ Uninstall ]
21. MemberNumber 1.1 [ Uninstall ]
22. Hack's Park Shoutbox 2.0.1 [ Uninstall ]
23. Advanced image uploader 1.0.9 [ Uninstall ]
24. SMF 1.0.17 / 1.1.9 / 2.0 RC1 Update 1.0 [ Uninstall ]
25. Limit A Guests Daily PageViews Mod 2.0 [ Uninstall ]
26. Twitter Profile Field 2.2 [ Uninstall ]
27. InfoBox 0.1 [ Uninstall ]
28. AllCaps Notifier 1.0 [ Uninstall ]
29. SMF 1.0.18 / 1.1.10 / 2.0 RC1-2 Update 1.1 [ Uninstall ]
30. Twitter mod 1.5 [ Uninstall ]
31. Aeva ~ Auto-Embed Video & Audio 7.0 [ Uninstall ]
32. Bakers Dozen Pages 1.1 [ Uninstall ]
33. SMF 1.0.19 / 1.1.11 Update 1.0 [ Uninstall ]

Thanks,
Karl.

Title: Re: Referrals Mod v2.2.7.2 (Now supports RC2!)
Post by: Amendoim on January 16, 2010, 03:47:33 PM
Quote from: Karlsm on January 16, 2010, 03:45:03 PM
Cheers

These are the installed mods i have on my forum. Without uninstalling the lot and trying your mod, do you think any of these off the top of your head could be conflicting with yours.  Did any of your users of this mod have a conflict with any of the below?

If not I will look at doing a manual edit.

I'm using 1.1.11 btw.

Mod Name Version 
1. SMF 1.0.15 / 1.1.7 Update 1.0 [ Uninstall ]
2. Signature Dropdown Choices 1.0 [ Uninstall ]
3. BK-SMF Sub-Board 1.5 [ Uninstall ]
4. Thank-O-Matic 1.2.5 [ Uninstall ]
5. Enhanced PM Warning Message 1.0 [ Uninstall ]
6. Prettier_Quotes 1.12 [ Uninstall ]
7. Quote Clear Line 1.0 [ Uninstall ]
8. BK-SMF News Box Mod 1.5 [ Uninstall ]
9. Date_Registerd on post 1.0 [ Uninstall ]
10. Reason For Editing Mod 1.14 [ Uninstall ]
11. Enhanced Profile Header 1.0 [ Uninstall ]
12. SMF 1.0.16 / 1.1.8 Update 1.0 [ Uninstall ]
13. Message for your guests 0.1 [ Uninstall ]
14. Auto Email Inactive Users 1.7 [ Uninstall ]
15. LocationOnReg 1.0 [ Uninstall ]
16. EmailValidator 1.0 [ Uninstall ]
17. Posters In Recent Posts 1.1 [ Uninstall ]
18. LocationOnPost 1.0 [ Uninstall ]
19. Go Up & Go Down 1.1 [ Uninstall ]
20. BK-SMF News Stay Mod 1.5 [ Uninstall ]
21. MemberNumber 1.1 [ Uninstall ]
22. Hack's Park Shoutbox 2.0.1 [ Uninstall ]
23. Advanced image uploader 1.0.9 [ Uninstall ]
24. SMF 1.0.17 / 1.1.9 / 2.0 RC1 Update 1.0 [ Uninstall ]
25. Limit A Guests Daily PageViews Mod 2.0 [ Uninstall ]
26. Twitter Profile Field 2.2 [ Uninstall ]
27. InfoBox 0.1 [ Uninstall ]
28. AllCaps Notifier 1.0 [ Uninstall ]
29. SMF 1.0.18 / 1.1.10 / 2.0 RC1-2 Update 1.1 [ Uninstall ]
30. Twitter mod 1.5 [ Uninstall ]
31. Aeva ~ Auto-Embed Video & Audio 7.0 [ Uninstall ]
32. Bakers Dozen Pages 1.1 [ Uninstall ]
33. SMF 1.0.19 / 1.1.11 Update 1.0 [ Uninstall ]

Thanks,
Karl.

:o :o
What? Full MODS :P
Title: Re: Referrals Mod v2.2.7.2 (Now supports RC2!)
Post by: JBlaze on January 16, 2010, 03:48:59 PM
It would be easier to just do the manual edit rather than going through each mod to see which would effect the register template.
Title: Re: Referrals Mod v2.2.7.2 (Now supports RC2!)
Post by: Karlsm on January 16, 2010, 05:05:57 PM
Manual edit did not work for me either  :(

I have edited the .xml file with the code specified and not working.
then
Register.template.php and no joy at all.

Help please.
Title: Re: Referrals Mod v2.2.7.2 (Now supports RC2!)
Post by: andris11 on January 17, 2010, 02:04:01 PM
I installed great MOD Thank you!


Where i can find it in admin?
Title: Re: Referrals Mod v2.2.7.2 (Now supports RC2!)
Post by: JBlaze on January 17, 2010, 02:07:39 PM
Quote from: andris11 on January 17, 2010, 02:04:01 PM
I installed great MOD Thank you!


Where i can find it in admin?

There are no settings for this mod.
Title: Re: Referrals Mod v2.2.7.2 (Now supports RC2!)
Post by: andris11 on January 17, 2010, 02:14:56 PM
but i cant see it in my profile, maybe ultimate profil can makes it wrong?
Title: Re: Referrals Mod v2.2.7.2 (Now supports RC2!)
Post by: JBlaze on January 17, 2010, 02:17:02 PM
Quote from: andris11 on January 17, 2010, 02:14:56 PM
but i cant see it in my profile, maybe ultimate profil can makes it wrong?

Yes this mod conflicts with Ultimate Profile. There is no current workaround.
Title: Re: Referrals Mod v2.2.7.2 (Now supports RC2!)
Post by: andris11 on January 17, 2010, 02:24:08 PM
It's hard to do it?
Title: Re: Referrals Mod v2.2.7.2 (Now supports RC2!)
Post by: ~DS~ on January 17, 2010, 02:26:40 PM
Quote from: andris11 on January 17, 2010, 02:24:08 PM
It's hard to do it?
Like JBlaze say there's no current walkaround at this moment.
Title: Re: Referrals Mod v2.2.7.2 (Now supports RC2!)
Post by: andris11 on January 17, 2010, 04:47:38 PM
ohh.:S And dont you think about creating a new one which support Ultimate Profile?
Title: Re: Referrals Mod v2.2.7.2 (Now supports RC2!)
Post by: Arantor on January 17, 2010, 04:48:52 PM
Maybe - but not yet. There isn't *currently* support. Doesn't mean there won't be in future, but right now you will just have to wait, sorry.
Title: Re: Referrals Mod v2.2.7.2 (Now supports RC2!)
Post by: nucode on January 18, 2010, 12:48:29 PM
I made polish language modification for Referrals Mod
Please PM me because i cant PM u
Title: Re: Referrals Mod v2.2.7.2 (Now supports RC2!)
Post by: Arantor on January 18, 2010, 12:53:32 PM
Normally translations would just be posted in the thread.
Title: Re: Referrals Mod v2.2.7.2 (Now supports RC2!)
Post by: supahben on February 05, 2010, 08:15:47 PM
How can I add or subtract karma when someone refers a new member?
Title: Re: Referrals Mod v2.2.7.2 (Now supports RC2!)
Post by: Sabre™ on February 06, 2010, 03:29:07 AM
Quote from: Dismal Shadow on January 17, 2010, 02:26:40 PM
Quote from: andris11 on January 17, 2010, 02:24:08 PM
It's hard to do it?
Like JBlaze say there's no current walkaround at this moment.

Try in [THIS] (http://www.simplemachines.org/community/index.php?topic=226191.msg2329345#msg2329345) old post.
Title: Re: Referrals Mod v2.2.7.2 (Now supports RC2!)
Post by: Bugo on February 09, 2010, 05:09:51 AM
Russian translation:

// Referrals Mod
$txt['referrals_findreferrer'] = 'Найти реферера';
$txt['referrals_who'] = 'Сведения о реферере:';
$txt['referrals_who_description'] = 'Кто пригласил Вас на этот сайт?';
$txt['referrals_on'] = '';
$txt['referrals_referrer_not_found'] = 'Указанный пользователь не найден. Пожалуйста, внимательно проверьте его имя. Или оставьте поле пустым.';
$txt['referrals_youwerereferred_by'] = '';
$txt['referrals_referrals'] = 'Рефералов:';
$txt['referrals_referrals_hits'] = 'Переходов по реферальной ссылке:';
$txt['referrals_noneyet'] = 'Пока нет!';
$txt['referrals_top5referrers'] = 'Первая пятёрка рефереров (по количеству рефералов)';
$txt['referrals_top5referrersbyposts'] = 'Первая пятёрка рефереров (по количеству сообщений рефералов)';
$txt['referrals_referralsstats'] = 'Рефералы';
$txt['referrals_referred_by'] = 'Приглашен:';
$txt['referrals_link'] = 'Реферальная ссылка:';
$txt['referrals_membersreferred'] = 'Приглашённые участники';
Title: Re: Referrals Mod v2.2.7.2 (Now supports RC2!)
Post by: nucode on February 14, 2010, 09:24:21 AM
Polish translation

$txt['referrals_findreferrer'] = 'Znajdź polecającego';
$txt['referrals_who'] = 'Informacje o poleconych:';
$txt['referrals_who_description'] = 'Od kogo dowiedziałeś się o naszym forum?';
$txt['referrals_on'] = 'On';
$txt['referrals_referrer_not_found'] = 'Polecający nie został odnaleziony. Proszę sprawdzić czy nazwa użytkownika jest wpisana poprawnie. W przypadku niepowodzenia proszę zostawić pole puste.';
$txt['referrals_youwerereferred_by'] = 'przez';
$txt['referrals_referrals'] = 'Poleceni:';
$txt['referrals_referrals_hits'] = 'Kliknięcia w link polecający użytkownika:';
$txt['referrals_noneyet'] = 'Wciąż brak';
$txt['referrals_top5referrers'] = '5 najlepszych polecających (wg. liczby poleconych)';
$txt['referrals_top5referrersbyposts'] = '5 najlepszych polecających (wg. ilości postów napisanych przez poleconych)';
$txt['referrals_referralsstats'] = 'Poleceni';
$txt['referrals_referred_by'] = 'Polecony przez:';
$txt['referrals_link'] = 'Link referencyjny:';
$txt['referrals_membersreferred'] = 'Użytkownicy poleceni';
Title: Re: Referrals Mod v2.2.7.2 (Now supports RC2!)
Post by: aED on February 15, 2010, 02:03:31 AM
Quote from: supahben on February 05, 2010, 08:15:47 PM
How can I add or subtract karma when someone refers a new member?

Find the following in register.php


// Credit the referral to the user
updateMemberData($referrer, array('referrals_no' => '+'));


then just add this code below

updateMemberData($referrer, array('good_karma' => '+'));


That was based on 2.0 RC2 so If you are using 1.1.x you might have to change the fieldname since it uses a different one. Good luck :P
Title: Re: Referrals Mod v2.2.7.2 (Now supports RC2!)
Post by: TAR-FOUNDER on February 24, 2010, 01:39:57 AM
I'm not sure what's going wrong with the mod at my forums, but the only one part of the mod works.

I now have the referral section on the registration page, but a newcomer can't search for the user that referred him/her.

Also, after they register, it doesn't show them as a referal.

There is no referral stuff on the profile page nor does the referal link work.
Title: Re: Referrals Mod v2.2.7.2 (Now supports RC2!)
Post by: Membre on February 24, 2010, 07:14:58 AM
Very nice mod, can you add some optiones like this one http://custom.simplemachines.org/mods/index.php?mod=653 ?  Thanks  :)
Title: Re: Referrals Mod v2.2.7.2 (Now supports RC2!)
Post by: TAR-FOUNDER on February 24, 2010, 02:32:15 PM
Quote from: TAR-FOUNDER on February 24, 2010, 01:39:57 AM
I'm not sure what's going wrong with the mod at my forums, but the only one part of the mod works.

I now have the referral section on the registration page, but a newcomer can't search for the user that referred him/her.

Also, after they register, it doesn't show them as a referal.

There is no referral stuff on the profile page nor does the referal link work.

any idea why this is happening?
Title: Re: Referrals Mod v2.2.7.2 (Now supports RC2!)
Post by: TAR-FOUNDER on February 25, 2010, 05:50:06 PM
anyone out there?
Title: Re: Referrals Mod v2.2.7.2 (Now supports RC2!)
Post by: aED on February 26, 2010, 09:09:03 PM
Quote from: TAR-FOUNDER on February 24, 2010, 01:39:57 AM
There is no referral stuff on the profile page nor does the referal link work.

What version of SMF are you using? Are you using a custom theme?

What does it show if you tried to visit a referral link?
Title: Re: Referrals Mod v2.2.7.2 (Now supports RC2!)
Post by: rd on February 26, 2010, 11:26:45 PM
Did you install correctly? Any errors? Custom theme?
Title: Re: Referrals Mod v2.2.7.2 (Now supports RC2!)
Post by: nucode on February 27, 2010, 08:02:12 AM
how long i have to wait for including my translation to this mod?
Title: Re: Referrals Mod v2.2.7.2 (Now supports RC2!)
Post by: massdog.com on March 03, 2010, 12:11:06 AM
Fatal error: Cannot redeclare loadreferral() (previously declared in /home/okecinta/public_html/chachashop.com/forum/Sources/Load.php:2217) in /home/okecinta/public_html/chachashop.com/forum/Sources/Load.php on line 2395

i got this error and i use this theme SuperNatural2 from themes

Please help me  :'(
Title: Re: Referrals Mod v2.2.7.2 (Now supports RC2!)
Post by: smp420 on March 03, 2010, 07:30:43 PM
You installed it twice on the mod page pick your version of smf and parse it then you will have to manually remove the code from the second install.
Title: Re: Referrals Mod v2.2.7.2 (Now supports RC3!)
Post by: vbgamer45 on March 08, 2010, 09:31:26 PM
Updated for SMF 2.0 RC3!
Title: Re: Referrals Mod v2.2.7.2 (Now supports RC3!)
Post by: mrtrc266 on March 09, 2010, 10:39:42 PM
Any ideas on this?

Using RC3 it works fine on the default profile template. I see the whole referral link

After install the Ultimate Profile Mod and doing the edit to the UltimateProfile.template.php file

I only see this "?action=register;referredby=1" instead of this "http://localhost/smf/index.php?action=register;referredby=1"

Title: Re: Referrals Mod v2.2.7.2 (Now supports RC3!)
Post by: Bob Perry of Web Presence Consulting on March 20, 2010, 03:28:37 AM
Quote from: vbgamer45 on March 08, 2010, 09:31:26 PM
Updated for SMF 2.0 RC3!

Hi VBgamer... I only have a minor little glitch with this mod on my SMF 2.0 RC3 install, you can see what it's doing in my "More Stats" screen at my site (see signature)...

Should an easy fix... seems good to go every where else in the mod tho, great job...

I've even implemented a cash prize contest based on this mod, so if we could get the aesthetics squared away I'd be all set to go

Title: Re: Referrals Mod v2.2.7.2 (Now supports RC3!)
Post by: JBlaze on March 20, 2010, 05:41:54 AM
Quote from: mrtrc266 on March 09, 2010, 10:39:42 PM
Any ideas on this?

Using RC3 it works fine on the default profile template. I see the whole referral link

After install the Ultimate Profile Mod and doing the edit to the UltimateProfile.template.php file

I only see this "?action=register;referredby=1" instead of this "http://localhost/smf/index.php?action=register;referredby=1"


$scripturl isn't being globaled.
Title: Re: Referrals Mod v2.2.7.2 (Now supports RC3!)
Post by: Bob Perry of Web Presence Consulting on March 28, 2010, 03:53:24 AM
Quote from: bperry921 on March 20, 2010, 03:28:37 AM
Quote from: vbgamer45 on March 08, 2010, 09:31:26 PM
Updated for SMF 2.0 RC3!

Hi VBgamer... I only have a minor little glitch with this mod on my SMF 2.0 RC3 install, you can see what it's doing in my "More Stats" screen at my site (see signature)...

Should an easy fix... seems good to go every where else in the mod tho, great job...

I've even implemented a cash prize contest based on this mod, so if we could get the aesthetics squared away I'd be all set to go



Any word on this issue?
Title: Re: Referrals Mod v2.2.7.2 (Now supports RC3!)
Post by: tatack on March 29, 2010, 02:46:22 AM
Could you please let me know what need to be changed in order to traslate this MOD to italian language?

Thank You
Title: Re: Referrals Mod v2.2.7.2 (Now supports RC3!)
Post by: pokerullz on March 29, 2010, 04:29:29 PM
Thanks for the mod. I just have a question because something is not working.

When I click the referral link and get to the registration page, the user who referred is not added automatically! The user needs to search for the person who referred him. How or what to edit in order that the user who referred is added without searching? I need this mod for a contest of mine :D. I tried on the basic theme and custom theme. Cleared the cookies everytime aswell.

Thanks for the mod btw.

Update 1 : Oh and my link looks like this : hxxx://pokerullz.com/register/referredby,1/   . Is it alright? I am using SimpleSEF aswell.

Update 2  : I switched off SimpleSef to try to see if it works and it works!!! How can I get a way around it so I can use both and the one who referred is added automatically? Ty
Cheers.
Title: Re: Referrals Mod v2.2.7.2 (Now supports RC3!)
Post by: mrtrc266 on March 30, 2010, 04:56:05 PM
Quote from: JBlaze on March 20, 2010, 05:41:54 AM
Quote from: mrtrc266 on March 09, 2010, 10:39:42 PM
Any ideas on this?

Using RC3 it works fine on the default profile template. I see the whole referral link

After install the Ultimate Profile Mod and doing the edit to the UltimateProfile.template.php file

I only see this "?action=register;referredby=1" instead of this "http://localhost/smf/index.php?action=register;referredby=1 (http://localhost/smf/index.php?action=register;referredby=1)"


$scripturl isn't being globaled.

Thank you for the response, how do I fix it though? I just installed this live and I'm getting the same thing.

Everyone's referral link is: ?action=register;referredby=X

EDIT: Never mind I got it. For anyone else....
Found /UltimateProfile.template.php
function up_block_user_info() {
    global $settings, $txt, $context;

Replaced with
function up_block_user_info() {
    global $settings, $txt, $context, $scripturl;
Title: Re: Referrals Mod v2.2.7.2 (Now supports RC3!)
Post by: ozzie1016 on March 30, 2010, 11:24:47 PM
I installed it and it works great. I am using rc3...I do have one question though...is there a way to hide the stats from other members...to make it just so admins can see it. I don't see anything in permissions that allows a change on this....Thanks in advance
Title: Re: Referrals Mod v2.2.7.2 (Now supports RC3!)
Post by: Diamond1444 on April 08, 2010, 08:36:05 AM
I have the same question as Ozzie.
Title: Re: Referrals Mod v2.2.7.2 (Now supports RC3!)
Post by: Afro on April 22, 2010, 08:58:51 AM
Mod installed correctly but when i try to copy the link from my profile, it refuses to copy.
it can be highlighted but ctrl+C doesnt work.
Right click removes the highlight and copies only " ; ".

Edit.. it works on Firefox, the problem was on Google chrome.

Another question is why this doesnt have any config link on the admin panel..
I also assume it is safe to remove the link from the registration page ?
Title: Re: Referrals Mod v2.2.7.2 (Now supports RC3!)
Post by: Hoodie on April 23, 2010, 02:40:51 AM
I'm not sure why at all this error is occurring but I'm getting it whenever not logged into the forums when using this mod..

8: Undefined index: server
File: /home/xxxxxx/public_html/demo/shared/Sources/Subs.php
Line: 799

I uninstall the mod and everything is good to go..

This is line 799 and surrounding:

779:     
780:     $str = !is_bool($show_today) ? $show_today : $user_info['time_format'];
781:     
782:     if (setlocale(LC_TIME, $txt['lang_locale']))
783:     {
784:     foreach (array('%a', '%A', '%b', '%B') as $token)
785:     if (strpos($str, $token) !== false)
786:     $str = str_replace($token, !empty($txt['lang_capitalize_dates']) ? $smcFunc['ucwords'](strftime($token, $time)) : strftime($token, $time), $str);
787:     }
788:     else
789:     {
790:     // Do-it-yourself time localization.  Fun.
791:     foreach (array('%a' => 'days_short', '%A' => 'days', '%b' => 'months_short', '%B' => 'months') as $token => $text_label)
792:     if (strpos($str, $token) !== false)
793:     $str = str_replace($token, $txt[$text_label][(int) strftime($token === '%a' || $token === '%A' ? '%w' : '%m', $time)], $str);
794:     if (strpos($str, '%p'))
795:     $str = str_replace('%p', (strftime('%H', $time) < 12 ? 'am' : 'pm'), $str);
796:     }
797:     
798:     // Windows doesn't support %e; on some versions, strftime fails altogether if used, so let's prevent that.
==>799:     if ($context['server']['is_windows'] && strpos($str, '%e') !== false)
800:     $str = str_replace('%e', ltrim(strftime('%d', $time), '0'), $str);
801:     
802:     // Format any other characters..
803:     return strftime($str, $time);
804:     }
805:     
806:     // Removes special entities from strings.  Compatibility...
807:     function un_htmlspecialchars($string)
808:     {
809:     static $translation;
810:     
811:     if (!isset($translation))
812:     $translation = array_flip(get_html_translation_table(HTML_SPECIALCHARS, ENT_QUOTES)) + array(''' => '\'', '&nbsp;' => ' ');
813:     
814:     return strtr($string, $translation);
815:     }
816:     
817:     // Shorten a subject + internationalization concerns.
818:     function shorten_subject($subject, $len)
819:     {
Title: Re: Referrals Mod v2.2.7.2 (Now supports RC3!)
Post by: SnoMan on April 23, 2010, 11:17:49 AM
I have installed this mod and switched to the core theme to test it (previously using Babylon theme). I see the referral info in the profile, but I don't see a referral button or link to actually activate an invitation. Am I missing a button, or are my members supposed to copy/paste the invitation into an email?

www.survivalnewsonline.com/snoboards
Title: Re: Referrals Mod v2.2.7.2 (Now supports RC3!)
Post by: mrtrc266 on April 23, 2010, 11:26:33 AM
Quote from: SnoMan on April 23, 2010, 11:17:49 AM
I have installed this mod and switched to the core theme to test it (previously using Babylon theme). I see the referral info in the profile, but I don't see a referral button or link to actually activate an invitation. Am I missing a button, or are my members supposed to copy/paste the invitation into an email?

www.survivalnewsonline.com/snoboards

You are correct there isn't a button, your members simply pass out their referral link to whoever they like. One thing to suggest when you make the announcement is for them to put it in their signature on other forums. Once someone clicks on your referral link it will stay in the cookies for 60 days (unless they clear their cookies). Or a member can simply type in the name of the referrer when they register to your site.
Title: Re: Referrals Mod v2.2.7.2 (Now supports RC3!)
Post by: SnoMan on April 23, 2010, 11:39:15 AM
Quote from: mrtrc266 on April 23, 2010, 11:26:33 AM
Quote from: SnoMan on April 23, 2010, 11:17:49 AM
I have installed this mod and switched to the core theme to test it (previously using Babylon theme). I see the referral info in the profile, but I don't see a referral button or link to actually activate an invitation. Am I missing a button, or are my members supposed to copy/paste the invitation into an email?

www.survivalnewsonline.com/snoboards

You are correct there isn't a button, your members simply pass out their referral link to whoever they like. One thing to suggest when you make the announcement is for them to put it in their signature on other forums. Once someone clicks on your referral link it will stay in the cookies for 60 days (unless they clear their cookies). Or a member can simply type in the name of the referrer when they register to your site.

Thanks! Does it matter whether the new member types in the display name of the referring member? Or must the new member type in the referring member's actual user name?
Title: Re: Referrals Mod v2.2.7.2 (Now supports RC3!)
Post by: mrtrc266 on April 23, 2010, 09:44:47 PM
Username I believe but not 100% on that.
Title: Re: Referrals Mod v2.2.7.2 (Now supports RC3!)
Post by: Afro on April 25, 2010, 11:53:04 AM
Vb, i want to remove the code block on the /Themes/default/Register.template.php.

I dont need the "who referred you" option there.

how does that affect anything about the mod ?

sometimes or most of the time, new members dont know the forum name of the person who referred them ..
Title: Re: Referrals Mod v2.2.7.2 (Now supports RC3!)
Post by: vbgamer45 on April 25, 2010, 03:52:38 PM
Not sure didn't make the mod orginally.
Title: Re: Referrals Mod v2.2.7.2 (Now supports RC3!)
Post by: Afro on April 25, 2010, 06:45:30 PM
Quote from: vbgamer45 on April 25, 2010, 03:52:38 PM
Not sure didn't make the mod orginally.

But could that option of "who referred you" on the registration page be made to have "enable" and "disable" from the admin cp ?
Title: Re: Referrals Mod v2.2.7.2 (Now supports RC3!)
Post by: phpshiva on May 04, 2010, 11:39:46 AM
wen someone clicks on the link then its ok but wen someone puts in the  display name of the referring member then its not showing anything.
Can you tell me what wrong?
wen i look in database its also not there.
Title: Re: Referrals Mod v2.2.7.2 (Now supports RC3!)
Post by: ~DS~ on May 04, 2010, 01:45:17 PM
 vbgamer45 is there a way not to show referrals on topics/posts?
Title: Re: Referrals Mod v2.2.7.2 (Now supports RC3!)
Post by: pointalk on May 06, 2010, 07:46:39 PM
I want this feature

1.Admin can see all members referrals number.
2.Display Top 10 Referrers every week (By Referrals) and Top 10 Referrers every month (By Referrals)
at Forum Stats.
So that I can start a refferal contest.

Can you help me,vbgamer45
Title: Re: Referrals Mod v2.2.7.2 (Now supports RC3!)
Post by: vbgamer45 on May 06, 2010, 08:10:06 PM
Not at the moment busy with other projects.
Title: Re: Referrals Mod v2.2.7.2 (Now supports RC3!)
Post by: Afro on May 07, 2010, 08:06:18 AM
http://www.afrowall.com/index.php?amp;action=register;sa=usernamecheck;xml;username=ohazeez
Apply Filter: Only show the errors with the same message
8: Undefined index: server
Apply Filter: Only show the errors from this file
File: /home/xxxxxxx/public_html/Sources/Subs.php
Line: 799

Whats the fix  for this error, it happens when someone uses a referral link to register.

here is line 799 of subs.php
if ($context['server']['is_windows'] && strpos($str, '%e') !== false)
Title: Re: Referrals Mod v2.2.7.2 (Now supports RC3!)
Post by: Vincent Volmer on May 08, 2010, 06:21:23 AM
Thanks vb for this great mod!
Quote from: pointalk on May 06, 2010, 07:46:39 PM
2.Display Top 10 Referrers every week (By Referrals) and Top 10 Referrers every month (By Referrals)
at Forum Stats.
So that I can start a refferal contest.

Would be a great feature! We'd like to give our members, after lets say 5 referrals,  a free item from the SMFStore. Therefore it would be helpfully to have a list of 'total referrals by members' and not only a Top5, if possible.

Vincent
Title: Re: Referrals Mod v2.2.7.2 (Now supports RC3!)
Post by: Vincent Volmer on May 08, 2010, 06:23:48 AM
Quote from: Afro on May 07, 2010, 08:06:18 AM
8: Undefined index: server
File: /home/xxxxxxx/public_html/Sources/Subs.php
Line: 799

Whats the fix  for this error, it happens when someone uses a referral link to register.

I have the same error in the log. For one registration it puts this error 13 times in the log

Vincent
Title: Re: Referrals Mod v2.2.7.2 (Now supports RC3!)
Post by: Afro on May 08, 2010, 07:32:23 AM
Quote from: Vincent Volmer on May 08, 2010, 06:23:48 AM
Quote from: Afro on May 07, 2010, 08:06:18 AM
8: Undefined index: server
File: /home/xxxxxxx/public_html/Sources/Subs.php
Line: 799

Whats the fix  for this error, it happens when someone uses a referral link to register.

I have the same error in the log. For one registration is puts it 13 times in the log

Vincent
Lets hope vb has a solution for it then.
Title: Re: Referrals Mod v2.2.7.2 (Now supports RC3!)
Post by: vbgamer45 on May 08, 2010, 10:16:07 AM
I am not longer going to support this mod mostly like going to put it up for sale.
Title: Re: Referrals Mod v2.2.7.2 (Now supports RC3!)
Post by: Vincent Volmer on May 08, 2010, 11:18:03 AM
Quote from: vbgamer45 on May 08, 2010, 10:16:07 AM
I am not longer going to support this mod mostly like going to put it up for sale.

I understand..... You have a lot of mods to work on.
But could you please look into this 'server' error? For the rest it's fine to leave it as it is.

Thanks for your great work!!! , Vincent

Title: Re: Referrals Mod v2.2.7.2 (Now supports RC3!)
Post by: vbgamer45 on May 08, 2010, 11:36:25 AM
I don't see server part of the refferals code so probably is deeper but don't have time to look for it.
Title: Re: Referrals Mod v2.2.7.2 (Now supports RC3!)
Post by: Bob Perry of Web Presence Consulting on May 08, 2010, 01:23:29 PM
Quote from: vbgamer45 on May 08, 2010, 10:16:07 AM
I am not longer going to support this mod mostly like going to put it up for sale.

I might like to buy it if it's not going to break the bank...
Title: Re: Referrals Mod v2.2.7.2 (Now supports RC3!)
Post by: vbgamer45 on May 08, 2010, 01:28:58 PM
Current list of Mods for Sale
http://www.simplemachines.org/community/index.php?topic=380410.msg2619058#new
Title: Re: Referrals Mod v2.2.7.2 (Now supports RC3!)
Post by: TurtleKicker on May 10, 2010, 10:17:20 AM
Please someone, pick this up... I plan on using it on my SMF2 forum relaunch and would hate the lose the functionality. :(
Title: Re: Referrals Mod v2.2.7.2 (Now supports RC3!)
Post by: Vincent Volmer on May 11, 2010, 01:09:31 AM
Yes please...
Or at least someone who can fix this error. Or.... tell us that we can ignore this error. It looks like it is working fine.

Vincent

Title: Re: Referrals Mod v2.2.7.2 (Now supports RC3!)
Post by: Bob Perry of Web Presence Consulting on May 11, 2010, 06:18:26 PM
Quote from: bperry921 on May 08, 2010, 01:23:29 PM
Quote from: vbgamer45 on May 08, 2010, 10:16:07 AM
I am not longer going to support this mod mostly like going to put it up for sale.

I might like to buy it if it's not going to break the bank...

I'm going to need one little fix before I'd consider buying it, in it's present form if a users account gets deleted who was referred by another user, there needs to be a check in the deletion actions somewhere to reach out and decrement the original referrer's referral count by one...

I'm not quite competent enough with PHP to tackle this in a time effective manner

Sorry if this has already been addressed, I'll do some looking afterward
Title: Re: Referrals Mod v2.2.7.2 (Now supports RC3!)
Post by: Bob Perry of Web Presence Consulting on May 16, 2010, 06:29:54 PM
Quote from: bperry921 on May 11, 2010, 06:18:26 PM
Quote from: bperry921 on May 08, 2010, 01:23:29 PM
Quote from: vbgamer45 on May 08, 2010, 10:16:07 AM
I am not longer going to support this mod mostly like going to put it up for sale.

Well I've attempted several times with variations of the code used to add the referral in the Register.php file, so far unsuccessfully, help please... I'd be willing to pay a reasonable fee for a working snippet of code which does the job...

I held a contest on my system based on this mod and got fair results with a few minor aesthetic edits to the code in its present form, but the contest opened my eyes to this glaring flaw in the mod so I really need this fixed before I conduct any further contests based on this mod...
I might like to buy it if it's not going to break the bank...

I'm going to need one little fix before I'd consider buying it, in it's present form if a users account gets deleted who was referred by another user, there needs to be a check in the deletion actions somewhere to reach out and decrement the original referrer's referral count by one...

I'm not quite competent enough with PHP to tackle this in a time effective manner

Sorry if this has already been addressed, I'll do some looking afterward
Title: Re: Referrals Mod v2.2.7.2 (Now supports RC3!)
Post by: vbgamer45 on May 16, 2010, 07:53:13 PM
Yeah I just don't have time right now to look it over.
Title: Re: Referrals Mod v2.2.7.2 (Now supports RC3!)
Post by: Bob Perry of Web Presence Consulting on May 25, 2010, 05:53:30 AM
Quote from: bperry921 on May 16, 2010, 06:29:54 PM
Quote from: bperry921 on May 11, 2010, 06:18:26 PM

I'm going to need one little fix before I'd consider buying it, in it's present form if a users account gets deleted who was referred by another user, there needs to be a check in the deletion actions somewhere to reach out and decrement the original referrer's referral count by one...

I'm not quite competent enough with PHP to tackle this in a time effective manner

Sorry if this has already been addressed, I'll do some looking afterward

Since he hasn't got the time any of you other PHP coders out there care to take a stab at this? A paid job is a paid job, but be reasonable please I can't afford much right now.

It would also be handy if there was a bit of code added to forum maintenance in the statistics recount option that verify referral counts are accurate.
Title: Referral Mod not giving suggestions on Soft dark theme
Post by: codevarun on May 30, 2010, 09:48:04 AM
Hello I just installed the light dark theme then I installed the referral mod

Points To be noted:
Its not working in soft dark theme but working with default theme check in every browser
Even with the soft dark theme it is showing suggestion with internet explorer but not in firefox or chrome
Below is the registration link
I used the firbug  in order to detect the problem and found that ajax not working at all
Please check and let me know what is wrong.
www.talentsucks.com/forum/register/

Title: Re: Referrals Mod v2.2.7.2 (Now supports RC3!)
Post by: Kmam on June 03, 2010, 05:30:13 PM
Is there a way to get my members referral links back on their profile while using ultimate profile mod? Using SMF 1.1.11
Title: Re: Referrals Mod v2.2.7.2 (Now supports RC3!)
Post by: droganto on June 03, 2010, 09:52:00 PM
Hello everyone, Well finally I found this MOD. I haven tested but I have a question. A lot of members already referred few new members, but since I just installed the MOD definitively everyone started at 0, is there anyway to change the Referral count to the right number?

I try the link but it goes to the registration page, so thats not going to work I think.

Like for example I have 1 member that is been with us since start and he had referred like 8 people, but since I just started the Mod it says 0. How can I change that to 8.
Title: Re: Referrals Mod v2.2.7.2 (Now supports RC3!)
Post by: Bob Perry of Web Presence Consulting on June 05, 2010, 02:12:57 AM
Quote from: droganto on June 03, 2010, 09:52:00 PM
Hello everyone, Well finally I found this MOD. I haven tested but I have a question. A lot of members already referred few new members, but since I just installed the MOD definitively everyone started at 0, is there anyway to change the Referral count to the right number?

I try the link but it goes to the registration page, so thats not going to work I think.

Like for example I have 1 member that is been with us since start and he had referred like 8 people, but since I just started the Mod it says 0. How can I change that to 8.

I can help you with that, but you may not like what you hear from me because it's not a very elegant way to accomplish your goal... actually, now that I think about it, there is an even simpler way if you are familiar with manually editing each members information directly in the database using mySQL editor? The first method I talk about is having each person who got refeered by user1 to delete their account and recreate it using user1's username this time, it would probably be better if you as admin delete the account and let them redo it, because many administers don't allow users to delete their own account anyway, and on the admin delete there is an option to delete the users posts or not do so, whereas on the delete their own option I know there is no such option and not sure right now whether their posts remain or not...

The other method is editing the database directly but if you're not familiar with doing that I leave it to the SMF helpers here to explain to you, I'm sure there's tons of info on it in other topics here, use your search function...

As a sidenote to other administers of this module, I have finally resolved the bug previously mentioned earlier in this thread, after a non-stop 72 hour session of cussing and hair pulling lol
:)
Title: Re: Referrals Mod v2.2.7.2 (Now supports RC3!)
Post by: Eclipse16V on June 05, 2010, 02:39:09 AM
Quote from: JBlaze on January 01, 2010, 05:07:22 PM
Shouldn't be long for the update. I am fairly busy so it won't be immediate.
Any news?
Please fix the errors.

Thanks
Title: Re: Referrals Mod v2.2.7.2 (Now supports RC3!)
Post by: droganto on June 05, 2010, 10:02:36 AM
Thank you Bperry, I will take a look inside the database and hope is not complicated to edit. If not I will wait until someone help here.
Title: Re: Referrals Mod v2.2.7.2 (Now supports RC3!)
Post by: Bob Perry of Web Presence Consulting on June 05, 2010, 02:22:10 PM
Quote from: droganto on June 05, 2010, 10:02:36 AM
Thank you Bperry, I will take a look inside the database and hope is not complicated to edit. If not I will wait until someone help here.

Yea that would be the best way to avoid much complaining from users, and it's not hard depending on the editor provided by your Hosting company... you'll only need to edit one field I think on the referredby user's account, "referral_no", and the "referred_by" field on each referral user's account...

Peruse through my posts in this thread, you'll discover that there is a major flaw in the default installed Referral mod, I am relatively certain I have the bug resolved , but I'm not a PHP expert yet and there is a lot of debugging code and un-necessary code in my versions of the files so I'm not going to post it till I go back over it again and remove that stuff.
Title: Re: Referrals Mod v2.2.7.2 (Now supports RC3!)
Post by: droganto on June 05, 2010, 11:02:13 PM
I cant find those files inside the Cpanel or the SQL
Title: Re: Referrals Mod v2.2.7.2 (Now supports RC3!)
Post by: Bob Perry of Web Presence Consulting on June 06, 2010, 12:26:04 AM
Quote from: droganto on June 05, 2010, 11:02:13 PM
I cant find those files inside the Cpanel or the SQL


Files, what files? If you are going to use an SQL editor to manipulate the database, the file you want is members, using whatever prefix you have set for it if any, that is the only file you'll need... what may have confused you is my mention of the previous threads here, my bad, i was just trying to let you know that there is a major bug in the current version of the mod which I have corrected in my system...
Title: Re: Referrals Mod v2.2.7.2 (Now supports RC3!)
Post by: droganto on June 06, 2010, 01:17:29 PM
Quote from: bperry921 on June 06, 2010, 12:26:04 AM
Quote from: droganto on June 05, 2010, 11:02:13 PM
I cant find those files inside the Cpanel or the SQL


Files, what files? If you are going to use an SQL editor to manipulate the database, the file you want is members, using whatever prefix you have set for it if any, that is the only file you'll need... what may have confused you is my mention of the previous threads here, my bad, i was just trying to let you know that there is a major bug in the current version of the mod which I have corrected in my system...

No problem P I did find it inside the smf_members. Now I just need to ask the guys to tell me who invited who, so I can change the ID and the quantity. Theres another field "referred_on" and it has a weird number, I wonder if I have to worry about that number or not?
Title: Re: Referrals Mod v2.2.7.2 (Now supports RC3!)
Post by: Bob Perry of Web Presence Consulting on June 06, 2010, 04:00:39 PM
Quote from: droganto on June 06, 2010, 01:17:29 PM
Quote from: bperry921 on June 06, 2010, 12:26:04 AM
Quote from: droganto on June 05, 2010, 11:02:13 PM
I cant find those files inside the Cpanel or the SQL


Files, what files? If you are going to use an SQL editor to manipulate the database, the file you want is members, using whatever prefix you have set for it if any, that is the only file you'll need... what may have confused you is my mention of the previous threads here, my bad, i was just trying to let you know that there is a major bug in the current version of the mod which I have corrected in my system...

No problem P I did find it inside the smf_members. Now I just need to ask the guys to tell me who invited who, so I can change the ID and the quantity. Theres another field "referred_on" and it has a weird number, I wonder if I have to worry about that number or not?

the referred_on is a date and I'm not sure how to manipulate that field, it's a time stamp field and I think it contains a Julian date, i wouldn't worry about that one... it's only used in the referral's profile information

Title: Re: Referrals Mod v2.2.7.2 (Now supports RC3!)
Post by: Mobeen Janjua (MJ) on June 07, 2010, 03:03:17 AM
I have installed referrals Mod v2.2.7.2 in my forum.. now what need to do.. how it will work.. .???
Title: Re: Referrals Mod v2.2.7.2 (Now supports RC3!)
Post by: Liam. on June 07, 2010, 01:13:03 PM
Quote from: Mobeen Janjua (MJ) on June 07, 2010, 03:03:17 AM
I have installed referrals Mod v2.2.7.2 in my forum.. now what need to do.. how it will work.. .???

Upon registration, the registree can select a user whom has referred them to the site. Similarly, a member can give someone else a link that will automatically enter their username in the registration box. Several other features are there - have a look around the screenshots, etcetera.
Title: Re: Referrals Mod v2.2.7.2 (Now supports RC3!)
Post by: Mobeen Janjua (MJ) on June 08, 2010, 11:29:52 AM
Quote from: Liam. on June 07, 2010, 01:13:03 PM
Quote from: Mobeen Janjua (MJ) on June 07, 2010, 03:03:17 AM
I have installed referrals Mod v2.2.7.2 in my forum.. now what need to do.. how it will work.. .???

Upon registration, the registree can select a user whom has referred them to the site. Similarly, a member can give someone else a link that will automatically enter their username in the registration box. Several other features are there - have a look around the screenshots, etcetera.

Yes I have checked these option but that referrel option is not available in registration from and also no link is available anywhere... Kindly suggest ...
Title: Re: Referrals Mod v2.2.7.2 (Now supports RC3!)
Post by: Bob Perry of Web Presence Consulting on June 12, 2010, 07:58:55 AM
Found another bug but it's easy to fix manually if you are comfortable with editing source files, just add the code circled in purple indicated in the following pic... which is located in Sources/Register.php

(http://www.rjventure.com/images/smfhelpticket37.png)

without this code, if a guest who is registering fills in the referral field, but forgets some other required field or if there is some error the system will credit the referrer anyway, throwing the true referral count for that user out of whack... be extremely careful with syntax while editing, and you may need to adjust for your particular registration required fields but the above should be good for most installs
Title: Re: Referrals Mod v2.2.7.2 (Now supports RC3!)
Post by: kaamaru on June 13, 2010, 02:54:23 PM
Need Help!

Some of my members have referals as you can see on the stats page, but no members that they have referred show up on there profiles?


http://ihackmyi.com/iphone/index.php?action=stats
Title: Re: Referrals Mod v2.2.7.2 (Now supports RC3!)
Post by: Afro on June 13, 2010, 07:34:47 PM
Quote from: bperry921 on June 12, 2010, 07:58:55 AM
Found another bug but it's easy to fix manually if you are comfortable with editing source files, just add the code circled in purple indicated in the following pic... which is located in Sources/Register.php

(http://www.rjventure.com/images/smfhelpticket37.png)

without this code, if a guest who is registering fills in the referral field, but forgets some other required field or if there is some error the system will credit the referrer anyway, throwing the true referral count for that user out of whack... be extremely careful with syntax while editing, and you may need to adjust for your particular registration required fields but the above should be good for most installs

nice discovery. i wrote the codes out . it works fine,

&& empty($reg_errors)
&& !empty($_POST['user'])
&& !empty($_POST['email'])
&& !empty($_POST['passwrd1'])
&& !empty($_POST['passwrd2'])
Title: Re: Referrals Mod v2.2.7.2 (Now supports RC3!)
Post by: IDunc on June 16, 2010, 10:31:48 PM
How do I get this mod working with Ultimate Profile on SMF RC3?
Title: Re: Referrals Mod v2.2.7.2 (Now supports RC3!)
Post by: IDunc on June 17, 2010, 02:14:48 PM
Can anyone help? How do I get this working with Ultimate Profile on SMF 2.0 RC3?
Title: Re: Referrals Mod v2.2.7.2 (Now supports RC3!)
Post by: smp420 on June 17, 2010, 03:08:17 PM
Search it's already in this topic.
Title: Re: Referrals Mod v2.2.7.2 (Now supports RC3!)
Post by: IDunc on June 17, 2010, 04:14:00 PM
Can you point me to where the solution is? I can't find it.
Title: Re: Referrals Mod v2.2.7.2 (Now supports RC3!)
Post by: RaXavier69 on June 17, 2010, 05:27:00 PM
any chance of referral adds +rep?
Title: Re: Referrals Mod v2.2.7.2 (Now supports RC3!)
Post by: IDunc on June 17, 2010, 06:05:32 PM
Quote from: IDunc on June 17, 2010, 04:14:00 PM
Can you point me to where the solution is? I can't find it.
Title: Re: Referrals Mod v2.2.7.2 (Now supports RC3!)
Post by: Tearstar on June 17, 2010, 07:30:09 PM
Quote from: RaXavier69 on June 17, 2010, 05:27:00 PM
any chance of referral adds +rep?

I like this idea, would promote getting the referrals.


Title: Re: Referrals Mod v2.2.7.2 (Now supports RC3!)
Post by: smp420 on June 18, 2010, 01:51:46 AM
Quote from: RaXavier69 on June 17, 2010, 05:27:00 PM
any chance of referral adds +rep?
http://www.simplemachines.org/community/index.php?topic=226191.msg2501650#msg2501650 That is for 2.0 RC2 should work with RC3 though

Quote from: IDunc on June 16, 2010, 10:31:48 PM
How do I get this mod working with Ultimate Profile on SMF RC3?
You posted 4 times within 2 days and sent me a pm about this it would of taken you alot less time to find it yourself all I know is it is somewhere in this topic.
Title: Re: Referrals Mod v2.2.7.2 (Now supports RC3!)
Post by: IDunc on June 18, 2010, 02:36:51 PM
I can not find a solution that actually works. Can someone please just help me?
Title: Re: Referrals Mod v2.2.7.2 (Now supports RC3!)
Post by: Vincent Volmer on June 18, 2010, 02:55:14 PM
Quote from: IDunc on June 18, 2010, 02:36:51 PM
I can not find a solution that actually works. Can someone please just help me?

On the top right of the website you find the search button. Search in "this topic" and you will find a lot of messages  ;) or follow this link:
http://www.simplemachines.org/community/index.php?action=search2;search=Ultimate+Profile;topic=226191 (http://www.simplemachines.org/community/index.php?action=search2;search=Ultimate+Profile;topic=226191)

But this mod isn't supported anymore until someone buys it:
http://www.simplemachines.org/community/index.php?topic=226191.msg2619225#msg2619225 (http://www.simplemachines.org/community/index.php?topic=226191.msg2619225#msg2619225)

Vy73!
Vincent
Title: Re: Referrals Mod v2.2.7.2 (Now supports RC3!)
Post by: smp420 on June 18, 2010, 04:32:34 PM
Here it is http://www.simplemachines.org/community/index.php?topic=226191.msg2329345#msg2329345
Title: Re: Referrals Mod v2.2.7.2 (Now supports RC3!)
Post by: IDunc on June 18, 2010, 04:45:06 PM
Okay thanks guys. I got it. But now I have a new problem.

The same problem as this post:
http://www.simplemachines.org/community/index.php?topic=226191.msg2561965;topicseen#msg2561965

Except when I modify the php file as it says to do, nothing changes in the link. It is still just ?action=register;referredby=1 instead of http://opticsglobal.co.cc/index.php?action=register;referredby=1.

This is what my code is:

function up_block_user_info() {
    global $settings, $txt, $context, $modsettings, $scripturl;


The difference is that his code didn't have $modsettings in it, but mine does.

Any help would be greatly appreciated.
Title: Re: Referrals Mod v2.2.7.2 (Now supports RC3!)
Post by: smp420 on June 18, 2010, 04:54:44 PM
You already have $scripturl globaled so it should work attach that file.
Title: Re: Referrals Mod v2.2.7.2 (Now supports RC3!)
Post by: Tearstar on June 18, 2010, 05:11:36 PM
Here is what I did

In Theme folder you are using, open UltimateProfile.Template.php

thenFind:
if (!empty($context['member']['referred_by'])){

echo'

<dt>', $txt['referrals_referred_by'], '</dt>

<dd>', $context['member']['referred_by_link'], ' ', $txt['referrals_on'], ' ', timeformat($context['member']['referred_on']), '</dd>';

}



// Remove the # on the next line to make the link appear for the profile's owner ONLY!

if ($context['user']['id'] == $context['member']['id'])

echo '

<dt>', $txt['referrals_link'], '</dt>

<dd>



the
replace the next line, which sould be something like

<input type="text" onselect="this.select()" id="referral_link" value="[url/to/forum/index]', $scripturl, '?action=register;referredby=', $context['member']['id'], '" readonly="true" style="width:150px;" />


[url/to/forum/index] of courese should be changed to point to your url, that should put it in the text
Title: Re: Referrals Mod v2.2.7.2 (Now supports RC3!)
Post by: smp420 on June 18, 2010, 05:14:18 PM
Well then you would get alot of errors because $scripturl is undefined
Title: Re: Referrals Mod v2.2.7.2 (Now supports RC3!)
Post by: IDunc on June 18, 2010, 05:16:53 PM
There is the file.
Title: Re: Referrals Mod v2.2.7.2 (Now supports RC3!)
Post by: Tearstar on June 18, 2010, 05:17:09 PM
I don't, you still keep scripturl, this is just to display the text in the text area so it can all be copied
Title: Re: Referrals Mod v2.2.7.2 (Now supports RC3!)
Post by: Tearstar on June 18, 2010, 05:23:40 PM
Try this, but go into the file and change

http://your.site.com/forumsfolder/index.php  to go to your forums main url page
Title: Re: Referrals Mod v2.2.7.2 (Now supports RC3!)
Post by: smp420 on June 18, 2010, 05:27:36 PM
Quote from: Tearstar on June 18, 2010, 05:17:09 PM
I don't, you still keep scripturl, this is just to display the text in the text area so it can all be copied
It's still there but not defined is the problem.

Quote from: IDunc on June 18, 2010, 05:16:53 PM
There is the file.
Try this
Title: Re: Referrals Mod v2.2.7.2 (Now supports RC3!)
Post by: IDunc on June 18, 2010, 05:34:22 PM
Thanks a lot smp, it worked.

And thanks to you to TearStar.
Title: Re: Referrals Mod v2.2.7.2 (Now supports RC3!)
Post by: Fredecardoso on July 03, 2010, 05:28:34 PM
Good day,

Already asked for help in my language but as yet I do not say anything and this is very important I think to come here.

I installed mod and when I try to refer to a member gives this error:

Fatal error: Call to undefined function loadreferral() in /home/a7087381/public_html/forum/index.php on line 172

What should I do to fix the problem?
I've also tried installing the mod manually and did not see anything wrong according to the website of the PARSE MOD SMF.
What should be wrong for me to correct?

Thank you for your attention,

Fred
Title: Re: Referrals Mod v2.2.7.2 (Now supports RC3!)
Post by: ilb on July 03, 2010, 06:30:46 PM
i have a slight issue!

i've installed this mod, works great. however when using the referral link, it only loads 20% of the foum and not all of it (it's missing the portal sections)


my site: xxx.iloveboost.com (replace xxx with www)

referral link: iloveboost.com/forum/index.php?referredby=22

So how do i go about fixing this slight issuse
Title: Re: Referrals Mod v2.2.7.2 (Now supports RC3!)
Post by: Sabre™ on July 03, 2010, 07:13:26 PM
@Fredecardoso
Check that all he edits were made to your templates, especially your load.php.
Look [HERE] (http://custom.simplemachines.org/mods/index.php?action=parse;mod=1114;attach=136985;smf_version=2.0_RC3) for the parse instructions.

@ilb
When clicking a referral link, the person should be directed to the registration page, not your home page, so in your profile.template.php, change this line
<input type="text" id="referral_link" value="', $scripturl, '?referredby=', $context['member']['id'], '" readonly="true" style="width:250px;" />

To this
<input type="text" id="referral_link" value="', $scripturl, '?action=register;referredby=', $context['member']['id'], '" readonly="true" style="width:250px;" />

When asking for assistance, be sure to mention which branch of SMF you guys are using, as SMF1 & SMF2 have different coding in certain templates.
Hope this helps :)
Title: Re: Referrals Mod v2.2.7.2 (Now supports RC3!)
Post by: ilb on July 03, 2010, 08:14:22 PM
Quote from: Sabre™ on July 03, 2010, 07:13:26 PM
@Fredecardoso
Check that all he edits were made to your templates, especially your load.php.
Look [HERE] (http://custom.simplemachines.org/mods/index.php?action=parse;mod=1114;attach=136985;smf_version=2.0_RC3) for the parse instructions.

@ilb
When clicking a referral link, the person should be directed to the registration page, not your home page, so in your profile.template.php, change this line
<input type="text" id="referral_link" value="', $scripturl, '?referredby=', $context['member']['id'], '" readonly="true" style="width:250px;" />

To this
<input type="text" id="referral_link" value="', $scripturl, '?action=register;referredby=', $context['member']['id'], '" readonly="true" style="width:250px;" />

When asking for assistance, be sure to mention which branch of SMF you guys are using, as SMF1 & SMF2 have different coding in certain templates.
Hope this helps :)

after probing around a little, i figured it out! lol.  now only if i can figure out how to fix my other problem (uninstalling thank-o-crap, i mean matic)


But thanls for the quick reply.
btw the way, i am using smf 1.1.11
Title: Re: Referrals Mod v2.2.7.2 (Now supports RC3!)
Post by: Sabre™ on July 03, 2010, 10:54:02 PM
I re-wrote that thanks mod for another member just last week, but after probing around a little, Im sure you'll figure out how to uninstall it ;)
Good luck.
Title: Re: Referrals Mod v2.2.7.2 (Now supports RC3!)
Post by: Fredecardoso on July 05, 2010, 08:03:22 AM
Boas,

I thank you for your quick reply to my problem.
I've checked all the files and saw nothing wrong but the file's stats could not find a few lines of code but I think this is irrelevant.
I've attached all the files modification for those who can see what the problem is.

Thank you for your attention,

Fredecardoso
Title: Re: Referrals Mod v2.2.7.2 (Now supports RC3!)
Post by: sevamaster on July 05, 2010, 01:59:35 PM
Hi there,
Is it possible to place referral link to any page of a forum?
f.e.

http://www.seobuilding.ru/seo-forum/o_saite_i_forume/pooshreniya_aktivnyh_polzovatelei_foruma_iul_2010/?referredby=29


I think it would be better to refer people to particular page in place of the register page.
Title: Re: Referrals Mod v2.2.7.2 (Now supports RC3!)
Post by: John1 on July 05, 2010, 05:25:33 PM
I want to add the referral link to the ultimate profile.

The ultimate profile mode over wrote the default profile view and the referral link disappeard.
How do i add it back ?
Title: Re: Referrals Mod v2.2.7.2 (Now supports RC3!)
Post by: Tearstar on July 05, 2010, 05:37:14 PM
Quote from: John1 on July 05, 2010, 05:25:33 PM
I want to add the referral link to the ultimate profile.

The ultimate profile mode over wrote the default profile view and the referral link disappeard.
How do i add it back ?

Read through this thread, there are alot of posts talking about how to do it. I posted some myself and following all the posts here, we got it working.
Title: Re: Referrals Mod
Post by: John1 on July 05, 2010, 06:16:39 PM
Quote from: Sabre™ on October 27, 2009, 12:20:41 AM
EDIT:

If you cannot wait...

search for
// Messenger type information.

and add before it
// Adds the referral/referred user information to the profile summary
echo '
    <table border="0" cellpadding="4" cellspacing="1" class="bordercolor" width="100%" id="info1">
    <tr>
<td class="windowbg">
<table border="0" cellspacing="0" cellpadding="2" width="100%">
<tr>
<td colspan="2"><hr size="1" width="100%" class="hrcolor" /></td>
</tr>
<tr>
<td><b>', $txt['referrals_referrals'], '</b></td>
<td>', $context['member']['referrals_no'];

// Show in dropdown of those referred
if (!empty($context['member']['referred_members'])){
echo '  <select onchange="location=options[selectedIndex].value;">
<option>', $txt['referrals_membersreferred'], '</option>';

foreach($context['member']['referred_members'] as $referred)
echo '
', $referred;

echo '
</select>';
}

echo '
</td>
</tr>
<tr>
<td><b>', $txt['referrals_referrals_hits'], '</b></td>
<td>', $context['member']['referrals_hits'], '</td>
</tr>';

if (!empty($context['member']['referred_by']))
echo'
<tr>
<td><b>', $txt['referrals_referred_by'], '</b></td>
<td>', $context['member']['referred_by_link'], ' ', $txt['referrals_on'], ' ', date("jS M Y",$context['member']['referred_on']), '</td>
</tr>';

echo '
<tr>
<td colspan="2"><b>', $txt['referrals_link'], '</b></td>
</tr>
<tr>
<td colspan="2" style="text-align: center;">
<input type="text" id="referral_link" value="', $scripturl, '?referredby=', $context['member']['id'], '" readonly="true" style="width:250px;" />
</td>
</tr>
    </table>
</td>
</tr>
</table>';


or the modified package is attached.
I'll remove it when JBlaze gets back.

I saw this edit but dont know which file. I could not find the messenger info on ultimateprofile template and profile template of my defualt theme.
Title: Re: Referrals Mod v2.2.7.2 (Now supports RC3!)
Post by: John1 on July 05, 2010, 06:51:03 PM
Got it fixed. Thanks
Title: Re: Referrals Mod v2.2.7.2 (Now supports RC3!)
Post by: C4G-TK on July 13, 2010, 06:02:12 PM
I'm using RC3 and I know this isn't supported any longer.
I am using it with Ultimate Profile by adding the Profile.template information into the UltimateProfile.template.php file.
It appears to be working, but it cuts off the link and doesn't display it entirely.  I get only get the following in the box:  ?action=register;referredby=2

Does anyone know what I need to add in order to get the full link to appear?  I get the full link if I switch it back to the standard profile.
Title: Re: Referrals Mod v2.2.7.2 (Now supports RC3!)
Post by: vbgamer45 on July 13, 2010, 06:23:43 PM
Looks like a missing $scripturl
Title: Re: Referrals Mod v2.2.7.2 (Now supports RC3!)
Post by: C4G-TK on July 13, 2010, 06:32:27 PM
Like I said, I added the Profile.template edit exactly into the UltimateProfile.template.  Do you mean I need to change something or add something into the script, too?

I put it between the last login and the profile activity in the Ultimate Profile.template:

echo '
<dt><strong>', $txt['date_registered'], ': </strong></dt>
<dd>', $context['member']['registered'], '</dd>
<dt><strong>', $txt['lastLoggedIn'], ': </strong></dt>
<dd>', $context['member']['last_login'], '</dd>
</dl>';



   // Add the referral/referred user information to the profile summary
echo '
<dt>', $txt['referrals_referrals'], '</dt>
<dd>
', $context['member']['referrals_no'], '  ';

// Show in dropdown username of those referred
if (!empty($context['member']['referred_members'])){
echo '
<select onchange="location=options[selectedIndex].value;">
<option>', $txt['referrals_membersreferred'], '</option>';
foreach($context['member']['referred_members'] as $referred)
echo '
', $referred;

echo '
</select>';
}

echo '
</dd>
<dt>', $txt['referrals_referrals_hits'], '</dd>
<dd>', $context['member']['referrals_hits'], '</dd>';

if (!empty($context['member']['referred_by'])){
echo'
<dt>', $txt['referrals_referred_by'], '</dt>
<dd>', $context['member']['referred_by_link'], ' ', $txt['referrals_on'], ' ', timeformat($context['member']['referred_on']), '</dd>';
}

// Remove the # on the next line to make the link appear for the profile's owner ONLY!
# if ($context['user']['id'] == $context['member']['id'])
echo '
<dt>', $txt['referrals_link'], '</dt>
<dd>
<input type="text" onselect="this.select()" id="referral_link" value="', $scripturl, '?action=register;referredby=', $context['member']['id'], '" readonly="true" style="width:250px;" />
</dd>';


if (isset($context['member']['action']) && allowedTo('who_view')) {
echo '<dt><b>', $txt['current_activity'], ': </b></dt>
<dd>', $context['member']['action'], '</dd>';
Title: Re: Referrals Mod v2.2.7.2 (Now supports RC3!)
Post by: sevamaster on July 20, 2010, 10:03:31 PM
Hi,
I have a problem.
One of my users has 20 referrals but it's shown only 9 in the referral combo-box.
See attached image.
What is wrong?
Title: Re: Referrals Mod v2.2.7.2 (Now supports RC3!)
Post by: shadow82x on August 15, 2010, 01:24:55 AM
Anyone have a patch or code edit to solve the "Undefined index: server" issue?
Title: Re: Referrals Mod v2.2.7.2 (Now supports RC3!)
Post by: Sabre™ on August 15, 2010, 04:48:12 AM
@ Fredecardoso
Sorry buddy, I completely missed your reply :-[
Do you still require assistance, or have you got it sorted?
Title: Re: Referrals Mod v2.2.7.2 (Now supports RC3!)
Post by: ledzepp on September 03, 2010, 11:44:14 AM
I wanna remove the link in the footer (Copyright), "Referrals by CreateAForum.com". Do I have to pay in order to do it legally, with the permission of the authors ?
Title: Re: Referrals Mod v2.2.7.2 (Now supports RC3!)
Post by: Sabre™ on September 03, 2010, 08:11:14 PM
Only if the author will accept payments to remove it.
Im also unsure of the policy of using a version "before" the copyright was introduced.
Title: Re: Referrals Mod v2.2.7.2 (Now supports RC3!)
Post by: Spoogs on September 04, 2010, 11:06:51 AM
The version I'm using is prior to the cpyright... being that the mod now has a new owner I'm assuming the copyright will be removed (hopefully not replaced)
Title: Re: Referrals Mod v2.2.7.2 (Now supports RC3!)
Post by: vbgamer45 on September 04, 2010, 11:12:08 AM
Quote from: ledzepp on September 03, 2010, 11:44:14 AM
I wanna remove the link in the footer (Copyright), "Referrals by CreateAForum.com". Do I have to pay in order to do it legally, with the permission of the authors ?
Contact me to remove it small fee.
Title: Re: Referrals Mod v2.2.7.2 (Now supports RC3!)
Post by: ledzepp on September 04, 2010, 12:10:04 PM
What version are you using ? I really wanna get rid of that copyright or replace it. CreateAForum makes my forum looks cheap and hosted by one of those free forum hosting companies.
Thanks
Title: Re: Referrals System 3.0 (Now supports RC3!)
Post by: MS Modders Team on September 04, 2010, 06:37:25 PM
We have released a new version of the Referrals System.
New in 3.0
+A complete rewrite with new code for both SMF 1.1.x and SMF 2.0.x
+New settings to control where referrals are shown
+Improved package installation for heavly modified forums
Title: Re: Referrals System 3.0 (Now supports RC3!)
Post by: Spoogs on September 04, 2010, 08:08:56 PM
Has the copyright been removed or replaced?
Title: Re: Referrals System 3.0 (Now supports RC3!)
Post by: ɔɔɔɔɔɔuɥoɾ on September 04, 2010, 11:41:20 PM
Quote from: Spoogs on September 04, 2010, 08:08:56 PM
Has the copyright been removed or replaced?

The copyright still remains, according to the parser on the mod site :)

Good work team :)
Title: Re: Referrals System 3.0 (Now supports RC3!)
Post by: Vincent Volmer on September 05, 2010, 03:39:16 AM
Thank you for the new version!!

I found one issue on our test website. The new referrals are not counted. The referrals are still 0 (zero). For admin I see the 'old' test referrals (10) that need to be 12 now. But still displaying 10.

Does anyone else have this issue?

Thanks for your great work S-M-F Modders!!

Vincent
Title: Re: Referrals System 3.0 (Now supports RC3!)
Post by: GAMBLINGWHORE on September 09, 2010, 11:39:05 PM
I also have the issue of zero referral as well you spelled referral wrong in your latest update - see this post for an image showing how its spelled incorrectly. I see the last poster has waited 5 days for a reply. can we get an update as to why the new update is not showing referrals?

http://www.simplemachines.org/community/index.php?topic=399988.0
Title: Re: Referrals System 3.0 (Now supports RC3!)
Post by: NoumanQAli on September 12, 2010, 01:20:09 PM
Also, you have no control over the referral system as an Admin. If someone cheats, you can't reset their Referral Amount. They can easily cheat with the Same IP...
Title: Re: Referrals System 3.0 (Now supports RC3!)
Post by: ɔɔɔɔɔɔuɥoɾ on September 12, 2010, 05:24:44 PM
Quote from: NoumanQAli on September 12, 2010, 01:20:09 PM
Also, you have no control over the referral system as an Admin. If someone cheats, you can't reset their Referral Amount. They can easily cheat with the Same IP...

And the new member will have the same IP address too, a simple trace IP can find out those cheating members.
Title: Re: Referrals System 3.0.1 (Now supports RC3!)
Post by: MS Modders Team on September 12, 2010, 06:28:55 PM
SMF Modders Team Update new fixes!!
3.0.1
!Fixed spelling of referrals
!Fixed link tracking for referrals
Title: Re: Referrals System 3.0.1 (Now supports RC3!)
Post by: cdog5000 on September 13, 2010, 03:44:00 PM
Quote from: S-M-F Modders Team on September 12, 2010, 06:28:55 PM
SMF Modders Team Update new fixes!!
3.0.1
!Fixed spelling of referrals
!Fixed link tracking for referrals
Still broken, I am not seeing it being added to the field when they are linked? Is this normal behaviour?
Title: Re: Referrals System 3.0.1 (Now supports RC3!)
Post by: Vincent Volmer on September 13, 2010, 04:34:10 PM
New referrals are added to my admin account. When a new member is referred by an other member the referral is still added to my admin.

How does this mod work? Referred by IP address or membername?

thanks,
Vincent
Title: Re: Referrals System 3.0.1 (Now supports RC3!)
Post by: uninvited13th on September 21, 2010, 12:58:22 AM
Is it possible to show who refered by a member?
Title: Re: Referrals System 3.0.1 (Now supports RC3!)
Post by: Afro on September 21, 2010, 03:57:40 PM
Quote from: Vincent Volmer on September 13, 2010, 04:34:10 PM
New referrals are added to my admin account. When a new member is referred by an other member the referral is still added to my admin.

How does this mod work? Referred by IP address or membername?

thanks,
Vincent

membername
Title: Re: Referrals System 3.0.1 (Now supports RC3!)
Post by: wooliwork on September 25, 2010, 05:44:09 PM
I was able to install the mod and it is working great. However when someone clicks on a referral link of someone it takes them to the registration page immediately without them getting a chance to look at forum. I realize they can click home and do this, but is there a way to have the person first directed either to the main forum page or the simple portal.
Thanks,
lisa
Title: Re: Referrals System 3.0.1 (Now supports RC3!)
Post by: perfec2 on September 27, 2010, 09:48:25 AM
The link it puts in the footer is it optional or must?. I want to remove it, but want to know if that is legal.
Title: Re: Referrals System 3.0.1 (Now supports RC3!)
Post by: Spoogs on September 27, 2010, 10:06:31 AM
Quote from: perfec2 on September 27, 2010, 09:48:25 AM
The link it puts in the footer is it optional or must?. I want to remove it, but want to know if that is legal.

Quote from: vbgamer45 on September 04, 2010, 11:12:08 AM
Quote from: ledzepp on September 03, 2010, 11:44:14 AM
I wanna remove the link in the footer (Copyright), "Referrals by CreateAForum.com". Do I have to pay in order to do it legally, with the permission of the authors ?
Contact me to remove it small fee.
Title: Re: Referrals System 3.0.1 (Now supports RC3!)
Post by: perfec2 on September 27, 2010, 10:14:55 AM
Sorry I didn't get you. Paying you as job fee or the author requires fee be paid before the link could be removed?
Title: Re: Referrals System 3.0.1 (Now supports RC3!)
Post by: Spoogs on September 27, 2010, 10:19:03 AM
I was quoting vbgamer45's post... so you would pay him (the author)
Title: Re: Referrals Mod
Post by: veranopage on October 07, 2010, 07:00:32 PM
how can i allow the referral totals to be show on a page that all members can see? 

thanks

Quote from: ~Kikoish~ on March 09, 2008, 10:26:12 PM
How to edit the referrals?
Title: Re: Referrals Mod
Post by: veranopage on October 07, 2010, 07:09:47 PM
Quote from: Fustrate on April 27, 2008, 12:25:17 AM
no, just the statistics page that general members see.

where is this page at??
Title: Re: Referrals System 3.0.1 (Now supports RC3!)
Post by: Spoogs on October 07, 2010, 07:15:03 PM
youforum/index.php?action=stats
Title: Re: Referrals System 3.0.1 (Now supports RC3!)
Post by: veranopage on October 07, 2010, 08:03:55 PM
Referrals do not show on this page
Title: Re: Referrals System 3.0.1 (Now supports RC3!)
Post by: Spoogs on October 08, 2010, 11:22:26 AM
I'm using an older version that has this option... I'm assuming it was changed in the re-write... maybe the mod author can confirm that or help you with it.
Title: Re: Referrals System 3.0.1 (Now supports RC3!)
Post by: king999 on October 12, 2010, 06:51:23 AM
I want referals are also shows in forum stats how it's possible and i m using ultimate profile mod so in that referal link is not showing in poriles what can i do tell me ........
Title: Re: Referrals System 3.0.1 (Now supports RC3!)
Post by: J. S. on November 01, 2010, 11:48:37 AM
When I use my referral link the box remains empty. Here is the link (http://www.tribalblogs.net/forum/index.php?action=refferals;refferedby=1). How can we fix this?
Title: Re: Referrals System 3.0.1 (Now supports RC3!)
Post by: GIJANE666 on November 06, 2010, 10:14:09 AM
hi,

Is it possible to make the referral field a required entry field?

At the moment I'm using it, but the new recruits are not using the field. If it's a required entry for registration it would work perfectly for our site.

Hope to hear from someone :)
Title: Re: Referrals System 3.0.1 (Now supports RC3!)
Post by: Wh0CaREs on November 09, 2010, 05:14:49 AM
Is any where TOP5 referals?
Title: Re: Referrals System 3.0.1 (Now supports RC3!)
Post by: Shonick on November 09, 2010, 08:07:53 AM
check your stats list, it should be on it
Title: Re: Referrals System 3.0.1 (Now supports RC3!)
Post by: GIJANE666 on November 09, 2010, 08:56:38 AM
Quote from: GIJANE666 on November 06, 2010, 10:14:09 AM
hi,

Is it possible to make the referral field a required entry field?

At the moment I'm using it, but the new recruits are not using the field. If it's a required entry for registration it would work perfectly for our site.

Hope to hear from someone :)

ANYONE ???
Title: Re: Referrals System 3.0.1 (Now supports RC3!)
Post by: Wh0CaREs on November 14, 2010, 06:57:39 AM
hi
If anyone use this mod on rc3 pls give me Stats.php because my template don't show top10 referals
Title: Re: Referrals System 3.0.1 (Now supports RC3!)
Post by: GIJANE666 on November 14, 2010, 07:08:14 AM
I've checked, but I don't have that either.

Also I'm still waiting for an answer on my question.

Quote from: GIJANE666 on November 06, 2010, 10:14:09 AM
hi,

Is it possible to make the referral field a required entry field?

At the moment I'm using it, but the new recruits are not using the field. If it's a required entry for registration it would work perfectly for our site.

Hope to hear from someone :)
Title: Re: Referrals System 3.0.1 (Now supports RC3!)
Post by: kartheekb on December 01, 2010, 01:13:47 AM
Is this MOD available for 2.0 RC4

I like this MOD, is increases the site members..
Title: Re: Referrals System 3.0.1 (Now supports RC3!)
Post by: MS Modders Team on December 01, 2010, 12:55:04 PM
Our core developer vbgamer, who originally wrote this mod has not been around lately and I have been too busy lately to take a peak at the issues with this mod.

When 2.0 hits final, we will do our best to get the bugs resolved, and Referrals System back up and running smoothly.
Title: Re: Referrals System 3.0.1 (Now supports RC3!)
Post by: aussieherps on December 02, 2010, 07:55:39 AM
Where should I find: referred by
Or: user refered usernae1 username2 etc.
Title: Re: Referrals System 3.0.1 (Now supports RC3!)
Post by: Joker™ on December 07, 2010, 06:50:53 AM
index.template.php

Hardcoded Text
', theme_copyright(), '<br />Refferals System by <a href="http://www.createaforum.com" title="Forum Hosting">CreateAForum.com</a>
Title: Re: Referrals System 3.0.1 (Now supports RC3!)
Post by: Assault on December 22, 2010, 03:30:09 PM
Just another person pushing for this mod for 2.0 RC4

For the required referral

Need something like this in the register. template.php file
if(empty($refferedbyname)) {
    $error_msg="Enter your referral's username.";
  }
Title: Re: Referrals System 3.0.1 (Now supports RC3!)
Post by: qtime on January 02, 2011, 07:04:13 PM
Is this modification a rebuilding of smf affiliates mod?

And if so, if I install - replace will it use the info from the smf affiliates mod?
Title: Re: Referrals System 3.0.1 (Now supports RC3!)
Post by: vbgamer45 on January 02, 2011, 07:30:38 PM
No it is not.
Title: Re: Referrals System 3.0.1 (Now supports RC3!)
Post by: qtime on January 02, 2011, 07:33:12 PM
ok, thanks for fast reply
Title: Re: Referrals System 3.0.1 (Now supports RC3!)
Post by: elguapo on January 03, 2011, 04:43:36 AM
for RC4 please? thanks. :(
Title: Re: Referrals System 3.0.1 (Now supports RC4!)
Post by: vbgamer45 on January 03, 2011, 11:10:29 PM
Updated for RC4
Title: Re: Referrals System 3.0.1 (Now supports RC4!)
Post by: elguapo on January 03, 2011, 11:42:36 PM
thanks so much sir. :D
Title: Re: Referrals System 3.0.1 (Now supports RC4!)
Post by: minuway on January 04, 2011, 12:34:40 PM
BUG Report:

I was successfully installed the script in 2.0 rc4 but when I try the referral link, and then redirect to registration page, the Referrer field/box is blank... And why is that I dont see the top referrers on the Forum Stats?
Title: Re: Referrals System 3.0.1 (Now supports RC4!)
Post by: impreza on January 04, 2011, 02:36:16 PM
Great add-on, thank you
Title: Re: Referrals System 3.0.1 (Now supports RC4!)
Post by: aussieherps on January 07, 2011, 10:53:05 PM
It needs to have some script for telling us how many referals have been made and the user names refered. Also a spot that tells us who refered a username. If that makes sense.
Title: Re: Referrals System 3.0.1 (Now supports RC4!)
Post by: Kmam on January 11, 2011, 09:51:10 PM
Strict Standards: require_once() [function.require-once]: It is not safe to rely on the system's timezone settings. Please use the date.timezone setting, the TZ environment variable or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/New_York' for 'EST/-5.0/no DST' instead in /home/tactical/public_html/Sources/Load.php on line 1022

Parse error: syntax error, unexpected '}' in /home/tactical/public_html/Sources/Load.php on line 1022

Weird error after manually installing on Estalia theme
Title: Re: Referrals System 3.0.1 (Now supports RC4!)
Post by: An0nymousHelper on January 27, 2011, 09:14:57 PM
Could someone please help me out here, i really need to get my site going but for some reason when i go to profile or my messages or members or stuff like that i get this error, if any one could help me out it would be greatly appreciated!

Unknown column 'mem.referrals_no' in 'field list'
File: /home/content/a/n/0/an0nymoushelp/html/forums/Sources/Load.php
Line: 896

Thanks in advance!!!!
Title: Re: Referrals System 3.0.1 (Now supports RC4!)
Post by: vbgamer45 on January 27, 2011, 09:16:56 PM
Sounds like you didn't run the installer for database script when installing the mod.
Title: Re: Referrals System 3.0.1 (Now supports RC4!)
Post by: An0nymousHelper on January 27, 2011, 09:20:37 PM
Quote from: vbgamer45 on January 27, 2011, 09:16:56 PM
Sounds like you didn't run the installer for database script when installing the mod.
I'm going to sound really dumb here lol, How exactly do i do this?
Title: Re: Referrals System 3.0.1 (Now supports RC4!)
Post by: vbgamer45 on January 27, 2011, 09:26:19 PM
Try uninstall and install again.
Title: Re: Referrals System 3.0.1 (Now supports RC4!)
Post by: An0nymousHelper on January 27, 2011, 09:40:42 PM
So i did all the manual edits then downloaded the folder and made it a .zip file and then put that file into the ./forums/Packages and then what? do i go to a link or something? Or is it just suppose to automatically install? sorry little bit of a noob here ;) never had this problem before.

Edit: It doesn't show up when i go to ACP>Packages>Browse Packages either :( so if anyone could help i would really really appreciate it as i need to get my site back up asap!!!!

Thanks!!
Title: Re: Referrals System 3.0.1 (Now supports RC4!)
Post by: Spoogs on January 27, 2011, 11:23:52 PM
you seem to be going thru a whole lot of unecessary steps there (unless I'm just misunderstanding)

To install a package you can simply download it to your computer (stop)
go to Admin>>Packages>>Download Packages... scroll down... upload the package.
Title: Re: Referrals System 3.0.1 (Now supports RC4!)
Post by: An0nymousHelper on January 28, 2011, 01:43:00 AM
Quote from: Spoogs on January 27, 2011, 11:23:52 PM
you seem to be going thru a whole lot of unecessary steps there (unless I'm just misunderstanding)

To install a package you can simply download it to your computer (stop)
go to Admin>>Packages>>Download Packages... scroll down... upload the package.
Yes i tried this and i got an error, it was saying "The package you tried to upload either is not a valid package or has become corrupted." I dont no how to fix this :(

EDIT: I was doing this on my mac which automatically extracted the files then i compressed them to .zip and thats were the problem must have been because when i went on my old PC and tried this it worked first try! Now everything is working! Thanks.
Title: Re: Referrals System 3.0.1 (Now supports RC4!)
Post by: agent47 on February 17, 2011, 04:18:06 AM
Everything seems to be working well on my site except that users don't have referral links on their profile. I have installed "Ultimate Profile" mod and I don't know if that's clashing with this mod but I could really use some help here.

http://www.superheroalliance.net
Title: Re: Referrals System 3.0.1 (Now supports RC4!)
Post by: !RFAN on February 17, 2011, 08:26:18 AM
add this to you ultimateprofile.template.php in signature area..

// Start Refferals System

echo '
<dt>', $txt['ref_refferals'] , '</dt>
<dd>', $context['member']['referrals_no'], '</dd>
';
// Refferals Link
if ($modSettings['ref_showreflink'])
if ($context['user']['is_admin'] || $context['user']['is_owner'])
echo '

<dt>', $txt['ref_refferal_link'], '</dt>
<dd><input type="text" size="50" value="', $scripturl, '?action=refferals;refferedby=', $context['member']['id'], '" /></dd>
';



// End Refferals System

Title: Re: Referrals System 3.0.1 (Now supports RC4!)
Post by: agent47 on February 17, 2011, 10:29:08 AM
Thanks a million !RFAN! You're the best my muslim brotha!!! :)
Title: Re: Referrals System 3.0.1 (Now supports RC4!)
Post by: ahmedjadoon on February 20, 2011, 08:51:29 AM
Anybody help me , i have smf 1.1.13 with blink theme . It will work? I tried installing but it shows error in 2 files
Title: Re: Referrals System 3.0.1 (Now supports RC4!)
Post by: Fearless Freap on February 22, 2011, 12:33:28 PM
I have a question about this mod.

I want to run a contest for about 1 month using the referral system as a tool for a membership drive.  While I do have everything installed correctly, and I currently have about 320 members to date... my question would be...

If (in a hypothetical situation) all 320 members add 5 members give or take, with one who added the most (the winner), How would I determine that 1 member?  Meaning, would I have to search through each member profile (now at 1,600 members) to find the one with the most referrals? Or is there a stats page that could give me the top 10 members with the most referrals?
Title: Re: Referrals System 3.0.1 (Now supports RC4!)
Post by: vbgamer45 on February 22, 2011, 12:38:35 PM
You would need query the database and see who refer the most members i think in the smf_members table.
Title: Re: Referrals System 3.0.1 (Now supports RC4!)
Post by: Fearless Freap on February 22, 2011, 12:43:04 PM
Cool, that would be directly through the mysql database?
Title: Re: Referrals System 3.0.1 (Now supports RC4!)
Post by: vbgamer45 on February 22, 2011, 12:52:15 PM
Yes  using a tool such as phpmyadmin
Title: Re: Referrals System 3.0.1 (Now supports RC4!)
Post by: Fearless Freap on February 22, 2011, 12:58:43 PM
Sweet.... Thank you so much!
Title: Re: Referrals System 3.0.1 (Now supports RC4!)
Post by: reinner on March 14, 2011, 03:32:25 AM
Hi,

Just a quick question, how could I see the names of members referred by a member?
Title: Re: Referrals System 3.0.1 (Now supports RC4!)
Post by: vbgamer45 on March 14, 2011, 10:34:41 AM
No easy way you would have to look in the database and the smf_members table and look at the reffered member id column
Title: Re: Referrals System 3.0.1 (Now supports RC4!)
Post by: Twysted on March 19, 2011, 10:32:32 PM
index.php?action=register2
Database Error: Unknown column 'Array' in 'where clause'
File: /public_html/Sources/refferals2.php
Line: 105

Line 105

$smcFunc['db_query']('', "UPDATE {db_prefix}members SET referred_by = $refferedMemberID WHERE ID_MEMBER = $NewMemberID" );


no other mods installed.
2.0 RC5
Title: Re: Referrals System 3.0.1 (Now supports RC4!)
Post by: vbgamer45 on March 20, 2011, 12:11:57 PM
Quote from: Twysted on March 19, 2011, 10:32:32 PM
index.php?action=register2
Database Error: Unknown column 'Array' in 'where clause'
File: /public_html/Sources/refferals2.php
Line: 105

Line 105

$smcFunc['db_query']('', "UPDATE {db_prefix}members SET referred_by = $refferedMemberID WHERE ID_MEMBER = $NewMemberID" );

Fixed posted an update to fix this issue.

no other mods installed.
2.0 RC5
Title: Re: Referrals System 3.0.1 (Now supports RC5!)
Post by: Twysted on March 21, 2011, 11:45:28 AM
why did you quote and not give a solution? I rather not have to recode this system to make it work correctly.
Title: Re: Referrals System 3.0.1 (Now supports RC5!)
Post by: Arantor on March 21, 2011, 11:50:39 AM
Because the quote actually contains a message that wasn't there before: Fixed posted an update to fix this issue...
Title: Re: Referrals System 3.0.1 (Now supports RC5!)
Post by: Twysted on March 21, 2011, 12:02:02 PM
well while it fixed the register it also caused a new bug, it now doesn't show the uplines username on the register page.
i think the culprit is right here


// Start Refferals System
echo '<dl class="register_form">
<dt>
<strong>', $txt['ref_reffered_by'], '</strong>
   </dt>
<dd>
<input type="text" name="refferedbyname" size="30" tabindex="', $context['tabindex']++, '" />
</dd></dl>';

might be me but i think it would work better as

// Start Refferals System
print "
<dl class='register_form'>
<dt>
<strong>".$txt['ref_reffered_by']."</strong>
   </dt>
<dd>
<input type='text' name='refferedbyname' size='30' tabindex='".$context['tabindex']++."' />
</dd></dl>";
Title: Re: Referrals System 3.0.1 (Now supports RC5!)
Post by: Twysted on March 21, 2011, 12:18:39 PM
maybe not... grrrr.
Title: Re: Referrals System 3.0.1 (Now supports RC5!)
Post by: Twysted on March 27, 2011, 10:00:00 AM
any answer?
Title: Re: Referrals System 3.0.1 (Now supports RC5!)
Post by: vbgamer45 on March 27, 2011, 10:10:30 AM
It won't show the name on the text area but is recorded internally from the cookie if they clicked a link. So a user can't wipe it if they try.
Title: Re: Referrals System 3.0.1 (Now supports RC5!)
Post by: agent47 on April 08, 2011, 07:42:07 AM
So I tried using the awards system which works perfectly except for two things:

Look at the image below. I have a created award and yet it's not showing.
(http://i51.tinypic.com/2hmo38l.jpg)

Answers to both these issues will be very much appreciated. :)
Title: Re: Referrals System 3.0.1 (Now supports RC5!)
Post by: vbgamer45 on April 08, 2011, 09:36:36 AM
Looks like you posted in the wrong topic.
Title: Re: Referrals System 3.0.1 (Now supports RC5!)
Post by: agent47 on April 08, 2011, 12:57:35 PM
What do you mean?
The awards feature does come with the referral system, doesn't it?
Title: Re: Referrals System 3.0.1 (Now supports RC5!)
Post by: vbgamer45 on April 08, 2011, 01:02:20 PM
It does not just tracks refferals.
Title: Re: Referrals System 3.0.1 (Now supports RC5!)
Post by: agent47 on April 08, 2011, 01:28:51 PM
What the? :O
Let me show you a screenshot.
Why is awards in the same section as the Refferal System then? :/
(http://i55.tinypic.com/2irl004.jpg)
Title: Re: Referrals System 3.0.1 (Now supports RC5!)
Post by: vbgamer45 on April 08, 2011, 01:29:58 PM
Strange not sure what is up with that.
Title: Re: Referrals System 3.0.1 (Now supports RC5!)
Post by: reinner on April 08, 2011, 03:57:35 PM
i have my award mod showing under referral mod too! lost the award mod link after i updated the referral mod though.
I already left a message at the award mod help section too. I asked him how to put back the "award" link under my admin panel
Title: Re: Referrals System 3.0.1 (Now supports RC5!)
Post by: vbgamer45 on April 09, 2011, 02:02:20 AM
No idea looks like a bug with awards system no reason for it to be listed under refferals checked the code and the admin code is specific to the refferal system.
Title: Re: Referrals System 3.0.1 (Now supports RC5!)
Post by: danielseeksGod on May 19, 2011, 01:14:59 AM
would it be too much to ask for the "enter referring username" field to feature the SMF ajax auto-suggest? most people registering will appreciate that.

thank you!
Title: Re: Referrals System 3.0.1 (Now supports RC5!)
Post by: Alb0 on May 22, 2011, 06:40:14 PM
Why is the stats option not included in the latest version?! Could someone please integrated with the latest version? So it shows the top 5 referral and what not on the stats?
Really need this.
Title: Re: Referrals System 3.0.1 (Now supports RC5!)
Post by: fengwu83 on May 23, 2011, 01:31:54 PM
Hello,

I tried installing this mod on my forum that is on the version 2.0 RC5 and i get this error :

(http://fotouploads.nl/images/09450306605182121993.png)

I tried installing with this error, but i dont get the referral system's tab

so can someone tell me how i can fix this?

thanks!
Title: Re: Referrals System 3.0.1 (Now supports RC5!)
Post by: vbgamer45 on May 23, 2011, 01:37:41 PM
You probably have to install it manually in that case.
Title: Re: Referrals System 3.0.1 (Now supports RC5!)
Post by: Goodman854 on May 26, 2011, 06:45:05 AM
Any way to find out who reffered a member?
Title: Re: Referrals System 3.0.1 (Now supports RC5!)
Post by: vbgamer45 on May 26, 2011, 09:01:37 AM
You would need to check inside the database there is a column added in the members table called refferedmemberid
Title: Re: Referrals System 3.0.1 (Now supports RC5!)
Post by: GlitchPC on June 05, 2011, 08:46:17 AM
Any help with the following error?

http://xxxxxx.xxx/index.php?action=register2
8: Undefined index: refferedbyname
File: /xxx/xxx/xxxxx/xxxxxxxx/xxxxxxxx/Sources/Register.php
Line: 496
Title: Re: Referrals System 3.0.3 (Now supports RC5!)
Post by: vbgamer45 on June 05, 2011, 02:23:46 PM
Quote from: GlitchPC on June 05, 2011, 08:46:17 AM
Any help with the following error?

http://xxxxxx.xxx/index.php?action=register2
8: Undefined index: refferedbyname
File: /xxx/xxx/xxxxx/xxxxxxxx/xxxxxxxx/Sources/Register.php
Line: 496

Fixed new version posted
Title: Re: Referrals System 3.0.3 (Now supports SMF 2.0)
Post by: GlitchPC on June 11, 2011, 08:12:30 PM
Referral link:

http://xxxxxxxx.xxx/index.php?action=refferals;refferedby=1

The word "refferal" is spelled:  R-E-F-E-R-R-A-L

No offense but, you should re-write the mod and fix all the errors for the spelling of the word.  I know, I know...nobody's perfect.   ;)

Even the php files were spelled incorrectly...
Title: Re: Referrals System 3.0.3 (Now supports SMF 2.0)
Post by: vbgamer45 on June 11, 2011, 08:13:36 PM
Maybe at some point but at this point it would break links unless I added detection for both spellings.
Title: Re: Referrals System 3.0.3 (Now supports SMF 2.0)
Post by: 4b11l on June 14, 2011, 07:27:11 PM
There's an extra > that is unneeded in quesrystring.php for the copyright.

Thought I'd do my best to help, haha.

Also, an update to the stats as asked above would be great for a future release. Thanks.
Title: Re: Referrals System 3.0.3 (Now supports SMF 2.0)
Post by: vbgamer45 on June 14, 2011, 10:17:29 PM
Quote from: 4b11l on June 14, 2011, 07:27:11 PM
There's an extra > that is unneeded in quesrystring.php for the copyright.

Thought I'd do my best to help, haha.

Also, an update to the stats as asked above would be great for a future release. Thanks.
Fixed copyright bug

Will add stats option at some point
Title: Re: Referrals System 3.0.3 (Now supports SMF 2.0)
Post by: TurtleKicker on June 15, 2011, 09:47:28 AM
Quote from: vbgamer45 on June 11, 2011, 08:13:36 PM
Maybe at some point but at this point it would break links unless I added detection for both spellings.

Still, that's the way to go. Having it misspelled looks really bad as these are the public URLs that we then ask our members to pass around to refer people to the site. :(

Checking for both spellings at this point within the mod is a necessary evil and unfortunately just the price that needs to be a paid for a major typo early in the process. Live and learn.  ;)
Title: Re: Referrals System 3.0.3 (Now supports SMF 2.0)
Post by: GlitchPC on June 15, 2011, 10:33:30 AM
Quote from: sremick on June 15, 2011, 09:47:28 AM
Quote from: vbgamer45 on June 11, 2011, 08:13:36 PM
Maybe at some point but at this point it would break links unless I added detection for both spellings.

Still, that's the way to go. Having it misspelled looks really bad as these are the public URLs that we then ask our members to pass around to refer people to the site. :(

Checking for both spellings at this point within the mod is a necessary evil and unfortunately just the price that needs to be a paid for a major typo early in the process. Live and learn.  ;)

Exactly why I'm not using it...

Was hoping someone, other than me, would make a reply about that...
Title: Re: Referrals System 3.0.3 (Now supports SMF 2.0)
Post by: yogesh_gamer on June 27, 2011, 02:15:47 AM
I installed this mod and update my SMF version (1.1.14)
I have a problem.
Many users are registering with already registered username and they listed in my spammer list.
I want that when a member register with already registered username then it should gives an error.
Title: Re: Referrals System 3.0.3 (Now supports SMF 2.0)
Post by: CBG81 on June 29, 2011, 07:02:28 AM
Hi guys,

is there a way to track who was referred by who?
Title: Re: Referrals System 3.0.3 (Now supports SMF 2.0)
Post by: yogesh_gamer on June 30, 2011, 01:43:48 AM
QuoteHi guys,

is there a way to track who was referred by who?

Me too

2 Ques:  I installed this mod and update my SMF version (1.1.14)
I have a problem.
Many users are registering with already registered username and they listed in my spammer list.
I want that when a member register with already registered username then it should gives an error.
Title: Re: Referrals System 3.0.3 (Now supports SMF 2.0)
Post by: ɔɔɔɔɔɔuɥoɾ on June 30, 2011, 12:19:04 PM
I have a idea/request.

Is there any simple way to link this mod to the SMF 2.0 Invitation mod, If member1 generates and invite code, which then member2 uses to register, member2 is then referred by member1 and its in their referral log?
Title: Re: Referrals System 3.0.3 (Now supports SMF 2.0)
Post by: vbgamer45 on June 30, 2011, 12:45:36 PM
Not easily would require research into both mods
Title: Re: Referrals System 3.0.3 (Now supports SMF 2.0)
Post by: ɔɔɔɔɔɔuɥoɾ on June 30, 2011, 12:47:48 PM
Its a good idea and comes with a price, lots or research lol.
/me needs to start getting back into PHP coding...
Title: Re: Referrals System 3.0.3 (Now supports SMF 2.0)
Post by: yogesh_gamer on July 02, 2011, 12:57:13 AM
I installed this mod and update my SMF version (1.1.14)
I have a problem.
Many users are registering with already registered username and they listed in my spammer list.
I want that when a member register with already registered username then it should gives an error.

Please reply me
Title: Re: Referrals System 3.0.3 (Now supports SMF 2.0)
Post by: Sci-Fi_Fan on August 26, 2011, 05:29:55 PM
Has anyone been successful in getting this mod to work with the Ultimate Profile mod? I'd really like to use both, but the referrals doesn't show up in UP.
Title: Re: Referrals System 3.0.3 (Now supports SMF 2.0)
Post by: elsaylala on September 11, 2011, 08:58:23 AM
Hi, could you add to the mod stats and that in the user's profile show his referred's users?


Sorry, but I am from Spain and I speak a bit bad English...
Title: Re: Referrals System 3.0.3 (Now supports SMF 2.0)
Post by: Xavi-Nena on September 11, 2011, 02:46:24 PM
Quote from: Sci-Fi_Fan on August 26, 2011, 05:29:55 PM
Has anyone been successful in getting this mod to work with the Ultimate Profile mod? I'd really like to use both, but the referrals doesn't show up in UP.

I know it is possible as I had once had it implemented I tried looking for the string of code and where I had it but I have not had any luck thus far, however I myself am needing it again so when/if I come across it before someone else can help out I will be sure to post it here.
Title: Re: Referrals System 3.0.3 (Now supports SMF 2.0)
Post by: TheListener on September 22, 2011, 01:25:01 PM
To use the mod with Ultimate Profile have a look at that mods topic and how I added some other mods with the help of Miss All Sunday.
Title: Re: Referrals System 3.0.3 (Now supports SMF 2.0)
Post by: mrtarkhan on October 06, 2011, 06:20:32 PM
persian  ;)

//  Start Referrals System
$txt['ref_admin'] = 'سیستم معرفی';
$txt['ref_settings'] = 'تنظیمات';
$txt['ref_save_settings'] = 'ذخیره تنظیمات';
$txt['ref_refferals'] = 'معرفی کرده:';
$txt['ref_refferal_link'] = 'لینک معرفی:';
$txt['ref_reffered_by'] = 'اگر توسط کاربر خاصی معرفی شده اید نام کاربری او را در کادر رو به رو بنویسید:';
// Setttings
$txt['ref_showreflink'] = 'نمایش لینک معرف در پروفایل';
$txt['ref_showonpost'] = 'نمایش لینک معرف در ارسال ها';
$txt['ref_trackcookiehits'] = 'شمارش تعداد کلیک ها بر روی لینک معرفی';
$txt['ref_cookietrackdays'] = 'تعداد روزهایی که کوکی شمارش کلیک های ارسالی ذخیره شود';


//  End Referrals System
Title: Re: Referrals System 3.0.3 (Now supports SMF 2.0)
Post by: vbgamer45 on October 06, 2011, 06:28:54 PM
Thanks again for the translation really appreciate the work you do.
Title: Re: Referrals System 3.0.3 (Now supports SMF 2.0)
Post by: mrtarkhan on October 06, 2011, 06:36:54 PM
Quote from: vbgamer45 on October 06, 2011, 06:28:54 PM
Thanks again for the translation really appreciate the work you do.

your welcome:)
Title: Re: Referrals System 3.0.3 (Now supports SMF 2.0)
Post by: ctec67 on October 19, 2011, 11:39:50 AM
Hello,

Does this mod work with Anecdota theme? (SMF 2.0.1)

I can install it without any errors, but do not have
referral link or referral stats anywhere, not in profile,
nor anywhere in admin.

Appreciate your help.

Sincerely
Carola
Title: Re: Referrals System 3.0.3 (Now supports SMF 2.0)
Post by: vbgamer45 on October 19, 2011, 11:45:29 AM
If the mod makes theme changes then they will need to be applied to the custom theme as well. But you should at least see the settings area if not then the mod did not install at all.
Title: Re: Referrals System 3.0.3 (Now supports SMF 2.0)
Post by: ctec67 on October 19, 2011, 12:01:45 PM
For setting area .. you mean in Modification Settings?

Just tried to un-install and getting all kinds of error message:
Error in Package Installation
At least one error was encountered during a test installation of this package. It is strongly recommended that you do not continue with installation unless you know what you are doing, and have made a backup very recently. This error may be caused by a conflict between the package you're trying to install and another package you have already installed, an error in the package, a package which requires another package that you don't have installed yet, or a package designed for another version of SMF.

Hmm now what?
Title: Re: Referrals System 3.0.3 (Now supports SMF 2.0)
Post by: Draffi on October 28, 2011, 04:46:19 PM
Great Mod!

Something new with the "stats-page" ? I want to make a contest, and everybody need to see who is the winner....

Is it possible to reset the data (e.g. after one year?) manually?
Title: Re: Referrals System 3.0.3 (Now supports SMF 2.0)
Post by: vbgamer45 on October 28, 2011, 05:11:51 PM
Yeah you can reset it  in the database in the members table.
Title: Re: Referrals System 3.0.3 (Now supports SMF 2.0)
Post by: Ventic on November 02, 2011, 07:49:37 AM
(http://www.aedes.us/i1/ya2S.png)

how my referall thing can be fixed

Title: Re: Referrals System 3.0.3 (Now supports SMF 2.0)
Post by: Spect3r on November 02, 2011, 09:08:14 PM
Any possibilitie of add same functionilalities as in the previous made, such as


Would be awesome if you could add this to the mod :)[/list]
Title: Re: Referrals System 3.0.3 (Now supports SMF 2.0)
Post by: dumindu89 on November 02, 2011, 11:36:13 PM
I am waiting for next version of this mod which supports with SMF 2.0.1 and I suggest following features.
An option to don't let show the number of referrals each member have referred to the public and it will only see by the particular member, moderators and administrators.
An option to reset  the number of referrals each member have referred each month or year. This will help administrators to conduct contests such as top referrer of the month/year.  ;)
Title: Re: Referrals System 3.0.3 (Now supports SMF 2.0)
Post by: Ventic on November 03, 2011, 01:45:28 AM
Quote from: Ventic on November 02, 2011, 07:49:37 AM
(http://www.aedes.us/i1/ya2S.png)

how my referall thing can be fixed
Title: Re: Referrals System 3.0.3 (Now supports SMF 2.0)
Post by: Ventic on November 06, 2011, 05:38:22 AM
Quote from: Ventic on November 02, 2011, 07:49:37 AM
(http://www.aedes.us/i1/ya2S.png)

how my referall thing can be fixed
Title: Re: Referrals System 3.0.3 (Now supports SMF 2.0)
Post by: Ventic on November 07, 2011, 12:57:47 PM
any idea how to fix it
Title: Re: Referrals System 3.0.3 (Now supports SMF 2.0)
Post by: Draffi on November 07, 2011, 03:35:13 PM
@ventic:

please, add your profile.template.php here, i will look....

(but i promise nothing...)
Title: Re: Referrals System 3.0.3 (Now supports SMF 2.0)
Post by: Draffi on November 07, 2011, 03:39:58 PM
ohh...

@vbgamer45: You created a great mod - but at last...you too, you need to say, it is useless without a statistic page...

maybe you can add this feature until 2012 is coming. I want to make a contest in my board, before 12-21-2012 ALL is ending  :o

THANK YOU.
Title: Re: Referrals System 3.0.3 (Now supports SMF 2.0)
Post by: vbgamer45 on November 07, 2011, 03:44:50 PM
Maybe one day.
Title: Re: Referrals System 3.0.3 (Now supports SMF 2.0)
Post by: Don Houston on November 16, 2011, 03:11:33 PM
vbgamer45,

Is there a way that I can manually add referrals to a user?  I have had three people who signed up and said they tried to put who refereed them but it did not show up for that person.  Can I change that so that they get credit?
Title: Re: Referrals System 3.0.3 (Now supports SMF 2.0)
Post by: vbgamer45 on November 16, 2011, 03:12:07 PM
Yeah you can go inside the database find the smf_members table then adjust the refferals column
Title: Re: Referrals System 3.0.3 (Now supports SMF 2.0)
Post by: Don Houston on November 16, 2011, 03:42:50 PM
Thank you sir
Title: Re: Referrals System 3.0.3 (Now supports SMF 2.0)
Post by: vbgamer45 on November 16, 2011, 03:49:08 PM
Glad to  help
Title: Re: Referrals System 3.0.3 (Now supports SMF 2.0)
Post by: Don Houston on November 16, 2011, 03:54:55 PM
VB,

I also know you are the designer for EZ portal, where is the board for that.  I have a few questions and I went to that site and no real support there
Title: Re: Referrals System 3.0.3 (Now supports SMF 2.0)
Post by: vbgamer45 on November 16, 2011, 04:01:09 PM
Site is http://www.ezportal.com
Mod support topic:
http://www.simplemachines.org/community/index.php?topic=271882.0
Title: Re: Referrals System 3.0.3 (Now supports SMF 2.0)
Post by: Ventic on November 17, 2011, 05:32:59 AM
Quote from: Draffi on November 07, 2011, 03:35:13 PM
@ventic:

please, add your profile.template.php here, i will look....

(but i promise nothing...)
ok
Title: Re: Referrals System 3.0.3 (Now supports SMF 2.0)
Post by: Draffi on November 18, 2011, 11:52:07 AM
@ventic:

Please try this profile.template.php....
Title: Re: Referrals System 3.0.3 (Now supports SMF 2.0)
Post by: Ventic on November 18, 2011, 01:12:40 PM
Quote from: Draffi on November 18, 2011, 11:52:07 AM
@ventic:

Please try this profile.template.php....
dude it would be better for me,if you could tell me what you changed cause i have done some edits
Title: Re: Referrals System 3.0.3 (Now supports SMF 2.0)
Post by: vbgamer45 on November 18, 2011, 02:30:09 PM
Get a program like beyond compare and you can see what parts of the file were changed.
Title: Re: Referrals System 3.0.3 (Now supports SMF 2.0)
Post by: Spect3r on November 18, 2011, 04:12:50 PM
Quote from: Draffi on November 07, 2011, 03:39:58 PM
ohh...

@vbgamer45: You created a great mod - but at last...you too, you need to say, it is useless without a statistic page...

maybe you can add this feature until 2012 is coming. I want to make a contest in my board, before 12-21-2012 ALL is ending  :o

THANK YOU.

Im in the same situation, i also need thus stats  :-\
Title: Re: Referrals System 3.0.3 (Now supports SMF 2.0)
Post by: Ventic on November 18, 2011, 04:23:57 PM
Quote from: vbgamer45 on November 18, 2011, 02:30:09 PM
Get a program like beyond compare and you can see what parts of the file were changed.
which program is this
Title: Re: Referrals System 3.0.3 (Now supports SMF 2.0)
Post by: vbgamer45 on November 18, 2011, 04:36:22 PM
http://www.scootersoftware.com/
Title: Re: Referrals System 3.0.3 (Now supports SMF 2.0)
Post by: Ventic on November 19, 2011, 04:21:47 AM
damn that,couldnt find the differences
Title: Re: Referrals System 3.0.3 (Now supports SMF 2.0)
Post by: vbgamer45 on November 19, 2011, 10:08:45 AM
It should find them I use it all the time make sure you use text compare settings.
Title: Re: Referrals System 3.0.3 (Now supports SMF 2.0)
Post by: Draffi on November 19, 2011, 04:14:40 PM
OK, dude, here you go:

After:
// If karma enabled show the members karma.

i delete:
// Start Refferals System

echo '
<dt>', $txt['ref_refferals'] , '</dt>
<dd>', $context['member']['referrals_no'], '</dd>
';
// Refferals Link
if ($modSettings['ref_showreflink'])
if ($context['user']['is_admin'] || $context['user']['is_owner'])
echo '

<dt>', $txt['ref_refferal_link'], '</dt>
<dd><input type="text" size="50" value="', $scripturl, '?action=refferals;refferedby=', $context['member']['id'], '" /></dd>
';



// End Refferals System


Replace:
echo '
<dt>', $txt['lastLoggedIn'], ': </dt>
<dd>', $context['member']['last_login'], '</dd>
</dl>';


with:
echo '
<dt>', $txt['lastLoggedIn'], ': </dt>
<dd>', $context['member']['last_login'], '</dd>
</dl>';

  // Start Refferals System

echo '
<dt>', $txt['ref_refferals'] , '</dt>
<dd>', $context['member']['referrals_no'], '</dd>
';
// Refferals Link
if ($modSettings['ref_showreflink'])
if ($context['user']['is_admin'] || $context['user']['is_owner'])
echo '

<dt>', $txt['ref_refferal_link'], '</dt>
<dd><input type="text" size="50" value="', $scripturl, '?action=refferals;refferedby=', $context['member']['id'], '" /></dd>
';



// End Refferals System

Title: Re: Referrals System 3.0.3 (Now supports SMF 2.0)
Post by: Ventic on November 19, 2011, 05:21:55 PM
thankss worked
Title: Re: Referrals System 3.0.3 (Now supports SMF 2.0)
Post by: Biology Forums on November 20, 2011, 01:34:01 AM
Is there a way of modifying this mod so that for every person you refer, you get x number of credits using the smfshop mod?
Title: Re: Referrals System 3.0.3 (Now supports SMF 2.0)
Post by: vbgamer45 on November 20, 2011, 01:55:43 AM
Possible requires php code and a mysql call to add points.
Title: Re: Referrals System 3.0.3 (Now supports SMF 2.0)
Post by: Biology Forums on November 20, 2011, 02:09:30 AM
Quote from: vbgamer45 on November 20, 2011, 01:55:43 AM
Possible requires php code and a mysql call to add points.

That will be a perfect incentive to refer people, otherwise I don't think so. :-\
Title: Re: Referrals System 3.0.3 (Now supports SMF 2.0)
Post by: Ventic on November 20, 2011, 05:26:02 AM
qustion.how i can check who got the most referalls?
Title: Re: Referrals System 3.0.3 (Now supports SMF 2.0)
Post by: vbgamer45 on November 20, 2011, 10:52:11 AM
At the moment you would need to check inside the database.
Title: Re: Referrals System 3.0.3 (Now supports SMF 2.0)
Post by: GlitchPC on November 28, 2011, 09:33:41 AM
I paid for the copyright removal but did not get removal instructions for this mod.
Title: Re: Referrals System 3.0.3 (Now supports SMF 2.0)
Post by: vbgamer45 on November 28, 2011, 01:15:05 PM
Quote from: GlitchPC on November 28, 2011, 09:33:41 AM
I paid for the copyright removal but did not get removal instructions for this mod.
PM Sent
Title: Re: Referrals System 3.0.3 (Now supports SMF 2.0)
Post by: GlitchPC on November 28, 2011, 01:32:01 PM
Done...and "Thank you..."
Title: Re: Referrals System 3.0.3 (Now supports SMF 2.0)
Post by: vbgamer45 on November 28, 2011, 01:37:06 PM
Glad to help.
Title: Re: Referrals System 3.0.3 (Now supports SMF 2.0)
Post by: ctec67 on December 01, 2011, 12:59:15 PM
Hello,

Installed this mod without any errors, but won't display.

I use Adk Cool Black, can anyone help?

Thank You!

Sincerely
Carola
Title: Re: Referrals System 3.0.3 (Now supports SMF 2.0)
Post by: vbgamer45 on December 01, 2011, 01:16:21 PM
If using SMF 2.0 did you check to install on other themes?
Title: Re: Referrals System 3.0.3 (Now supports SMF 2.0)
Post by: ctec67 on December 01, 2011, 01:19:22 PM
Yes 2.0.1 and yes installed on theme.
Title: Re: Referrals System 3.0.3 (Now supports SMF 2.0)
Post by: GlitchPC on December 01, 2011, 01:21:29 PM
Did you enable it through Admin/Referrals System/Settings?
Title: Re: Referrals System 3.0.3 (Now supports SMF 2.0)
Post by: ctec67 on December 01, 2011, 01:25:17 PM
Hmmm where would I find that option?

Don't see an Admin/Referrals or System/Settings option.
Title: Re: Referrals System 3.0.3 (Now supports SMF 2.0)
Post by: GlitchPC on December 01, 2011, 01:29:37 PM
Go to Admin page.  Look in the left navigation blocks for Referrals System.  Underneath it you will see a Settings menu link.
Title: Re: Referrals System 3.0.3 (Now supports SMF 2.0)
Post by: ctec67 on December 01, 2011, 01:35:41 PM
Well I must be having a really bad day (lol) :( as I don't see it!

:)
Thank You!
Sincerely
Carola
Title: Re: Referrals System 3.0.3 (Now supports SMF 2.0)
Post by: GlitchPC on December 01, 2011, 01:43:44 PM
You may want to remove the above info as to anyone can now access your admin page.  Also reset the password for the admin account.

How did you upload the mod?  Thorugh Package Manager, or FTP?

Also...vbgamer45...I will try to install it for her...but, it may be better if you did.  It will not uninstall since it fails across every edit.
Title: Re: Referrals System 3.0.3 (Now supports SMF 2.0)
Post by: ctec67 on December 01, 2011, 01:45:54 PM
Removed and will change pw :)
Title: Re: Referrals System 3.0.3 (Now supports SMF 2.0)
Post by: ctec67 on December 01, 2011, 01:46:37 PM
Uploaded through package manager.
Title: Re: Referrals System 3.0.3 (Now supports SMF 2.0)
Post by: GlitchPC on December 01, 2011, 01:52:53 PM
Check all files that need to be edited through the parser for that particular mod.  Make sure all edits were performed.  If not...you'll have to make the changes manually.

With me so far?
Title: Re: Referrals System 3.0.3 (Now supports SMF 2.0)
Post by: ctec67 on December 01, 2011, 02:15:56 PM
I will do that.

Thank You! :)
Title: Re: Referrals System 3.0.3 (Now supports SMF 2.0)
Post by: machinenoob on December 02, 2011, 11:48:51 AM
vbgamer I am not as versed in PHP or SMF coding for that matter... I sent you the PM about knowing who referred who....

I noticed in the database it creates the proper field referred_by but it uses the members ID.. instead if it would do the actual members NAME and then on the profile coding

/ Start Refferals System
   
   echo '
                     <dt>', $txt['ref_refferals'] , '</dt>
                           <dd>', $context['member']['referrals_no'], '</dd>
add

$context['member']['referrals_by']

that might work..again I would try this but I am not as familiar with how SMF pulls information/gathers information

IF SMF has an easier way to get the members name from the ID then nothing database wise would have to change it would just be pulling the referral_by ID and translate to MEMBER NAME

.......

i might be talking out of my mind.. but thought I would just put it out there..

Title: Re: Referrals System 3.0.3 (Now supports SMF 2.0)
Post by: machinenoob on December 02, 2011, 12:28:18 PM
Ok I was brave and was able to test somethings...

// Start Refferals System

echo '
<dt>', $txt['ref_refferals'] , '</dt>
<dd>', $context['member']['referrals_no'], '</dd>';

echo '
<dt>', $txt['ref_reffered_by'] , '</dt>
<dd>', $context['member']['referred_by'], '</dd>';

// Refferals Link
if ($modSettings['ref_showreflink'])
if ($context['user']['is_admin'] || $context['user']['is_owner'])
echo '
<dt>', $txt['ref_refferal_link'], '</dt>
<dd><input type="text" size="50" value="', $scripturl, '?action=refferals;refferedby=', $context['member']['id'], '" /></dd>';

// End Refferals System


this will show the Referred by Member Name: but it has the ID not the NAME.. if there was a way to translate the ID to NAME.....OR the most TIME efficient way is to change the way the information is stored in the database and instead of putting the ID put the actual name..

current code to install is...
if ($referred_by)
db_query("ALTER TABLE {$db_prefix}members ADD referred_by mediumint(8) NOT NULL default '0'", __FILE__, __LINE__);


this field would have to change to varchar(80) which is the same as the members name...

also in referrals.php or referrals2.php (not sure which one)

// Update reffered by
  $smcFunc['db_query']('', "
UPDATE {db_prefix}members
SET  referred_by = $refferedMemberID
WHERE ID_MEMBER =  " . $NewMemberID );

}


instead of $referredMemberID it would have to be $refferedByName


again if anyone has coding experience.. that would be awesome... I hope VBGAMER updates it or IMPROVES my PIECED together assumption of WHAT needs to be done..lol ;) smack me if I am completely off base or wrong... or if there is an easier way...

I hope a new version with INSTALLATION is made as well...;)



Also in testing the referral system i put ANY name into the REFERRAL BOX and it allowed me to SIGN UP, just puts 0 next to Referred members... Is there coding to CHECK to see if that member exists and if NOT then PREVENT registering???
Title: Re: Referrals System 3.0.3 (Now supports SMF 2.0)
Post by: machinenoob on December 02, 2011, 08:59:23 PM
SWEEEETTTTTT!!!!!! It works...

here is the rest of what is needed..

I logged into myphpadmin(on the server not the forum) and CHANGED the type on referred_by to Varchar with a length of 80 (same as the username settings)

Then under /SOURCES/referrals2.php this is the code that I changed..

Quote// Update reffered by
        $smcFunc['db_query']('', "
         UPDATE {db_prefix}members
         SET  referred_by = '$refferedByName'
         WHERE ID_MEMBER =  " . $NewMemberID );

The only issues I still see is the fact I can enter ANYTHING into the REFERRAL field when registering...AND that when a persons account is deleted it doesn't UPDATE the referral_no by one less. So if a person creates 50 accounts referred by THE SAME persons MAIN account and then deletes the user, the count still shows 50.  I know there are other ways to prevent it.. just thought it would also be a nice feature added.  This would also help when doing site maintenance and removing INACTIVE members.

Well hopefully VBGAMER will make some changes to the install/implement those other features ;)

Hope it helps others..

****I updated the installer with the modifications and gave VBGAMER a link to the files, if he approves them, hopefully he will rename/update it to version 3.0.4 ****

Please note that the original UNINSTALL for this mod does not remove the database additions, you will have to remove/drop those fields in your database under (YourDBPrefix_members).  When I tried to remove the original version it didn't work on some of the files...not sure if it was because I modified them, but I kept original files before changing and replaced everything back to original (before I tried changing files) and I still got uninstall errors.. I actually had to Re-install the forum. I applied my modified install package first then an invite system and the invite system had issues, so I uninstalled my modified referral version and it worked perfectly.  After that I was able to install the invite system and then re-install the referral mod perfectly...

here is a link to the zip file..
hxxp://www.fileserve.com/file/K8HNSc4/ReferralsSystem3.0.3-MOD.zip

Let me know if everything works.

Things that could be added if someone wants to try..
1) Checking to see if the referral field is actually populated with an actual board member.
2) the uninstall actually removes parts from the database.




Title: Re: Referrals System 3.0.3 (Now supports SMF 2.0)
Post by: Draffi on December 09, 2011, 04:46:11 AM
Something new about a statistic page for referrals?

Please, Sir, can you add this function/output...
Title: Re: Referrals System 3.0.3 (Now supports SMF 2.0)
Post by: machinenoob on December 09, 2011, 09:57:46 PM
note sure if VBGAMER is really interested in this mod anymore.. I pm'd him for some support with my above modifications, but no response on the newly packaged/possible upgrade..  Not sure why, maybe he/she is busy with other mods currently.  I'm sure VBGAMER will return to update it, but not sure when..
Title: Re: Referrals System 3.0.3 (Now supports SMF 2.0)
Post by: vbgamer45 on December 09, 2011, 10:43:32 PM
Been busy with no end in site at the moment.
Title: Re: Referrals System 3.0.3 (Now supports SMF 2.0)
Post by: machinenoob on December 10, 2011, 09:03:10 AM
QuoteBeen busy with no end in site at the moment.

thats what I thought..
Title: Re: Referrals System 3.0.3 (Now supports SMF 2.0)
Post by: Kindred on December 10, 2011, 09:10:34 AM
Machinenoob,

Setting the name in the database is a problem... Not only for the reason that you noticed, but also because you could change the username some point, and then your references would be incorrect as well.

Instead, you should keep the I'd as the referral and, then in the profile, read put the username associated with that userid. That is how SMF handles almost every reference to users... Like in posts, pms, etc...
Title: Re: Referrals System 3.0.3 (Now supports SMF 2.0)
Post by: machinenoob on December 10, 2011, 03:48:04 PM
QuoteMachinenoob,

Setting the name in the database is a problem... Not only for the reason that you noticed, but also because you could change the username some point, and then your references would be incorrect as well.

Instead, you should keep the I'd as the referral and, then in the profile, read put the username associated with that userid. That is how SMF handles almost every reference to users... Like in posts, pms, etc...

I was trying to see if i could do that at first with some of the built in functions of SMF... but I had NO CLUE.. I went to mod section and tried to look for some kind of a LIST that shows ALL the possible shortcut functions and what they return..

I was looking for something like $modsetting['get_user_name']['ID NUMBER'] but there was no such easy method that I KNOW OF.. i JUST started looking in to SMF/ modifications and do not know anythign about SMF modding... I just looked at the code and figured out somethings..

If you can give me a link to all the $Content[WHAT EVER] and modsettings and $SMF FUNCTIONS... with examples/output examples that would be great..
Title: Re: Referrals System 3.0.3 (Now supports SMF 2.0)
Post by: Kindred on December 10, 2011, 06:15:36 PM
Have you looked at the function databas and/or the wiki?
Title: Re: Referrals System 3.0.3 (Now supports SMF 2.0)
Post by: Ventic on January 08, 2012, 06:10:56 AM
how i can see who got the most referalls?
Title: Re: Referrals System 3.0.3 (Now supports SMF 2.0)
Post by: Ventic on January 08, 2012, 07:59:06 AM
Quote from: vbgamer45 on November 20, 2011, 10:52:11 AM
At the moment you would need to check inside the database.
where exactly?
Title: Re: Referrals System 3.0.3 (Now supports SMF 2.0)
Post by: vbgamer45 on January 08, 2012, 12:54:22 PM
In the smf_members table for the user
Title: Re: Referrals System 3.0.3 (Now supports SMF 2.0)
Post by: Heardy on January 18, 2012, 05:27:59 PM
This is awesome!

Isn't there any way for you to include a statistics table on the forum statistics itself? :)
Title: Re: Referrals System 3.0.3 (Now supports SMF 2.0)
Post by: vbgamer45 on January 18, 2012, 05:48:13 PM
Not at the moment maybe in a future update.
Title: Re: Referrals System 3.0.3 (Now supports SMF 2.0)
Post by: Heardy on January 18, 2012, 05:52:13 PM
Thanks for the quick reply, would love to see this implemented as I have a referral contest going ahead!
Title: Re: Referrals System 3.0.3 (Now supports SMF 2.0)
Post by: Draffi on January 18, 2012, 06:42:27 PM
Sorry for to bother you, but...

QuoteNot at the moment maybe in a future update.

Im sure, this update take less time than your other projects. Well im almost sure... 8) O:) ;)

And you see, a lot of people asking for this. Maybe you can do this. 3 or 4 days, and this is finish, for you as a coding genius.

with all the respect
Draffi
Title: Re: Referrals System 3.0.3 (Now supports SMF 2.0)
Post by: vbgamer45 on January 18, 2012, 07:00:36 PM
If I got a reasonable donation I could but otherwise have higher priority projects to work on
Title: Re: Referrals System 3.0.3 (Now supports SMF 2.0)
Post by: Draffi on January 18, 2012, 07:04:46 PM
@all: if somebody want to have:

- statistc page and a
- reset button

in this mod and is willing to pay for this, please write me a PN. maybe we can collect some bugs....
Title: Re: Referrals System 3.0.3 (Now supports SMF 2.0)
Post by: Heardy on January 19, 2012, 04:52:18 PM
Hmm..

For some reason when I have added the referral system to the Ultimate Profile Mod, it doesn't seem right.

Referrals: 0
Referral Link Hits: 0
Referred By: 01 January, 1970, 12:00:00 AM


Referred By: seems a bit strange haha!

Code (php) Select

if (!empty($context['member']['referred_by'])){
echo'
<dt><strong>', $txt['referrals_referred_by'], ': </strong></dt>
<dd>', $context['member']['referred_by_link'], ' ', $txt['referrals_on'], ' ', timeformat($context['member']['referred_on']), '</dd>';
}


Is the code I am using.

I'm getting a few errors though on the actual forum itself..

Undefined index: referredby
File: /home/mindless/public_html/Themes/Glacier/Footer.template.php (summary2 sub template - eval?)

Undefined index: referrals_on
File: /home/mindless/public_html/Themes/Glacier/Footer.template.php (summary2 sub template - eval?)

Undefined index: referred_by_name
File: /home/mindless/public_html/Themes/Glacier/Footer.template.php (summary2 sub template - eval?)

Edit: This is the section I am using with the referral code inside - http://pastebin.com/raw.php?i=0J6CJxD2

This is my Referral PHP with all the variables inside. (I think)

http://pastebin.com/raw.php?i=E8GPd2KJ
Title: Re: Referrals System 3.0.3 (Now supports SMF 2.0)
Post by: Heardy on January 20, 2012, 05:35:38 PM
Anyone?

Edit: I figured out that I don't have referred_members, referrals_no or referred_on in phpmyadmin.

I just wondered how I could get it in there again?
Title: Re: Referrals System 3.0.3 (Now supports SMF 2.0)
Post by: ScottDB on January 24, 2012, 03:32:22 AM
I just installed the mod and it went great on 2.0.1. Some great features there. I have spent the last 3 weeks looking for a mod in various script sites for something like this. Found a couple but they were for way older versions of a different script that were not supported anymore. In my searches I found lots of people asking for mods or scripts for affiliating a site. I myself, and I'm sure there are others, would gladly pay for an upscaled version of this with what Draffi wanted. As well as maybe an affiliate banner section and most of all say affiliate levels or tie it in with the paid subscriptions which is already on it. Then you could put on it say a % for commisions. That would make it a fully functioning affiliate mod people would pay good money for.

By the way pm me and let me know how much you mean by reasonable donation.
Title: Re: Referrals System 3.0.3 (Now supports SMF 2.0)
Post by: vbgamer45 on January 24, 2012, 09:22:45 AM
That would involve a quite a bit of work. Generally don't do custom projects anymore unless a large budget otherwise just don't have time to work on them.
Title: Re: Referrals System 3.0.3 (Now supports SMF 2.0)
Post by: Heardy on January 25, 2012, 04:23:23 AM
How about implementing the referred_members, referrals_no or referred_on tables back into MySQL so we can see what member has referred who?
Title: Re: Referrals System 3.0.3 (Now supports SMF 2.0)
Post by: vbgamer45 on January 25, 2012, 01:04:02 PM
Maybe in the future
Title: Re: Referrals System 3.0.3 (Now supports SMF 2.0)
Post by: ScottDB on January 25, 2012, 01:48:36 PM
Hi vbgamer45, I know you are a busy man and don't have time to work on this. I was just trying to come up with a temporary short cut untill you do have time to come up with an update. Hope you don't mind.

Was thinking I could just add code into the ez blocks mod that allows php to get results to show. I tried but getting a syntax error. I am very new to sql and php but realy eager to learn. :)  Here is what I have. Can you tell me if I am way off, if this is possible, or if you mind my posting this?


<?php
$con 
mysql_connect("localhost","dbusername","dbpassword");
if (!
$con)
  {
  die(
'Could not connect: ' mysql_error());
  }
mysql_select_db("xxxxx_smf");
$result mysql_query("SELECT member_name,referrals_no,referred_by FROM smf_members");
echo 
"<table border='1'>
<tr>
<th>Affiliate Member Count</th>
</tr>"
;
while(
$row mysql_fetch_array($result))
  {
  echo 
"<tr>";
  echo 
"<td>" $row['member_name'] . "</td>";
  echo 
"<td>" $row['referrals_no'] . "</td>";
  echo 
"<td>" $row['referred_by'] . "</td>";
  echo 
"</tr>";
  }
echo 
"</table>";
mysql_close($con);
?>



Title: Re: Referrals System 3.0.3 (Now supports SMF 2.0)
Post by: vbgamer45 on January 25, 2012, 01:55:28 PM
If ezblock you do not need to do mysql connection.

SELECT member_name,referrals_no,referred_by FROM smf_members  YOU should add a limit clause otherwise if large forum will be bad.
Title: Re: Referrals System 3.0.3 (Now supports SMF 2.0)
Post by: ScottDB on January 25, 2012, 02:19:13 PM
Wow, that was quick.

Thanks for the info on the sql connect. I deleted that part and still getting syntax error. Guess I got some ), ], ', or something in the wrong place. If you don't have time for this I understand and will look in some coding forums to get this to work.
Title: Re: Referrals System 3.0.3 (Now supports SMF 2.0)
Post by: Vutrox on January 29, 2012, 03:25:03 PM
How can I see the top10 members with the most points?

sry for my bad English xD
Title: Re: Referrals System 3.0.3 (Now supports SMF 2.0)
Post by: Vutrox on February 01, 2012, 04:15:00 PM
Quote from: Vutrox on January 29, 2012, 03:25:03 PM
How can I see the top10 members with the most points?

sry for my bad English xD

anyone? :/
Title: Re: Referrals System 3.0.3 (Now supports SMF 2.0)
Post by: vbgamer45 on February 01, 2012, 04:18:14 PM
You would have to an SQL query on the members table at the moment.
Title: Re: Referrals System 3.0.3 (Now supports SMF 2.0)
Post by: ctec67 on February 03, 2012, 10:54:19 AM
Could someone point me to the file where I can remove
from the registration page the "Referred by Membername" and
input box?

As it sets a cookie and knows who referred one, and it doesn't
put the name, I rather not show it to the new members.

I just can't find it anywhere. :(

Thank You!
Title: Re: Referrals System 3.0.3 (Now supports SMF 2.0)
Post by: vbgamer45 on February 03, 2012, 11:03:03 AM
It would be in the themes/default/registration.template.php I would do a search for refferal and it should popup in there.
Title: Re: Referrals System 3.0.3 (Now supports SMF 2.0)
Post by: ctec67 on February 03, 2012, 11:43:36 AM
Thank you very much vbgamer45! :)
Title: Re: Referrals System 3.0.3 (Now supports SMF 2.0)
Post by: sk718 on February 06, 2012, 08:57:08 PM
I just installed this mod through the package manager and I am getting a huge list of errors.

512: package_flush_cache(): some files are still not writable

2: fopen(/home/facetrad/public_html/forums/Sources/refferals2.php) [<a href='function.fopen'>function.fopen</a>]: failed to open stream: No such file or directory

2: copy(/home/facetrad/public_html/forums/Themes/default/refferals2.template.php) [<a href='function.copy'>function.copy</a>]: failed to open stream: Permission denied

2: copy(/home/facetrad/public_html/forums/Sources/refferals2.php) [<a href='function.copy'>function.copy</a>]: failed to open stream: Permission denied

2: fclose() expects parameter 1 to be resource, boolean given

2: fopen(/home/facetrad/public_html/forums/Themes/core/Display.template.php) [<a href='function.fopen'>function.fopen</a>]: failed to open stream: Permission denied


And A LOT more, please help me fix this.
Title: Re: Referrals System 3.0.3 (Now supports SMF 2.0)
Post by: vbgamer45 on February 06, 2012, 09:31:27 PM
Looks like you have bad file permissions.

Goto Admin -> Package Manager -> Options and there should be reset file permissions area in there.
Title: Re: Referrals System 3.0.3 (Now supports SMF 2.0)
Post by: sk718 on February 06, 2012, 10:09:21 PM
I have everything 777 except  Sources.

What should they be?
Title: Re: Referrals System 3.0.3 (Now supports SMF 2.0)
Post by: vbgamer45 on February 06, 2012, 10:31:28 PM
777 would work do other mods install correctly? If not might be an SMF/hosting issue.
Title: Re: Referrals System 3.0.3 (Now supports SMF 2.0)
Post by: sk718 on February 06, 2012, 10:41:10 PM
this is the first mod i'm tryin to install, I used the package manager and then picked the file.  Also, the webhost is using Linux.
Title: Re: Referrals System 3.0.3 (Now supports SMF 2.0)
Post by: sk718 on February 08, 2012, 01:22:58 AM
Bump. If anyone can help me solve this problem, I would greatly appreciate it!
Title: Re: Referrals System 3.0.3 (Now supports SMF 2.0)
Post by: Bob Perry of Web Presence Consulting on February 26, 2012, 05:55:02 PM
Quote from: Vutrox on January 29, 2012, 03:25:03 PM
How can I see the top10 members with the most points?

sry for my bad English xD

Pop in to the stats page on my website, I can show you how it's done, if you want me to do it for you there's a fee
Title: Re: Referrals System 3.0.3 (Now supports SMF 2.0)
Post by: fullmoonya on March 02, 2012, 08:55:52 PM
i have a problem. the refferer's username/name doesn't show in the "Referred by Membername" textbox in the registration page. i tried to use the link provided in my member's profile but it doesnt really show. please help me.
Title: Re: Referrals System 3.0.3 (Now supports SMF 2.0)
Post by: fedxrx on March 02, 2012, 11:30:50 PM
When I use the mod, it installs perfectly and works great.  HOWEVER, when someone does get a referral, EVERYONE gets a referral.

Example:
Joe refers Susie to come to the site.  Susie joins, Joe gets referral +1

Now everyone has referral +1.

Joe refers someone else, they join the site.  Joe gets referral +2

Now everyone has referral +2.  Not just in their profile, but also on the threads.

How can I fix this?
Title: Re: Referrals System 3.0.3 (Now supports SMF 2.0)
Post by: Alex4108 on March 03, 2012, 08:01:34 AM
Searched the thread and it seems nobody gets an answer to this question.

On SMF 2.0.2, where do I modify to credit the referring user SMFShop money?  Which function on what file do I need to tweak?
Title: Re: Referrals System 3.0.3 (Now supports SMF 2.0)
Post by: fullmoonya on March 04, 2012, 10:30:46 PM
i think the codes are not completed..maybe there is some code that needs to be put in register.template.php. i hope someone know how to fix those problem in this mod.
Title: Re: Referrals System 3.0.3 (Now supports SMF 2.0)
Post by: Manicred on April 10, 2012, 01:28:22 PM
This mod needs serious upgrading. Does NOT work properly. Once someone refers someone everyone gets the referral. Plus how do you see who has referred who?
Title: Re: Referrals System 3.0.3 (Now supports SMF 2.0)
Post by: vbgamer45 on April 10, 2012, 01:39:52 PM
The only way to see who reffered who at the moment is to look inside the database and the members table to look at the refferred id.
Title: Re: Referrals System 3.0.3 (Now supports SMF 2.0)
Post by: InfoStrides on April 11, 2012, 01:26:11 PM
I want to use this mod with SMF Shop so that I can assign value for each referral for use in the shop. Please help!
Title: Re: Referrals System 3.0.3 (Now supports SMF 2.0)
Post by: Sabrewulv on April 14, 2012, 03:40:21 PM
I installed this mod on an smf site. It says in settings show referral link in profile but there's no link there. On the registration page it says if referred by a member put in their name. i registered a dummy account and used my name for the refferal yet it didn't credit it to me.

Any ideas?
Title: Re: Referrals System 3.0.3 (Now supports SMF 2.0)
Post by: fullmoonya on April 16, 2012, 08:55:37 PM
Quote from: Sabrewulv on April 14, 2012, 03:40:21 PM
I installed this mod on an smf site. It says in settings show referral link in profile but there's no link there. On the registration page it says if referred by a member put in their name. i registered a dummy account and used my name for the refferal yet it didn't credit it to me.

Any ideas?

maybe you are using ultimate profile mod..
Title: Re: Referrals System 3.0.3 (Now supports SMF 2.0)
Post by: mageguild on May 28, 2012, 07:58:41 AM
This mod was working fine for me but it appears to stop working.  I now get this error:  Undefined index: referrals_no.  This error is generated on every page where a users referral count is displayed. 
Title: Re: Referrals System 3.0.3 (Now supports SMF 2.0)
Post by: was1f on June 17, 2012, 02:12:56 PM
I Install Referral System In My Forum But This Is Not WOrked For Me Please Help How Can I Set That. .

Here Is Screen Short Of Admin Panel.
(http://s15.postimage.org/i8bjf6rqv/1stref.jpg) (http://postimage.org/image/i8bjf6rqv/)

This Screen Short Of Users Panel.
(http://s15.postimage.org/tejmld62f/2rf.jpg) (http://postimage.org/image/tejmld62f/)

Please Help Me.
My Froum URL: http://easyearning.net/forum/index.php (http://easyearning.net/forum/index.php)

Thanks.
Title: Re: Referrals System 3.0.3 (Now supports SMF 2.0)
Post by: vbgamer45 on June 17, 2012, 02:14:23 PM
You might need to add text to your themes/languages/modifications.english.php file if it exists

Copy from themes/default/languages/modifications.english.php
Title: Re: Referrals System 3.0.3 (Now supports SMF 2.0)
Post by: was1f on June 17, 2012, 04:03:24 PM
Quote from: vbgamer45 on June 17, 2012, 02:14:23 PM
You might need to add text to your themes/languages/modifications.english.php file if it exists

Copy from themes/default/languages/modifications.english.php

Which Text Bro I Dont Understand.
Title: Re: Referrals System 3.0.3 (Now supports SMF 2.0)
Post by: mybiafraland on June 19, 2012, 10:36:13 PM
Can't get this working on my concept3 three theme
Title: Re: Referrals System 3.0.3 (Now supports SMF 2.0)
Post by: TheListener on June 19, 2012, 10:41:07 PM
Quote from: humblelad on June 19, 2012, 10:36:13 PM
Can't get this working on my concept3 three theme

How can't you get the mod to work?
Title: Re: Referrals System 3.0.3 (Now supports SMF 2.0)
Post by: mybiafraland on June 20, 2012, 04:13:03 AM
the mod installs fine but will not appear in the members profile
Title: Re: Referrals System 3.0.3 (Now supports SMF 2.0)
Post by: 4Kstore on June 20, 2012, 05:27:54 PM
Quote from: vbgamer45 on April 10, 2012, 01:39:52 PM
The only way to see who reffered who at the moment is to look inside the database and the members table to look at the refferred id.

I made a mini script for this...
maybe can help to someone.

Result:
(http://i.imgur.com/To6Pt.png)

Steps:
1º Install the mod *duhhh*

2º Edit: Sources/Load.php

Search:
// What a monstrous array...

Add before:

//Referrer Start
$context['referinfo'] = array();
$referinfo = array();
if($profile['referrals_no'] != 0)
{
$request2 = $smcFunc['db_query']('', '
SELECT referred_by, real_name, id_member
FROM {db_prefix}members
WHERE referred_by = {int:id_member_profile}',
array(
'id_member_profile' => $profile['id_member'],
)
);

while($row = $smcFunc['db_fetch_assoc']($request2))
{
  $referinfo = &$context['referinfo'][];  
  $referinfo['referidos_url'] = ''. $scripturl .'?action=profile;u='.$row['id_member'].'';  
  $referinfo['referidos_name'] = $row['real_name'];  
}
$smcFunc['db_free_result']($request2);
}
//Referrer END


Save and upload

3º:  Edit: Themes/{tutheme}/Profile.template.php

Search:

echo '
<dt>', $txt['ref_refferals'] , '</dt>
<dd>', $context['member']['referrals_no'], '</dd>
';


Replace for:

echo '
<dt>', $txt['ref_refferals'] , '</dt>
<dd>', $context['member']['referrals_no'], '';
if (!empty($context['referinfo']))
{
echo' - <select name="menu2">';
foreach($context['referinfo'] as $info)
{
echo'<option value="'.$info['referidos_url'].'">'.$info['referidos_name'].'</option>';
}
echo'</select>';
}
echo'</dd>';


Save and upload
Baii
Title: Re: Referrals System 3.0.3 (Now supports SMF 2.0)
Post by: phpshiva on July 11, 2012, 09:24:08 AM
Thanks this works great :laugh:
Title: Re: Referrals System 3.0.3 (Now supports SMF 2.0)
Post by: mcaswe on July 18, 2012, 04:44:08 PM
Maybe this question has been asked, but if I was running a member drive, is there a way to find out how many referrals members got, without going into everyones profile? Thanks in advance for your help.
Title: Re: Referrals System 3.0.3 (Now supports SMF 2.0)
Post by: vbgamer45 on July 18, 2012, 04:57:40 PM
You could do an sql statement via phpmyadmin and do a sum of all referrals from the smf_members database table.
Title: Re: Referrals System 3.0.3 (Now supports SMF 2.0)
Post by: mcaswe on July 18, 2012, 08:49:06 PM
Quote from: vbgamer45 on July 18, 2012, 04:57:40 PM
You could do an sql statement via phpmyadmin and do a sum of all referrals from the smf_members database table.
How would this be done?
Title: Re: Referrals System 3.0.3 (Now supports SMF 2.0)
Post by: vbgamer45 on July 18, 2012, 10:26:25 PM
SQL Query below:

SELECT sum(referrals_hits) as total from smf_members
Title: Re: Referrals System 3.0.3 (Now supports SMF 2.0)
Post by: Arantor on July 18, 2012, 10:40:55 PM
Wouldn't you want:
SELECT id_member, real_name, SUM(referrals_hits) AS total FROM smf_members GROUP BY id_member
Title: Re: Referrals System 3.0.3 (Now supports SMF 2.0)
Post by: vbgamer45 on July 18, 2012, 10:52:31 PM
That would be better Adjusted a little bit

SELECT id_member, real_name, SUM(referrals_hits) AS total FROM smf_members GROUP BY id_member ORDER BY total DESC
Title: Re: Referrals System 3.0.3 (Now supports SMF 2.0)
Post by: Arantor on July 18, 2012, 11:01:02 PM
*shrug* Depends on whether you want them by name or by most first, either way it really does need the per-user grouping in there to make the figures make sense.
Title: Re: Referrals System 3.0.3 (Now supports SMF 2.0)
Post by: tatack on September 07, 2012, 09:22:00 AM
Hello, I see the referral value increase on some user of my forum, but I need to know what's the user name of the new member that has been referred by a specific user.

How to know this?

Thank You
Title: Re: Referrals System 3.0.3 (Now supports SMF 2.0)
Post by: vbgamer45 on September 07, 2012, 10:42:17 AM
At the moment you have to look in the database in the smf_members table and there is a reffrered memberid column
Title: Re: Referrals System 3.0.3 (Now supports SMF 2.0)
Post by: Kindred on September 07, 2012, 10:53:33 AM
So to be slightly more clear - if you know how to do it, you can query the database and get a report which displays the referred user by ID, name and who they were referred by.

But you have to write the script/query yourself, because it does not currently exist.
Title: Re: Referrals System 3.0.3 (Now supports SMF 2.0)
Post by: tatack on September 07, 2012, 11:06:29 AM
Quote from: vbgamer45 on September 07, 2012, 10:42:17 AM
At the moment you have to look in the database in the smf_members table and there is a reffrered memberid column

Thank You
Title: Re: Referrals System 3.0.3 (Now supports SMF 2.0)
Post by: Okaztle on September 13, 2012, 08:15:46 AM
Please help, i uninstall referral mod but the credit link still appear at the footer of my forum and i install it back it becomes double, please how can i remove one out of it. My forum is www.9jageek.com
Title: Re: Referrals System 3.0.3 (Now supports SMF 2.0)
Post by: Shambles on September 13, 2012, 09:11:28 AM
Just remove the line(s) from your Theme's index.template.php file
Title: Re: Referrals System 3.0.3 (Now supports SMF 2.0)
Post by: Okaztle on September 26, 2012, 10:46:19 AM
Wat would i search to see the code?
Title: Re: Referrals System 3.0.3 (Now supports SMF 2.0)
Post by: vbgamer45 on September 26, 2012, 10:51:18 AM
refferals system if not there check sources/querystring.php
Title: Re: Referrals System 3.0.3 (Now supports SMF 2.0)
Post by: xjplt on October 03, 2012, 10:51:14 PM
The referral link has spelling errors, i.e. "refferals". Any help on how to correct them?
Title: Re: Referrals System 3.0.3 (Now supports SMF 2.0)
Post by: ProtoGT on October 25, 2012, 10:16:39 PM
Is there anyway to recount referrals?
Title: Re: Referrals System 3.0.3 (Now supports SMF 2.0)
Post by: vbgamer45 on October 25, 2012, 11:24:56 PM
Not at the moment
Title: Re: Referrals System 3.0.3 (Now supports SMF 2.0)
Post by: ProtoGT on October 26, 2012, 07:35:16 PM
Could you possibly give me a SQL statement to run via shell or phpMyAdmin to recount?
Title: Re: Referrals System 3.0.3 (Now supports SMF 2.0)
Post by: vbgamer45 on October 26, 2012, 08:02:06 PM
It is based on fields in the smf_members tables that the mod added
Title: Re: Referrals System 3.0.3 (Now supports SMF 2.0)
Post by: ProtoGT on October 26, 2012, 08:18:02 PM
Quote from: ProtoGT on October 26, 2012, 07:35:16 PM
Could you possibly give me a SQL statement to run via shell or phpMyAdmin to recount?
Title: Re: Referrals System 3.0.3 (Now supports SMF 2.0)
Post by: vbgamer45 on October 26, 2012, 08:22:48 PM
I don't know it offhand.
Title: Re: Referrals System 3.0.3 (Now supports SMF 2.0)
Post by: MotRude on October 26, 2012, 10:13:14 PM
Installed this mod but then uninstalled quick when i discovered Create A Forum in the Footer of my forum... >:(
Title: Re: Referrals System 3.0.3 (Now supports SMF 2.0)
Post by: vbgamer45 on October 26, 2012, 10:20:21 PM
Ok you can pay for copyright removal if you still want the mod.
Title: Re: Referrals System 3.0.3 (Now supports SMF 2.0)
Post by: MotRude on October 26, 2012, 10:55:03 PM
I Will Pass on the Mod but thanks...
Title: Re: Referrals System 3.0.3 (Now supports SMF 2.0)
Post by: ProtoGT on October 29, 2012, 04:19:19 PM

Quote from: ProtoGT on October 26, 2012, 07:35:16 PM
Could you possibly give me a SQL statement to run via shell or phpMyAdmin to recount?

anyone?
Title: Re: Referrals System 3.0.3 (Now supports SMF 2.0)
Post by: imsosocial on November 17, 2012, 07:14:58 AM
how to buy link removal cause if i have another Createaforum link at the bottom of my site im gonna go mental lol, it's almost spam.

Every mod wants to add a link on my forum and fair enough it's free but it's beyond a joke now, Couldn't you just add it to the credits page, or something.

Specially if your creating so many mods i have 2 or 3 links for Create a forum your ad mod this mod and another one and thats not to mention a portal mod Ect. Ect.. i cant use a theme i wanted cause the footer area isn't big enough to hold all the links and makes the site look horrible.

Can i pay so i can remove these links cause they look like crud and i dont want them.

Thanks for an amazing mod it's awesome you have done this. It's an awesome mod but if smf is not making these things default and we have to have a ton of links its just silly is all having a bunch of the same persons links at the bottom of the site i cant even move them to another location like in portal so it's not on every page, you even smashed it on every page on the SMFShop mod (SMFShop Mod By Createaforum)  lol  it's just over kill is all im saying. But thanks for a great od id be happy to pay for link removal if i can
Title: Re: Referrals System 3.0.3 (Now supports SMF 2.0)
Post by: vbgamer45 on November 17, 2012, 12:56:00 PM
For link removal you can buy it at
http://www.smfhacks.com/copyright_removal.php
Title: Re: Referrals System 3.0.3 (Now supports SMF 2.0)
Post by: imsosocial on November 18, 2012, 10:58:26 AM
thanks mate, your a champion, Also reading over my first post seems a little harsh i was thinking this was gonna cost me 50$ or something stupid per mod but your prices are more than fair for the hard work that would have gone in thank you very much indeed this has made my day, i can now buy all link removal and start using a lot of your other mods that ive had to un install due to this link problem again thank you this has really made me a happy camper :) 

another question though


it says this ...

Quote
Information:
Allows you to remove the copyright html links to (http://www.smfhacks.com) from .template.php for the modification
Valid for a single instance/install of the modification
Copyright information must remain in the code.
Useful if you are running a business or professional site and to keep users on your forum


will this give me the right to remove the Createaforum.com link also that is on these mods to cause some of these mods have 2 links 1 for smfhacks  and right next to it it also has a link for createaform.com 

for instance the SMFshop mod has

Powered by SMFShop by CreateAForum.com

dont even have a smfhacks link on there yet it says i can remove the smfhacks link if i pay 10$ lol

how does this work, not trying to be difficult i actually want to buy this and i like to do things legit so i want to make sure i understand before i spend anything .
Title: Re: Referrals System 3.0.3 (Now supports SMF 2.0)
Post by: vbgamer45 on November 18, 2012, 11:16:22 AM
Yes it works for all the links smfhacks.com,createaforum.com any link/text that we add to the footer.
Title: Re: Referrals System 3.0.3 (Now supports SMF 2.0)
Post by: imsosocial on November 19, 2012, 01:00:36 PM
Wonderful your a champion thanks very much ill be buying this. cheers for your help.
Title: Re: Referrals System 3.0.3 (Now supports SMF 2.0)
Post by: vbgamer45 on November 19, 2012, 01:22:38 PM
Glad to help.
Title: Re: Referrals System 3.0.3 (Now supports SMF 2.0)
Post by: schneizel57 on December 13, 2012, 03:16:14 AM
Hello.
I have installed Referrals System 3.0.3 mod, everything works fine but I can't see it in profile.
I think the problem is that I'm using UltimateProflie Mod....
How can I integrate this on UltimateProfile?
I want to show the referral links and number of referred users on UltimateProfile.
Thanks :)
Title: Re: Referrals System 3.0.3 (Now supports SMF 2.0)
Post by: Bob Perry of Web Presence Consulting on January 03, 2013, 02:46:17 AM
Quote from: vbgamer45 on November 19, 2012, 01:22:38 PM
Glad to help.

I have followed this mod for quite some time now, installing various versions from almost the beginning... I have one pesky little bug report that I'd like you to fix when you get some time as it has persisted throughout all versions AND a few feature requests as well...

Many moons ago I had an almost 1st version fixed the way i wanted by correcting things programatically myself and corrected this little bug, but have since lost all the editing done so I'm starting from scratch and going to put in a marathon session to get some of the features how I want it and fix this little bug because this really is a great mod for multiple reasons...

Let's say a user registers a new account and puts a valid referrer in his field, but if the new guy either deletes his new account or gets it deleted by an administrator, you need to fix it so that the referral he made gets adjusted down statistically from the member who it was awarded to...

Which brings me to the feature requests... I'm going to modify it so that two statistical record blocks will be tracked in the system stats page, members with highest number of referrals & members with most hits on their link...

Also, one of the first versions had a handy dandy little drop-down arrow box available on the user profile summary page to the right of the Referrals number where if the user hovered their cursor over the box a nice little list of that members referral membernames.
Title: Re: Referrals System 3.0.3 (Now supports SMF 2.0)
Post by: Bob Perry of Web Presence Consulting on January 17, 2013, 11:41:20 AM
Quote from: bperry921 on January 03, 2013, 02:46:17 AM
Quote from: vbgamer45 on November 19, 2012, 01:22:38 PM
Glad to help.

I have followed this mod for quite some time now, installing various versions from almost the beginning... I have one pesky little bug report that I'd like you to fix when you get some time as it has persisted throughout all versions AND a few feature requests as well...

Many moons ago I had an almost 1st version fixed the way i wanted by correcting things programatically myself and corrected this little bug, but have since lost all the editing done so I'm starting from scratch and going to put in a marathon session to get some of the features how I want it and fix this little bug because this really is a great mod for multiple reasons...

Let's say a user registers a new account and puts a valid referrer in his field, but if the new guy either deletes his new account or gets it deleted by an administrator, you need to fix it so that the referral he made gets adjusted down statistically from the member who it was awarded to...

Which brings me to the feature requests... I'm going to modify it so that two statistical record blocks will be tracked in the system stats page, members with highest number of referrals & members with most hits on their link...

Also, one of the first versions had a handy dandy little drop-down arrow box available on the user profile summary page to the right of the Referrals number where if the user hovered their cursor over the box a nice little list of that members referral membernames.

I've got the statistics page set up, now if I can remember how to fix the mentioned bug, I'll let you work on the drop down list for some future release as that is a relatively unnecessary part of my goals... but I must have the numbers accurate when a members account is deleted and also need to fix it so they can't get credit for a "self" referral in order to realize my goal of having contests based on this mod
Title: Re: Referrals System 3.0.3 (Now supports SMF 2.0)
Post by: faster123 on January 18, 2013, 08:07:20 AM
Hi,

I was hoping to run a referral contest with this mod that ends weekly. Is it possible to reset everyone's referral count to 0 every week?

Also, is there any way to track like a referral leader-board so everyone can see it. If not, I think this would be a HUGE upgrade as a forum with a referral contest is much more likely to get traffic.

Thanks in advance.
Title: Re: Referrals System 3.0.3 (Now supports SMF 2.0)
Post by: Bob Perry of Web Presence Consulting on January 19, 2013, 05:54:42 PM
Quote from: faster123 on January 18, 2013, 08:07:20 AM
Hi,

I was hoping to run a referral contest with this mod that ends weekly. Is it possible to reset everyone's referral count to 0 every week?

Also, is there any way to track like a referral leader-board so everyone can see it. If not, I think this would be a HUGE upgrade as a forum with a referral contest is much more likely to get traffic.

Thanks in advance.

I can fix you up with this for a price, but you might hold off a bit on making your contest official until the bug I mentioned in my previous posts is squashed by the author, but tracking the leaders in the statistics page is a relatively easy hack, visit my site for an example
Title: Re: Referrals System 3.0.3 (Now supports SMF 2.0)
Post by: N i g h t m a r e on February 01, 2013, 06:30:04 PM
okay so i wanna change the spot of the "Refferal Link"

Like in image 1 its in the "Profile Area" box thingy.... and it kinda messes that upby being right there
Title: Re: Referrals System 3.0.3 (Now supports SMF 2.0)
Post by: vbgamer45 on February 01, 2013, 08:11:06 PM
That would be a change in the Profile.template.php file.
Title: Re: Referrals System 3.0.3 (Now supports SMF 2.0)
Post by: N i g h t m a r e on February 01, 2013, 08:40:42 PM
Could you tell me in what folders, and how to change it?
Title: Re: Referrals System 3.0.3 (Now supports SMF 2.0)
Post by: vbgamer45 on February 01, 2013, 08:52:47 PM
The file would be in the themes/default/ folder
Title: Re: Referrals System 3.0.3 (Now supports SMF 2.0)
Post by: N i g h t m a r e on February 01, 2013, 08:59:28 PM
okay i have that file opened now with  Notepad++ i just need to know what to look for and what to change...
Title: Re: Referrals System 3.0.3 (Now supports SMF 2.0)
Post by: vbgamer45 on February 01, 2013, 09:10:03 PM
Search for the refferals code
Title: Re: Referrals System 3.0.3 (Now supports SMF 2.0)
Post by: N i g h t m a r e on February 01, 2013, 09:18:31 PM
i found this while searching for "Referrals"

// Start Refferals System

echo '
<dt>', $txt['ref_refferals'] , '</dt>
<dd>', $context['member']['referrals_no'], '</dd>
';
// Refferals Link
if ($modSettings['ref_showreflink'])
if ($context['user']['is_admin'] || $context['user']['is_owner'])
echo '

<dt>', $txt['ref_refferal_link'], '</dt>
<dd><input type="text" size="50" value="', $scripturl, '?action=refferals;refferedby=', $context['member']['id'], '" /></dd>
';



// End Refferals System



What exactly do i change?
Title: Re: Referrals System 3.0.3 (Now supports SMF 2.0)
Post by: vbgamer45 on February 01, 2013, 09:28:37 PM
Not sure looks like using a custom theme but you would need to move that code to a different spot if it is too big for the area that you have now.
Title: Re: Referrals System 3.0.3 (Now supports SMF 2.0)
Post by: N i g h t m a r e on February 01, 2013, 09:48:45 PM
Thanks A LOT!!!! i managed to get it EXACTLY where i wanted it :)
Check it out: http://pshomenation.com/index.php?action=profile;u=1
Title: Re: Referrals System 3.0.3 (Now supports SMF 2.0)
Post by: Tikkuy on February 08, 2013,