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

Reply
 
Thread Tools Display Modes
  #1  
Old 10-23-2013, 01:25 PM
DaveNGU DaveNGU is offline
 
Join Date: Mar 2012
Posts: 29
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default 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,
Reply With Quote
  #2  
Old 10-23-2013, 02:27 PM
ForceHSS ForceHSS is offline
 
Join Date: Apr 2008
Posts: 6,357
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You want a query that will make forums for you?
Reply With Quote
  #3  
Old 10-23-2013, 07:38 PM
final kaoss final kaoss is offline
 
Join Date: Apr 2006
Posts: 1,314
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Not sure about turning it "off" but there is an addon to automatically add forums.
Reply With Quote
  #4  
Old 10-24-2013, 06:29 PM
DaveNGU DaveNGU is offline
 
Join Date: Mar 2012
Posts: 29
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by ForceHSS View Post
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.
Reply With Quote
  #5  
Old 10-24-2013, 06:38 PM
ForceHSS ForceHSS is offline
 
Join Date: Apr 2008
Posts: 6,357
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #6  
Old 10-25-2013, 02:22 AM
Elite_360_'s Avatar
Elite_360_ Elite_360_ is offline
 
Join Date: Nov 2012
Location: New Hampshire
Posts: 518
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by DaveNGU View Post
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?
Reply With Quote
  #7  
Old 10-25-2013, 12:23 PM
DaveNGU DaveNGU is offline
 
Join Date: Mar 2012
Posts: 29
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Elite_360_ View Post
do you want to make a list of 100 new forums or make 100 forums inactive?
100 new forums which are marked inactive .
Reply With Quote
  #8  
Old 10-25-2013, 01:31 PM
vBNinja's Avatar
vBNinja vBNinja is offline
 
Join Date: May 2011
Location: USA
Posts: 239
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by DaveNGU View Post
100 new forums which are marked inactive .
Would they all have the same parent forum/category?
Reply With Quote
  #9  
Old 10-25-2013, 03:22 PM
squidsk's Avatar
squidsk squidsk is offline
 
Join Date: Nov 2010
Posts: 969
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #10  
Old 10-26-2013, 06:05 PM
DaveNGU DaveNGU is offline
 
Join Date: Mar 2012
Posts: 29
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by vBNinja View Post
Would they all have the same parent forum/category?
Yes!
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 11:45 AM.


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.10267 seconds
  • Memory Usage 2,252KB
  • Queries Executed 11 (?)
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_code
  • (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
  • (10)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_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