rejetto forum
Software => HTML & templates => HFS ~ HTTP File Server => RAWR-Designs => Topic started by: rejetto on November 26, 2007, 12:14:33 PM
-
Check if this Thunderchicken of Glory is the latest build!
does this appear to every visitor?
it has sense to show only to the admin, whom is usually connected through 127.0.0.1 or localhost, and is thus recognizable. (even using macros instead of jscript)
-
It is hidden to all external users and has been since 2.9.0.
Think it can be done with a macro?
-
can you tell me what's the code supposed to hide that part?
Think it can be done with a macro?
sure, something like {{if| {{=|%ip%|127.0.0.1}} | <div> }}
-
//Show template update module.
if(Ip.match("127.0.0.|10.1.1.|10.0.0.|192.168.")) gEBI("Upd").style.display='block';
This is in the pageLoad function, Ip = %ip%, gEBI... its complicated...
hmm i will try this macro idea...
-
pros
macros: more compatible
javascript: cpu load distributed
-
something like
Ip.match("127.0.0.|10.1.1.|10.0.0.|192.168.")) gEBI("Upd").style.display='block';
replace it with
{{ if {{ = | {{left | %ip% | 8 }} | 127.0.0. }} | {{ section | What you must see}} }}
{{ if {{ = | {{leftstr | %ip% | 7 }} | 10.0.0. }} | {{ section | What you must see}} }}
{{ if {{ = | {{leftstr | %ip% | 7 }} | 10.1.1. }} | {{ section | What you must see}} }}
{{ if {{ = | {{leftstr | %ip% | 8 }} | 192.168. }} | {{ section | What you must see}} }}
[What you must see]
<div>
.....
</div>
implementation
{{leftstr|Text|length}}
{{midstr|Text|offset|length}}
{{rightstr|Text|length}}
if necessary I can create code to rejetto
In the long run hfs is going to become a real language of programming as a replacement of javascript
The return in the good old BASIC of the interpreted and simple language.
I LIKE ;D ;D
-
I agree mars, everything that doesn't require user input like this update check div which will only show to internal users will be done with macro's :) but javascript is always going to be needed for dynamic page content.
That version you made seems unnecessarily complicated, i don't quite understand it yet, can you post a working version?
-
{{ if {{ = | {{left | %ip% | 8 }} | 127.0.0. }} | {{ section | What you must see}} }}
{{ if {{ = | {{leftstr | %ip% | 7 }} | 10.0.0. }} | {{ section | What you must see}} }}
{{ if {{ = | {{leftstr | %ip% | 7 }} | 10.1.1. }} | {{ section | What you must see}} }}
{{ if {{ = | {{leftstr | %ip% | 8 }} | 192.168. }} | {{ section | What you must see}} }}
things are better thanks to macros {{match}} and {{match address}}
{{leftstr|Text|length}}
{{midstr|Text|offset|length}}
{{rightstr|Text|length}}
you won't miss any of them thanks to {{cut}} ;)
In the long run hfs is going to become a real language of programming as a replacement of javascript
The return in the good old BASIC of the interpreted and simple language.
i was thinking of trying to make a macro {{while}} to see if it could be considered a real (unhandy) programming language, but it's just mindfu#king ;D
the thing i like most in all this is: it's making it much more powerful without any performance decay.
-
i meant: all those i cited, are already DONE, and are documented on the wiki
-
by their name i don't understand what they are meant to do
if it takes hours to make them you'd better first describe their meaning
-
i noticed that users of the old version of TOG were pointed to a wrong url on rejetto.com
they are now redirected automatically to the new website
-
ehmm ye i left the old update directory on rejetto.com for the old template the new template uses the new website.
-
Just a message to the 1000+ ToG users that have already downloaded the template, the update check was pointing to a .htm directory at www.rawr-designs.com, I am going to put up a redirect to the correct download.php. The archive now has this fixed. I thank you for your patience if the link was always failing on you, i know that is frustrating :)
Oh and mars/rejetto, i use this...
{{if|{{is substring|127.0.0.|%ip%}}|{{$update-mod}}}}
{{if|{{is substring|10.0.0.|%ip%}}|{{$update-mod}}}}
{{if|{{is substring|10.1.1.|%ip%}}|{{$update-mod}}}}
{{if|{{is substring|192.168|%ip%}}|{{$update-mod}}}}
works for me :)