News:

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

Main Menu

BETA: Referrals Mod

Started by karlbenson, May 29, 2007, 10:09:38 PM

Previous topic - Next topic

karlbenson

Edit: This modification has now been approved
See http://www.simplemachines.org/community/index.php?topic=184291.0

nitins60

Wow! I never seen this post! It's amazing! Referral mod will be the SMF top 1 mod. I don't know, how many times it's requested by many users, even few SMF staff. But no one did it.


I would like to ask few questions, what do you mean by tracking by cookies. Remember, many ppl definatly clear thier cookies after thier browsing time. Instead of referredby=587, make it referredid=id of the user (since it's unique).

I think, you can get great help from other developers to fix bugs/help

SlammedDime

Quote from: nitins60 on May 29, 2007, 11:53:53 PM
Wow! I never seen this post! It's amazing! Referral mod will be the SMF top 1 mod. I don't know, how many times it's requested by many users, even few SMF staff. But no one did it.


I would like to ask few questions, what do you mean by tracking by cookies. Remember, many ppl definatly clear thier cookies after thier browsing time. Instead of referredby=587, make it referredid=id of the user (since it's unique).

I think, you can get great help from other developers to fix bugs/help
Tracking by cookies is just as it implies.  A cookie is set when a user visits the site through a referral link that dicates who the user was that referred the person.  As for the 'id of the user'... thats what '587' in your example is, the user id, not the username.

This looks like a nice mod.  When I have some free time this week, I'll poke around at it.
SlammedDime
Former Lead Customizer
BitBucket Projects
GeekStorage.com Hosting
                      My Mods
SimpleSEF
Ajax Quick Reply
Sitemap
more...
                     

RIPPeterBrock

please tell me what smf version this is for? im using Powered by SMF 1.1.2

karlbenson

RIPPeterBrock: 1.1.2 is what I've made and tested it on. (it may work on 1.1.1 or other versions aswell)

Matt @ ARTcom is correct.  When some one users the referral link, a cookie is placed on their computer.
It is set to expire in 60 days.
If the user clears their cookies, then obviously it won't be there that long.

The referredby is their referring users ID and not realName or memberName.

RIPPeterBrock

Will install now on my theme and tell you how it goes, it is not the default theme, but it does use some of the default index boards.

RIPPeterBrock

Okay, i upload it and it says this:

---------------------

Error in Package Installation
At least one error was encountered during a test installation of this package. It is strongly recommended that you do not continue with installation unless you know what you are doing, and have made a backup very recently. This error may be caused by a conflict between the package you're trying to install and another package you have already installed, an error in the package, a package which requires another package that you don't have installed yet, or a package designed for another version of SMF.

-------------------

1.     Execute Modification     install.xml     Modification parse error
2.    Execute Modification    -    Modification parse error

karlbenson

what modifications have you got installed?

At the moment I've only tested this mod on clean (no mods, fresh 1.1.2) installation.

RIPPeterBrock

SMF Shoutbox
SMFShop
YouTube BBC Tag (XHTML Compliant)
SMFPets
Xbox Live Gamer Tag
VisualWarning
Custom Profile Field Mod
War(c)hild:IMDB_Tag4Smf
Referrals
Users Online Today Mod

-----------------------------------------

And one or two tiny little shop mod items.

karlbenson

After some research on here, that type of error is todo with server configuration and permissions.
Something preventing the files being extracted from the mod file.

One suggested installing the "no temp directory removal mod"
http://custom.simplemachines.org/mods/index.php?mod=724

RIPPeterBrock

hmm, so i just install this mod and your one should then install?

Edit: Hmm getting the same error, "cries"

RIPPeterBrock

somebody posted this about the G2 GALLERY MOD:

If you're planning to use it in "bridged mode" (where users are redirected to the external gallery instead of having the gallery embedded in SMF), then you should install it in a sub-directory of SMF or the Image Chooser script won't work (it doesn't support a standalone G2 installation being on a separate subdomain). Otherwise you can install it wherever you want as long as it's on the same server and can be accessed by SMF.

The "Modification Parse Error" thing is a bug with PHP 5.2 and is something related to the size of the modification file (we haven't figured it out completely yet). You will need to install it manually (see the "help.txt" file that's included with the package, or http://docs.simplemachines.org/index.php?topic=402) if it won't install through the package manager. Someone has made a PHP 5.2 compatible package, but it is only for the regular version and not the "no-bridge" version. Beta 3.1 of the bridge (which should hopefully be released next week - I just haven't had time to test it) will split the modification into two separate files, which will allow it to install on PHP 5.2.

Hope this helps.

-----------------------------------------

Only problem is, i ain't the best, i don't know how to install this mod manually

RIPPeterBrock

ok i found out why it's doing it, it's to do with PHP5 and PHP4, it's some code you got in a XML file or something which is why most / all of us that are on php5 will not be able to use your mod until you have fixed the code or something along those lines they say.

karlbenson

#13
I'll have a search.

I've actually developed this mod while running php 5.2.2 (with xampplite)

but also tested this on my server running php 4.3

When you installed the  "no temp directory removal mod"
http://custom.simplemachines.org/mods/index.php?mod=724 did you create a 'temp' folder in packages beforehand with permissions set to 777?

Have you got any errors in your error log? (Please copy and paste if you have)

Is Safe Mod Off?

From your phpinfo, whether zlib is installed (What is phpinfo.php?)
[/quote]

SlammedDime

I tested installing this on a virgin 1.1.2 install with PHP 5.2.2 and it worked without error, fyi. ;)
SlammedDime
Former Lead Customizer
BitBucket Projects
GeekStorage.com Hosting
                      My Mods
SimpleSEF
Ajax Quick Reply
Sitemap
more...
                     

SlammedDime

Let me recommend something about your install script.... there is no need to do "<file name="$sourcedir/Load.php">" for every modification to a file... if you have 20 modification for Load.php, put them ALL inside one <file> tag, don't put each one in its own...  ie:

<file = load>
<operation></operation>
<operation></operation>
<operation></operation>
<operation></operation>
<operation></operation>
</file>

not

<file = load>
<operation></operation>
</file>

<file = load>
<operation></operation>
</file>

<file = load>
<operation></operation>
</file>

<file = load>
<operation></operation>
</file>
SlammedDime
Former Lead Customizer
BitBucket Projects
GeekStorage.com Hosting
                      My Mods
SimpleSEF
Ajax Quick Reply
Sitemap
more...
                     

~Unkn0wn~

WOrks on the latest SMF? Fully work? When do the test ends?

karlbenson

Matt: re the files, lol . Yes I do know that. (per most my other mods)

I only do it for BETAs where theres tonnes of modifications to the same file.
If theres a file on the install, i can quickly work out which modification/change within that file is at fault.
(the same for any problems you may encounter with it working for other mods or if you have to manually install, you can see which ones didnt fail.)

Once it gets out of beta, I'll merge the file entries. But for now, it makes absolutely no difference to the install. (although it might look a bit weird)

SlammedDime

SlammedDime
Former Lead Customizer
BitBucket Projects
GeekStorage.com Hosting
                      My Mods
SimpleSEF
Ajax Quick Reply
Sitemap
more...
                     

karlbenson

The first readme that i did for this file, actually stated that I had done it and the reasons why.

Advertisement: