PDA

View Full Version : Help me please?


OldManWillow
02-26-2002, 06:58 PM
Here is the original Line:
$DB_site->query("UPDATE user SET birthday='$birthday',options='$options',usergroupi d='$usergroupid',username='".a ddslashes(htmlspecialchars($ausername))."'$pwdinclude,email='".addslashes(htmlsp ecialchars($email))."',styleid='$userstyleid',parentemail='".addslashes(htmlspec ialchars($parentemail))."',coppauser=$coppauser,homepage='".addslashes(htmlspeci alchars($homepage))."',icq='".addslashes(htmlspecialchars($icq))."',aim='".addsl ashes(htmlspecialchars($aim))."',yahoo='".addslashes(htmlspecialchars($yahoo))." ',signature='".addslashes($signature)."',adminemail=$adminemail,showemail=$showe mail,invisible=$invisible,usertitle='".addslashes($usertitle)."',customtitle=$cu stomtitle,joindate=$joindate,cookieuser=$cookieuse r,nosessionhash=$nosessionhash ,daysprune='$daysprune',lastvisit=$lastvisit,lasta ctivity=$lastactivity,lastpost =$lastpost,posts='$posts',timezoneoffset='$timezon eoffset',emailnotification=$em ailnotification,receivepm='$receivepm',emailonpm=' $emailonpm',ipaddress='".addsl ashes($aipaddress)."',donator='$donation',showdonation='$showdonation' ,pmpopup=I F(pmpopup=2 AND $pmpopup=1,pmpopup,'$pmpopup') WHERE userid=$userid");

Here is the line that I am suppose to replace it with:
$DB_site->query("UPDATE user SET birthday='$birthday',options='$options',usergroupi d='$usergroupid',username='".a ddslashes(htmlspecialchars($ausername))."'$pwdinclude,email='".addslashes(htmlsp ecialchars($email))."',styleid='$userstyleid',parentemail='".addslashes(htmlspec ialchars($parentemail))."',coppauser=$coppauser,homepage='".addslashes(htmlspeci alchars($homepage))."',icq='".addslashes(htmlspecialchars($icq))."',aim='".addsl ashes(htmlspecialchars($aim))."',yahoo='".addslashes(htmlspecialchars($yahoo))." ',signature='".addslashes($signature)."',adminemail=$adminemail,showemail=$showe mail,invisible=$invisible,usertitle='".addslashes($usertitle)."',customtitle=$cu stomtitle,joindate=$joindate,cookieuser=$cookieuse r,nosessionhash=$nosessionhash ,daysprune='$daysprune',lastvisit=$lastvisit,lasta ctivity=$lastactivity,lastpost =$lastpost,posts='$posts',timezoneoffset='$timezon eoffset',emailnotification=$em ailnotification,receivepm='$receivepm',emailonpm=' $emailonpm',ipaddress='".addsl ashes($aipaddress)."',award='$hasaward',pmpopup=IF(pmpopup=2 AND $pmpopup=1,pmpopup,'$pmpopup') WHERE userid=$userid");

Basically it has to do with the awards part but I have other edits in the first line I need to keep to have certain things running correctly on the forums. anyway I can add the award part without getting an error?

Any help would be great.

Lesane
02-26-2002, 07:02 PM
No, because u have also in your original line: donator and showdonation. To include award in your original line u come to this code:

$DB_site->query("UPDATE user SET birthday='$birthday',options='$options',usergroupi d='$usergroupid',username='".addslashes(htmlspecialchars($ausername))."'$pwdinclude,email='".addslashes(htmlspecialchars($email))."',styleid='$userstyleid',parentemail='".addslashes(htmlspecialchars($parentemail))."',coppauser=$coppauser,homepage='".addslashes(htmlspecialchars($homepage))."',icq='".addslashes(htmlspecialchars($icq))."',aim='".addslashes(htmlspecialchars($aim))."',yahoo='".addslashes(htmlspecialchars($yahoo))."',signature='".addslashes($signature)."',adminemail=$adminemail,showemail=$showemail,invi sible=$invisible,usertitle='".addslashes($usertitle)."',customtitle=$customtitle,joindate=$joindate,cook ieuser=$cookieuser,nosessionhash=$nosessionhash,da ysprune='$daysprune',lastvisit=$lastvisit,lastacti vity=$lastactivity,lastpost=$lastpost,posts='$post s',timezoneoffset='$timezoneoffset',emailnotificat ion=$emailnotification,receivepm='$receivepm',emai lonpm='$emailonpm',ipaddress='".addslashes($aipaddress)."',donator='$donation',showdonation='$showdonation' ,award='$hasaward',pmpopup=IF(pmpopup=2 AND $pmpopup=1,pmpopup,'$pmpopup') WHERE userid=$userid");

OldManWillow
02-26-2002, 07:04 PM
So this will work with my donations as well? No errors?

OldManWillow
02-26-2002, 07:11 PM
I added the code and it still doesnt show the donations. : (

Lesane
02-26-2002, 07:20 PM
Still doesnt work? So it did not work before the sql query change?

I only added ,award='$hasaward', to your sql query. This sql query change will update the row "award" in the database aswell.

OldManWillow
02-26-2002, 07:20 PM
:(

OldManWillow
02-26-2002, 07:28 PM
Ok it worked. Can you tell me how to add future things to those lines? So that I may add more hacks?

Lesane
02-26-2002, 07:37 PM
In an update tag it mostly adds a new variable on the end like the awards hack did. The awards hack added almost on the end (before ,pmpopup) awards='$hasaward', but u also need to add , between the variables..

You have currently an end tag of the update like this:

,award='$hasaward',pmpopup=IF(pmpopup=2 AND $pmpopup=1,pmpopup,'$pmpopup') WHERE userid=$userid");

when you install a new hack for example: karma hack. Then you must first look whats changed in the update tag, the instructions will always say that u need 2 change that update tag to that update tag... now u compare those 2 and look whats changed, then when u know the changing u add it on the end after awards='$hasawards'... so lets say the new variable is: karma='$karma' then you get an update tag like this:

,award='$hasaward',karma='$karma',pmpopup=IF(pmpop up=2 AND $pmpopup=1,pmpopup,'$pmpopup') WHERE userid=$userid");

Do i make any sense? ;)

OldManWillow
02-26-2002, 07:40 PM
Is that the code for the karma hack? Cause I need to get it working again hehe

Lesane
02-26-2002, 07:41 PM
hehe, nono.. thats just an example :)

OldManWillow
02-26-2002, 07:42 PM
What would I add for the karma hack? Or do I have to go back through the install procdure to view that?

Lesane
02-26-2002, 07:44 PM
Originally posted by OldManWillow
What would I add for the karma hack? Or do I have to go back through the install procdure to view that?

Yes, it will tell you wich update tag u need 2 do in the instructions/installer.

OldManWillow
02-26-2002, 07:45 PM
ok great thanks!

OldManWillow
02-26-2002, 07:46 PM
let me try it

OldManWillow
02-26-2002, 08:01 PM
:)

OldManWillow
02-26-2002, 08:02 PM
now I can add a ton more hacks! yay!