vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=252)
-   -   Query for adding forums (https://vborg.vbsupport.ru/showthread.php?t=303740)

DaveNGU 10-23-2013 01:25 PM

Query for adding forums
 
Hello,

I'd like to add a list of forums and mark 'forum is active' as no, and would prefer to do it within a query to save time. What would be the correct format for this?

Thanks,

ForceHSS 10-23-2013 02:27 PM

You want a query that will make forums for you?

final kaoss 10-23-2013 07:38 PM

Not sure about turning it "off" but there is an addon to automatically add forums.

DaveNGU 10-24-2013 06:29 PM

Quote:

Originally Posted by ForceHSS (Post 2455556)
You want a query that will make forums for you?

Sort of, I guess, but the main trouble I'm having is with marking them as inactive.

I want to add a list of about 100 forums so it makes sense to do it in one query rather than manually.

ForceHSS 10-24-2013 06:38 PM

would take u longer to make the query as u need to make a different name for each forum section and permissions for each
but here are two querys to get you started

Main section
Code:

INSERT INTO `forum` VALUES ('1', '0', 'Main Category', 'Main Category', 'Main Category Description', 'Main Category Description', '86017', '0', '1', '0', '0', '', '0', '', '0', '0', '', '0', '-1', '', '', '-1', '1,-1', '', '', '1,2,-1', 'lastpost', 'desc', '');
Forum inside main section
Code:

INSERT INTO `forum` VALUES ('2', '0', 'Main Forum', 'Main Forum', 'Main Forum Description', 'Main Forum Description', '89799', '0', '1', '0', '0', '', '0', '', '0', '0', '', '0', '-1', '', '', '1', '2,1,-1', '', '', '2,-1', 'lastpost', 'desc', '');
This is only a guide

Elite_360_ 10-25-2013 02:22 AM

Quote:

Originally Posted by DaveNGU (Post 2455921)
Sort of, I guess, but the main trouble I'm having is with marking them as inactive.

I want to add a list of about 100 forums so it makes sense to do it in one query rather than manually.

do you want to make a list of 100 new forums or make 100 forums inactive?

DaveNGU 10-25-2013 12:23 PM

Quote:

Originally Posted by Elite_360_ (Post 2456007)
do you want to make a list of 100 new forums or make 100 forums inactive?

100 new forums which are marked inactive :).

vBNinja 10-25-2013 01:31 PM

Quote:

Originally Posted by DaveNGU (Post 2456119)
100 new forums which are marked inactive :).

Would they all have the same parent forum/category?

squidsk 10-25-2013 03:22 PM

You'd be better off writing a php script that uses the forums datamanager and having that create 100 forums with the settings you need. Forum creation impacts more than just the forum table so just filling in entries in the forum table may or may not accomplish what you're after.

DaveNGU 10-26-2013 06:05 PM

Quote:

Originally Posted by vBNinja (Post 2456135)
Would they all have the same parent forum/category?

Yes!


All times are GMT. The time now is 05:46 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.01147 seconds
  • Memory Usage 1,737KB
  • 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_code_printable
  • (5)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete