vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   Refresh AdminCP Menu during Product Install (https://vborg.vbsupport.ru/showthread.php?t=177916)

Grim77 05-03-2008 05:31 AM

Refresh AdminCP Menu during Product Install
 
Is there anyway (using Javascript or otherwise) to automatically refresh the AdminCP menu (left side frame) during a product install, using the PHP install code for instance.

I'm developing a product that will include a cpnav XML file, and would rather not have to instruct users to "refresh the page" or "press F5" so they can see the new menu options. My first thought would be JavaScript code to instruct the left side menu frame to refresh itself, but I'm not sure if it's possible, how it would be done, or whether or not it would work within the product install code.

Besides that one issue, everything is seamless. Many of the mods I see are telling their users to refresh, or logout then log back-in.

Any ideas?

GameWizard 05-03-2008 09:36 AM

This should get you started:

Code:

<script type="text/javascript">

function Reload () {
var f = document.getElementById('nav');
f.src = f.src;
}

</script>

'nav' in this case being the name of the iframe you want to refresh, although I am not certain if this is the exact name of the iframe, you will have to double check.

Then you need to initiate the code, you will have to setup code that will process it once your hack is installed. But this code below will allow you to perform the action via link:

Code:

<input type="button" value="Reload" onclick="Reload();">

Grim77 05-03-2008 01:07 PM

Thank you!

I think I'm going to give it a try, making sure to check that the XML file exists before attempting refresh :)


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