Referrals Mod

Started by karlbenson, July 23, 2007, 07:04:38 PM

Previous topic - Next topic

Lanthan

Thanks karlbenson,

But I have another strange behavior (nothing seriously) found...
If you open the daily stats the first time... all I see is the value NULL for the days. After a Refresh of the page all is okay.
Can someone reproduce this?

Best regards
Lanthan

PS If I find a solution I will post it here..

karlbenson

@Lanthan
Its the only other bug that I know about.
Its todo with the xml not getting the value.

When its queries in php it works.

At this moment, I'm sure whats causing it. And was going to take a look after I finish the adrevenuesharing mod which I'm re-writing.

Lanthan

Hi karlbenson,
thanks for the tip with the xml...

I have looked at the code and here is the fix:
Themes/default/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'] . '"', ' />';


and change to:

<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'] . '"', ' />';


Best Regards
Lanthan

Lanthan

Hi its me again,
I have found another thing..

Your additions in the member table are not complete..
install.php

$newcolumns['referredon'] = "int(10) NOT NULL";


should be better

$newcolumns['referredon'] = "int(10) NOT NULL default '0'";


otherwise a restore is not possible.

Best Regards
Lanthan

Pranav

#24
I'll be installing it once i come back from school on my Dilber MC theme.Let's see what happens. :)
Gives me this error while installing :

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

shaka

Quote from: ulgaming.net on August 03, 2007, 08:45:29 PM
I'll be installing it once i come back from school on my Dilber MC theme.Let's see what happens. :)
Gives me this error while installing :

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

getting the same error

nitins60

First of all, Dilber MC theme doesn't have it's own Display.template, m using it n my forum perfectly with many typical mods. It uses Default SMF themes one. You might have installed Custom Profile Mod? Otherwise list the mods which you installed

Pranav

Quote from: nitins60 on August 04, 2007, 09:57:50 PM
First of all, Dilber MC theme doesn't have it's own Display.template, m using it n my forum perfectly with many typical mods. It uses Default SMF themes one. You might have installed Custom Profile Mod? Otherwise list the mods which you installed
So this works with Dilber MC? I have installed that only..So i should try installing on it.

Pranav

Ok..i installed it on Dilber MC and it worked too! But i get this error in my error log :

Quote8: Undefined index: referredby
File: /home/******/public_html/Sources/Register.php
Line: 335

karlbenson

#29
Ok everyone,

Just uploaded v1.3

Fixed all current known bugs.  See version log for list of fixes.

During the process of bug fixing I've discovered the stats have been screwed up and counting a referral every time a user registers.  Therefore to get the stats working fully I'm recommending users uninstall/reinstall to fix all the bugs.

Enjoy!


By request I've also put the referral link in a new input box for easy copy and paste.

See

asdas2

ok budddy here u

smf version 1.1.3
theme Dilber MC

ERROR




Install Actions
Installations actions for "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 successful
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 failed
7. Execute Modification ./Themes/default/xml.template.php File not found

8. Execute Modification ./Themes/default/Stats.template.php Test successful
9. Execute Modification ./Themes/default/Stats.template.php Test successful
10. Execute Modification ./Themes/default/Profile.template.php Test successful
11. Execute Modification ./Themes/default/languages/Modifications.english.php Test successful
12. Execute Code install.php 
www.chillparadise.com

for all desi people .... get everything u ever wanted.... log in to view hidden stuff.

karlbenson

Sorry.  xml should have been Xml.

I've reuploaded to to fix that one.

On the Display.template.php there is obviously a problem with that modification.  You'll have to do it manually.

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


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

// show how many referrals they have made
echo $txt['referrals_referrals'].' '.$message['member']['referralsno'].'</br></br>';

Pranav

How can i upgrade my current version??

Lanthan

You have to remove the mod, and then reinstall it. All entries in the db will remain.

Lanthan

Pranav


karlbenson

Thats good news.

Obviously on the Display.template.php Dilber does something differently or it was affected by another installed mod.

LostProphecy

Hi, i just installed this mod and i love it and think it's going to be really useful...

just wondering one small thing...

is there anyway of me manually going backward and giving referral points to members that referred people one month or even one year ago?

would i just need to go into the database and manually add rows of info and that sort of thing or would it just plain not work?
Angelus Ex Quo Nox

karlbenson

Well you could alter the database manually.  It would probably be alot of hassle.  Altering the user_id of the referrer, the date when referred and increasing the referrers people who have registered by 1 each time.

Although how would you know who referred who? (until my mod came along, there is no record)

LostProphecy

i think i'll do just that thank you :)

i've done heaps of database mods before so it shouldn't be that hard for me...

as for the record, previously we had a member bonus scheme giving members points for joining up others so i have a history thread of who brought whoever along, it's a spoken history but it's enough
Angelus Ex Quo Nox

askepott

hey, how's the mod going? I'm thinking of adding this to my forum, I'm sure this will help me to advertise my forum :P

Advertisement: