Log in

View Full Version : ok i did this in vb 2.3 but 3.0 beta 4 is giving me trouble


dv6cougar
08-14-2003, 02:46 PM
so i have a page for car profiles, it's not of my forum, it' son the main pages... now i know mysql and i know php, but i've never actually used eval() in my own scripts, so i get a bit lost with it.

basically we're gonna make a Car Profile button next ot he profile button so i have this in showthread.php


//i adde carprofile as a template used
//at hte top of the page
$caruser = $post['userid'];
$get_car = mysql_query("SELECT * FROM prof WHERE userid='$caruser'") or die("
<font color=white>".mysql_error()."</font>");
if(mysql_num_rows($get_car) == "0") {

} else {
eval("\$post[showcar] = \"".fetch_template("carprofile")."\";");
}

//now i took ou the if statement,
//but that didn't do anything ether...
// i placed this right after the this statement:
if ($post['lastactivity'] > time() - $cookietimeout and !$post['invisible'] and $post['lastvisit'] != $post['lastactivity']) {

eval("\$post[onlinestatus] = \"".fetch_template("getinfo_online")."\";");

} else {

eval("\$post[onlinestatus] = \"".fetch_template("getinfo_offline")."\";");

}
//which does work...


now in my template postbit_buttons code i have this:
$post[showcar]

and i have the carprofile tempalte made looking like this:
<a href=../main/carprofile.php?id=$post[userid]>Car Profile</a>


but nothing shows up at all :(

any inf would be great guys, i'm thinking my problem is where i'm placing it in the showthread.php but then it's right under onlinestatus which is right below that.

or maybe am I missing something else i have to do to get it to work?

filburt1
08-14-2003, 02:51 PM
Please read the announcements: vB3 pre-RC code discussion is not allowed.

filburt1
08-14-2003, 06:49 PM
Also, dv6cougar, you are currently showing up as unlicensed. To be able to download hacks and/or receive support here at vBulletin.org, we ask you to please click here (http://www.vbulletin.com/members/forums.php) (vB-germany users click here (http://www.vbulletin-germany.com/members/forums.php)) and enter your email address, to show us that you are licensed.

You will need to use your customer number and password (which will be in the email you got when you paid for your license) to access that page. Please note that your email is case sensitive.

Thank you.

Erwin
08-15-2003, 12:07 AM
Just a small tip for vB3 hackers - vB3 has much tighter security - basically you need to modify the PHP file to add a "globalize request" section and add "id" to the list, so that it gets read by the PHP file.