rejetto forum
February 11, 2012, 02:49:33 PM *
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: A little confusion about the macros...  (Read 3581 times)
0 Members and 1 Guest are viewing this topic.
Chrisp6825
Regular poster
**
Offline Offline

United States United States

Posts: 20


View Profile Email
« on: June 14, 2008, 03: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...
Code:
<html>
<body>
{{if| {{and|{{?name}}|{{?text}} /and}} |{{\
{{append|chat.html|<br>{{time}} --- <b>{{?name}}</b>&gt; {{?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/

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

France France

Posts: 1469



View Profile WWW
« Reply #1 on: June 14, 2008, 05:22:58 PM »

Your link give this:

Quote
{{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
« Last Edit: June 14, 2008, 05:31:01 PM by mars » Logged
Chrisp6825
Regular poster
**
Offline Offline

United States United States

Posts: 20


View Profile Email
« Reply #2 on: June 14, 2008, 05:27:48 PM »

ok, im on 185 now.
Logged
Mars
Operator
Insane poster
*****
Offline Offline

France France

Posts: 1469



View Profile WWW
« Reply #3 on: June 14, 2008, 05:43:29 PM »

see what is possible with an extended chat

http://silentpliz.serveftp.com
Logged
Chrisp6825
Regular poster
**
Offline Offline

United States United States

Posts: 20


View Profile Email
« Reply #4 on: June 14, 2008, 06:20:16 PM »

So this is an html file?
Logged
Mars
Operator
Insane poster
*****
Offline Offline

France France

Posts: 1469



View Profile WWW
« Reply #5 on: June 14, 2008, 06:24:01 PM »

the chat tpl you use was
 modified by me , include it as an attached file in a new post
Logged
rejetto forum
« Reply #5 on: June 14, 2008, 06:24:01 PM »

Do you like this software? Consider even $2
 Logged
Chrisp6825
Regular poster
**
Offline Offline

United States United States

Posts: 20


View Profile Email
« Reply #6 on: June 14, 2008, 06:30:15 PM »

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

France France

Posts: 1469



View Profile WWW
« Reply #7 on: June 14, 2008, 06:31:36 PM »

began to rename chat.html by hfs.diff.tpl in a folder and include this folder to hfs as a real folder
Logged
Mars
Operator
Insane poster
*****
Offline Offline

France France

Posts: 1469



View Profile WWW
« Reply #8 on: June 14, 2008, 06:33:53 PM »

Quote
<html>
<body>
{{if| {{and|{{?name}}|{{?text}} /and}} |{{\
{{append|chat.html|<br>{{time}} --- <b>{{?name}}</b>&gt; {{?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
Logged
Chrisp6825
Regular poster
**
Offline Offline

United States United States

Posts: 20


View Profile Email
« Reply #9 on: June 14, 2008, 06:39:58 PM »

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

France France

Posts: 1469



View Profile WWW
« Reply #10 on: June 14, 2008, 06:43:24 PM »

give me the link where you had uploaded the actual file
Logged
Chrisp6825
Regular poster
**
Offline Offline

United States United States

Posts: 20


View Profile Email
« Reply #11 on: June 14, 2008, 06:45:37 PM »

here : http://chrisp6825.co.nr/chat/hfs.diff.tpl

but i still only have that code in there, that you said isnt what i use.
Logged
Mars
Operator
Insane poster
*****
Offline Offline

France France

Posts: 1469



View Profile WWW
« Reply #12 on: June 14, 2008, 06:50:38 PM »

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
Logged
Chrisp6825
Regular poster
**
Offline Offline

United States United States

Posts: 20


View Profile Email
« Reply #13 on: June 14, 2008, 06:53:12 PM »

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

France France

Posts: 1469



View Profile WWW
« Reply #14 on: June 14, 2008, 06:59:01 PM »

delete index.html and reativate the chat by default mask for files
Logged
Chrisp6825
Regular poster
**
Offline Offline

United States United States

Posts: 20


View Profile Email
« Reply #15 on: June 14, 2008, 07:10:06 PM »

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 :
Code:
{.append|chat.html|<br>.....

where is the chat.html file that its appending to? like, where is the chat stored in?
Logged
Foggy
Insane poster
*****
Offline Offline

Australia Australia

Posts: 806


View Profile
« Reply #16 on: June 15, 2008, 04:32:32 AM »

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.
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 February 01, 2012, 11:51:04 AM
anything