rejetto forum
Software => HFS ~ HTTP File Server => HTML & templates => Topic started by: Mars on January 10, 2008, 12:56:59 AM
-
Moved lower in the topic
-
Vu, lu, et aprouvé ! :D
Un petit détaïl:
Le fait qu'il commence le "refresh" à l'ouverture, oblige à speeder pour entrer le pseudo, ou à taper une lettre en zone texte.
Ce serait peut-être mieux (si possible), que le "refresh" commence au premier envoi.
Remarque que je peux toujours augmenter le délai entre refresh... mais tous le monde ne met pas les mains dans le "cambouis" si peu soit-il.
C'est juste pour que ce chat ronronne dans tous les foyers. ;D
Sinon, il est toujours aussi sympa.
++
-
If we can make this chat into a shoutbox, i will use it in my new template. The only downside i can think of is editing out spam, they'
ll have to edit the file directly am i right?
-
now that we have save, it would be possible but difficult. When I finish my current project I'll have a look at creating a shoutbox, it will be similar to what I'm doing now except simpler.
-
Chat.tpl was supplied by rejetto, and is in the sourcesof the beta version
I use it by creating a virtual directory CHAT and by authorizing only the identified accounts, and by placing html code in folder right-click-->> advanced - > diff-template of the concerned directory
-
Si tu veux jeter un oeil sur ton chat sur mon hfs, j'ai fait des modifs qui fonctionnent (zone d'affichage du dialogue style %comment%,) et j'ai placé des boutons smiley, mais je ne sait pas les faires fonctionner.
A côte de la zone d'affichage de la conversation, j'ai essayé d'insérer un textarea pour éditer directement le fichier chat.txt en temps réel... mais c'est pas pour aujourd'hui. :-\
-
adding auto refresh every 10s , refresh stopped if your TEXT box is not empty or if focus is on name
a text is examined with one pass to reset chat.txt ( by default !reset)
you can change !reset by {{load|chatpass.txt}} and put your command in chatpass.txt who must be plced in same directory as chat.txt
last entry is at first now (changing 'append' to 'save' ) and you can choice the maxlength for the file
<html>
<head>
<script language="JavaScript" type="text/JavaScript">
<!--
var refresh=true;
function Frefresh() {
if ((document.frm.text.value=='') & (document.frm.login.value>'') & refresh)
window.location="{{get|url|text=}}";
};
setTimeout("Frefresh()",10000);
//-->
</script>
</head>
<body>
{{set|maxlength|10240}}
{{if|{{filesize|chat.txt}}>{{^maxlength}}|
{{save|chat.txt|{{cut||{{div|{{^maxlength}}|2}}|{{load|chat.txt}} }} /save}}
/if}}
{{if|{{?text=!reset}}|{{\{{save|chat.txt|}}/}}}}
{{if| {{and|{{?name}}|{{?text}}|{{not| {{?text=!reset}}}}/and}} |
{{\{{save|chat.txt|{{time}} --- <b>{{?name}}</b>> {{?text}}<br>{{load|chat.txt}}
/save}}/}} /if}}
<form name=frm>
Name <input id=login name=name value="{{?name|%user%}}" onfocus="javascript:refresh='false';" onblur="javascript:refresh='true';">
<p>Text <input id=text name=text onfocus="javascript:refresh='true';" >
<p><input type=submit>
</form>
<script>document.frm.text.focus();</script>
<a href="{{get|url|text=}}">REFRESH</a>
<hr>
{{load|chat.txt}}
</body>
</html>
</body>
</html>
with chatpass.txt
<html>
<head>
<script language="JavaScript" type="text/JavaScript">
<!--
var refresh=true;
function Frefresh() {
if ((document.frm.text.value=='') & (document.frm.login.value>'') & refresh)
window.location="{{get|url|text=}}";
};
setTimeout("Frefresh()",10000);
//-->
</script>
</head>
<body>
{{set|maxlength|10240}}
{{if|{{filesize|chat.txt}}>{{^maxlength}}|
{{save|chat.txt|{{cut||{{div|{{^maxlength}}|2}}|{{load|chat.txt}} }} /save}}
/if}}
{{if|{{?text={{load|chatpass.txt}}}}|{{\{{save|chat.txt|}}/}}}}
{{if| {{and|{{?name}}|{{?text}}|{{not| {{?text={{load|chatpass.txt}}}}}}/and}} |
{{\{{save|chat.txt|{{time}} --- <b>{{?name}}</b>> {{?text}}<br>{{load|chat.txt}}
/save}}/}} /if}}
<form name=frm>
Name <input id=login name=name value="{{?name|%user%}}" onfocus="javascript:refresh='false';" onblur="javascript:refresh='true';">
<p>Text <input id=text name=text onfocus="javascript:refresh='true';" >
<p><input type=submit>
</form>
<script>document.frm.text.focus();</script>
<a href="{{get|url|text=}}">REFRESH</a>
<hr>
{{load|chat.txt}}
</body>
</html>
</body>
</html>
-
If you want to chat with one or more of your users, how do you alert him so he knows that somebody wants to chat? You won't see people hanging around looking at the chat screen waiting for someone to drop by and say something!
-
Its more of a shoutbox than a chat.
-
To solve the alert problem, it might be better for the chat to be in the form of a popup window when in use and manually closed when chat is finished. Without a chat alert of some type, this feature is somewhat useless IMHO.
-
A chat-option is a good example to show what we can do with macros. For test-purposes i have tried with an inlineframe that can be switched on/off and another option with a small new window.
To give it some use, it is limited to some kind of shoutbox, for example to leave some feedback to the admin or to leave some question or suggestion.
But chat would at least imply list of connected users, better an optional connect/disconncet option as not al users may want to chat nor want that others see that they are connected.... ... how many users would be connected to a small home-server to chat ?!
So, putting a 'chat' on a homepage - fileserver is an other good example of what rejetto calls 'Voidism' .
-
It is fine as a shoutbox, not much of a chat, i think the name just got 'lost in translation'. People like to leave me messages and I answer them when i notice them. It is great when someone finds a problem or is just simply posting a positive remark about the site. If someone is having problems with the server, they can post their troubles in the shoutbox for the administrator to sort out the problem.
I am going to try out this 'chat' shoutbox now and implement it in the rawr-template if i like it ;)
I can't get my messages to save to the text file...
-
We do not have to forget that a browser is not a server, A real chat works on the principle client-server, as skype msn irc ...., The advantage with regard to a southbox simple is the refresh all the 10s in the template, you can associate a popup or a music every time last line change and then you obtain an appearance of CHAT
-
Im not sure if you are already using AJAX for the refresh, but if you arnt I recommend that you give it a try as you wont have to refresh the whole page or frame.
-
Im not sure if you are already using AJAX .. , but if you arnt I recommend that you give it..
;D ;D ;DIn my country, ajax is a domestic cleaner and I sometimes use it to wash me hands ;D ;D ;D
I use especially the macro and little of javascript when I cannot make otherwise.
It is the purpose of hfs, to be the most autonomous possible, and not to add him external subtleties. Otherwise so much use a server IIS or FTP.
Certainly we cannot do without module to listen to mp3 or show the AVI, but to use hfs as a Christmas tree by putting in it full of decorations, I prefer to see the natural beauty of the tree which hides below
-
Im not sure if you are already using AJAX .. , but if you arnt I recommend that you give it..
;D ;D ;DIn my country, ajax is a domestic cleaner and I sometimes use it to wash me hands ;D ;D ;D
With ammoniac. ;D ;D ;D
Moi je le trouve pratique,et je l'aime bien.
Il manque juste une alerte lors des connexions.