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

Reply
 
Thread Tools Display Modes
  #1  
Old 08-02-2001, 08:30 AM
VirtueTech VirtueTech is offline
 
Join Date: Oct 2001
Posts: 189
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hello,

I want to add some new fields to capture for a new post. These fields will be included in the first post in the postbit area.

Things like this:

Price:
Shipping:
What Comes With it:
Trades:
if yes what:

Can someone give me instructions I need to follow to setup the DB and scripts to do this. Thanks.
Reply With Quote
  #2  
Old 08-02-2001, 01:34 PM
VirtueTech VirtueTech is offline
 
Join Date: Oct 2001
Posts: 189
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Since this will be adding fields only to the first post of the thread...do I make the cnages in the "post" or "thread" table?
Reply With Quote
  #3  
Old 08-02-2001, 02:04 PM
Mark Hewitt Mark Hewitt is offline
 
Join Date: Oct 2001
Posts: 174
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Since it's the first post it would be better to associate it with a thread, rather than put extra fields into each post.

You probably know all this stuff already but.
Alter the thread table so every entry has new fields to store the required information.
You need to change the template for new thread to include your new input boxes.
Then find the part in new thread where it accesses the database thread table to create a new thread. You need to alter this to include your new variables that are passed to it by your template modifications. Looking at the code you can probably tell the syntax.

Once the information is in the database you need to find a way to get it out. Using postbit probably isn't the best idea as that deals with every post not just the first one. Perhaps showing the information at the top of each thread would be acceptable?

You might be able to get away with not altering showthread.php itself as IIRC the entire thread record is downloaded so you should be able to put it directly in your templates as a variable.

Sorry if it doesn't tell you exactly how to do it, but to do that I would have to implement it, and I don't need this feature!
Reply With Quote
  #4  
Old 08-02-2001, 03:13 PM
VirtueTech VirtueTech is offline
 
Join Date: Oct 2001
Posts: 189
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

That's more than enough Mark thanks.
Reply With Quote
  #5  
Old 08-03-2001, 05:57 AM
VirtueTech VirtueTech is offline
 
Join Date: Oct 2001
Posts: 189
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Mark...I got it to write to the DB....now I'm having problems calling it into the first post.

can you elaborate more on this process to call it in the new thread?

Thanks.
Reply With Quote
  #6  
Old 08-03-2001, 07:08 AM
Mark Hewitt Mark Hewitt is offline
 
Join Date: Oct 2001
Posts: 174
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'm going off memory so please excuse any errors.

Just looked at showthread.php and it doesn't seem to contain a general thing to pull thread info out of the database. Your probably going to have to put a new database call in there. I believe there is code that will do this for you in forumdisplay.php, the part which downloads into the $thread variable.

On you should then be able to extract things by calling the variable $thread[yourinfo] etc.

Sorry I haven't time to look into it properly
Reply With Quote
  #7  
Old 08-03-2001, 07:36 AM
VirtueTech VirtueTech is offline
 
Join Date: Oct 2001
Posts: 189
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Your correct...I was coming back to tell everyone I figured it out..and I now see your post...but your right.

thanks.
Reply With Quote
  #8  
Old 06-27-2004, 04:37 AM
SVTBlackLight01's Avatar
SVTBlackLight01 SVTBlackLight01 is offline
 
Join Date: Jan 2003
Location: Texas
Posts: 504
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

If you have the time, could you give us a rundown of the steps to do this? I'm working on the same thing, but still have a few issues to work out. (this is for VB3)
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 09:11 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.04085 seconds
  • Memory Usage 2,222KB
  • Queries Executed 13 (?)
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)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (8)post_thanks_box
  • (8)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (8)post_thanks_postbit_info
  • (8)postbit
  • (8)postbit_onlinestatus
  • (8)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_postinfo_query
  • fetch_postinfo
  • 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