The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
vb 3.5 and globalize()
Ok I am working on porting a vb 3.0.3 hack to vb 3.5 and globalize is no longer used so I need to know what replaced it and say for instance replace this line:
PHP Code:
Any help would be much appreciated. Yes this is unaltered file and vbulletin test forum. Thanks Myth |
#2
|
|||
|
|||
PHP Code:
Change goto to the variable you wish to clean, and type_str to the type you want to clean it to (find them in a file somewhere, not sure which) You should then use the below method to access the variable (not it doesnt get "globalised"). PHP Code:
PHP Code:
|
#3
|
|||
|
|||
Thanks that helped.
Now I get this error: Code:
Database error in vBulletin 3.5.0 Release Candidate 2: Invalid SQL: SELECT username FROM vbuser WHERE userid =; MySQL Error : You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 3 Error Number : 1064 Date : Monday, September 5th 2005 @ 09:35:22 AM Script : http://www.eternaltide.net/test/admincp/qas.php?&do=qaslink&u=1 Referrer : IP Address : XX.XXX.XXX.XX Username : Admin Classname : vb_database PHP Code:
Myth |
#4
|
|||
|
|||
You will need to set $u yourself or change $u to {$vbulletin->GPC[u]}
|
#5
|
|||
|
|||
so how would I set it myself also if not that, how would or where would {$vbulletin->GPC[u]} go? Would I just put it in place of WHERE userid = $u to look liked WHERE userid = {$vbulletin->GPC[u]} ?
|
#6
|
|||
|
|||
Hrm - not only that but you're using the wrong function.
PHP Code:
|
#7
|
|||
|
|||
Ok got it but this new warning shows up:
HTML Code:
Warning: Invalid argument supplied for foreach() in /includes/class_core.php on line 1519 Code:
foreach ($variables AS $varname => $vartype) { if (!isset($this->registry->GPC["$varname"])) // limit variable to only being "cleaned" once to avoid potential corruption { $this->registry->GPC_exists["$varname"] = isset($sg["$varname"]); $this->registry->GPC["$varname"] =& $this->clean( $sg["$varname"], $vartype, isset($sg["$varname"]) ); } } } Now after that warning I get this: Code:
Database error in vBulletin 3.5.0 Release Candidate 2: Invalid SQL: SELECT userid, username, qas FROM vbuser WHERE userid =; MySQL Error : You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 3 Error Number : 1064 Date : Monday, September 5th 2005 @ 09:51:34 AM Script : http://www.eternaltide.net/test/admincp/qas.php Referrer : IP Address : XX.XXX.XXX.XX Username : Admin Classname : vb_database Place 1: PHP Code:
PHP Code:
Myth |
#8
|
|||
|
|||
The warning at the top of your post indicates that $variables is not an array. Code above that that builds $variables might not be returning anything.
The database error that you are getting is a similar cause of the same problem above. As for your attempt to use "u2" as a variable will fail because you havent cleaned it first. You must clean all variables you're using. Call the function you call for u, but replace u with u2. |
#9
|
|||
|
|||
Ok Merk, no go, couldn't get it figured out.
I can't find the function used to call for u. Ok the whole warning thing I'm ignoring for now as I believe this coding error is whats causing that warning. How would I clean the variable for "u2"? What should the function look like? |
#10
|
|||
|
|||
I take it the user1 query in "place 1" and "place 2" are the same query?
You need to clean every single input variable you might be using to make sure they are actually input variables. They do not get globalised, so you need to access them from where vBulletin stores them, $vbulletin->GPC['name']. To get them put into that GPC array, you will need to run clean_gpc or clean_array_gpc (the second one takes many different variables at the same time, does the same thing). To clean 2 variables, you should use (which would replace the clean_gpc command that you are using at place one. PHP Code:
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|