vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Member Archives (https://vborg.vbsupport.ru/forumdisplay.php?f=202)
-   -   Help me please? (https://vborg.vbsupport.ru/showthread.php?t=35474)

OldManWillow 02-26-2002 06:58 PM

Help me please?
 
Here is the original Line:
$DB_site->query("UPDATE user SET birthday='$birthday',options='$options',usergroupi d='$usergroupid',username='".a ddslashes(htmlspecialchars($ausername))."'$pwdincl ude,email='".addslashes(htmlsp ecialchars($email))."',styleid='$userstyleid',pare ntemail='".addslashes(htmlspec ialchars($parentemail))."',coppauser=$coppauser,ho mepage='".addslashes(htmlspeci alchars($homepage))."',icq='".addslashes(htmlspeci alchars($icq))."',aim='".addsl ashes(htmlspecialchars($aim))."',yahoo='".addslash es(htmlspecialchars($yahoo))." ',signature='".addslashes($signature)."',adminemai l=$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',showdona tion='$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))."'$pwdincl ude,email='".addslashes(htmlsp ecialchars($email))."',styleid='$userstyleid',pare ntemail='".addslashes(htmlspec ialchars($parentemail))."',coppauser=$coppauser,ho mepage='".addslashes(htmlspeci alchars($homepage))."',icq='".addslashes(htmlspeci alchars($icq))."',aim='".addsl ashes(htmlspecialchars($aim))."',yahoo='".addslash es(htmlspecialchars($yahoo))." ',signature='".addslashes($signature)."',adminemai l=$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:

PHP Code:

$DB_site->query("UPDATE user SET birthday='$birthday',options='$options',usergroupid='$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,invisible=$invisible,usertitle='".addslashes($usertitle)."',customtitle=$customtitle,joindate=$joindate,cookieuser=$cookieuser,nosessionhash=$nosessionhash,daysprune='$daysprune',lastvisit=$lastvisit,lastactivity=$lastactivity,lastpost=$lastpost,posts='$posts',timezoneoffset='$timezoneoffset',emailnotification=$emailnotification,receivepm='$receivepm',emailonpm='$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

Quote:

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!


All times are GMT. The time now is 05:02 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01181 seconds
  • Memory Usage 1,762KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (16)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete