rejetto forum
Software => HFS ~ HTTP File Server => Beta => Topic started by: rejetto on July 17, 2008, 11:46:37 PM
-
Hey templaters!
2 big news in this build, and the best thing is that they required me just few minutes to make. Holy sweat.
Your templates are now easier to install.
Tell users to just drag&drop the tpl file over HFS window.
No need to tell what to answer to the Install this template? on your screen.
More, a new {.mime.} macro to decide what's the kind of content you are going to deliver.
Do you have a [css] section?
Just put {.mime|text/css.} somewhere in it, and people with wrong mime settings won't complain with you anymore.
Are you going to deliver some RSS content?
Don't forget to put {.mime|application/rss+xml.} and the world will be a better place.
And now let's pray against the bugs. :-X
download @ www.dovedove.it/hfs/hfs192.exe
what's new
+ template installation through drag&drop
+ new template macro: mime
- "Edit" broken in build #191 (didn't work with spaces in the editor path)
- "Browse it" wasn't working with links http://www.rejetto.com/forum/index.php?topic=6010.msg1035702#msg1035702
- "hints for newcomers" has been extended to more hints
-
hfs2.3B192汉化版
-
WooW !, :D fun and useful these new features !
Good job!
And now let's pray against the bugs.
If prayer against bugs is ineffective ... Some grigris ;)
-
Good job rejetto! I see no problems. :)
-
FUNCTION LOADCFG()
OLD:
ini:=loadFile(cfgPath+CFG_FILE);
if ini > '' then
begin
saveMode:=SM_FILE;
moveLegacyTpl(loadFile(cfgPath+TPL_FILE)); //Do not work if hfs.tpl is destroyed before the launch of hfs
exit;
end;
NEW:
ini:=loadFile(cfgPath+CFG_FILE);
if ini > '' then
begin
if fileExists(cfgPath+TPL_FILE) then tpl:=loadFile(cfgPath+TPL_FILE) // load the hfs.tpl if exist
else begin // else load the internal template
tpl:=defaulttpl;
tplFilename:=''; //force to create and save to TPL_FILE
end;
saveMode:=SM_FILE;
moveLegacyTpl(tpl); // save the current tpl
exit;
end;
At home, I work with a more pushed version, but here it is the minimum necessities.
just for information:
function loadCfg(var ini,tpl:string):boolean;
// until 2.2 the template could be kept in the registry, so we need to move it now.
// returns true if the registry source can be deleted
function moveLegacyTpl(tpl:string):boolean; //189
begin
result:=FALSE;
if tpl = '' then exit;
if tplfilename='' then tplfilename:= cfgPath+TPL_FILE;
try
saveFile(cfgPath+TPL_FILE, tpl); //create always hfs.tpl for editor
//**result:= // until the version is stable, we should not delete the registry anyway
except result:=false; end;
end; // moveLegacyTpl
begin
result:=TRUE;
ipsEverConnected.text:=loadfile(IPS_FILE);
ini:=loadFile(cfgPath+CFG_FILE);
if ini > '' then
begin
if fileExists(cfgPath+TPL_FILE) then tpl:=loadFile(cfgPath+TPL_FILE) // load the hfs.tpl
else if fileExists(tplfilename) then tpl:=loadFile(tplfilename) // else load the tpl filename file
else // else load the internal template
begin
tpl:=defaulttpl;
tplFilename:=''; //force to create TPL_FILE
end;
saveMode:=SM_FILE;
moveLegacyTpl(tpl); //189
exit;
end;
-
if ini > '' then
the file exists for sure, because we just loaded it!
;)
-
;)
1) load CFG_FILE , that ok if hfs.ini exist
2) if ini>'' is true, if 1) is true, and tplfilename='hfs.tpl'
3) load from TPL_FILE false if hfs.tpl does'nt exist
then moveLegacyTpl(loadFile(cfgPath+TPL_FILE)); equivalent to moveLegacyTpl('');
4) call function
function moveLegacyTpl(tpl:string):boolean;
...
if (tplFilename > '') or (tpl = '') then exit;
somewhere tplfilename (in hfs.ini) can have as value '.....\hfs.tpl' but this file has no existence, here is the problem, even if this is compensated by
if fileExists(tplFilename) then
if getMtime(tplFilename) > tplLast then
begin
tplLast:=getMtime(tplFilename);
setTplText(loadFile(tplFilename));
end
else
else
if tplLast <> 0 then
begin
tplLast:=0; // we have no modified-time in this case, but this will stop the refresh
setTplText(defaultTpl);
end;
I think that it is better necessary to avoid that a grain of sand checks the machine, with a parameter which would not be defined just in time. ;)
-
login bug chinesc name look:
宫 = [��ѧ��]
???
-
sorry mars, i was in a hurry and missed the point.
now i had a deeper look at your suggestion, and still don't see the problem with the current code. try rephrasing.
-
For those that don't peruse the Template board often, RAWR-Template, ToG, and Terayon have been updated using this beta of HFS.
Follow this to get to the RAWR-Designs board:
http://www.rejetto.com/forum/index.php?board=34.0