Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #11  
Old 09-02-2003, 02:53 AM
EvilLS1's Avatar
EvilLS1 EvilLS1 is offline
 
Join Date: Apr 2002
Location: Georgia, USA
Posts: 987
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I would suggest storing the timeslip info in the user or userfield table of the vb database and also calling templates to display the html instead of putting it in the php file.
Reply With Quote
  #12  
Old 09-02-2003, 03:58 AM
99SIVTEC 99SIVTEC is offline
 
Join Date: Nov 2001
Posts: 281
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Today at 04:53 AM EvilLS1 said this in Post #11
I would suggest storing the timeslip info in the user or userfield table of the vb database and also calling templates to display the html instead of putting it in the php file.
Honestly though I have no idea where to even start to acomplish something like that. This is pretty much my first php program to date. Another hurdle might also be down the road. I "might" make this script into its own website, or at least build a site around it. I have a network going and this would fit that theme. Is there any way to do what i'm looking for without completely integrating it? I did go ahead and move the timeslip table into the vbulletin database for now.
Reply With Quote
  #13  
Old 09-02-2003, 05:50 AM
assassingod's Avatar
assassingod assassingod is offline
 
Join Date: Jul 2002
Posts: 3,337
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Try this

PHP Code:
<?php 
     
echo("<a href=\"member.php?s=$session[sessionhash]&action=getinfo&userid=$bbuserinfo[userid]\">$bbuserinfo[username]</a>"); 
?>
Reply With Quote
  #14  
Old 09-02-2003, 05:59 AM
99SIVTEC 99SIVTEC is offline
 
Join Date: Nov 2001
Posts: 281
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Cool, that worked to link the username to the profile . Thank you

Now I just need to figure out how to get that same data to post to the database.
Reply With Quote
  #15  
Old 09-02-2003, 06:05 AM
assassingod's Avatar
assassingod assassingod is offline
 
Join Date: Jul 2002
Posts: 3,337
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Im not sure if it'll work, but try replacing;
PHP Code:
$sql "INSERT INTO TIMESLIPS (DRIVER,MAKE,MODEL,YEAR,INDUCTION,ET,TRAP,LOCATION) 
VALUES ('
$DRIVER','$MAKE','$MODEL','$YEAR','$INDUCTION','$ET','$TRAP','$LOCATION')"
with
PHP Code:
$sql "INSERT INTO TIMESLIPS (DRIVER,username,MAKE,MODEL,YEAR,INDUCTION,ET,TRAP,LOCATION) 
VALUES ('
$DRIVER',''".addslashes(htmlspecialchars($ausername))."',$MAKE','$MODEL','$YEAR','$INDUCTION','$ET','$TRAP','$LOCATION')"
That should be it but I dunno if it'll work (or even if thats what you want)
Reply With Quote
  #16  
Old 09-02-2003, 06:29 AM
99SIVTEC 99SIVTEC is offline
 
Join Date: Nov 2001
Posts: 281
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

it doesn't appear to add the data to the database after making that change.
Reply With Quote
  #17  
Old 09-02-2003, 06:35 AM
99SIVTEC 99SIVTEC is offline
 
Join Date: Nov 2001
Posts: 281
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

wait, I jumped the gun. I changed it to replace the $DRIVER variable. Now the data posts to the database, but the DRIVER field is blank i nthe results. That syntax must be just a bit off. I think we are on the right track though. My sql looks like this now

PHP Code:
$sql "INSERT INTO TIMESLIPS (DRIVER,MAKE,MODEL,YEAR,INDUCTION,ET,TRAP,LOCATION) 
VALUES ('"
.addslashes(htmlspecialchars($ausername))."','$MAKE','$MODEL','$YEAR','$INDUCTION','$ET','$TRAP','$LOCATION')"
Reply With Quote
  #18  
Old 09-02-2003, 06:36 AM
assassingod's Avatar
assassingod assassingod is offline
 
Join Date: Jul 2002
Posts: 3,337
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

didn't think it would. There is a way I just can't think what:ermm:
Reply With Quote
  #19  
Old 09-02-2003, 06:43 AM
99SIVTEC 99SIVTEC is offline
 
Join Date: Nov 2001
Posts: 281
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

wonder if I can use this? http://www.htmlgoodies.com/beyond/jspass.html#place

I "might" be able to use javascript to pass the
PHP Code:
<a href=\"member.php?s=$session[sessionhash]&action=getinfo&userid=$bbuserinfo[userid]\">$bbuserinfo[username]</a> 
variable to the form value. Forms don't seem to like html as a value so this ight be away around that.
Reply With Quote
  #20  
Old 09-02-2003, 06:51 AM
assassingod's Avatar
assassingod assassingod is offline
 
Join Date: Jul 2002
Posts: 3,337
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Could work
Reply With Quote
Reply


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 12:58 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.05708 seconds
  • Memory Usage 2,265KB
  • 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
  • (5)bbcode_php
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)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
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete