Welcome, Guest. Please Login or Register.
April 27, 2025, 12:02:38 AM
Home Help Search Log in Register
News: If you are still using YaBB SE, please consider upgrading to SMF as soon as possible.

YaBB SE Community  |  Development  |  Completed mods  |  [Beta 1.3.+][Code]Referalls « previous next »
Pages: 1 [2] Reply Ignore Print
Author Topic: [Beta 1.3.+][Code]Referalls  (Read 4494 times)
Flash
Noobie
*
Posts: 48


Spass muss sein, sprach Wallenstein

ICQ - 72223934 WWW
Re:[Code]Referalls
« Reply #15 on: June 22, 2002, 01:41:24 PM »
Reply with quote

GREAT MOD

so i translated it for working with SE 1.4
Here`s the code:

<id>
User Referall Mod
</id>

<version>
0.11
</version>

<mod info>
If you a user refers someone to the board the referer will get a referall point.  The referall points don't do anything but i'm sure
you could hold contest or something with them.

Features:
-A link in your profile which you can refer users with
-Displays referalls in members profiles
-Referall points goes up when someone has you as a refer

Hopefully in other releases:
-Turn off/on in admin
-Users cannot pick who refered them (all they have to do now is change the name when they are registering)
-Shows referalls in memberlist
-Shows who refered them in a users profile
-Will show users with most referalls
-Show referall in posts
-Special titles for people who have certain amount of referalls (like custom titles)


</mod info>

<author>
DarkShady (1.4 Translated by Flash)
</author>

<homepage>
none
</homepage>

<edit file>
Sources/Register.php
</edit file>

<search for>
   global $yytitle,$txt,$color,$cgi,$action,$allow_hide_email,$modSettings,$RegAgree,$emailpassword,$vardir,$db_prefix;
</search for>

<replace>
   global $yytitle,$txt,$color,$cgi,$action,$allow_hide_email,$modSettings,$RegAgree,$emailpassword,$vardir,$db_prefix,$referall,$referingperson;
</replace>

<search for>
   $request = mysql_query("INSERT INTO {$db_prefix}members (memberName,realName,passwd,emailAddress,posts,personalText,avatar,dateRegistered,hideEmail,memberIP) VALUES ('$member[user]','$member[user]','$queryPasswdPart','$member[email]',0,'$txt[209]','blank.gif',$requesttime,'$hideemail','$memIP')");
</search for>

<replace>
$request = mysql_query("INSERT INTO {$db_prefix}members (memberName,realName,passwd,emailAddress,posts,personalText,avatar,dateRegistered,hideEmail,memberIP,referer,referalls) VALUES ('$member[user]','$member[user]','$queryPasswdPart','$member[email]',0,'$txt[209]','blank.gif',$requesttime,'$hideemail','$memIP','$member[referer]','0')");
   $request = mysql_query("SELECT referalls FROM {$db_prefix}members WHERE memberName='$member[referer]'");
   $referallsettings = mysql_fetch_array($request);
$newnumberofreferalls = $referallsettings[0]+1;
  $request = mysql_query("UPDATE {$db_prefix}members SET referalls='$newnumberofreferalls' WHERE memberName='$member[referer]'");
</replace>

<search for>
      <tr>
        <td width="40%"><font size=2>* <b>$txt[98]:</b></font>
        <BR><font size="1">$txt[520]</font></td>
        <td><input type=text name=user size=20 maxlength=18></td>
      </tr><tr>
</search for>

<replace>
      <tr>
   <td width="40%"><font size=2>* <b>$txt[98]:</b></font>
   <BR><font size="1">$txt[520]</font></td>
   <td><input type=text name=user size=20 maxlength=18></td>
      </tr>
      <tr>
   <td width="40%"><font size=2><b>$referall[2]:</b></font>
   <BR><font size="1">$referall[3]</font></td>
   <td><input type=text name=referer size=20 maxlength=18 value=$referingperson></td>
      </tr><tr>
</replace>

<search for>
   global $allow_hide_email,$modSettings,$REMOTE_ADDR;
</search for>

<replace>
   global $allow_hide_email,$modSettings,$REMOTE_ADDR,$referallsettings;
</replace>

<edit file>
Sources/Profile.php
</edit file>

<search for>
   global $username,$password,$pwseed,$action,$cookiepassword,$cookieusername,$db_prefix,$modSettings;
</search for>

<replace>
   global $username,$password,$pwseed,$action,$cookiepassword,$cookieusername,$db_prefix,$modSettings,$referall;
</replace>

<search for>
   global $MaxSigLen,$timeformatstring,$db_prefix,$locale,$modSettings,$language,$timeoffset;
</search for>

<replace>
   global $MaxSigLen,$timeformatstring,$db_prefix,$locale,$modSettings,$language,$timeoffset,$boardurl,$user,$mbname,$referall;
</replace>

<search for>
      </tr><tr>
   <td width="45%"><font size=2><b>$txt[604]: </b></font><BR>
   <font size=1>$txt[602]</font></td>
   <td><font size=2><input type=text name=yim size=20 value="$memsettings[YIM]"></font></td>
      </tr><tr>
</search for>

<replace>
      </tr><tr>
   <td width="45%"><font size=2><b>$txt[604]: </b></font><BR>
   <font size=1>$txt[602]</font></td>
   <td><font size=2><input type=text name=yim size=20 value="$memsettings[YIM]"></font></td>
      </tr><tr>
   <td width="45%"><font size=2><b>$referall[1]: </b></font><BR></td>
   <td><font size=2><textarea><a href="$boardurl/index.php?board=;action=register&referingperson=$user">Join $mbname</a></textarea></font></td>
      </tr><tr>
</replace>

<search for>
/*                                                                           */
/* The GNU GPL can be found in gpl.txt in this directory                     */
/*****************************************************************************/
</search for>

<add after>
include("./Settings.php");
</add after>

<search for>
      </tr><tr>
        <td><font size=2><b>$txt[227]: </b></font></td>
        <td><font size=2>$memsettings[15]</font></td>
      </tr>$usrlng
</search for>

<replace>
      </tr><tr>
   <td><font size=2><b>$txt[227]: </b></font></td>
   <td><font size=2>$memsettings[15]</font></td>
      </tr><tr>
   <td><font size=2><b>$referall[4]</b></font></td>
   <td><font size=2>$memsettings[27]</font></td>
      </tr>$usrlng
</replace>

<search for>
   $request = mysql_query("SELECT passwd,realName,emailAddress,websiteTitle,websiteUrl,signature,posts,memberGroup,ICQ,AIM,YIM,gender,personalText,avatar,dateRegistered,location,birthdate,timeFormat,timeOffset,hideEmail,ID_MEMBER,usertitle,karmaBad,karmaGood,lngfile,MSN,memberIP FROM {$db_prefix}members WHERE memberName='$user'");
</search for>

<replace>
   $request = mysql_query("SELECT passwd,realName,emailAddress,websiteTitle,websiteUrl,signature,posts,memberGroup,ICQ,AIM,YIM,gender,personalText,avatar,dateRegistered,location,birthdate,timeFormat,timeOffset,hideEmail,ID_MEMBER,usertitle,karmaBad,karmaGood,lngfile,MSN,memberIP,referalls FROM {$db_prefix}members WHERE memberName='$user'");
</replace>

<edit file>
english.lng
</edit file>

<search for>
$txt['yse_stats_12'] = "Top 10 Topics (by Views)";
$txt['yse_stats_13'] = "Monthly Summary";
$txt['yse_stats_14'] = "Most Online";
</search for>

<add after>
$referall['1'] = "Referall Code";
$referall['2'] = "Referer";
$referall['3'] = "Username of Referer";
$referall['4'] = "Referalls:";
</add after>

<edit file>
german.lng
</edit file>

<search for>
$txt['yse_stats_12'] = "Top 10 Themen (nach Views)";
$txt['yse_stats_13'] = "Monatlicher Zusammenzug";
$txt['yse_stats_14'] = "Am meisten online";
</search for>

<add after>
$referall['1'] = "Werbe-URL";
$referall['2'] = "Werber";
$referall['3'] = "User, durch den du auf uns aufmerksam wurdest";
$referall['4'] = "Geworbene User:";
</add after>

SQL-Add:
ALTER TABLE yabbse_members ADD COLUMN referer tinytext;

ALTER TABLE yabbse_members ADD COLUMN referalls tinytext;
UPDATE yabbse_members SET referalls= 0;


!!!BUT!!! I allways get one SILLY error and dont know why, because the code is allright!

if i use
<td><font size=2>$memsettings[27]</font></td>the page wont load and the IE says "server dont answer" or "page not loaded"

BUT if i user
<td><font size=2>test</font></td>instead ... it works !!!

BUT Why??? ???
The SQL-Request for "$memsettings[27]" is ok and still works on other things like "number of posts" ... so why does this error happen ???

PS:  I also checked the sql table but its all ok too..."0 referalls" at startup in the table and after test with the url for refering user "1 referalls".....
« Last Edit: June 22, 2002, 01:43:41 PM by Flash » Logged

Besucht uns im IRC:
#antiheros @ Quakenet
Flash
Noobie
*
Posts: 48


Spass muss sein, sprach Wallenstein

ICQ - 72223934 WWW
Re:[Code]Referalls
« Reply #16 on: June 23, 2002, 02:00:19 PM »
Reply with quote

I think i found the error with this "$memsettings[27]" but don't know where or how to fix...maybe a php good can ;)

  • I try`d to change another request, for examble the "$memsettings[15]" into "$memsettings[27]" and then it works! I see the Refered-Persons Number!
  • But if i change "$gender" into "$memsettings[27" it doesn't work!
  • Also if a add it in a new line like the script normaly does, it doesn't work!
It seems like the SQL-Request could only be done for a maximum number of requests! One more like this "$memsettings[15]" makes a mistake in this php like described in my first post!

But where is this max Number set???

PLZ Help, because its a great Mod!!!
Logged

Besucht uns im IRC:
#antiheros @ Quakenet
Bimbel
Noobie
*
Posts: 3


WWW
Re:[Code]Referalls
« Reply #17 on: June 23, 2002, 10:10:31 PM »
Reply with quote

Hi,

i've done your mod by hand since there are other mods so i can't use BoardMod
You'll have to be sure to replace

<search for>
   $request = mysql_query("SELECT passwd,realName,emailAddress,websiteTitle,websiteUrl,signature,posts,memberGroup,ICQ,AIM,YIM,gender,personalText,avatar,dateRegistered,location,birthdate,timeFormat,timeOffset,hideEmail,ID_MEMBER,usertitle,karmaBad,karmaGood,lngfile,MSN,memberIP FROM {$db_prefix}members WHERE memberName='$user'");
</search for>

<replace>
   $request = mysql_query("SELECT passwd,realName,emailAddress,websiteTitle,websiteUrl,signature,posts,memberGroup,ICQ,AIM,YIM,gender,personalText,avatar,dateRegistered,location,birthdate,timeFormat,timeOffset,hideEmail,ID_MEMBER,usertitle,karmaBad,karmaGood,lngfile,MSN,memberIP,referalls FROM {$db_prefix}members WHERE memberName='$user'");
</replace>

in "ViewProfile ()", possibly the first appearance of this piece of code is in "ModifyProfile ()", so $memsettings[27] doesn't exist when you show the profile.
Logged
Nossie
Full Member
***
Posts: 192


If it aint broke, you haven't played with it enuff

ICQ - 18967293IanHarvie@Hotmail.com WWW
Re:[Code]Referalls
« Reply #18 on: June 28, 2002, 05:36:41 PM »
Reply with quote

Quote from: Jedi~ on June 14, 2002, 03:34:32 PMWho cares, its coded awful...

no offence Jedi but could one of you lot do it better? LOL atleast these people have tried no ?

I think its a great mod because it encourages people to sign up their friends etc...


I think it would be great if someone  were to make this a proper working compatable mod and not just some code hack..


*bangs up and down on the table for a split thread mod and referral mod *

Logged

nsanden
Jr. Member
**
Posts: 58


I'm a llama!

Re:[Code]Referalls
« Reply #19 on: July 01, 2002, 10:24:37 PM »
Reply with quote

Could someone show me an example of this mod in use. Its an interesting idea, I just have no idea how it works or what it looks like.
Thanks,
Nate

-----

YaBB Poll v0.1.3 is now available! Include your latest forum poll on your home page! - http://www.yabb.info/community/index.php?board=158;action=display;threadid=9860
« Last Edit: July 01, 2002, 10:26:09 PM by nsanden » Logged
Bimbel
Noobie
*
Posts: 3


WWW
Re:[Code]Referalls
« Reply #20 on: July 02, 2002, 11:14:51 AM »
Reply with quote

You can see it on my board (in german). If someone wants to register, he can specify a person, or this will be done via a direct link:
http://www.umbau-kult.de/yabbse/index.php?board=;action=register&referingperson=Oliver_Timmermann
If you view the profile of a member, you can see the number of referals:
http://www.umbau-kult.de/yabbse/index.php?action=viewprofile;user=Oliver_Timmermann
Logged
Darkshady
Noobie
*
Posts: 40


I'm a llama!

Re:[Code]Referalls
« Reply #21 on: August 07, 2002, 10:16:52 PM »
Reply with quote

I'm surprised anyone liked it.  I changed the coding so now there is only about 1 replace and I made it so you can't change who refered you and if no one refered you it won't show the referall box in the signup.  (although I still haven't updated it to 1.4, it's still 1.3)

<id>
User Referall Mod
</id>

<version>
.1
</version>

<mod info>
If you a user refers someone to the board the referer will get a referall point.  The referall points don't do anything but i'm sure
you could hold contest or something with them.

Features:
-A link in your profile which you can refer users with
-Displays referalls in members profiles
-Referall points goes up when someone has you as a refer
</mod info>

<author>
DarkShady
</author>

<homepage>
None
</homepage>

<edit file>
Sources/Register.php
</edit file>

<search for>
function Register (){
   global $yytitle,$txt,$color,$cgi,$action,$allow_hide_email,$modSettings,$RegAgree,$emailpassword,$vardir,$db_prefix;
</search for>

<add after>
   global $referall,$referingperson;
</add after>

<search for>
   $request = mysql_query("INSERT INTO {$db_prefix}members (memberName,realName,passwd,emailAddress,posts,personalText,avatar,dateRegistered,hideEmail,memberIP) VALUES ('$member[user]','$member[user]','$queryPasswdPart','$member[email]',0,'$txt[209]','blank.gif',$requesttime,'$hideemail','$memIP')");
</search for>

<replace>
$request = mysql_query("INSERT INTO {$db_prefix}members (memberName,realName,passwd,emailAddress,posts,personalText,avatar,dateRegistered,hideEmail,memberIP,referer,referalls) VALUES ('$member[user]','$member[user]','$queryPasswdPart','$member[email]',0,'$txt[209]','blank.gif',$requesttime,'$hideemail','$memIP','$member[referer]','0')");
</replace>

<search for>
$request = mysql_query("INSERT INTO {$db_prefix}members (memberName,realName,passwd,emailAddress,posts,personalText,avatar,dateRegistered,hideEmail,memberIP,referer,referalls) VALUES ('$member[user]','$member[user]','$queryPasswdPart','$member[email]',0,'$txt[209]','blank.gif',$requesttime,'$hideemail','$memIP','$member[referer]','0')");
</search for>

<add after>
   $request = mysql_query("SELECT referalls FROM {$db_prefix}members WHERE memberName='$member[referer]'");
  $request = mysql_query("UPDATE {$db_prefix}members SET referalls='++$referallsettings[0]' WHERE memberName='$member[referer]'");
</add after>

<search for>
      <tr>
        <td width="40%"><font size=2>* <b>$txt[98]:</b></font>
        <BR><font size="1">$txt[520]</font></td>
        <td><input type=text name=user size=20 maxlength=18></td>
      </tr><tr>
</search for>

<add after>
EOT;
if($referingperson){
echo<<<EOT
       <td width="40%"><font size=2><b>$referall[2]:</b></font>
       <BR><font size="1">$referall[3]</font></td>
       <td><input type=hidden name=referer size=20 maxlength=18 value=$referingperson><input type=text size=20 maxlength=18 value=$referingperson></td>
     </tr><tr>
EOT;
}
echo<<<EOT
</add after>

<search for>
   global $allow_hide_email,$modSettings,$REMOTE_ADDR;
</search for>

<add after>
   global $referallsettings;
</add after>

<edit file>
Sources/Profile.php
</edit file>

<search for>
function ViewProfile (){
    global $user, $modify, $userpic_width, $facesurl, $userpic_height, $allowpics, $txt, $color, $cgi, $GodPostNum;
   global $SrPostNum, $FullPostNum, $JrPostNum, $settings, $allow_hide_email, $imagesdir,$yytitle;
   global $username,$password,$pwseed,$action,$cookiepassword,$cookieusername,$db_prefix,$modSettings;
</search for>

<add after>
   global $referall; //1
</add after>

<search for>
function ModifyProfile (){
   global $user,$username,$txt,$yytitle,$settings,$img,$cgi,$timeformatstring,$color,$imagesdir;
   global $GenderMale,$GenderFemale,$allowpics,$facesdir,$userpic_limits,$facesurl,$allow_hide_email,$boarddir,$userpic_width,$userpic_height;
   global $MaxSigLen,$timeformatstring,$db_prefix,$locale,$modSettings,$language,$timeoffset;
</search for>

<add after>
   global $referall; //2
</add after>

<search for>
      </tr><tr>
   <td width="45%"><font size=2><b>$txt[604]: </b></font><BR>
   <font size=1>$txt[602]</font></td>
   <td><font size=2><input type=text name=yim size=20 value="$memsettings[YIM]"></font></td>
      </tr><tr>
</search for>

<add after>
<tr>
   <td width="45%"><font size=2><b>$referall[1]: </b></font><BR></td>
   <td><font size=2><textarea><a href="$boardurl/index.php?board=;action=register&referingperson=$user">Join $mbname</a></textarea></font></td>
     </tr><tr>
</add after>

<search for>
/*                                                                           */
/* The GNU GPL can be found in gpl.txt in this directory                     */
/*****************************************************************************/
</search for>

<add after>
include("./Settings.php");
</add after>

<search for>
      </tr><tr>
        <td><font size=2><b>$txt[227]: </b></font></td>
        <td><font size=2>$memsettings[15]</font></td>
</search for>

<add after>
     </tr><tr>
       <td><font size=2><b>$referall[4]</b></font></td>
       <td><font size=2>$memsettings[26]</font></td>
     </tr>$usrlng
</add after>

<search for>
   $request = mysql_query("SELECT passwd,realName,emailAddress,websiteTitle,websiteUrl,signature,posts,memberGroup,ICQ,AIM,YIM,gender,personalText,avatar,dateRegistered,location,birthdate,timeFormat,timeOffset,hideEmail,ID_MEMBER,usertitle,karmaBad,karmaGood,lngfile,MSN FROM {$db_prefix}members WHERE memberName='$user'");
</search for>

<replace>
   $request = mysql_query("SELECT passwd,realName,emailAddress,websiteTitle,websiteUrl,signature,posts,memberGroup,ICQ,AIM,YIM,gender,personalText,avatar,dateRegistered,location,birthdate,timeFormat,timeOffset,hideEmail,ID_MEMBER,usertitle,karmaBad,karmaGood,lngfile,MSN,referalls FROM {$db_prefix}members WHERE memberName='$user'");
</replace>

<edit file>
english.lng
</edit file>

<search for>
$txt['yse_stats_12'] = "Top 10 Topics (by Views)";
$txt['yse_stats_13'] = "Monthly Summary";
$txt['yse_stats_14'] = "Most Online";
</search for>

<add after>
$referall['1'] = "Referall Code";
$referall['2'] = "Referer";
$referall['3'] = "Username of Referer";
$referall['4'] = "Referalls:";
</add after>
Logged
Nossie
Full Member
***
Posts: 192


If it aint broke, you haven't played with it enuff

ICQ - 18967293IanHarvie@Hotmail.com WWW
Re:[Code]Referalls
« Reply #22 on: August 08, 2002, 06:44:40 PM »
Reply with quote

wanna convert to 1.4 flash ? lol ;)


Logged

R3v3ng3
Noobie
*
Posts: 28


Rikku forever

WWW
Re:[Code]Referalls
« Reply #23 on: August 18, 2002, 09:45:26 AM »
Reply with quote

me has a question.
I want to use this mod, but how do I have to install it.
I already have the country flag en the city field mod.
how do I use this one? there are so much scriptings  :-\

I have to 1.4 version of yabb

thanx for your help  :)
Logged

www.rpglegacy.be
Soon in English
Soon in Dutch
Soon more info
Soon more stuff
Soon BIG!
R3v3ng3
Noobie
*
Posts: 28


Rikku forever

WWW
Re:[Code]Referalls
« Reply #24 on: August 18, 2002, 10:10:50 AM »
Reply with quote

I have installed it manually, but how do I have to add those rows into the mySQL?
Logged

www.rpglegacy.be
Soon in English
Soon in Dutch
Soon more info
Soon more stuff
Soon BIG!
R3v3ng3
Noobie
*
Posts: 28


Rikku forever

WWW
Re:[Code]Referalls
« Reply #25 on: August 18, 2002, 11:50:40 AM »
Reply with quote

alright, I  did this code:
ALTER TABLE yabbse_members ADD COLUMN referer tinytext;

ALTER TABLE yabbse_members ADD COLUMN referalls tinytext;
UPDATE yabbse_members SET referalls= 0;
in the database, and it works fine.

Bu i made a new account to test it, and by the profile the referalls was still empty, so it didn't say 1 but just empty

link: www.rpglegacy.be/yapp :(
Logged

www.rpglegacy.be
Soon in English
Soon in Dutch
Soon more info
Soon more stuff
Soon BIG!
R3v3ng3
Noobie
*
Posts: 28


Rikku forever

WWW
Re:[Code]Referalls
« Reply #26 on: August 18, 2002, 05:02:44 PM »
Reply with quote

nobody knows how this freakin' thing works?  :'(
Logged

www.rpglegacy.be
Soon in English
Soon in Dutch
Soon more info
Soon more stuff
Soon BIG!
Nossie
Full Member
***
Posts: 192


If it aint broke, you haven't played with it enuff

ICQ - 18967293IanHarvie@Hotmail.com WWW
Re:[Beta 1.3.+][Code]Referalls
« Reply #27 on: October 01, 2002, 06:35:04 PM »
Reply with quote

hmmm yeah :'(

it would appear to have been forgotten about *sniff*
Logged

PostDeals
Full Member
***
Posts: 112


Checkout postdeals.net for the latest deals.

WWW
Re:[Beta 1.3.+][Code]Referalls
« Reply #28 on: November 09, 2002, 04:25:04 AM »
Reply with quote

does this mod do what i think it does?

I run www.postdeals.net  and I want to have some type of referral setup so whenever anyone posts even staples or any name like that i can have it automatically link to something like stapels   this way i can make some money with referrals  is there anyway anyone can think of this can be done? I know i use to use bad word replacement but [email protected][/email] or PM me.

THANKS
http://www.postdeals.net
Admin
Logged

For HotDeals, Coupons, Games Visit: www.postdeals.net

sce
Noobie
*
Posts: 9


i like old stuff

WWW
Re:[Beta 1.3.+][Code]Referalls
« Reply #29 on: March 17, 2003, 04:21:55 AM »
Reply with quote

Any status on this mod ..

Does it work or not ? Hard to tell from this thread.

Has it been updated ?



Logged
Pages: 1 [2] Reply Ignore Print 
YaBB SE Community  |  Development  |  Completed mods  |  [Beta 1.3.+][Code]Referalls « previous - next »
 


Powered by MySQL Powered by PHP YaBB SE Community | Powered by YaBB SE
© 2001-2003, YaBB SE Dev Team. All Rights Reserved.
SMF 2.1.4 © 2023, Simple Machines
Valid XHTML 1.0! Valid CSS

Page created in 2.312 seconds with 16 queries.