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

Reply
 
Thread Tools Display Modes
  #1  
Old 10-13-2005, 10:13 PM
pyro.699 pyro.699 is offline
 
Join Date: Sep 2005
Location: Fredericton, New Brunswic
Posts: 261
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default add a field to the thread table

i would like to know how to add a field to the thread table... lol, as the title says...

i would also like to know, how to inflict that on my postbit!
Reply With Quote
  #2  
Old 10-13-2005, 10:15 PM
Andreas's Avatar
Andreas Andreas is offline
 
Join Date: Jan 2004
Location: Germany
Posts: 6,863
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

[sql]ALTER TABLE thread ADD foobar VARCHAR(20) NOT NULL DEFAULT ''[/sql]
Reply With Quote
  #3  
Old 10-13-2005, 10:36 PM
pyro.699 pyro.699 is offline
 
Join Date: Sep 2005
Location: Fredericton, New Brunswic
Posts: 261
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

what? lol

that makes the least of sence.. i know how 2 run the query.. ikd what its for, what files to edit...

(its for an rpg script, the user decideds what the requirements are for the rpg he wants to make, then based on his options, it adds them to the postbit...)
Reply With Quote
  #4  
Old 10-13-2005, 10:46 PM
Andreas's Avatar
Andreas Andreas is offline
 
Join Date: Jan 2004
Location: Germany
Posts: 6,863
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Your question was
Quote:
i would like to know how to add a field to the thread table
I've answered it. But it seems like you wanted to know smth. else.
So please state exactly what ou want to know.
Reply With Quote
  #5  
Old 10-13-2005, 11:04 PM
pyro.699 pyro.699 is offline
 
Join Date: Sep 2005
Location: Fredericton, New Brunswic
Posts: 261
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ok, (=D'')=D < Kirby with boxing gloves ^^

I would like to edit the appearance of forum id #26. Ifs goign to be made to fit a customized rpg script.

CURRENT OPTIONS:
look at my post ^^
Da Link

FEATURES:
User can choose what options he/she wants(in the thread posting area) (options are in link)

Depending on what the user has selected, thats what is displayed in the postbit

WHAT I HAVE DONE SO FAR:
added all current tables
added postbits
created the php file
made the querys


lme know if you need any more info
Reply With Quote
  #6  
Old 10-13-2005, 11:32 PM
Guest190829
Guest
 
Posts: n/a
Default

Kirby's sql query is correct

PHP Code:

ALTER TABLE thread ADD foobar VARCHAR
(20NOT NULL DEFAULT '' 
foobar is the new field name.

If you need to get that info in a postbit then you have to use a select query to get the info.

But, why not just use custom profile fields?
Reply With Quote
  #7  
Old 10-13-2005, 11:49 PM
pyro.699 pyro.699 is offline
 
Join Date: Sep 2005
Location: Fredericton, New Brunswic
Posts: 261
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

...

im more asking for a bit of help designing the script... not a request, like iming information i dont really like having people give me the scripts, id like to help build them.

I know that kirbys script is correct, im also asking, what else do i add?
Reply With Quote
  #8  
Old 10-13-2005, 11:50 PM
Andreas's Avatar
Andreas Andreas is offline
 
Join Date: Jan 2004
Location: Germany
Posts: 6,863
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Danny.VBT
If you need to get that info in a postbit then you have to use a select query to get the info.
$threadinfo['foobar'], no need for a query
Reply With Quote
  #9  
Old 10-13-2005, 11:55 PM
Guest190829
Guest
 
Posts: n/a
Default

Quote:
Originally Posted by KirbyDE
$threadinfo['foobar'], no need for a query
Learn something new everyday.
Reply With Quote
  #10  
Old 10-14-2005, 12:06 AM
pyro.699 pyro.699 is offline
 
Join Date: Sep 2005
Location: Fredericton, New Brunswic
Posts: 261
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

ok, i need a bit mroe help... i need ot know how to tel the script to read what the user has selected...

-----
Help from AJ
-----

what i want is to be ale to specify a few things when i go to amke a post, then i want the postbit to be able to read those choices...

Quote:
Originally Posted by AJ
[22:01] Aj - It's That Time of Year Again!: just explain what you did to me
[22:01] Aj - It's That Time of Year Again!: when you make a thread you want to specify some things
[22:01] Aj - It's That Time of Year Again!: thast the main part because you have to add the fields to the datamanager, and learn how to use it
---------------
---NEW POST---
---------------
Quote:
Originally Posted by (=D'')=D
- Alter table thread to add your fields
- Adjust Template newthread
- Creae a Plugin for threadpfdata_start to add the fields to its validfields
- Create a Plugin for newthread_post_start to set the fields in $post to the cleaned form data
- Create a Plugin for newpost_process to set the values from $post to the Datamanager

This method does not cause additional queries
AJ helped me find this post, can you elaberate a bit more on this? more to my specifications?

like, do i add
PHP Code:
 if (thread id code == 26)
 {
 }; 
to every plugin? or what...

and how do i amke the postbit read what the user selected...

Thanks
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 05:20 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.07911 seconds
  • Memory Usage 2,256KB
  • 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
  • (2)bbcode_php
  • (5)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
  • (1)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
  • (8)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_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
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete