rejetto forum

update check

rejetto · 13 · 6247

0 Members and 1 Guest are viewing this topic.

Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13510
    • View Profile
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)


Offline TSG

  • Moderator
  • Tireless poster
  • *****
    • Posts: 1935
    • View Profile
    • RAWR-Designs
It is hidden to all external users and has been since 2.9.0.

Think it can be done with a macro?
« Last Edit: November 26, 2007, 12:29:23 PM by That_Stevens_Guy »


Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13510
    • View Profile
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> }}


Offline TSG

  • Moderator
  • Tireless poster
  • *****
    • Posts: 1935
    • View Profile
    • RAWR-Designs
//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...


Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13510
    • View Profile
pros
macros: more compatible
javascript: cpu load distributed


Offline Mars

  • Operator
  • Tireless poster
  • *****
    • Posts: 2059
    • View Profile
something like

Quote
Ip.match("127.0.0.|10.1.1.|10.0.0.|192.168.")) gEBI("Upd").style.display='block';

replace it with

Quote
{{ 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


Offline TSG

  • Moderator
  • Tireless poster
  • *****
    • Posts: 1935
    • View Profile
    • RAWR-Designs
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?
« Last Edit: November 26, 2007, 06:56:31 PM by That_Stevens_Guy »


Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13510
    • View Profile
Code: [Select]
{{ 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}}

Quote
{{leftstr|Text|length}}
{{midstr|Text|offset|length}}
{{rightstr|Text|length}}

you won't miss any of them thanks to {{cut}} ;)

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


Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13510
    • View Profile
i meant: all those i cited, are already DONE, and are documented on the wiki


Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13510
    • View Profile
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


Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13510
    • View Profile
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


Offline TSG

  • Moderator
  • Tireless poster
  • *****
    • Posts: 1935
    • View Profile
    • RAWR-Designs
ehmm ye i left the old update directory on rejetto.com for the old template the new template uses the new website.


Offline TSG

  • Moderator
  • Tireless poster
  • *****
    • Posts: 1935
    • View Profile
    • RAWR-Designs
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 :)
« Last Edit: December 12, 2007, 03:55:50 PM by That_Stevens_Guy »