rejetto forum

Software => HFS ~ HTTP File Server => Topic started by: maverick on February 28, 2009, 05:10:05 PM

Title: diff template
Post by: maverick on February 28, 2009, 05:10:05 PM
using diff template with default template

I was noticing that whenever I used diff template the filelist for a directory didn't show proper enteries.

For example a diff template entry:
[file]
<tr><td class=row>%new% <a href="%item-url%"><img align=top src="/~img_file">&nbsp;%item-name%</a>%comment%<td align=center class=row><font color="#fff8dc">%item-size%</font><td align=center class=row><font color="#ffffff">%item-modified%</font><td align=center class=row>

With this diff template, the following occurs in a default template filelist ...
1. New tag doesn't show
2. Comment or descript.ion doesn't show
3. Filesize, Filetime & Hits columns are empty

The attachment below include all of the above but are missing.  Does the default template support diff template?



Title: Re: diff template
Post by: rejetto on February 28, 2009, 05:15:58 PM
you are using %new% in your diff tpl.
%new% is an old (still supported but deprecated) way to make the NEW flag.
it needs you to have a [newfile] section in your template.

equivalent: {.if| {.get|is new.} | {.$newfile.} .}
note: you are not forced anymore in keeping the code inside section [newfile]

you can see that current default template doesn't use %new% anymore
Title: Re: diff template
Post by: maverick on February 28, 2009, 05:36:23 PM
I only use the default template for testing.  [newfile] is included in my custom template so %new% does work properly.

Title: Re: diff template
Post by: Mars on February 28, 2009, 05:53:38 PM
Eh! The lads, are you colour-blind or what?

Quote
file]
<tr><td class=row>%new% <a href="%item-url%"><img align=top src="/~img_file">&nbsp;%item-name%</a>%comment%<td align=center class=row><font color="#fff8dc">%item-size%</font><td align=center class=row><font color="#ffffff">%item-modified%</font><td align=center class=row>


the foreground color is the same as the background!
http://www.rejetto.com/forum/index.php?action=dlattach;topic=6708.0;attach=3799;image
;D ;D ;D

And it is old men as me wich have no more our eyes of 20 years which are obliged to see it the first ones.
HEHE!
Title: Re: diff template
Post by: maverick on February 28, 2009, 06:05:03 PM
Eh! The lads, are you colour-blind or what?

You are right mars :):)  Didn't notice that as I copied it from my custom template which supports those colors.  That was the problem from the beginning.  Shit!

I should go to bed.
Title: Re: diff template
Post by: Mars on February 28, 2009, 06:13:01 PM
For proof that even one old "pain in the ass" as me on the forum, it has of the check. ;) ;D
Title: Re: diff template
Post by: Fysack on March 04, 2009, 12:06:31 AM
using diff template with default template
Dont answer him, its a trap-trick, maverick dont ever wonder anything!!  ;D ;)