vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   My PHP Forum Creation Breaks in 3.8.1 (https://vborg.vbsupport.ru/showthread.php?t=205830)

ShannonA 02-18-2009 07:24 PM

My PHP Forum Creation Breaks in 3.8.1
 
I do some forum creation out in PHP.

My forum creation function does the minimal amount of working, not trying to build up any of the lists like the childlist or the parentlist, then runs some vBulletin functions to clean everything up:

Quote:

require_once('./global.php');
require_once('includes/functions_databuild.php');

build_forum_counters($rebuildid, true);

vbflush();
Sadly, this worked in 3.7.2 and no longer seems to work in 3.8.1. Now newly created forums don't get their lists built out, and (presumably as a result) don't show up either in the forums or the forums administration tool.

Any idea what changed from 3.7.2 to 3.8.1 and what it'll take to fix it? (Else it backs to digging through the code.)

Here's the forum creation, for what it's worth:

Quote:

function createForum($title,$desc,$order,$parentid,$options ,$daysprune) {

global $forumdbh, $dbForumName;

$title = addslashes(stripslashes($title));
$desc = addslashes(stripslashes($desc));

$clean_title = strip_tags($title);
$clean_desc = strip_tags($desc);

$SQL = "INSERT INTO forum ";
$SQL .= "(title,description,displayorder,parentid,options, daysprune,title_clean,description_clean) ";
$SQL .= "VALUES ('$title','$desc',$order,$parentid,$options,$daysp rune,'$clean_title','$clean_desc') ";

$result = mysql_db_query($dbForumName,$SQL,$forumdbh);

$forumid = mysql_insert_id($forumdbh);

return $forumid;
}

Dismounted 02-19-2009 04:18 AM

You should be using the vBulletin Data Managers to do this! Some documentation can be found in the manual, and some articles are available.


All times are GMT. The time now is 06:19 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.02045 seconds
  • Memory Usage 1,711KB
  • 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
  • (2)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