Menu

text input frame

2002-02-04
2002-02-15
  • robert stewart

    robert stewart - 2002-02-04

    Is there any way to stop the 'text input' frame reloading when the submit button is pressed? This is rather annoying because you have to wait for it to reload before you can type again.

    Regards,

    Robert

     
    • Mirko Giese

      Mirko Giese - 2002-02-15

      to do so, you have 2 possibilities:
      1. remove the code which kicks idle users
      2. add code to be select whether the user is only idle or has closed the browser

      i would prefer the second method, although it is more to do.

      but first the first method:
      open your index.php, go to line 99 (well, it is line 99 in my version, maybe you changed something) or search for this
      /** Loesche alle Teilnehmer aus der Tabelle der Telnehmer, die 10 Minuten nix gesagt haben  **/
      $result=mysql_query("DELETE FROM chat WHERE Zeit<(UNIX_TIMESTAMP()-(10*60))",$db_handle);
      and make a comment out of the db-query, cause this deletes ilde users. but remember this: not only that your idle users are not kicked until they log-of normally, any crashed user will be listed as still online, too. in

      second method:
      my opinion it is better, to go another way:
      (a way which may be good to go in the main chatdevelopment, too)
      leave index.php as it is but open your getlines.php. my idea is to note everey reload from the browser (which is normally made every 10 seconds). only if this reload is not done for a longer time (actual it would be 10 minutes) the user is crashed and can be deleted from the list of online users. if the user is only in listen mode and did not say anything for a very long time, he stays in the online-table. if i understand you rigth, this is what you want.
      so what to do? as i sayed, getlines.php is the fiel to edit.
      i think a good place to do this update is before the chat looks for new lines in the database. so this would be before line 37 or before this comment:
      //output frame must be loaded first else parent.output.document has no properties
      ok, if you are there add this line to getlines.php:
      include('timeupdate_inc.php');
      and thats all.

      BUT: this is untested, i dont know if it REALLY works. try it and look what happens. maybe we have to change something. well maybe it works ;-)

      hope that helps you out of your problem

      kind regards

      mirko

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.