Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions
  #1  
Old 08-14-2003, 02:46 PM
dv6cougar dv6cougar is offline
 
Join Date: Mar 2003
Posts: 30
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default ok i did this in vb 2.3 but 3.0 beta 4 is giving me trouble

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

PHP Code:
//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?
  #2  
Old 08-14-2003, 02:51 PM
filburt1 filburt1 is offline
 
Join Date: Feb 2002
Location: Maryland, US
Posts: 6,144
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Please read the announcements: vB3 pre-RC code discussion is not allowed.
  #3  
Old 08-14-2003, 06:49 PM
filburt1 filburt1 is offline
 
Join Date: Feb 2002
Location: Maryland, US
Posts: 6,144
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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 (vB-germany users click here) 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.
  #4  
Old 08-15-2003, 12:07 AM
Erwin's Avatar
Erwin Erwin is offline
 
Join Date: Jan 2002
Posts: 7,604
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Closed Thread

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 09:03 PM.


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.03840 seconds
  • Memory Usage 2,185KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)bbcode_php
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (4)post_thanks_box
  • (4)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (4)post_thanks_postbit_info
  • (4)postbit
  • (4)postbit_onlinestatus
  • (4)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete