vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   Self - Submitting Form (https://vborg.vbsupport.ru/showthread.php?t=75744)

Michael Morris 02-04-2005 10:20 PM

Self - Submitting Form
 
I'm working on a script that imports data from a custom database into vbulletin in the form of posts and threads. I've ran into a problem that a section of the script now takes so long to run PHP times out on the request. Rather than reconfigure PHP, I'd like to break the operation up into phases. As each phase completes it will send a page that has a self submitting form that loads the next phase. How do I make a self submitting form?

Dean C 02-05-2005 12:02 AM

Take a look at the code vB3 uses when rebuilding the search index ;)

Michael Morris 02-05-2005 12:59 AM

K, I will. Thx Dean. Uhm.. Do you know which file does that off hand?

Dean C 02-05-2005 08:58 AM

admincp/misc.php :)

Michael Morris 02-05-2005 03:14 PM

K, I found this in misc.php - looks like my candidate

PHP Code:

    if (($totalposts $doprocess OR !$doprocess) AND $checkmore $DB_site->query_first("SELECT postid FROM " TABLE_PREFIX "post WHERE postid >= $finishat LIMIT 1"))
    {
        if (
$autoredirect == 1)
        {
            
print_cp_redirect("misc.php?$session[sessionurl]do=buildpostindex&startat=$finishat&perpage=$perpage&autoredirect=$autoredirect&totalthreads=$totalthreads&doprocess=$doprocess&totalposts=$totalposts");
        }
        echo 
"<p><a href=\"misc.php?$session[sessionurl]do=buildpostindex&amp;startat=$finishat&amp;perpage=$perpage&amp;autoredirect=$autoredirect&amp;totalthreads=$totalthreads&amp;doprocess=$doprocess&amp;totalposts=$totalposts\">" $vbphrase['click_here_to_continue_processing'] . "</a></p>";
    }
    else
    {
        
define('CP_REDIRECT''misc.php');
        
print_stop_message('rebuilt_search_index_successfully');
    } 

Thanks again.


All times are GMT. The time now is 06:49 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.01092 seconds
  • Memory Usage 1,718KB
  • 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
  • (1)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (5)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