rejetto forum

Software => HFS ~ HTTP File Server => Topic started by: TSG on January 18, 2007, 08:52:41 AM

Title: File.EXT idea...
Post by: TSG on January 18, 2007, 08:52:41 AM
OK i have been editing the ToG and i have come across something in the template that i think maybe could be improved.   :)

In the template for images i have,
Code: [Select]
[file.jpg]
<tr class=off onmouseover="this.className='on'" onmouseout="this.className='off'">
<td class=rw style="padding:0px;border-left:0px;">
<a href="%item-url%" target=_blank>
<div style="position:absolute;z-index:20;" onmouseout="popUp(event,'t10')" onmouseover="popUp(event,'t10')"><img src="/thumb/%item-name%" alt=""></div>
<div style="z-index:10;"><img src="/thumb/nt.gif" alt="" align=absmiddle>&nbsp;%item-name%%new%</div>
</a>
%comment%</td>
<td class=rw align=center>%item-size%</td>
<td class=rw align=center>%item-modified%</td>
<td class=rw align=center>%item-dl-count%</td>
</tr>

Now, this same code is used for .bmp/.gif/.png, i was wondering... if maybe it would be possible to allow a section of the template to be used for different or multiple specified file extensions, this would reduce redundant code in the template, and ease the editing process of the template. Something like this maybe [file.jpg/.png/.bmp/.gif] and the code piece in that section will be used for all of those file types... i know this wouldnt reduce the page load times or anything like that, but it would make the editing of the template easier. Similiar process could be used for ppl that use video streaming [file.flv/.mpg/.wmv/.swf] or music [file.mp3/.m4a/.wma/.wav/.aiff/.midi] or something like that....  ???
Title: Re: File.EXT idea...
Post by: rejetto on January 18, 2007, 02:00:12 PM
accepted
Title: Re: File.EXT idea...
Post by: rejetto on January 18, 2007, 02:01:33 PM
i would say the extra dots are unnecessary
[file.jpg/gif/png]
Title: Re: File.EXT idea...
Post by: TSG on January 18, 2007, 02:03:11 PM
Yep i agree.
Title: Re: File.EXT idea...
Post by: Garphy on January 18, 2007, 02:38:24 PM
good idea~
may reduce the code
Title: Re: File.EXT idea...
Post by: maverick on January 18, 2007, 02:52:14 PM

I agree.  Good idea TSG and thanks rejetto.
Title: Re: File.EXT idea...
Post by: TSG on January 19, 2007, 07:44:37 PM
What build can we be expecting this?

Because i am almost ready to release the new version of the ToG... sometime tonight methinks.
Title: Re: File.EXT idea...
Post by: rejetto on January 19, 2007, 10:36:47 PM
well... would you realase your tpl as working only with the last release?
maybe you could wait some time and wait it to be well spread
as you wish
Title: Re: File.EXT idea...
Post by: TSG on January 19, 2007, 11:21:26 PM
i'll release it with the old settings, the old code will still work with the new system off course?

because i have another thing i want to add in when i return from holidays but i have no time to start it atm, so that release can have this new thingo included.
Title: Re: File.EXT idea...
Post by: rejetto on January 20, 2007, 01:46:11 AM
sure

i should consider of an alternative: a feature that let you specify the content for several sections instead of just one.
i mean... something that is not only for file sections, but that would work for an section.
the syntax would be something like
[A = B = C]
html content

for files it would apply like
[file.jpg = file.gif = file.png]
<img src='...'>
Title: Re: File.EXT idea...
Post by: TSG on January 20, 2007, 06:26:52 AM
As long as u can specify multiple file extensions for a file section, go for it. ;) would this be able to be used for any of the sections of the template? so if u have any duplicate section, you could shorten it to the one part?

Also a small question which is a little bit off topic... is it possible to show the active transfers window (/~progress) in a frame on any part of the hfs? cause ino in the upload section uses /~upload+progress, but that uses another section of the tpl.... i cant envision how to make it appear as a frame for any part of the template, instead of opening to a new window.
Title: Re: File.EXT idea...
Post by: Giant Eagle on January 20, 2007, 11:31:27 AM
nice idea  ;)

but what happens if you use a file section twice?

Example:
Code: [Select]
[file.jpg = file.gif = file.png]
<img src='...'>

[file.gif]
<img src='...'>
Title: Re: File.EXT idea...
Post by: rejetto on January 20, 2007, 08:12:06 PM
nice idea  ;)
but what happens if you use a file section twice?

i guess... the same that happens if you specify twice [file.gif]
you overwrite
Title: Re: File.EXT idea...
Post by: rejetto on January 20, 2007, 08:13:40 PM
Also a small question which is a little bit off topic... is it possible to show the active transfers window (/~progress) in a frame on any part of the hfs? cause ino in the upload section uses /~upload+progress, but that uses another section of the tpl.... i cant envision how to make it appear as a frame for any part of the template, instead of opening to a new window.

you may put defaultpage.html in the root, containing 2 frames:
one points to /~nodefault
the other points to /~progress
Title: Re: File.EXT idea...
Post by: rejetto on January 22, 2007, 04:33:10 PM
available in 083