rejetto forum
May 25, 2012, 02:43:44 AM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: This forum is free, you do NOT need to register to post. But you may.
PROBLEMS? QUESTIONS? CLICK HERE!
Fill the survey!
 
   Home   Help Search Login Register  
Pages: [1] 2  All
  Print  
Author Topic: New CHAT.TPL  (Read 4104 times)
0 Members and 1 Guest are viewing this topic.
Mars
Operator
Insane poster
*****
Offline Offline

France France

Posts: 1481



View Profile WWW
« on: January 09, 2008, 06:56:59 PM »

Moved lower in the topic

* chatpass.txt (0.01 KB - downloaded 277 times.)
« Last Edit: January 11, 2008, 04:03:35 PM by mars » Logged
SilentPliz
Operator
Insane poster
*****
Offline Offline

France France

Posts: 1046


....... chut ! shh!


View Profile WWW
« Reply #1 on: January 09, 2008, 09:30:47 PM »

Vu, lu, et aprouvé !  Cheesy

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. Grin

Sinon, il est toujours aussi sympa.

++
« Last Edit: January 10, 2008, 12:53:02 AM by SilentPliz » Logged
TSG
Operator
Insane poster
*****
Offline Offline

Australia Australia

Posts: 1919



View Profile WWW
« Reply #2 on: January 10, 2008, 05:30:32 AM »

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?
Logged

Foggy
Insane poster
*****
Offline Offline

Australia Australia

Posts: 806


View Profile
« Reply #3 on: January 10, 2008, 06:07:05 AM »

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.
Logged
Mars
Operator
Insane poster
*****
Offline Offline

France France

Posts: 1481



View Profile WWW
« Reply #4 on: January 10, 2008, 12:56:23 PM »

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

Logged
SilentPliz
Operator
Insane poster
*****
Offline Offline

France France

Posts: 1046


....... chut ! shh!


View Profile WWW
« Reply #5 on: January 10, 2008, 01:12:47 PM »

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. Undecided

« Last Edit: January 10, 2008, 02:43:32 PM by SilentPliz » Logged
rejetto forum
« Reply #5 on: January 10, 2008, 01:12:47 PM »

Do you like this software? Consider even $2
 Logged
Mars
Operator
Insane poster
*****
Offline Offline

France France

Posts: 1481



View Profile WWW
« Reply #6 on: January 11, 2008, 04:02:33 PM »

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

Quote
<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>&gt; {{?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

Quote
<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>&gt; {{?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>

Logged
maverick
Insane poster
*****
Offline Offline

Posts: 1056


Computer Solutions


View Profile
« Reply #7 on: January 11, 2008, 06:33:33 PM »


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!
Logged

maverick
TSG
Operator
Insane poster
*****
Offline Offline

Australia Australia

Posts: 1919



View Profile WWW
« Reply #8 on: January 11, 2008, 11:09:27 PM »

Its more of a shoutbox than a chat.
Logged

maverick
Insane poster
*****
Offline Offline

Posts: 1056


Computer Solutions


View Profile
« Reply #9 on: January 12, 2008, 01:40:08 AM »


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.
Logged

maverick
bacter
Operator
Insane poster
*****
Offline Offline

Spain Spain

Posts: 679


View Profile
« Reply #10 on: January 12, 2008, 04:25:48 AM »

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' .
Logged

your computer has no brain - use your own !
TSG
Operator
Insane poster
*****
Offline Offline

Australia Australia

Posts: 1919



View Profile WWW
« Reply #11 on: January 12, 2008, 05:04:18 AM »

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 Wink

I can't get my messages to save to the text file...
« Last Edit: January 12, 2008, 05:12:21 AM by That_Stevens_Guy » Logged

Mars
Operator
Insane poster
*****
Offline Offline

France France

Posts: 1481



View Profile WWW
« Reply #12 on: January 12, 2008, 05:19:54 AM »

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
Logged
Foggy
Insane poster
*****
Offline Offline

Australia Australia

Posts: 806


View Profile
« Reply #13 on: January 12, 2008, 06:42:07 AM »

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.
Logged
Mars
Operator
Insane poster
*****
Offline Offline

France France

Posts: 1481



View Profile WWW
« Reply #14 on: January 12, 2008, 07:56:01 AM »

Quote
Im not sure if you are already using AJAX .. , but if you arnt I recommend that you give it..

 Grin Grin ;DIn my country, ajax is a domestic cleaner and I sometimes use it to wash me hands Grin Grin Grin

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
« Last Edit: January 12, 2008, 08:05:55 AM by mars » Logged
Pages: [1] 2  All
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!


Google visited last this page May 22, 2012, 01:51:16 AM