vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=251)
-   -   Custom Fields on New Thread? (https://vborg.vbsupport.ru/showthread.php?t=278460)

Abhik 02-12-2012 12:02 PM

Custom Fields on New Thread?
 
Hello,
I want to add two custom text fields on new thread which will be saved to database for that thread while posting that thread.

And, then I want to call those two fields in showthread.

How can I do that?

I already created two text fields using a plugin at newthread_start hook and they are showing on while creating a new thread.

NB: I followed this tutorial, but that one is saving the values with post, not database and that's creating some problems.

Thanks

Lynne 02-12-2012 05:28 PM

That article talks about adding it to the database also.

Abhik 02-12-2012 05:32 PM

Quote:

Originally Posted by Lynne (Post 2298976)
That article talks about adding it to the database also.

Amm!! Can you please tell me which part is that?
Sorry for being such a nerd, but I am new to coding.

Also, how can I call the values in a custom template?
Thanks

Lynne 02-13-2012 12:30 AM

Well, he just says "Add additional fields values to post/database" He shows and example of adding it to the post message. If you want it in the database, then you will need to add the field to the database and to the datamanager. I know there are other examples of doing that around here if you don't know how to do that.

Abhik 02-13-2012 03:43 AM

Quote:

Originally Posted by Lynne (Post 2299109)
Well, he just says "Add additional fields values to post/database" He shows and example of adding it to the post message. If you want it in the database, then you will need to add the field to the database and to the datamanager. I know there are other examples of doing that around here if you don't know how to do that.

Can you please guide me to such an tutorial?
Thanks

Lynne 02-13-2012 08:22 PM

You really should look through the articles forums. There is a ton of information in there. Just a couple here:

Datamanagers: Objects as Data and Methods
[HOW TO] Add custom fields to new threads


All times are GMT. The time now is 11:21 AM.

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.01045 seconds
  • Memory Usage 1,718KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (6)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete