rejetto forum

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Mars

Pages: 1 ... 122 123 124 125 126 ... 134
1846
HTML & templates / Re: Change ?rev
« on: December 10, 2007, 11:45:47 PM »
 
Quote
from next build, when a parameter like recursive has no value, {{urlvar}} will return 1 .... and so will {{?}}
? remembers the same ? used for url parameters

je pense que le plus simple serait d'avoir une macro {{urldef|recursive}}
qui donnerait une chaine vide '' si recursive n'est pas dans l'url et 'recursive' s'il s'y trouve
...
<br>
Liste des paramètres URL : {{urldef|recursive}},{{urldef|rev}},{{urldef|sort}}, ...
<br>
...



{{ get | url | sort=s |{{ if | {{ urldef | rev }}| | rev}} }}  permet d'activer ou désactiver & rev par un seul click

Quote
   <th><a href="{{get|url|sort=n|{{if not|{{=|{{urlvar|sort}}|n}}| |{{if{{urldef|rev}}| |rev /if}} /if}} /get}}">Filename</a>
         <a href="{{get|url|sort=e|{{if not|{{=|{{urlvar|sort}}|e}}| |{{if{{urldef|rev}}| |rev /if}} /if}} /get}}">.ext</a>
   <th><a href="{{get|url|sort=s|{{if not|{{=|{{urlvar|sort}}|s}}| |{{if{{urldef|rev}}| |rev /if}} /if}} /get}}">Filesize</a>
   <th><a href="{{get|url|sort=t|{{if not|{{=|{{urlvar|sort}}|t}}| |{{if{{urldef|rev}}| |rev /if}} /if}} /get}}">Filetime</a>
   <th><a href="{{get|url|sort=d|{{if not|{{=|{{urlvar|sort}}|d}}| |{{if{{urldef|rev}}| |rev /if}} /if}} /get}}">Hits</a>

1847
HFS ~ HTTP File Server / Re: Unable to login now?
« on: December 10, 2007, 10:36:53 PM »
It is confirmed: a destroyed(annulled) account lose all its authorizations

1848
Bug reports / build 161 bug with search
« on: December 10, 2007, 10:30:37 PM »

if recursive option activated then search give items with full path.


http://127.0.0.1/rejetto/texte/texte.txt



if recursive is not activated search give same result but all files listed seem to belong to root

http://127.0.0.1/texte.txt

1849
HFS ~ HTTP File Server / Re: "Search" button redirects to main page...
« on: December 10, 2007, 10:22:45 PM »
no problem
look into your  template and find it

Quote
{{if| {{get|can recur}} |
  <td nowrap>
    <div class=button>
    <form action='/' style='width:160px'>
    <input name=search size=10 value="{{urlvar|search}}">
    <input type=submit value=search>
    </form>
    </div>

action='/'  redirects you to root page, you can change it  by action='%folder%'  to begin search from current folder


1850
HTML & templates / Re: Macros
« on: December 10, 2007, 09:56:48 PM »
Still I

Instead of writing several times the same macro in a template, we could use alias

{{ alias | alias-name | {{macro defined to be an alias}} }}

Working on the same principle as the call to sections {{$section}}

{{ alias | myalias | {{ my macro}} }}   talking by {{$myalias}}

Replaceable also by

Quote
{{$myalias}}

[myalias]
{{my macro}}
it is possible to put any alias in an external file and load it by {load|alias.tpl}

{{alias|...}} don't appear into user's browser and is considered by hfs as  macro {{comment ...}} , but who works as a [section].

NOTE: It will be possible to use {{alias| name | some text}} and call it by {{$name}} and then we have a string var 

Quote
{{alias| rejetto | The person without whom we would not be on this forum there}}

{{$rejetto}}  --->  The person without whom we would not be on this forum there


{{alias | minval | -2 }}                 {{$minval}}  --->  -2

{{alias | maxval | 255 }}               {{$maxval}}  --->  256

I hope to have been rather precise so that everybody understands


1851
HTML & templates / Re: Macros
« on: December 10, 2007, 09:30:55 PM »
 another 3 macros to add

 Abs  Returns the absolute value of a signed number  {{abs| value}}
 Max  Gives the maximum of some integer values       {{max| value1 | value2 |...| valueN }}
 Min  Gives the minimum of some integer values         {{max| value1 | value2 |...| valueN }}

Quote a macro and give your opinion for or against (  If possible, only favorable notices; ;) to bacter)

1852
HFS ~ HTTP File Server / Re: Uploaded by
« on: December 10, 2007, 06:10:23 PM »
 
Quote
The automatic 'uploaded-by-user' filename.ext.comment probably could be done in hfs without much progrramming effort,

three possibility to see if a file is added in hfs list

- one user make an upload into a folder :  {{append|PATH%item-name%.comment|uploaded by %user%}}


- administrator add a folder or file in the hfs tree  : hfs can detect this

- look at the notification when a real folder is modified : there is delphi code for that ( i think possibility to detect if file is new)

1853
HTML & templates / Re: Macros
« on: December 10, 2007, 06:02:07 PM »
 
Quote
The possibility to write a complex macro and place it in a user created function with custom parameters would be useful.
to call it {{call function | function-name | $A$ | $B$ |...}} A and B are the custom parameters.

A macro is a function to her alone, it uses parameters and returns a result as string, actualy only one macro give a numeric value :{{length|string}

For your demand I propose a macro one specialized in the calculation, of the genre:

{{calc | num1 | + | num2 | - | ( | num3 | / | num4 | ) | * | -num5 }}


identical to
num1 + num2 - ( num3 / num4 )*(-num5)

it will be posible to have

{{calc|num1+num2-(num3/num4)*(-num5)}} to reduce length

then simply functions as A+B, A-B, A*B are possible

A/B is more complicate if result is not an integer, he can be truncated or rounded to the nearest integer. result of A/B can be the quotient and result of  (A%B) give the rest of the division (modulo)

Or result can be a real, rejetto has the choice



I will search code to this macro

1854
RAWR-Designs / Re: New template in the works.
« on: December 10, 2007, 05:59:05 PM »
TO TSG

download rejetto template attached

desactivate 'archivable' to root  and activate some sub-folder being archivable

and see what append  at the place of filesize

-----------------------------------------------------

pour rejetto

activer 'archivable' sur la racine implique que la même option pour les sous-dossiers est activée par défaut, il faudrait envisager les deux cas 'full archivable' and 'recursive archivable'

'full archivable'  : all subdirs are archivable by 'herited'
'recursive archivable' : only sub-folders wich are 'archivable' activated are achivable in folder.tar

tu comprends la différence??  un peu à la manière des droits sur les dossiers

1855
HTML & templates / Re: Change ?rev
« on: December 09, 2007, 10:15:07 PM »
nouvelle syntaxe pour 'rev' ?

?sort=xx&rev=xx&..

{{?sort}}  est-il l'équivalent de la pseudo macro {{is define|sort}} dans ce cas

{{?rev}} permettra de savoir si rev se trouve dans l'url

de même que {{?recursive}} ??

en effet {{urlvar|sort}} permet de connaitre la valeur utilisé pour sort=xx

mais {{urlvar|rev}} et {{urlvar|reverse}} sont inutilisables d'où mon idée d'introduire

{{is def | parmetre_url}} return true or false

par contre je trouve assez illogique  qu'un test retourne une chaine vide à la place de la valeur false et une chaine non vide pour la valeur true

exemple {{if |%user%| then |else}} ne devrait fonctionner que si %user% est true ou false, sinon on devrait utiliser en toute rigeur

{{ if | {{ not | {{ equal | %user% | }} }} | then | else }}

quelques mises au point sont à faire comme,

 procedure trueIf(cond:boolean);
  begin if cond then result:='true' else result:='false' end;

 function isFalse(s:string):boolean; inline;
  begin result:=stringExists(s, ['false','FALSE']) end;

  function isTrue(s:string):boolean; inline;
  begin result:=stringExists(s, ['true','TRUE']) end;
 

1856
HTML & templates / Re: Macros
« on: December 09, 2007, 07:04:56 PM »
 ;)
C++
size_t copy ( char* s, size_t n, size_t pos = 0) const;
http://www.cplusplus.com/reference/string/string/copy.html


*************************************************************
autre chose:

{{TRANSLATE | récursif ou linéaire, où à n'être rien  }} 

     result = r&eacute;cursif ou lin&eacute;aire, o&ugrave; &agrave; n'&ecirc;tre rien 

{{TRANSLATE |
<PRE>
 L'accent en italien est écrit uniquement sur la dernière syllabe.
ex: città, virtù, libertà, lunedì, Nicolò, cioè
Dans ce cas, ces mots sont invariables au pluriel.
</PRE>
}}

result= .....

la macro convertirait les codes accentués en leur equivalent html unifié.

usage {{translate | {{load|texte_accentué.txt}} ]]


1857
HFS ~ HTTP File Server / Re: New Forum Request
« on: December 08, 2007, 11:32:45 PM »
The macro are halfway between template and beta, and they make pour a lot of ink,If there was a vote, I would militate for the proposition of maverick

1858
HTML & templates / temp
« on: December 08, 2007, 10:08:04 PM »
 
Quote
cut | A | B | C
cut C from position A, for B characters. The difference with macro substring is that here you specify where to cut by numeric positions. Example: with A=2 and B=3 and C=abcdef you will get bcd because it is from character 2 and for a length of 3.

The name of this macro seems to me misleading, the "copy" word would been more adequate

How many programmers uses exclusively the  function 'copy(string, from, to) ??

Mainly in the programs, we find rather its by-products which are left, mid, right.

To return to the macro 'cut' there, she executes what makes the function 'copy',  excepted for the negative values where it makes  exception for the rule.

On this question I would rather have seen the macro cut under this aspect

cut | A | B | C
Example: with C=ABCDEFGHIJ A=3 and B=4 and  ,you will get  ABGHIJ


It was everything made possible to make the difference enter

{{substring| AB | GHIJ | ABCDEFGHIJ }}
and
{{substring| 3 | 4 | ABCDEFGHIJ }}

without passing by the macro CUT, because few chances to meet itself in the indecision with
{{substring| 3 | 4 | 428635710]4598 }}

Rejetto I have nothing against the command CUT it is simply to argue against bacter ;),I excuse him for it. I shall put that at the account of the difference of age, the other time(period), the other philosophy. ;D ;D ;D ;D ::)

At least this debate has to make nothing in this topic.!!!

1859
HTML & templates / Macros
« on: December 08, 2007, 06:21:58 PM »
Some ideas of macro for the continuation


Quote
%symbols%  : Text   HFS symbols
%mysection%   : HTML Text  for compatibility with old templates

//  Boolean must be TRUE or FALSE  ,   nothing else

{{ not | Boolean | /not }} : Boolean                                 result= not(Boolean)
{{ and | Boolean1 | Boolean2 | ... | BooleanN | /and }} : Boolean    result= Boolean1 AND .... AND BooleanN
{{ or | Boolean1 | Boolean2 | /or }} : Boolean                       result= Boolean1 OR .... OR BooleanN
{{ xor | Boolean1 | Boolean2 | /xor }}  : Boolean                    result= Boolean1 XOR Boolean2



{{ is == | Num1 | Num2 | /is }} : Boolean   To be NEW
{{ is >= | Num1 | Num2 | /is }} : Boolean   To be NEW
{{ is <= | num1 | Num2 | /is }} : Boolean   To be NEW            
{{ is <> | Num1 | Num2 | /is }} : Boolean  To be NEW             
{{ is >> | Num1 | Num2 | /is }} : Boolean   To be NEW             
{{ is << | Num1 | Num2 | /is }} : Boolean  To be NEW             


{{ is def | urlvar| /is }} : Boolean  return TRUE if URLVAR is defined in url    To be NEW             


