The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Back End from jquery-php-chat (first version) to a simple forum

  • This topic is empty.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
  • #29561

    I need an help to realize a little forum.
    I start by the code of a chat on this tutorial:

    only I need to make a little change: i want to see messages sent in the past sessions, when I open my room.
    Substantially, I want to see in chat-area what is writen in chat.txt when I open my page.

    May you help me for this?

    thanks a lot


    now I have done this:
    if I comment this in the process.php:

    foreach ($lines as $line_num => $line)
    // if($line_num >= $state){
    $text[] = $line = str_replace("n", "", $line);
    // }


    I see all the messages of the past sessions, before my connection, but only after I sent one message.
    If I don’t send anything, I don’t see anuthing in the "chat-area"…

    I have the same result if I put var state=0; in chat.js and putting in comment //chat.getState(); in index.php

    But it is not enought becouse I need to see any old message, when I restart the page

    what can I do?

    many many thanks


    ok… I have done..

    state=0; in file chat.js
    // getStateOfChat() ; commented in Index.php
    inside Index.php:

    chatUpdate(); // display all chat.txt….

    setInterval (‘chatUpdate()’,100000 ); so my scroll bar works again.

    Thanks a lot, for your good job.


Viewing 3 posts - 1 through 3 (of 3 total)
  • The forum ‘Back End’ is closed to new topics and replies.