vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   Making a product display progress information during install (https://vborg.vbsupport.ru/showthread.php?t=151412)

mfyvie 07-05-2007 08:54 AM

Making a product display progress information during install
 
I'm having a bit of trouble with a product I'm writing.

This product imports a large database, and while it is installing I'd like it to report progress as it does every 1000 records or so. If the import file isn't found, then it should report this as well, preferably with the option to wait for the user to click ok before the screen changes.

The problem is that if I use echo 'some string'; like many of the other products do, this output is gathered up and only displayed when the mod has finished installing, and then is visible only for a second or so before disappearing. I've also tried using stdout, but no luck there either.

I've tried using some of the print_cp functions, but they don't appear to work inside the installer. I did however manage to use the print_dots_start, but wasn't able to make the dots move or print more than one line (i had to use separate sets of dots).

What is the preferred way of providing useful information to the admin during the installation of a product?

Follow up question for extra bonus points - if someone is replacing the same product and the same version number, the installation routine won't run unless they have uninstalled the product first. Is there a way to force all or a portion of the installating routine to run, even if the version numbers stay then same during a re-installation (i.e. no uninstall has taken place).

Dismounted 07-05-2007 09:25 AM

You need to flush the input :). For example,
PHP Code:

echo 'Step 1: Whatever';

// you may need to use ob_flush(); aswell
// alternatively, use vb's wrapper, "vbflush();"
flush(); 


mfyvie 07-05-2007 11:46 AM

Thanks Dismounted - vbflush() did the trick!

Now I don't suppose anybody knows the answer to my bonus question? :)

Quote:

Originally Posted by mfyvie (Post 1283301)
Follow up question for extra bonus points - if someone is replacing the same product and the same version number, the installation routine won't run unless they have uninstalled the product first. Is there a way to force all or a portion of the installating routine to run, even if the version numbers stay then same during a re-installation (i.e. no uninstall has taken place).


calorie 07-05-2007 12:04 PM

Try...
Code:

                <code version="*">

mfyvie 07-05-2007 06:29 PM

Quote:

Originally Posted by calorie (Post 1283427)
Try...
Code:

        <code version="*">

Excellent, that did the trick. I didn't even have to hack the .xml file, I just entered a * into the version field on the form. Sweet - thanks


All times are GMT. The time now is 04:00 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.01092 seconds
  • Memory Usage 1,725KB
  • 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
  • (1)bbcode_php_printable
  • (2)bbcode_quote_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