vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   help using admincp/misc.php?do=update forum (https://vborg.vbsupport.ru/showthread.php?t=65932)

meowmeow 06-07-2004 12:50 PM

help using admincp/misc.php?do=update forum
 
I want to run the same function thats run when you click the
'update forum info' button in admincp/import&maintenance/update counters
and I think that is the "update forum" in the misc.php
how can I execute this function from another script i wrote???

Xenon 06-07-2004 04:40 PM

you have to require functions_databuild.php

and then this function will help you:

PHP Code:

// ###################### Start updateforumcount #######################
// updates forum counters and last post info
function build_forum_counters($forumid


meowmeow 06-08-2004 08:28 AM

ok did that...
i have this:
PHP Code:

require ("../../includes/functions_databuild.php"); 

and this
PHP Code:

for( $i $i count($forums) ; $i++)
{
    
$row1 $forums[$i];
    
build_forum_counters($row1['id_mg']);


but i get an error:
"Fatal error: Call to undefined function: fetch_foruminfo() in /www/forum/htdocs/includes/functions_databuild.php on line 78"

it doesnt find the fetch_foruminfo() function for some reason! Do i maybe have to put the script i wrote in the same directory as the functions_databuild.php???

Xenon 06-08-2004 10:36 AM

erm, you have to make sure, that you have global.php required in your script as well, as that file includes other important files as well..

meowmeow 06-08-2004 10:42 AM

and when i have
PHP Code:

include ("../../global.php"); 

i get this error:

Fatal error: Failed opening required './includes/init.php' (include_path='.:/usr/local/lib/php') in /www/forum/htdocs/global.php on line 18
or
Parsing functions.php Time before: 1086698586.0523
Fatal error: Failed opening required './includes/functions.php' (include_path='.:/usr/local/lib/php') in /www/forum/htdocs/global.php on line 37

when i tried to comment out the first include.
it always seems to be an include of an include! what am i doin wrong?

Xenon 06-08-2004 10:46 AM

your script is in the wrong directory.

you can place it in the forum directory itself, or you do a chdir() before you do the include.


All times are GMT. The time now is 03:43 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.02314 seconds
  • Memory Usage 1,719KB
  • 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
  • (4)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