rejetto forum
Software => HFS ~ HTTP File Server => HTML & templates => Topic started by: Chrisp6825 on June 14, 2008, 08:01:27 PM
-
I've seen a few "proof of concept" macros in this forum and was wondering exactly how I would use them..?
Like, I have copied a chat macro I found that I was wanting to look at and tweak up a bit...
<html>
<body>
{{if| {{and|{{?name}}|{{?text}} /and}} |{{\
{{append|chat.html|<br>{{time}} --- <b>{{?name}}</b>> {{?text}}
/append}}
/}} /if}}
<form name=frm>
Name <input name=name value="{{?name}}">
<p>Text <input name=text>
<p><input type=submit>
</form>
<script>document.frm.text.focus();</script>
<a href="{{get|url|text=}}">REFRESH</a>
<hr>
{{load|chat.html}}
</body>
</html>
So would I put this in a file named "chat.html" or add it into the hfs template, or make a new virtual folder and put it in the "diff template" for the folder?
I've tried all of those anyways though, but I always turn up with about the same thing, except when I put it in the HFS template. When I do that, nothing really happens.
I have my site up, and the page is on there.. if it's alright I'll post it. If not, just tell me to remove it and I will..
Here it is : Chrisp6825.co.nr/chat/ (http://Chrisp6825.co.nr/chat/)
Right now It's set to the "diff template" for a virtual folder on the root of the site called "chat". All I have in the "diff template" is that code that I posted.
Any help is really appreciated! :)
-
Your link give this:
{{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}} --- {{?name}}> {{?text}}
{{load|chat.txt}} /save}}/}} /if}}
Name
Text
REFRESH
--------------------------------------------------------------------------------
{{load|chat.txt}}
Begin by using the HFS ver 2.3 build 185, not the 2.2d build 152
http://www.dovedove.it/hfs/hfs185.exe
-
ok, im on 185 now.
-
see what is possible with an extended chat
http://silentpliz.serveftp.com
-
So this is an html file?
-
the chat tpl you use was
modified by me , include it as an attached file in a new post
-
you want me to attach what im using? Well, im just using what i posted in the first post. I just dont know how to use it.
It's a template right? So do I make a folder and right click it > advanced > diff template and then paste the macro in there?
Or is it supposed to be in an html file? This is what I don't understand.
-
began to rename chat.html by hfs.diff.tpl in a folder and include this folder to hfs as a real folder
-
<html>
<body>
{{if| {{and|{{?name}}|{{?text}} /and}} |{{\
{{append|chat.html|<br>{{time}} --- <b>{{?name}}</b>> {{?text}}
/append}}
/}} /if}}
<form name=frm>
Name <input name=name value="{{?name}}">
<p>Text <input name=text>
<p><input type=submit>
</form>
<script>document.frm.text.focus();</script>
<a href="{{get|url|text=}}">REFRESH</a>
<hr>
{{load|chat.html}}
</body>
</html>
is not the chat.tpl that you use actually
-
ok. I made a "real" folder in hfs named "chat". then I added a file named "hfs.diff.tpl". this is right so far?
and if that isn't the tpl i use, what do i use?
-
give me the link where you had uploaded the actual file
-
here : http://chrisp6825.co.nr/chat/hfs.diff.tpl (http://chrisp6825.co.nr/chat/hfs.diff.tpl)
but i still only have that code in there, that you said isnt what i use.
-
delete what you have in your diff template to the folder chat into hfs, the hfs.diff.tpl can't give what my browser see
-
there isnt anything in the diff template. You mean the thing where i right click the folder in hfs and goto advanced then "diff template" right? its already empty.
-
delete index.html and reativate the chat by default mask for files
-
hah.. o wow.
I only had the index.html file in the actual chat folder. but only in hfs it was renamed to "hfs.diff.tpl"
so i just renamed the actual file to "hfs.diff.tpl" and it works.
Posted on: June 14, 2008, 07:01:18 PM
Shouldn't i leave this topic here just in case someone else has this question?
I have another question though... I noticed in the hfs.diff.tpl file it says :
{.append|chat.html|<br>.....
where is the chat.html file that its appending to? like, where is the chat stored in?
-
unless you specify a static path in the hfs template, the path is relative to the hfs executable.
som in this case the chat.html file is being saved in the same folder as the hfs executable.