Advertisement:

Author Topic: Referrals System 3.1 (Now supports SMF 2.0.x and SMF 1.1.x)  (Read 261818 times)

Offline SMFHacks.com Team

  • Jr. Member
  • **
  • Posts: 225
    • smfhacks on Facebook
    • @smfhacks on Twitter
    • SMFHacks.com
Referrals System 3.1 (Now supports SMF 2.0.x and SMF 1.1.x)
« on: March 03, 2008, 01:02:01 PM »

Referrals System


[Link to Mod
[Support and Comments

3.1
+Added easy copyright removal ordering system

New Version 3.0
+Rewrote the modification from the ground up.
+Settings to control where referrals are shown
« Last Edit: April 14, 2013, 11:57:58 PM by SMFHacks.com Team »
Disclaimer: SMFHacks.com Team is in no way directly affiliated with the SMF Team or the SimpleMachines NPO.
SMFHacks.com -  Paid Modifications for SMF

Latest Mods:
Community Suite
Newsletter Pro SMF Gallery Pro SMF Classifieds SMF Store

Offline edi67

  • SMF Hero
  • ******
  • Posts: 1,532
  • Gender: Male
  • Italian Supporter
    • CrazyZone
Re: Referrals Mod
« Reply #1 on: March 03, 2008, 03:33:25 PM »
let me try
CrazyZone - My SMF Forum


From the difficult the hardening of the man you can see

Offline Hoochie Coochie Man

  • SMF Hero
  • ******
  • Posts: 5,135
  • Gender: Male
    • İstanblues.org
Re: Referrals Mod
« Reply #2 on: March 03, 2008, 06:20:34 PM »
Good job! Thanks for this great mod.
İnadına SMF 1.1.X


Offline mcblaber

  • Support Specialist
  • SMF Super Hero
  • *
  • Posts: 11,171
  • Gender: Male
    • mcblaber on LinkedIn
    • @mcblaber on Twitter
    • AvatarPrime
Re: Referrals Mod
« Reply #4 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.
M. Colin Blaber
Formally known as shadow82x
SMF Support Specialist

SMF2.1 Alpha Playground

Offline karlbenson

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 15,581
  • Gender: Male
    • Mortons Solicitors
Re: Referrals Mod
« Reply #5 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.

Offline paypalcommunity

  • Semi-Newbie
  • *
  • Posts: 27
    • paypalcommunity
Re: Referrals Mod
« Reply #6 on: March 04, 2008, 06:10:24 AM »
thats... it works good to me
join my forum - http://www.paypalcommunity.info a site where you can earn money from posting and trading and learning new things. join http://www.paypalcommunity.info - this is newly site :)

Offline JoshieDaMan

  • Jr. Member
  • **
  • Posts: 343
    • JustAFreeLancer.com
Re: Referrals Mod
« Reply #7 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.

Offline Eliana Tamerin

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 5,506
  • Gender: Female
Re: Referrals Mod
« Reply #8 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.
Do NOT PM me for support.

SimplePortal 2.3.5 is OUT!
SimplePortal Project Manager
Download | Docs
SimplePortal: Power of Simplicity!

Offline karlbenson

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 15,581
  • Gender: Male
    • Mortons Solicitors
Re: Referrals Mod
« Reply #9 on: March 06, 2008, 12:39:43 AM »
Eliana Tamerin it should use a popup.  In fact the code it uses is from smf. :(

Offline Eliana Tamerin

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 5,506
  • Gender: Female
Re: Referrals Mod
« Reply #10 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:

Code: [Select]
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:

Code: [Select]
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.
« Last Edit: March 06, 2008, 01:06:18 AM by Eliana Tamerin »
Do NOT PM me for support.

SimplePortal 2.3.5 is OUT!
SimplePortal Project Manager
Download | Docs
SimplePortal: Power of Simplicity!

Offline karlbenson

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 15,581
  • Gender: Male
    • Mortons Solicitors
Re: Referrals Mod
« Reply #11 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)

Offline Eliana Tamerin

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 5,506
  • Gender: Female
Re: Referrals Mod
« Reply #12 on: March 06, 2008, 01:23:43 AM »
No on both counts. They both appear as popups without redirecting the current page.
Do NOT PM me for support.

SimplePortal 2.3.5 is OUT!
SimplePortal Project Manager
Download | Docs
SimplePortal: Power of Simplicity!

Offline Fustrate

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 6,474
  • Gender: Male
  • Controller of the rum budget
    • @Fustrate on Twitter
    • Fustrate
Re: Referrals Mod
« Reply #13 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.
Steven Hoffman
Former Team Member, 2009-2012

Offline ~Kikoish~

  • Semi-Newbie
  • *
  • Posts: 72
  • Gender: Male
  • Newbie
Re: Referrals Mod
« Reply #14 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:

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

How to fix this?


Offline Spamiam

  • Semi-Newbie
  • *
  • Posts: 58
Re: Referrals Mod
« Reply #15 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. :(

Offline ~Kikoish~

  • Semi-Newbie
  • *
  • Posts: 72
  • Gender: Male
  • Newbie
Re: Referrals Mod
« Reply #16 on: March 09, 2008, 10:26:12 PM »
How to edit the referrals?

Offline JoshieDaMan

  • Jr. Member
  • **
  • Posts: 343
    • JustAFreeLancer.com
Re: Referrals Mod
« Reply #17 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?

Offline Eliana Tamerin

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 5,506
  • Gender: Female
Re: Referrals Mod
« Reply #18 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.
Do NOT PM me for support.

SimplePortal 2.3.5 is OUT!
SimplePortal Project Manager
Download | Docs
SimplePortal: Power of Simplicity!

Offline Fustrate

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 6,474
  • Gender: Male
  • Controller of the rum budget
    • @Fustrate on Twitter
    • Fustrate
Re: Referrals Mod
« Reply #19 on: March 09, 2008, 11:39:12 PM »
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:
Code: [Select]
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:
Code: [Select]
// 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
« Last Edit: March 10, 2008, 12:08:32 AM by YodaOfDarkness »
Steven Hoffman
Former Team Member, 2009-2012