vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   custom forums on vB3 (https://vborg.vbsupport.ru/showthread.php?t=184934)

sturdevk 07-10-2008 07:27 PM

custom forums on vB3
 
Hi,

We are creating forums from our application(by directly inserting records into forum, thread and post). With vB 1.1, for creating a forum we are inserting a record into forum, thread and post. We also update forumpermission and allwed_in.

Now we are migrating to vB 3.6, what I need to do to create a forum from our application?, because I could see lot of changes on db with vB3.

Thanks,
S~

Opserty 07-10-2008 08:36 PM

Use the Data Managers to save anything to the database.

Direct database edits are not really advised.

Check the Articles section for more information on coding in vBulletin. Also see: vBulletin Code Standards

RLShare 07-10-2008 09:26 PM

PHP Code:

$forumdata =& datamanager_init('Forum'$vbulletinERRTYPE_ARRAY);
$forumdata->set('title''NAME OF NEW FORUM');
$forumdata->set('description''FORUM DESCRIPTION');
$forumdata->set('link''');
$forumdata->set('displayorder'1);
$forumdata->set('parentid'12);
$forumdata->set('daysprune', -1);
$forumdata->set('defaultsortfield''lastpost');
$forumdata->set('defaultsortorder''desc');
$forumdata->set('showprivate'0);
$forumdata->set('newpostemail''');
$forumdata->set('newthreademail''');
$forumdata->set_bitfield('options','moderatenewpost'0);
$forumdata->set_bitfield('options','moderatenewthread'0);
$forumdata->set_bitfield('options','moderateattach'0);
$forumdata->set_bitfield('options','styleoverride'0);
$forumdata->set_bitfield('options','canhavepassword'0);
$forumdata->set_bitfield('options','cancontainthreads'1);
$forumdata->set_bitfield('options','active'1);
$forumdata->set_bitfield('options','allowposting'1);
$forumdata->set_bitfield('options','indexposts'1);
$forumdata->set_bitfield('options','allowhtml'0);
$forumdata->set_bitfield('options','allowbbcode'1);
$forumdata->set_bitfield('options','allowimages'1);
$forumdata->set_bitfield('options','allowsmilies'0);
$forumdata->set_bitfield('options','allowicons'0);
$forumdata->set_bitfield('options','allowratings'0);
$forumdata->set_bitfield('options','countposts'1);
$forumdata->set_bitfield('options','showonforumjump'1);
$forumdata->set_bitfield('options','prefixrequired'1);
$forumdata->set('styleid', -1);
$forumdata->set('imageprefix''');
$forumdata->set('password''');

$forumdata->save();
unset(
$forumdata); 

^^Thats how you create a new forum in code, if you are unsure of what an option is, look at the forum manager for creating new forums and see the descriptions next to those options.

Opserty 07-10-2008 09:42 PM

Its always best to work out things for yourself then to copy and paste. ;)

You can learn things which you will remember then. :)

RLShare 07-11-2008 12:28 AM

lol..yeah I guess so. It took me forever to figure out, so I figured I'd help. I guess it might have taken me forever because I was not looking through the vbulletin manual, I was looking through the files themselves.

sturdevk 07-11-2008 12:37 PM

Thank you for the responses. I have gone through DBManager and Code standards part, helped me to understand how to update data through PHP. But, we are using a Java application to update DB, Does any body has the data model(relationships) of vB3.6?

Thanks in advance,
S~


All times are GMT. The time now is 10:00 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.01090 seconds
  • Memory Usage 1,747KB
  • 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
  • (1)bbcode_php_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