PDA

View Full Version : Mark user as a Referrer [v 1.0.1]


Buczilla
07-26-2003, 10:00 PM
I don't know if anyone has been needing a hack like this... but I did, so decided to make it. 90% of the credit for this hack goes to MarkB (his contributor hack), as I don't know any php, so just changed all the variables in his hack. Thanks alot MarkB!!!

What this hack does: It allows you to mark a user as a referrer, so, if a user has referred a bunch of people, or anything, you can select (in the Admin CP - Under Edit User), that they are a referrer... it will then display an image (or whatever you want) in postbit.

You really could edit MarkB's hack to be ANYTHING (as an option) to be displayed in postbit, but if you don't want to edit the php, this is made for you. Please report any bugs in this thread, it should work, but I don't want to be responsible for a messed up board... so PLEASE BACKUP YOUR DATABASE, AND ALL FILES RELATED TO THIS HACK!!!

Also, please click Install if you use this hack! If you need a hack similiar to this, except for something else you want displayed in postbit... let me know, or try to edit the php yourself (like I did :banana: )

Thanks again MarkB!!!

What might come later: Auto-update if user has an AdminCP-Definable number of referrals. I'm gonna need help with this.

Screenshots to follow:

Buczilla
07-27-2003, 06:39 AM
The Option to mark a user as a referrer in the Admin CP

Buczilla
07-27-2003, 06:40 AM
Postbit:

Please note, the referrer and contributor are completely seperate, and, it doesn't have to be an image (it can be text, flash, anything)

Dean C
07-27-2003, 10:21 AM
Did you specifically ask MarkB for permisson :)?

Buczilla
07-27-2003, 05:18 PM
Yes I did.

I know how frustrating it is when people use your stuff, without asking :)

Dean C
07-27-2003, 05:40 PM
Ok then no problems :)

- miSt

Buczilla
07-27-2003, 09:44 PM
:)

esfron
07-29-2003, 12:03 AM
It's not working in 2.3.0

In user.php, I don't find ipaddress='".addslashes($aipaddress)." to add ',referrer='$referrer',

in

$DB_site->query("INSERT INTO user (userid,usergroupid,username,password,email,stylei d,parentemail,coppauser,homepa ge,icq,aim,yahoo,signature,adminemail,showemail,in visible,usertitle,customtitle, joindate,cookieuser,daysprune,lastvisit,lastactivi ty,lastpost,posts,timezoneoffs et,emailnotification,receivepm,emailonpm,ipaddress ,pmpopup,options,birthday) VALUES (NULL,'$usergroupid','".addslashes(htmlspecialchars($ausername))."','".addslashe s(md5($apassword))."','".addslashes(htmlspecialchars($email))."','$userstyleid', '".addslashes(htmlspecialchars($parentemail))."','$coppauser','".addslashes(html specialchars($homepage))."','".addslashes(htmlspecialchars($icq))."','".addslash es(htmlspecialchars($aim))."','".addslashes(htmlspecialchars($yahoo))."','".adds lashes($signature)."','$adminemail','$showemail','$invisible','".addslashes($use rtitle)."','$customtitle',$joindate,'$cookieuser','$dayspru ne',$lastvisit,$lasta ctivity,$lastpost,'$posts','$timezoneoffset','$ema ilnotification','$receivepm',' $emailonpm','".addslashes($aipaddress)."','$pmpopup','$options','birthday')");

It's not matching in 2.3.0.

Here is my add:

$DB_site->query("INSERT INTO user (userid,usergroupid,username,password,email,stylei d,parentemail,coppauser,homepa ge,icq,aim,yahoo,signature,adminemail,showemail,in visible,usertitle,customtitle, joindate,cookieuser,nosessionhash,daysprune,lastvi sit,lastactivity,lastpost,post s,timezoneoffset,emailnotification,receivepm,email onpm,ipaddress,referrer,pmpopu p,options,birthday) VALUES (NULL,'$usergroupid','".addslashes(htmlspecialchars($ausername))."','".addslashe s(md5($apassword))."','".addslashes(htmlspecialchars($email))."','$userstyleid', '".addslashes(htmlspecialchars($parentemail))."','$coppauser','".addslashes(html specialchars($homepage))."','".addslashes(htmlspecialchars($icq))."','".addslash es(htmlspecialchars($aim))."','".addslashes(htmlspecialchars($yahoo))."','".adds lashes($signature)."','$adminemail','$showemail','$invisible','".addslashes($use rtitle)."','$customtitle',$joindate,'$cookieuser','$nosessi onhash','$daysprune', $lastvisit,$lastactivity,$lastpost,'$posts','$time zoneoffset','$emailnotificatio n','$receivepm','$emailonpm','".addslashes($aipaddress)."','$referrer','$pmpopup ','$options','$birthday')");

esfron
07-30-2003, 02:03 AM
Can someone update this hack ?

thx

Buczilla
07-30-2003, 05:09 AM
Oops... try this: (Remember, not user.php, but admin/user.php)!!!

In Line Find:

".addslashes($aipaddress)."

In line after add:

',referrer='$referrer',

That code section should look like this:

".addslashes($aipaddress)."','$referrer',


Lemme know if it works please!


This has been updated in the zip file :)

esfron
07-30-2003, 02:30 PM
Today at 07:09 AM Buczilla said this in Post #10 (https://vborg.vbsupport.ru/showthread.php?postid=421732#post421732)
Oops... try this: (Remember, not user.php, but admin/user.php)!!!

In Line Find:

".addslashes($aipaddress)."

In line after add:

',referrer='$referrer',

That code section should look like this:

".addslashes($aipaddress)."','$referrer',




Sorry. I am confused.

..Should look like ... '".addslashes($aipaddress)."',referrer='$referrer', ...

or like
','$emailonpm','".addslashes($aipaddress)."','$referrer', ...

???

Anyway, in first case. I got no MySQL error. All seems OK. I selected an user as referrer in AdminCP but user is not marked as referrer in postbit (no text). I see nothing. Are you sure for $post[donation] in Postbit ? Why donation ?

Buczilla
07-30-2003, 07:57 PM
$post[referrer]

is what it's supposed to be. Fixed in the zip.

esfron
07-30-2003, 11:59 PM
It's working now. Very nice hack. Clicked Install.

Thx. :glasses:

Buczilla
07-31-2003, 04:52 AM
Thanks, all should work now... you were my lab rat :D

j/k