News:

Wondering if this will always be free?  See why free is better.

Main Menu

Referral System

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

Previous topic - Next topic

Netizen98

#380
I think I have discovered a cause that makes referral mod behave abnormally  ;) I was preparing a test forum to send you the link, however this time I did not have "~" in the path name. And I am not able to make the referrals mod fail! I guess the problem was using "~" in the pathname like "website.com/~test/forum". Can you confirm on your side? Also, do you see any reason why this would make the mod not to work as it is supposed to? My guess is that either referrals or some other mod is not able to handle the "~" in path name & makes changes in code that takes referrals mod in LALA land. But once that happens only way to restore referrals mod is re-installing SMF all over again. Does "~" have a special meaning in php/SMF/mods?

Fustrate

the tilde shouldn't have anything to do with it, and has no special meaning that I know of. The little search box has no permission checks in it, so I have no clue what could have caused it. Is everything good now?
Steven Hoffman
Former Team Member, 2009-2012

Netizen98

If the cause is not '~' then I am afraid that it might happen again. Could the flash banner I am trying use in place of logo_url be the cause of it? Or is it possible that referrals mod does not like some of the customization done in index.template or boardindex.template. Anyhow I will try out few more things and report back if I find something useful in a few days.

Fustrate

There's absolutely nothing that could cause it to do that. There aren't any permission checks in the code that would require a login box to be shown.

So does it show after you search a few times within the same popup box, or after a few consecutive visits? Can you tell me exactly how it happens?
Steven Hoffman
Former Team Member, 2009-2012

akguide

#384
Re:      Referrals Mod
« Reply #108 on: July 14, 2008, 10:19:55 PM »  On page 6 of this topic and having to do with selecting referrer's code by clicking on button in profile.   I read through this topic and could not determine if this worked?   If it did, great as  that is the only apparent issue  I am having, so if it does work my dumb question of the hour is where do I find "script.js:"  so I can make those edits?  Of course that might just be my problem, the script.js  but hey if you don't know one has to ask .. thanks :)

Thanks in advance and as always thank you for your time and this otherwise great addition to SMF.

AKGuide

Found script.js  now on the profile it says select next to the information one needs but it does not select the text after clicking but hey now they know what to do right?..lol    If you get the time and want to look at what files  let me know I'll find and post them.

AKGuide





Netizen98

When it does happen it happens immediately (not after a few searches). I am not still sure if its interaction with other mods combined with ~ in the path name was causing it. Unfortunately at this moment I can not spend a lot of time specifically tracking it. However as & when I have more data I will post it here for you.  I think it is a great mod to have. Thanks for the effort.

Sudhakar Arjunan

Hi yoda,

I have two queries to discuss with ,

Have one issue as discussed with you earlier - http://www.simplemachines.org/community/index.php?topic=226191.msg1869613#msg1869613

New issue - Our forum users started complaining about there referrals issue.

They said without referring anyone, it shows they have referred many new users.

Say an example, a new comer on the site who has not even activated their account. to him it shows there is two referral for him.

When we click on the referral drop down, it does not show any name and its empty.
Working on New Mods & Themes for SMF... Will update soon... My Blog page
My Smf forum : Discuss ITAcumens :: My SMF Forum

Fustrate

#387
You're the second person to have this issue... I'm still trying to figure it out myself...

okay, either of you, try this. Find in /Sources/Register.php
trackStats(array('referrals' => '+'));

and add this AFTER it:

$time = date('g:i:s A \o\n F jS, Y', time()-7200);
$somecontent = "\n" . $time . (strlen($time) < 32 ? "\t\t" : "\t") .  $_SERVER['REMOTE_ADDR'] . " was reffered by #" . referrer;
$filename = './log.php';

if(is_writable($filename)){
if(!$handle = fopen($filename, 'a'))
$dev = null;
if(fwrite($handle, $somecontent) === FALSE)
$dev = null;
fclose($handle);
$dev = null;
} else {
$dev = null;
}


and create a file name log.php in your /Sources/ folder, CHMOD'd to 0777

let's see if it's merely being executed multiple times for some reason...
Steven Hoffman
Former Team Member, 2009-2012

Sudhakar Arjunan

Quote from: YodaOfDarkness on January 16, 2009, 06:25:43 AM
You're the second person to have this issue... I'm still trying to figure it out myself...

I remember in the previous pages, after releasing the mod. You are help someone to clear this issue manually just because there are only less no of members in it.

But i do have 7500 Members on my board.

Now what could i do, even i have tried to recount all my post and stats through my maintenance . but that never helped me out.
Working on New Mods & Themes for SMF... Will update soon... My Blog page
My Smf forum : Discuss ITAcumens :: My SMF Forum

Fustrate

I edited my prior post with instructions to test something... and does the total number of referrals in the stats page go up wildly too?
Steven Hoffman
Former Team Member, 2009-2012

