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

SosniTo.sk

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
QuoteUnknown column 'referrals' in 'field list'

Please give me the SQL command, which I would only entered into phpmyadmin.

Kyzer

Thanks, been looking for this, just found it lol,now if they just used your rep system i could +Rep you :D
Runic WoW World of Warcraft Gaming Forums

Xavi-Nena

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.


TurtleKicker

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.

Fustrate

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
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.
Steven Hoffman
Former Team Member, 2009-2012

SosniTo.sk


_Anthony_

Thanks for the mod Fustrate

Fustrate

#568
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.
Steven Hoffman
Former Team Member, 2009-2012

TurtleKicker

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.

zanyuki

Would you guys have any support for RC1-1?

Fustrate

Yes, this should work on RC1-1.
Steven Hoffman
Former Team Member, 2009-2012

Vekseid

It works fine in 1.1, except for ajax loads in the statistics page.
Adult Role Playing Forums - - Over five million posts - - Elliquiy's LAMP configuration (maybe NSFW)

Blog about Forums and Servers - - Twenty things to make Simple Machines Forum go faster

Private/Instant Message requests for free support will be ignored.

TurtleKicker

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.

[Core]


TurtleKicker

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.

dragoon944

My screen has gone blank and i have no back up of my forum, what should i do?

TheListener

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.

Fustrate

I've uploaded a new package that just senses if it's 1.1 or 2.0
Steven Hoffman
Former Team Member, 2009-2012

TheListener

Had an error on install on display template php.

Went to manually edit the file and the required text was not there.

Advertisement: