rejetto forum

HFS with ChatROOM or Message box ?

yoksan · 19 · 10868

0 Members and 1 Guest are viewing this topic.

Offline yoksan

  • Occasional poster
  • *
    • Posts: 5
    • View Profile
Helo,

I try to check and search the forum, but all link is outdated.
What i want is how to add ChatROOM or Message box like shout mix in hfs ?
I found this function quite interesting in the WWW File Share Pro 5.3 with the plugin Chatroom and Message, so i wonder can hfs do something like this ? or how to edit the template if i just copy the plugin from WFS Pro 5.3 to hfs? is it working ? or do you have any idea how to do it ?

Can you please list down the procedure step by step ?

Expert please help.


THanks,
yoksan


Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13510
    • View Profile
Did you consider using a template with chat support?


Offline yoksan

  • Occasional poster
  • *
    • Posts: 5
    • View Profile
ya i have considered it , but is just that i don't know how to edit or add the code...
mind that you provide me the code and teach me how to use it ? thanks


Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13510
    • View Profile
easy: download the template you like, and just drag&drop it over HFS.

but this is true only if you use the last beta version


Offline yoksan

  • Occasional poster
  • *
    • Posts: 5
    • View Profile
I don't know which one that has the chat support.
can you please provide me the download link for template that have chat function ?
give me a few link ?

thanks..



Offline Mars

  • Operator
  • Tireless poster
  • *****
    • Posts: 2059
    • View Profile
A solution on the basis of the work of rejetto: the file of saving 'chat.txt' is situated in the directory of hfs.exe. there is one auto-refresh of 5000 ms (that is 5s) when the field name is filled and when the text field is empty. it is added  the possibility of resetting the chat.txt file with the command
 '!Clear' , her size max is fixed to 10240 characters and divided by two when the max is reached.

You can use this code as diff template in a virtual folder, or to rename it as hfs.diff.tpl in a real folder of the vfs.

To use several copies of chatlight.tpl, rename the chat.txt name by the other one in the line: {.set | chatfile | chat.txt .}

the pass to reset file is at line: {.set | pass | !clear .}   ( ! is used as an IRC command)

auto refresh at line:  if (refresh) setTimeout("Prefresh()",5000);  ( 5000 = 5 second )

max length for chat.txt is at line: {.set| maxlength | 10240.}

« Last Edit: September 01, 2008, 09:27:56 PM by mars »


ebola

  • Guest
w0w

This is realy cool @ mars!
I like the idea and how you have done this.


Maybee you could help me with the following:
I would like to have a input-field (like your message-field) and a button.
User enters info in textfield and hit button.
After that he will be redirected to a existing html-file.

Checked google and found some things (onsubmit=) but can't get it to work :(

Cheers,
ebola


Offline Mars

  • Operator
  • Tireless poster
  • *****
    • Posts: 2059
    • View Profile
better that... google page with an IFRAME
« Last Edit: September 04, 2008, 07:06:31 AM by mars »


ebola

  • Guest
Hi

anyone knows what's wrong with that:

Code: [Select]
<html>
<head>
<title>BlahBlah</title>

<!-- Define special:begin -->
{.set|Rnd_No|{.random number|1000000000|9999999999/random number.}/set.}

<!-- Save input to file on hard drive -->
{.save|{.^Rnd_No.}.txt|{.?text.}/save.}
</head>

<script language="JavaScript">
<!--
function na_change_location(url)
{
  location=url;
}

// -->
</script>

</head>
<body>

<form name="frm">
    <input type="text" name="text">
    <input type="submit" OnClick="na_change_location('abc.html');">
</form>

</body>
</html>

It saves the file with the userinput just fine - but wont redirect to abc.html :(


Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13510
    • View Profile

ebola

  • Guest
Hi

Not working either :(
I think it's not possible to use submit and another action like onClick for same button.
either it is saving text or redirecting. Tried 100 different solutions from google but none is working for both things.


ebola


Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13510
    • View Profile
yes, it is possible, in several ways i think.
method1: normal button, onclick, do your job, then
document.getElementById('id_of_the_form').submit();


ebola

  • Guest
Hi

Thx for your answer & help.
I think I leave this thing. Pure html and macros are fine. But for the project I'm running most people have scripts disabled so there is no way for fancy things like that.

Thx anyway,
ebola


Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13510
    • View Profile