Sudhakar Arjunan

Quote from: YodaOfDarkness on January 16, 2009, 06:25:43 AM

and create a file name log.php in your /Sources/ folder, CHMOD'd to 0777

let's see if it's merely being executed multiple times for some reason...

I did all the edits, have did one registration, i have given admin as referral.

Then come to stats and checked , it has been increase to me as count 1 and one more user who reported me say userid - 1563 got 1 referral added but its not showing anything on the drop down box near referral.

Details about my forum i have send a personal message to you.
Working on New Mods & Themes for SMF... Will update soon... My Blog page
My Smf forum : Discuss ITAcumens :: My SMF Forum

Sudhakar Arjunan

I got these errors after adding the edit you have given,

http://sitename.com/index.php?action=register2
Apply Filter: Only show the errors with the same message
8: Use of undefined constant referrer - assumed 'referrer'
Apply Filter: Only show the errors from this file
File: /home/sitename/public_html/forumfolder/Sources/Register.php
Line: 519
Working on New Mods & Themes for SMF... Will update soon... My Blog page
My Smf forum : Discuss ITAcumens :: My SMF Forum

KahneFan

@A.SK - run the following in SQL...

Quote from: YodaOfDarkness on January 06, 2009, 01:34:41 PM
UPDATE smf_members
SET referrals_no = 0
WHERE 1=1

Then place the attached referrals.php in your root folder and do the following...

Quote from: YodaOfDarkness on January 05, 2009, 10:17:48 PM
This one will be run twice - the first time, just go to /referrals.php, but the second time go to /referrals.php?do

the ?do part will actually do the updates, if the numbers shown the first time are correct.

It will fix it momentarily, but it WILL give you the bad stats after your next registration (from what I can tell that's the trigger).
#eric_on_twit| (video) Creating Themes for SMF | Reset Your Forum
NOTE: No PM's for support please.

Sudhakar Arjunan

Quote from: KahneFan on January 16, 2009, 10:48:26 AM
@A.SK - run the following in SQL...


I am moving now , tomorrow morning sure i will do it.

Thanks  a lot for it.
Working on New Mods & Themes for SMF... Will update soon... My Blog page
My Smf forum : Discuss ITAcumens :: My SMF Forum

Fustrate

Quote from: KahneFan on January 16, 2009, 10:48:26 AM
@A.SK - run the following in SQL...

Quote from: YodaOfDarkness on January 06, 2009, 01:34:41 PM
UPDATE smf_members
SET referrals_no = 0
WHERE 1=1

Then place the attached referrals.php in your root folder and do the following...

Quote from: YodaOfDarkness on January 05, 2009, 10:17:48 PM
This one will be run twice - the first time, just go to /referrals.php, but the second time go to /referrals.php?do

the ?do part will actually do the updates, if the numbers shown the first time are correct.

It will fix it momentarily, but it WILL give you the bad stats after your next registration (from what I can tell that's the trigger).
Ya, but I need to find the root of the problem... I wrote that as a temporary fix, but I can't expect you to run that file every day.

Can either of you message me on AIM? There's something I'd like to try, but it has to be a quick thing or nobody will be able to register.
Steven Hoffman
Former Team Member, 2009-2012

KahneFan

I've added AIM, and I think I've added you. I'm on a different times, try to catch me sometime. Username: KahneFan2009
#eric_on_twit| (video) Creating Themes for SMF | Reset Your Forum
NOTE: No PM's for support please.

Sudhakar Arjunan

Quote from: KahneFan on January 16, 2009, 05:39:32 PM
I've added AIM, and I think I've added you. I'm on a different times, try to catch me sometime. Username: KahneFan2009

I have added you from my gmail account.

Today the hole day, my sql server was offline.

So the hole day i spent fixing the issues.

Now am going to start, tomorrow i will catch you. Thank you.
Working on New Mods & Themes for SMF... Will update soon... My Blog page
My Smf forum : Discuss ITAcumens :: My SMF Forum

question

what the referrals_copytoclipboard.swf file used for

i am a bit afraid of putting a falsh file on my root directory

no offense to the developer ,

but is there a way we can verify what the swf file exactly do
in other words , is there a way to dissect it so we can determine it's function
or at least test it ?
website :)

Fustrate

that's the swf karlbenson put in so that you could copy the code to your clipboard... I'm thinking of removing it, not everything needs to be so automatic...

unfortunately, I do not have the pre-compiled version.
Steven Hoffman
Former Team Member, 2009-2012

Sudhakar Arjunan

Thanks for all you helped me to bug this out.

But i have been forced to remove this excellent mod, since it shows wrong referral count to many new registered also.

The new registered member got all the referrals for the following registration on the site.
Working on New Mods & Themes for SMF... Will update soon... My Blog page
My Smf forum : Discuss ITAcumens :: My SMF Forum

Advertisement: