Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - dj

Pages: [1] 2 3
3
alternativ add attribute accept to input type='file' in [box upload], e.g. accept='video/*'

4
HFS ~ HTTP File Server / Re: Feature request: folder access by IP address
« on: December 02, 2016, 08:36:43 AM »
Change ip and Add diff template
Code: [Select]
[list]
{.if |{.%ip%=192.168.1.2.}|

<div id='files_outer'>
<div style='height:1.6em;'></div> {.comment| this is quite ugly, i know, but if i use any vertical padding with height:100% i'll get a scrollbar .}
{.if not| %number% |{: <div style='font-size:200%; padding:1em;'>{.!No {.if|{.length|{.?search.}.}|results|files.}.}</div> :}|{:
        <form method='post'>
            <table id='files'>
            {.set|sortlink| {:<a href="{.trim|
                    {.get|url|sort=$1| {.if| {.{.?sort.} = $1.} |  rev={.not|{.?rev.} .} /if.} /get.}
                /trim.}">{.!$2.}{.if| {.{.?sort.} = $1.} | &{.if|{.?rev.}|u|d.}arr;.}</a>:} .}
            <th>{.^sortlink|n|Name.}{.^sortlink|e|.extension.}
            <th>{.^sortlink|s|Size.}
            <th>{.^sortlink|t|Timestamp.}
            <th>{.^sortlink|d|Hits.}
            %list%
            </table>
        </form>
:}.}
</div>

|forbidden.}

update for your case:
{.if |{.regexp|10\.0\.0\.|%ip%.}|
or {.if |{.{.regexp|.*\.|%host%.}={.regexp|.*\.|%ip%.}.}| or {.if |{.match|10.0.0.*|%ip%.}|

5
HFS ~ HTTP File Server / Re: set expiry to delete content
« on: September 12, 2016, 11:36:20 AM »
pseudocode:

if Sunday then 3
else if Saturday then 2
else 1

Code: [Select]
{. if |{.{.time|ddd.}=Sun.} | 3 | {:{.if|{.{.time|ddd.}=Sat.}|2|1.}:} .}
remind to replace Mon to Sun by their translations

6
HFS ~ HTTP File Server / Re: set expiry to delete content
« on: September 10, 2016, 12:27:55 AM »
I wonder how difficult it would be to have it not delete on a ... Sunday?

replace 1 (number of days) with
Code: [Select]
{. if |{.{.time|ddd.}=Sun.} | 2 | 1 .}

7
you can use the standard template for the supported formats

http://www.rejetto.com/forum/beta/downloaded-files/msg1052766/#msg1052766

Menu > Other options > MIME types...   and open directly in browser
*.mp4   |video/mp4    (H.264 1 2)
*.ogg    |video/ogg     (Theora)
*.webm |video/webm (VP9)
*.mp3   |audio/mpeg
*.m3u8 |    3

update:  1H.265 in Edge 2in mkv in Chrome 3in Edge (HLS)


8
HTML & templates / Re: Capture and upload images from your webcam
« on: June 27, 2016, 09:24:12 AM »
Update: select webcam. Tested with FF, chrome (use localhost) and Edge

9
HTML & templates / Re: Responsive small screen template
« on: June 20, 2016, 02:14:50 AM »
Corrected

10
HTML & templates / Re: Responsive small screen template
« on: June 19, 2016, 11:02:44 PM »
the template without pictureviewer

Code: [Select]
[file=folder]
{.set|mask|{:{.match|jpg;png;gif|%item-ext%.}:}.}
<tr id="%item-url%" {.if|{.^mask.}|class="media".}><td style="width:72px">
<img src= {.if|{.^mask.}|"thumb/%item-url%" style="width:64px;height:64px;object-fit:cover" onclick='show|"%item-icon%" onclick='location=.}("%item-url%")' alt="&#x1f304;" title="%item-name%" /></td>

[+file=+folder]
<td style="text-align:initial">
<div><a href="%item-url%" style="color:black; font-size:16px">%item-name%</a></div>
<div style="width:200px" title="%item-comment%">%item-modified% {.if|{.get|is new.}|&#x1F195;.}</div>
<div style="width:100px" title="%item-dl-count%">{.or|%item-size%|.}</div>
</td>
<td style="width:72px;text-align:center">
<input type="checkbox" class='selector' name='selection' value="%item-url%" {.if not|{.or|{.get|can delete.}|{.get|can access.}|{.get|can archive item.}.}|disabled='disabled'.} ></td>
</tr>

[list]
<div id='files_outer'>
<div style='height:1.6em;'></div>

{.if not| %number% |{: <div style='font-size:200%; padding:1em;'>{.!No {.if|{.length|{.?search.}.}|results|files.}.}</div> :}|{:
        <form method='post'>
<table id='files' style="width:100%; border-spacing:0px 1px; font-family:Helvetica">
<tr>
<th><a id="menu">&#x2261;</a>
<th><select onchange='location=this.value'>
<option {.if|{.=|{.urlvar|sort.}|n.}|selected.} value="{.get|url|sort=n|rev={.?sort=n.}.}">Name</option>
<option {.if|{.=|{.urlvar|sort.}|s.}|selected.} value="{.get|url|sort=s|rev={.?sort=s.}.}">Size</option>
<option {.if|{.=|{.urlvar|sort.}|t.}|selected.} value="{.get|url|sort=t|rev={.?sort=t.}.}">Timestamp</option>
<option value="{.get|url|rev={.not|{.?rev.}.}.}">order &{.if|{.?rev.}|u|d.}arr;</option>
</select><th>
</tr>
%list%
</table>
        </form>
:}.}
</div>

<script>
(function() {
  var menu = document.getElementById("menu")
  menu.onclick = function() {
    var pan = document.getElementById("panel");
    pan.style.display = pan.style.display ? "" : "none";
    document.getElementById("files_outer").style.overflow = pan.style.display ? "initial" : "auto"
  }
  if (window.innerWidth < 640) menu.click()  //if template is slow remove this line
})();
</script>

[box panel]
<script>
(function() {
//add viewport to head
 var tmp = document.createElement("meta");
  tmp.name = 'viewport';
  tmp.content = 'width=device-width';
  document.head.appendChild(tmp)

  var tmp = document.createElement('style');
  tmp.innerHTML = 'tr:hover td {background: #EEE} \ntd div[title] {opacity:.54; font-size:14px; display:inline-block}';
  document.head.appendChild(tmp)

})();
</script>

<div id='panel'>
    {.$box messages.}
    {.$box login.}
    {.$box folder.}
    {.$box search.}
    {.$box selection.}
    {.$box upload.}
    {.$box actions.}
    {.$box server info.}
</div>

Perhaps it's faster

13
HFS ~ HTTP File Server / Re: HFS very slow response on some clients
« on: June 11, 2016, 07:09:26 AM »
If you use images, but no thumbnails, you could try to replace "thumb/%item-url%" with "%item-icon%" or "" (line 4)

update: try to load the script earlier
add [box panel] before the script and the content of box panel of the hfs.tpl after the script block

14
HTML & templates / Re: Responsive small screen template
« on: June 07, 2016, 05:03:14 AM »
To change the sort direction

add before </select> (line 27 33)
Code: [Select]
<option value="{.get|url|rev={.not|{.?rev.}.}.}">order &{.if|{.?rev.}|u|d.}arr;</option>

15
HTML & templates / Re: Responsive small screen template
« on: June 06, 2016, 08:52:56 AM »
My bad.
In hfs Add a new real folder. In explorer Add the file hfs.diff.tpl to this folder.
Or If you wan't use in the root, select /, Properties, Diff template and copy the text of the hfs.diff.tpl to it.
Don't change template file.
http://www.rejetto.com/wiki/index.php?title=HFS:_Hidden_things

Pages: [1] 2 3