vb.org Archive

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

Kaitlyn2004 11-01-2008 01:47 PM

Create forums
 
If I want to create a number of forums, do I just:

PHP Code:

include global.php
include class_dm_forum.php

$f 
= new vB_DataManager_Forum();
$f->set('parentid'5);
$f->set('title''My forum');
$f->save(); 

Is there anything else I need to do?

Thanks

--------------- Added [DATE]1225566355[/DATE] at [TIME]1225566355[/TIME] ---------------

...anyone?

Dismounted 11-02-2008 03:36 AM

I suggest you have a look at the Data Managers section of the manual.

You should initialise a data manager like this:
PHP Code:

$forum =& datamanager_init('Forum'$vbulletinERRTYPE_ARRAY); 

Also, look inside the data manager file to see what is required and what is not ($validfields array).

mokujin 11-03-2008 09:37 PM

Quote:

Originally Posted by Dismounted (Post 1657645)
I suggest you have a look at the Data Managers section of the manual.

You should initialise a data manager like this:
PHP Code:

$forum =& datamanager_init('Forum'$vbulletinERRTYPE_ARRAY); 

Also, look inside the data manager file to see what is required and what is not ($validfields array).

Hi Dismounted,
I see there is not DMs for Groups and Albums, so I cant use DMs for my custom mod with Groups or Albums?
Thank you!

Guest190829 11-03-2008 09:39 PM

There are data managers for Social Groups and Albums. See:

includes/class_dm_album.php

and

includes/class_dm_socialgroup.php


All times are GMT. The time now is 10:56 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.01558 seconds
  • Memory Usage 1,722KB
  • 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
  • (3)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (4)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