{{ is equal | Text1 | Text2 | /is }} : Boolean
{{ is empty | Text | /is} : Boolean                          To be NEW             
{{ is substring | subText | Text | /is} : Boolean


{{file|name|url}}   '' or a name   To be NEW
{{file|size|url}}     '' or >=0       To be NEW
{{file|date|url}}    '' or a date     To be NEW
{{file|empty|url}}  true or false   To be NEW
{{file|exist|url}}    true or false   To be NEW


{{if | Boolean | then | else | /if }} : Text
{{ if not | Boolean | then | else | /if }} : Text
{{ switch | What | Text1 | Result1 | Text2 | Result2 | .... | TextN | ResultN_ as_Default | /switch }} : Text


{{ pos | subText | Text }} : Num                      To be NEW             
{{ length | Text }} : Num

{{abs| value}}                                   Abs  Returns the absolute value of a signed number
{{max| value1 | value2 |...| valueN }}   Max  Gives the maximum of some integer values       
{{max| value1 | value2 |...| valueN }}   Min  Gives the minimum of some integer values
 

{{calc | numerical expression to be evaluated }}
syntax:
{{calc | num1 | + | num2 | - | ( | num3 | / | num4 | ) | * | -num5 }} or
{{calc |num1+num2-(num3/num4)*(-num5) }}

{{ left | Text | Num }} : Text                                  To be NEW             
{{ right | Text | Num }} : Text                                To be NEW             
{{ mid  | Text | Num-From | Num-Upto }} : Text      To be NEW             
{{ upper | Text }} : Text
{{ lower | Text }} : Text
{{ trim | Text }} :Text


{{ repeat | Num | Text }} : Text

{{ substring | From-After-Text | To-Before-Text | Text-Source }} : Text

{{ cut | Num-From(begin) | Num-Upto(end) | Text  }} :Text

{{ replace | Text-Old | Text-New | Text-Source }}

{{ chopline | Num | Text-Source}} : HTML Text                       To be NEW             

{{ section | mysection }} : HTML Text             load section from active template
                                                                   (included "diff template" and  hfs.diff.tpl) idem as %[mysection]%
{{ section | mysection | external_file}} : HTML Text            load mysection from external template


{{load | external_file}} : HTML Text

{{load | external_file | from-line | Upto-line }} : HTML Text       To be NEW              
 
{{translate|text}}    translate any text to UTF-8    To be NEW             

{{alias| name | html-text}}  call by {{$name}}    To be NEW             
       return html-text  can be use as variable
{{inc | $name | value }}      To be NEW             
{{dec| $name | value }}      To be NEW             
     at the place of  {{alias|name|{{calc|{{$name}}+ value}} }}

{{define | newmacro | {{macro|$1|$2|$3|....}}  }}  To be NEW             
       call by {{newmacro| param1|param2|.....}}






http://www.rejetto.com/wiki/index.php?title=HFS:_Template_macros

1860
HTML & templates / Re: tpl localisation
« on: December 08, 2007, 06:16:00 PM »
 
Quote
and i don't like that %lang% depends of the browsers language.
Others we can be need or envy to like its existence

?lang=  ?spec=stringfr
you can use {{urlvar|lang}} or {{urlvar|sp}} to return what you want
and use something like

Short version:
[special:string]
{{section|string{{urlvar|sp}}|url{{urlvar|sp}}.tpl}}

It is already possible to make what you wish with what we have under the hand

Longer version:
[special:string]
%sym-{{urlvar|sp}}%

[sym-IT]
hey=you
name=Frank
msg=do the right thing

[sym-FR]
hey=Vous
name=Marcel
msg=fait les choses correctement

[sym-XX]
{{section|externalXX|urlXX.tpl}}


missing just macro {{£name}}       {{£msg}} return the correct message according what you pass with ?sp=IT

%sp% with ?sp= will never exist, bacter,forget this possibility

(I believe that that there also I am going to put myself him in back, but it is him who in begun with left mid and right) ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D


%var% must be reserved for the internal informattions in hfs, for the parameters URL it exist a macro self-important for that (read the wiki)
http://www.rejetto.com/wiki/index.php?title=HFS:_Template_macros#Data_getting

(I believe that that there also I am going to put myself him in back, but it is him who in begun with left mid and right) ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D

Why not

{{filevar|name|file.tpl}}

by sample  {{filevar|last-external-address|/hfs.ini}} return your external IP

%lang% will just return language using by user's browser

Otherwise there is that for the inconsolable of any javascript
Code: [Select]
<script language="JavaScript">
/*
Browser Language Redirect script- By JavaScript Kit
For this and over 400+ free scripts, visit http://www.javascriptkit.com
This notice must stay intact
*/

//Enter ISO 639-2 letter Language codes to detect (see: http://www.w3.org/WAI/ER/IG/ert/iso639.htm):
var langcodes=new Array("en", "fr", "es", "ja", "zh", "default")

//Enter corresponding redirect URLs (last one is for default URL):
var langredirects=new Array("index.htm", "french.htm", "spanish.htm", "japan.htm", "chinese.htm", "index.htm")

var languageinfo=navigator.language? navigator.language : navigator.userLanguage
var gotodefault=1

function redirectpage(dest){
if (window.location.replace)
window.location.replace(dest)
else
window.location=dest
}

for (i=0;i<langcodes.length-1;i++){
if (languageinfo.substr(0,2)==langcodes[i]){
redirectpage(langredirects[i])
gotodefault=0
break
}
}

if (gotodefault)
redirectpage(langredirects[langcodes.length-1])
</script>
;D

Pages: 1 ... 122 123 124 125 126 ... 134