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

General_Naga

Here you go.

Thanks for looking into it.

Fustrate

Has anyone been referred yet? I need to also take a look at Stats.php to see if anything is wrong in there, the template file looks fine as it is. I'm just worried that there isn't a total for each year... and that would get set in the source file.
Steven Hoffman
Former Team Member, 2009-2012

General_Naga

#242
 :D No-one has been referred yet, as I wanted to get it fixed before pointing it out to the membership. I'll make a test referrer though to see what happens.

Stats.php Attached.

Thanks once again for looking into this Yoda

Fustrate

Steven Hoffman
Former Team Member, 2009-2012

General_Naga

No joy I'm afraid. Using that Stats.php results in the stats page being a blank white page.

Fustrate

Any errors in the error log? I'll check again to make sure I didn't miss anything, but I have 20 more minutes here at work and then I'll be able to get home ;)
Steven Hoffman
Former Team Member, 2009-2012

General_Naga

#246
Short answer yes there are there's 32901 this week. I really need to work out what
Quote/Themes/default/GenericMenu.template.php (body_below sub template - eval?)
means!

EDIT:

I owe you an apology Yoda. I just tried your file for a second time after clearing the log and it worked beautifully! I have no idea what I did last time. Must have had a corrupted upload to the FTP or something.

Thanks for all the help you've given.

Fustrate

No problem, thanks for finding that error!
Steven Hoffman
Former Team Member, 2009-2012

Darkness_

Yoda will it take much time, when could you help out?

humantaperecorder

Hi there YodaOfDarkness

I'm sorry for this elementary question because, from the comments in this thread, I can see you're busy (on other mods).

My question:

I can't seem to install the latest version of the Referrals Mod. I'm a relative newbie to SMF and not a coder so I think I might be making a really simple mistake. I'll explain what I've done:

I went to the mod page and downloaded the referrals_2-0.tar.gz file.

I then went into my Package Manager and selected Download Packages and browsed to where it was on my machine. I just uploaded it as-is (i.e. as a "tar.gz" file)... Is that correct? Should I have unpacked it first?

The Package Manager told me it had uploaded. I clicked on Apply Mod...

...and got the following error:

The package you are trying to download or install is either corrupt or not compatible with this version of SMF.

I just updated my SMF to 1.1.6

I tried downloading the file again, deleting the mod, and attempting to reinstall in the same fashion. Same error.

Not sure what I'm doing wrong.

Can anyone help this not very techy noob?   :(

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

So, I went back and downloaded the referrals_1-1.tar.gz file, deleted the other one and installed this one.

It worked, although it showed me the list in the jpg attached. I can see that some of the files it has skipped are language files, but I dont' know if it should have just not given me any message at all for the three at the bottom... ???

Anyway, I guess it works, but why wouldn't the latest version install? I've put this on a test installation site and I'd obviously like the most up-to-date version if I can for my real site. If not, no problem, i'll use the v1-1.

Any thoughts?

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

Also, I set up a few dummy users and clicked on their referral links but it doesn't seem to have added the Stats function

As is shown here

Or the referrer link under the avatar:

Like in this pic

It did, however, show this one:

Referrer's name and date of referral


It's also not showing up the text, numbers or dropdown menu in the bottom half of this pic:

Stats for each person.

It's just showing the link to copy. But not the little [copy] link.

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

Wow... a much longer post than i'd anticipated and way too many questions, methinks!

But if anyone has a few moments and can help out, that would be terrific.

I'd really, really appreciate it!

Thanks!  :D

Fustrate

Are you using a custom theme, or one other than the default? 99.9% of the time that's the problem :)

http://custom.simplemachines.org/mods/index.php?action=parse;mod=1114;attach=66634;smf_version=1.1.6
You can manually do the theme edits shown on that page for the following files:
Display.template.php
Profile.template.php
Stats.template.php
which shouldn't take too much time, if you pay close attention. The files that were skipped during installation don't matter, and the last three items always work as they should.
Steven Hoffman
Former Team Member, 2009-2012

humantaperecorder

Dude, do you ever sleep?  :P I mean I only posted that, like, 10 minutes ago!

Thanks for the link. I went there and had a skim... I'm not afraid to mod templates. I just don't know what I should be doing in this case or why.

In answer to your question re: Themes... yes, I'm using the Alak theme.

Question: Should I do the following?

1. Make a copy of these three files as they currently are

Display.template.php
Profile.template.php
Stats.template.php

(Just FTP them back to my desktop from where they are. Actually, come to think of it... where are they? Where will I find these files in the first place?)


2.  Follow the instructions regarding "Find" and "Add" for each of those files (on the page you linked to above).

Can I just do this using the FileManager in my cPanel?


3.  Save and hope it works.  ;D


Or is it more complicated?

Fustrate

Nope, sleep is boring.

Anyways, the files will be in something like /Themes/alak/ which will contain those three files (and more).

Due to the way mod packages are parsed in the 1.1.x series, theme changes only get made to the default theme and nothing else. It's been improved to change all themes in 2.0, and even then it doesn't always work.

Oh, and 1-1 is the latest version for SMF 1.1.x, the 2-0 file is the newer version for the SMF 2.0 betas :)
Steven Hoffman
Former Team Member, 2009-2012

