Author Topic: diff template  (Read 1757 times)

0 Members and 1 Guest are viewing this topic.

Offline maverick

  • Tireless poster
  • ****
  • Posts: 1052
  • Computer Solutions
    • View Profile
diff template
« 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?



maverick

Offline rejetto

  • Administrator
  • Tireless poster
  • *
  • Posts: 12949
    • View Profile
Re: diff template
« Reply #1 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

Offline maverick

  • Tireless poster
  • ****
  • Posts: 1052
  • Computer Solutions
    • View Profile
Re: diff template
« Reply #2 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.

« Last Edit: March 01, 2009, 10:48:42 AM by maverick »
maverick

Offline Mars

  • Operator
  • Tireless poster
  • *****
  • Posts: 1880
    • View Profile
Re: diff template
« Reply #3 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!
« Last Edit: February 28, 2009, 05:57:28 PM by mars »

Offline maverick

  • Tireless poster
  • ****
  • Posts: 1052
  • Computer Solutions
    • View Profile
Re: diff template
« Reply #4 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.
« Last Edit: February 28, 2009, 06:11:27 PM by maverick »
maverick

Offline Mars

  • Operator
  • Tireless poster
  • *****
  • Posts: 1880
    • View Profile
Re: diff template
« Reply #5 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
« Last Edit: February 28, 2009, 07:16:24 PM by mars »

Offline Fysack

  • Tireless poster
  • ****
  • Posts: 615
  • present picture
    • View Profile
    • Admin
Re: diff template
« Reply #6 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 ;)
GOD CAN READ YOUR MIND