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

Adish - (F.L.A.M.E.R)

hey is it possible to have a page in admin panel where it gives the list of all the refferes ?? Just referrers and the numbers.. and it can be edited up ..??

Adish - (F.L.A.M.E.R)

The code might have worked but as i click on register this is what it appears.. I guess some code error...

Template Parse Error!
It seems something has gone sour on the forum with the template system. This problem should only be temporary, so please come back later and try again. If you continue to see this message, please contact the administrator.

You can also try refreshing this page.

Fustrate

Replace what I told you to put in before with
if(!empty($context['referrals']['referred_by_name'])
echo '
<tr>
<td width="40%"><b>', $txt['referrals_who'] ,'</b>
<div class="smalltext">', $txt['referrals_who_description'], '</div></td>
<td>
<input name="referredby" id="referredby" type="text" size="30" value="', $context['referrals']['referred_by_name'], '" readonly="readonly" /><br />
<span id="referredon" class="smalltext">', $txt['referrals_on'], ' ', $context['referrals']['referred_date'], '</span>
</td>
</tr>';

else
echo '
<tr>
<td width="40%"><b>', $txt['referrals_who'] ,'</b>
<div class="smalltext">', $txt['referrals_who_description'], '</div></td>
<td>
<input name="referredby" id="referredby" type="text" size="30" value="" />
<a href="', $scripturl, '?action=findmember;input=referredby;sesc=', $context['session_id'], '" onclick="document.getElementById(\'referredby\').value=\'\';document.getElementById(\'referredon\').innerHTML =\'&nbsp;\';return reqWin(this.href, 350, 400);"><img src="', $settings['images_url'], '/icons/assist.gif" border="0" alt="', $txt['referrals_findreferrer'] ,'" /> ', $txt['referrals_findreferrer'], '</a>
</td>
</tr>';


Steven Hoffman
Former Team Member, 2009-2012

Adish - (F.L.A.M.E.R)

Still the same error...

Adish - (F.L.A.M.E.R)

Hmm just a prob I noticed...
check out the attachment...


Acorrding to the referel link it should show up nothing but it shows that user by default..

Dunno how it happened but just happened...

Fustrate

Can you attach your Register.template.php to a post so I can see the whole thing?
Steven Hoffman
Former Team Member, 2009-2012

Adish - (F.L.A.M.E.R)


Fustrate

err, you never did the last thing I said

attached is the fixed file
Steven Hoffman
Former Team Member, 2009-2012

Adish - (F.L.A.M.E.R)

still the same thing.. :( it says the same again and again....  :'( :'( :'( :'(

Fustrate

Steven Hoffman
Former Team Member, 2009-2012

Adish - (F.L.A.M.E.R)

ok finally worked bu the problem in the image still remains.. :(:(

Fustrate

it's saved in a cookie after you go to the link at all. just trust that it works as it should.
Steven Hoffman
Former Team Member, 2009-2012

Adish - (F.L.A.M.E.R)

oo ..phew... thats kwl now... that was gr8 work and help from you... thanks a million...!! hope i dont get anything else :D

Adish - (F.L.A.M.E.R)

and yep it had saved a cookie... worked well.. i cleared cookies and got it all right..  ;) ;) ;)

fext

How would
Quote from: YodaOfDarkness on July 26, 2008, 07:04:45 PM
it's saved in a cookie after you go to the link at all. just trust that it works as it should.

Hi Yoda,

Great mod!

I have a couple of questions regarding the mod.

1. I tried to apply the register.template file and uploaded to default theme folder but my DarkBreak theme does not reflect the change - do i need to alter something in the custom theme?

2. Earlier in this thread there was a reference with how to show referrals on member list - i tried the edits and instead of it showing referrals (there are none at the moment) the Referrals part took the values from the Topics values but only showed the graph of the topics e.g.

BEFORE mod:

Topics:
345        | GRAPH HERE

AFTER MOD:

Referrals | Topics
345        | GRAPH HERE

3. I have an issue with finding members when testing the 'find member' link - would there be a way for it to have a dropdown and show a dynamic list of all the members or is there another way of doing this - i have a guest page view mod so guest can only see the site 10 times before it tells you to login or register - problem being when a popup is show while searching for members they count as page views - now if your searching thru say 50 members and only 5 display per page in the popup... well you get what i am saying :P

Would there be an easier way for new registrants to get  member details?

On the site when sending a message when you type in a member name it suto fills the text field with suggested member names and narrows the name down the more characters you enter - why does this not work on the referrals mod?

4. Would there be a way for me to input into member profiles referrals they made prior to the mod as i was keeping track via the 'Custom Profile Fields' mod so i still have a list of who got what members on the site - could i somehow input these details into the referrals mod?

Sorry for so many questions but those are some issues i am having - otherwise a fantastic mod :)

roguehosting

I installed refferals mod 2.0.1 on smf 1.1.5 and last step was hxxp:install.php.it [nonactive] says it may not run,which showed to be true.
So instead that it is offered query tables,but how do i add that?I tryed using phpmyadmin sql query function but it reports hxxp:errors.how [nonactive] do i import those tables?Now beacuse of that profile report missing mysql query.

Fustrate

#156
Sorry it took so long to reply... life kinda got in the way =\

roguehosting, execute these queries in phpMyAdmin:
ALTER TABLE smf_members ADD COLUMN referrals_no mediumint(8) NOT NULL default '0'
ALTER TABLE smf_members ADD COLUMN referrals_hits mediumint(10) NOT NULL default '0'
ALTER TABLE smf_members ADD COLUMN referred_by mediumint(8) NOT NULL default '0'
ALTER TABLE smf_members ADD COLUMN referred_on int(10) NOT NULL default '0'
ALTER TABLE smf_log_activity ADD COLUMN referrals smallint(5) NOT NULL default '0'

(one line per query, five total - replace smf_ with your $db_prefix if you changed from the default)

Youngie:

1. If your DarkBreak theme has it's own Register.template.php then you'll have to manually do the edits to that theme too.

2. I'm guessing you forgot to change the numbers that were mentioned at the end of the post.

3. It would probably be easiest if you asked the Page View mod author if there is a way to exclude certain pages from being counted... I'll go look through the old thread for this mod though, because I did in fact write some code that would put in a dropdown box. Best to check with that mod author though ;)

The auto-fill on this site is part of SMF 2.0 and is already implemented in the 2.0 version of this mod... but I don't believe it's in the 1.1.x line.

4. To add those in, you'd have to do it manually through queries in phpMyAdmin. I'll look into writing a script that you can use to make it faster, though...
Steven Hoffman
Former Team Member, 2009-2012

Kylezz

Can somebody post pictures, and what version of smf is this for? 1.1.5?
Why do i post alot? I am not a leecher.

Fustrate

Pictures are on the right side of this page:
http://custom.simplemachines.org/mods/index.php?mod=1114

and it's currently for 1.1.4/5 and the 2.0 version is done, but will be released shortly after 2.0 Beta 4
Steven Hoffman
Former Team Member, 2009-2012

fext

Quote from: YodaOfDarkness on August 04, 2008, 08:47:00 PM
Sorry it took so long to reply... life kinda got in the way =\

Youngie:

1. If your DarkBreak theme has it's own Register.template.php then you'll have to manually do the edits to that theme too.

2. I'm guessing you forgot to change the numbers that were mentioned at the end of the post.

3. It would probably be easiest if you asked the Page View mod author if there is a way to exclude certain pages from being counted... I'll go look through the old thread for this mod though, because I did in fact write some code that would put in a dropdown box. Best to check with that mod author though ;)

The auto-fill on this site is part of SMF 2.0 and is already implemented in the 2.0 version of this mod... but I don't believe it's in the 1.1.x line.

4. To add those in, you'd have to do it manually through queries in phpMyAdmin. I'll look into writing a script that you can use to make it faster, though...

Hi Yoda,

Thanks for the fast respones :)

1. There is no Register.Template.php for my theme
2. I did not notice those numbers BUT there was no 'Memberlist.template.php' for my theme - i made edits to the one for the default theme and it seemed to work ok - it did not have numbers for the function within though.
3. The guy that made the page views mod does not accept PMs regarding his MODs - i will have to ask in the support thread - i have enquired about the PM issue - i would really like to be able to style the Popup windows myself but i would prefer another way of displaying help other than popups :P

I would love it if you could shed some light on the dropdown idea though :)

4. I was thinking the same but not via queries - i was going to do it manually lol - bit laborious.

Thanks for your help bro.

Advertisement: