vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   How to let a applet run just 1 time, not reload (https://vborg.vbsupport.ru/showthread.php?t=202740)

BiZiMDiYaR 01-22-2009 06:10 PM

How to let a applet run just 1 time, not reload
 
Hi,

How are we able to let applets or a piece of php code to run when on the forum, but this piece of code should not reload again, when still on the forum, so should be only 1 time... When the person leaves the forum and comes back, that code should be also loaded.. I want to run something 1 time when he is on the site and when the site is reloaded, that piece of code should not run again...

There should be some way to let this load 1 time I assume.. Can anyody help me with this ? Thanks.

<?php

code

?>

Dismounted 01-23-2009 03:40 AM

Define "leave the forum".

BiZiMDiYaR 01-23-2009 08:32 AM

Hi,

Thanks for your reply, euhmm when they close the website, that should mean "leave the forum", but if there is also a possibility to check for, if the php code is running, so still loaded, it should not be reloaded again, if the php is not running, it should reload again.

Also, how to use the user's nick to add to the code ? I want it to use the username of the person.

Best regards,

Thanks.

Dismounted 01-23-2009 08:44 AM

HTTP is a stateless protocol. It does not know of any previous page loads. It only acts on the request it receives. PHP deals with each individual request and then closes. When the user finishes loading the page, PHP is done with the request, it does not continue to "run".

BiZiMDiYaR 01-23-2009 12:43 PM

Hi,

But you have got some php script... php bot, that runs when the page is loaded. Let me tell in such way, I have a php bot, that code I want to add into vbulletin... but I don't want it to be reloading all the time... it should just do 1 time...

How to handle that ?

Dismounted 01-24-2009 03:29 AM

Once how often? You still neglect that detail.

BiZiMDiYaR 01-25-2009 06:22 PM

Hi,

Sorry, let me try to be more clear. When a user connects on my forum, an java applet needs to run, while that person is still on the forum ( doesn't affect when going to different pages on the forum )... that applet needs to run untill the person leaves the forum... closes the IE or firefox.

The applet is a piece of code which begins with:

<applet
code
</applet>

Best regards

Dismounted 01-26-2009 04:49 AM

Once the person navigates to a different page, the applet will stop running. It will then start running again on the new page, etc. The applet will not have any knowledge of the previous run.

BiZiMDiYaR 01-26-2009 10:53 PM

Hi,

Can't we have somthing that stays on top or some way... ? Is there any way to handle this like above ?

Dismounted 01-27-2009 04:06 AM

The whole page gets reloaded, so you can't have anything that "stays on top".


All times are GMT. The time now is 05:25 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.01031 seconds
  • Memory Usage 1,723KB
  • 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)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete