rejetto forum

Software => HFS ~ HTTP File Server => Topic started by: kycken on January 06, 2008, 03:36:24 PM

Title: popup new page
Post by: kycken on January 06, 2008, 03:36:24 PM
HFS can add a setting when press a link,folder,files or photo

can popup a new page!!

Cause I don't want anytime modify the template to get this

function!!(>_<)
Title: Re: popup new page
Post by: rejetto on January 06, 2008, 03:59:25 PM
can you show the html you are suggesting?
Title: Re: popup new page
Post by: TSG on January 06, 2008, 07:01:26 PM
<a href="link" target="_blank">link</a>

You will have to edit the template to get it lol.

Sure you can set files to open in browser with hfs, but i find it best to specify them in the template. I do this in the new beta builds of HFS.

[target]
{{switch|{{lower|%item-ext%}}|,|gif,pdf,htm,html,css,js,txt,jpg,png|target="_blank"|}}

and in [file]
the link <a href="moo" {{$target}}>MOO</a>

 ;) You could do it also with javascript.

<a href="javascript:window.open('%item-url%','%item-name%','width=,height=,left=,top=,scrollbars=1,resizable=1');">MOO</a>
Title: Re: popup new page
Post by: rejetto on January 07, 2008, 02:33:09 AM
what's the point in opening a new window for such files?

note: {{switch}} is case insensitive
Title: Re: popup new page
Post by: kycken on January 07, 2008, 02:30:31 PM
When the folder have more photo and have a photo thumb preview,

each time press a photo link and popup a new page.

I just close the new page is OK!

But if no popup a new page.When I back to the folder,

it will spend a time reload the photo thumb preview once again!!

so it is a point why I want HFS have a function setting reason(>_<)
Title: Re: popup new page
Post by: Foggy on January 07, 2008, 03:11:33 PM
your browser should cache the thumbnails.  ???
Title: Re: popup new page
Post by: rejetto on January 15, 2008, 06:50:18 AM
mm, i have an idea!
instead of editing the template, use the diff template.
by putting only [file] and the other code that TSG posted in the diff tpl, you will have the default tpl untouched. :)
let us know if you don't understand.