
since rejetto implemented the dir cmd ... i should be able to load all the modules automatically ... so i gave it a try and wrote a script to do this ... :
function to load the modules :
{.if|{.!modules.}|{:
< t d width="175" valign="top" id="moduleCol" >
< s p a n id="specialBox" >< /s p a n >
{.for each|#module|{.dir|template/rawr_default/modules/.}|{:
{.if not| {.pos |false|{.for each|#restr|none|{.load|template/rawr_default/modules/{.^#module.}/restrictions.txt.}|{:
{.^checkrestriction|{.^#restr.}|{.^#module.}.}
:}.}.}|{:
{.^modhtml|{.^#module.}.}
:}.}
:}.}
< / t d >
:}.}
checkrestrictions functions:
{.set|checkrestrictions|{:
{.switch|$1|,|
local|{: {.if|{.match|127.*;10.*;192.168.*|%ip%.}|true|false .} :}|
ggk|{:{.if|{.{.^ggk|$2=true.}.}|true|false.}:}|
lgd|{:{.if|%user%|true|false.}:}|
off|{:false:}|
none|{:false:}|true
.}
:}.}
modhtml function :
{.set|modhtml|{:
< d i v class="module" >
< d i v class="modHeading" >
< s p a n >
< a h r e f ="javascript:pinModule('$1');" id="$1_Link" title="{.!lv_hideTitle.}" >< i mg
class="hide" src="/template/{.!theme.}/images/hide.gif" align="top" alt=""/ >
< n o s c r i p t >< i mg src="/template/rawr_default/images/spacer.gif" width="8" align="top" alt=""/ >< /n o s c r i p t >
< / a >
< / s p a n >
{.load|/template/rawr_default/modules/$1/title.txt.}
< / d i v >
< d i v class="modContent" id="$1" >
{.load|/template/rawr_default/modules/$1/modcontent.txt.}
< / d i v >
< / d i v >
:}.}
... and the problem is ... all modules are displayed ... but the checkrestriction function returns neither false nor true ...
and the bigger problem :
none of the macros in the modules beign loaded are executed ... and i dunno why ^^
would be great if anyone could take a look at the code and tell if he could spot the problem ^^
thx in advance