humantaperecorder

Thanks very much. I wasn't sure if I should be modding the Alak templates or the Default ones. Thanks for clearing that up.

Re: sleep... LOL! After my first few years at university I came up with the motto "Sleep is over-rated!" which has kept burning the midnight oil ever since. It's like university never stopped.  ;D

Thanks again. I'll see how I go.

Also, that thing about 1-1 and 2-0 is not clear. Perhaps you should make a note of that on the Mod's download page because it defaults you to download the 2-0 version, which I guess everyone (like me) just assumes is the most up-to-date version.

Best,
HTR

Fustrate

Ya, I'll probably just rename the files to referrals_smf1-1.tar.gz and referrals_smf2-0.tar.gz, I'd guess that that would be easier to catch.

Mkay, I'm gonna go be bored... g'night!
Steven Hoffman
Former Team Member, 2009-2012

humantaperecorder

Heya, YodaOfDarkness

I looked in the Alak theme's folder and could only find the

Display.template.php

Neither of the other two.

Profile.template.php
Stats.template.php

Fustrate

I admit it. I'm still awake.

Okay, make the changes to Display.template.php, and then make sure those three files did get edited in the /Themes/default/ folder.
Steven Hoffman
Former Team Member, 2009-2012

humantaperecorder

Heya!  ;)

In the default theme folder, there are "two" copies of the three files:

Display.template.php
Display.template.php~
Profile.template.php
Profile.template.php~
Stats.template.php
Stats.template.php~

Does this mean they've been modified? (Coz I have no idea what that tilda represents!)

Cheers.

P.S. Still hunting down that line of code in the Display.template.php file in the Alak theme's directory... slippery little buggers, eh?

humantaperecorder

Okay, got it!


// Show how many posts they have made.
                                 echo '
                                                    <li class="posts">', $txt[26], ': ', $message['member']['posts'], '</li>';



Should I change it so that it reads like this:


// Show how many posts they have made.
                                 echo '
                                                    <li class="posts">', $txt[26], ': ', $message['member']['posts'], '<br />
', $txt['referrals_referrals'].' '.$message['member']['referrals_no'].'<br /></li>';


Not sure about those line breaks in there, to be honest...
The first one isn't in the Alak template (but it appears in the page the modification appears on (above)... and so I'm not sure whether I should put the second one in, then, either...


Cheers!

Fustrate

well, try it out and see if it works. If not, just remove some linebreaks.
Steven Hoffman
Former Team Member, 2009-2012

Advertisement: