News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Referral System

Started by SMFHacks.com Team, March 03, 2008, 01:02:01 PM

Previous topic - Next topic

Heardy

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
Mindless Junk - A haven for forumers.

Heardy

#1041
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?
Mindless Junk - A haven for forumers.

ScottDB

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.
Thank you,
Scott

If at first you don't succeed. post and post again.

vbgamer45

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.
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Heardy

How about implementing the referred_members, referrals_no or referred_on tables back into MySQL so we can see what member has referred who?
Mindless Junk - A haven for forumers.

vbgamer45

Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

ScottDB

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);
?>



Thank you,
Scott

If at first you don't succeed. post and post again.

vbgamer45

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.
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

ScottDB

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.
Thank you,
Scott

If at first you don't succeed. post and post again.

Vutrox

How can I see the top10 members with the most points?

sry for my bad English xD

Vutrox

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? :/

vbgamer45

You would have to an SQL query on the members table at the moment.
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

ctec67

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!

vbgamer45

It would be in the themes/default/registration.template.php I would do a search for refferal and it should popup in there.
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

ctec67


sk718

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.

vbgamer45

Looks like you have bad file permissions.

Goto Admin -> Package Manager -> Options and there should be reset file permissions area in there.
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

sk718

I have everything 777 except  Sources.

What should they be?

vbgamer45

777 would work do other mods install correctly? If not might be an SMF/hosting issue.
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

sk718

#1059
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.

Advertisement: