Open includes/acp/acp_referral.php and search for this code:Jessica wrote: I created a contest today, February 1st, at 12:50 pm. Set the duration to 3 months.
So it says the end date is April 1st, 11:50 am. the date is right, but the time isn't. Well, it's just one hour off and I suspect it's something to do with DST? It's really not a big deal and if there's no "fix" that's fine - one hour off is no big deal. Just wondering why it's one hour off.
Code: Select all
strtotime('+ ' . $contest_duration[0] . ' ' . $contest_duration[1])
Code: Select all
(strtotime("+ {$contest_duration[0]} {$contest_duration[1]}") + 3600)
It is set to descending by default. It works fine on my demo: http://www.siropu.com/test/phpBB3Jessica wrote:Current top referrers on my board:
TOP 5 REFERRERS
Knight Rider (1), Jessica (4)
is there a way I can list in descending order? From highest to lowest?
Code: Select all
ORDER BY user_referrals
Thanks!Siropu wrote:Open includes/acp/acp_referral.php and search for this code:Jessica wrote: I created a contest today, February 1st, at 12:50 pm. Set the duration to 3 months.
So it says the end date is April 1st, 11:50 am. the date is right, but the time isn't. Well, it's just one hour off and I suspect it's something to do with DST? It's really not a big deal and if there's no "fix" that's fine - one hour off is no big deal. Just wondering why it's one hour off.Replace with this:Code: Select all
strtotime('+ ' . $contest_duration[0] . ' ' . $contest_duration[1])
This will not affect old contests so when you will add a new contest it sould be ok.Code: Select all
(strtotime("+ {$contest_duration[0]} {$contest_duration[1]}") + 3600)
I will make this change in the next release.
Strange, apparently the edit in index.php wasn't correct (not of the latest version). I corrected it, and that fixed the order. Thanks againSiropu wrote:It is set to descending by default. It works fine on my demo: http://www.siropu.com/test/phpBB3Jessica wrote:Current top referrers on my board:
TOP 5 REFERRERS
Knight Rider (1), Jessica (4)
is there a way I can list in descending order? From highest to lowest?
Open index.php and search for:What do you see after it, "ASC" or "DESC"? It should be "DESC".Code: Select all
ORDER BY user_referrals
Do you think you can alter this for subsilver as well? THIS was something I overlooked before I installed mod, and you pretty much made it come full circle. If you could convert this to subsilver, I would be so greatful!Qwertyip wrote:Hi there.
Great Mod, I needed it for a 'Referral:' Box on the registration page, but i liked how simple it is. So i used it and put a referral box on the registration page myself.
(Im not very good with php though, but i think i've done okay.)
I see there was some requests for it, so here's how i did it.
Information:
- Auto-fill 'Referral' box if you were referred by the referall link.
- If the referral is edited to a different name, It will over-ride the referal link and use the new name the user entered. E.g, The name is wrong and you want your friend as the Referrer.
- If the name is deleted out of the textbox, the link referrer still gets credit for the referral.
- If user wasn't referrer by link, and fills referral box. Named user will get referral credit.
includes/ucp/ucp_register.php
- If user wasn't referred by link, and leaves box empty. Registration continues as normal.
FINDADD BELOWCode: Select all
'tz' => request_var('tz', (float) $timezone),
...Code: Select all
'referrer' => request_var('referrer', ''),
FINDADD ABOVECode: Select all
// Check and initialize some variables if needed if ($submit)
...Code: Select all
$rid = request_var($config['cookie_name'] . '_referrer_id', '', false, true); if (!empty($rid)) { $sql = 'SELECT username, user_referrals FROM ' . USERS_TABLE . ' WHERE user_id = ' . $rid; $result = $db->sql_query($sql); $row = $db->sql_fetchrow($result); $db->sql_freeresult($result); $referrer = $row['username']; }
FINDADD ABOVECode: Select all
if (!sizeof($error)) { if ($data['new_password'] != $data['password_confirm']) {
...Code: Select all
/*Referrer input Box*/ if ($data['referrer']) { $sql_array_ref = array( 'username' => $data['referrer'], ); $sql = 'SELECT user_id FROM ' . USERS_TABLE . ' WHERE ' . $db->sql_build_array('SELECT', $sql_array_ref); $result = $db->sql_query($sql); $row = $db->sql_fetchrow($result); $db->sql_freeresult($result); if (!$row) { $error[] = $user->lang['NO_REFFERER_WITH_NAME']; } }
FINDREPLACE WITHCode: Select all
// Begin Referral MOD $rid = request_var($config['cookie_name'] . '_referrer_id', '', false, true); if (!empty($rid)) {
...Code: Select all
// Begin Referral MOD if ($referrer || $data['referrer']) { if (!$referrer && $data['referrer'] || ($referrer && $data['referrer']) && ($referrer != $data['referrer'])) { $sql_array = array( 'username' => $data['referrer'], ); $sql = 'SELECT user_id FROM ' . USERS_TABLE . ' WHERE ' . $db->sql_build_array('SELECT', $sql_array); $result = $db->sql_query($sql); $row = $db->sql_fetchrow($result); $db->sql_freeresult($result); $rid = $row['user_id']; }
FINDADD AFTERCode: Select all
'EMAIL_CONFIRM' => $data['email_confirm'],
------------------------Code: Select all
'REFERRER' => $data['referrer'] ? $data['referrer'] : $referrer,
language/en/common.php
FINDADD AFTERCode: Select all
'REFERRALS' => 'Referrals',
-------------------------Code: Select all
'REFERRER' => 'Referrer', 'NO_REFFERER_WITH_NAME' => 'Referral: No user with that username',
styles/NAME(prosilver)/template/ucp_register.html
FINDADD ABOVECode: Select all
<dl> <dt><label for="tz">{L_TIMEZONE}:</label></dt> <dd><select name="tz" id="tz" tabindex="6" class="autowidth">{S_TZ_OPTIONS}</select></dd> </dl>
Code: Select all
<dl> <dt><label for="referrer">{L_REFERRER}:</label></dt> <dd><input type="text" tabindex="5" name="referrer" id="referrer" size="25" maxlength="50" value="{REFERRER}" class="inputbox autowidth" title="{L_REFERRER}" /></dd> </dl> <hr />
The last edit to the template is purely up to you where you put it, My registration form is heavly modded now so the above 'FIND' may not work for you.
I believe thats all the modifications I made, If anyone has any problems, Just say, i may have missed something, I'm pritty tired
-Qwertyip
P.S. Great Mod, Thanks.. Just what i was looking for
Code: Select all
<a href="http://www.erepublik.com/en/referrer/Boolee" target="_blank" > <img src="http://erepublik.com/images/badges/erepublik-badge-125x80.gif"></a>
I don't know why, but sometimes that happens.wooting wrote:when i install it using automod i end up in this
"The MOD requires an external installer to finish installation. Click here to continue to that step."
when i click it it tells me
"Not Found
The requested URL /Array was not found on this server.
Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request."
Code: Select all
your-board-url/referral_mod_install.php
This happens when you email a member or when the forum sends email notifications (new PM, new reply, etc) and that has nothing to do with this MOD.yf_pro wrote:Not really, it sends email using forum admin email on behalf of whatever email you put in the box so technically it uses forum domain email.
Code: Select all
'NO_REFERRALS' => 'You don\'t have any referrals yet.',
’
Code: Select all
$template->assign_vars(array(
'VIEW_STATS' => true,
)
);
Code: Select all
$template->assign_var('VIEW_STATS', true);
Code: Select all
WHERE username="' . $search_referrer . '" AND user_referrals >=1 ORDER BY user_referrals DESC';
Code: Select all
WHERE user_type IN (' . USER_NORMAL . ', ' . USER_FOUNDER . ') AND user_referrals >=1 ORDER BY user_referrals DESC';
Code: Select all
WHERE ' . $db->sql_in_set('user_type', array(USER_NORMAL, USER_FOUNDER)). ' AND user_referrals >=1 ORDER BY user_referrals DESC';
Code: Select all
WHERE referrer_id=' . $rid;
(int)
Code: Select all
$subject = utf8_normalize_nfc(request_var('subject',''));
$message = utf8_normalize_nfc(request_var('message',''));
Code: Select all
$template->assign_vars(array(
'FORM_ERROR' => true,
));