rejetto forum

help! something is wrong with my template! (again!)

0 Members and 1 Guest are viewing this topic.

Offline legop3

  • Occasional poster
  • *
    • Posts: 9
    • View Profile
my friend logged on to my file server today and let me know that all of the "actions" buttons were gone and he couldn't do anything. the only thing in the box is "get list" and it isnt even a button! I suspect that something is just out of alignment, I am probably just missing a </> end thing somewhere, but i can't find where it is. here is the section that i think has the problem: (yes, I have saved the original one, this is a copy I modified) 
Code: [Select]
[box panel]
<div id='panel'>
{.$box howto.}
    {.$box messages.}
    {.$box login.}
    {.$box folder.}
    {.$box search.}
    {.$box selection.}
    {.$box upload.}
    {.$box actions.}
    {.$box server info.}

[box howto]
<p><font size="2">Welcome to the server! feel free to upload whatever you'd like with the <bold><mark>upload</mark></bold> button, and you can download or view a file by clicking on it. Don't worry about deleting things, as there is enough space for everyone <img src="/ussr.png" alt="ussr_symbol" width="10" height="10">. Before you can upload something, you must go to root. uploading is unavalible in kekdrive because it is a physical drive as opposed to a virtual folder, like root. to select a folder or file, tick the checkbox next to it, and then you can rename or move it.</font></p>

[box messages]
<fieldset id='msgs'>
<legend><img src="/~img10"> {.!Messages.}</legend>
<ul style='padding-left:2em'>

[box folder]
<fieldset id='folder'>
<legend><img src="/~img8"> {.!Folder.}</legend>

       <div style='float:right; position:relative; top:-1em; font-weight:bold;'>
{.if| {.length|{.?search.}.} | <a href="."><img src="/~img14"> {.!Back.}</a>
| {.if| {.%folder% != / .} | <a href=".."><img src="/~img14"> {.!Up.}</a> .}

<div id='breadcrumbs'>
{.comment|we need this to start from 1 {.count|folder levels.}.}
{.breadcrumbs|{:<a href="%bread-url%" {.if|{.length|%bread-name%.}|style='padding-left:{.calc|{.count|folder levels.}*0.7.}em;'.} /> {.if|{.length|%bread-name%.}|&raquo; %bread-name%|<img src="/~img1"> {.!Home.}.}</a>:} .}

<div id='folder-stats'>%number-folders% {.!folders.}, %number-files% {.!files.}, {.add bytes|%total-size%.}

{.123 if 2| <div id='foldercomment'>|{.commentNL|%folder-item-comment%.}|</div> .}

[box search]
{.if| {.get|can recur.} |
<fieldset id='search'>
<legend><img src="/~img3"> {.!Search.}</legend>
<form style='text-align:center'>
<input name='search' size='15' value="{.escape attr|{.?search.}.}">
<input type='submit' value="{.!go.}">
<div style='margin-top:0.5em;' class='hidden popup'>
<legend>{.!Where to search.}</legend>
<input type='radio' name='where' value='fromhere' checked='true' />  {.!this folder and sub-folders.}
<br><input type='radio' name='where' value='here' />  {.!this folder only.}
<br><input type='radio' name='where' value='anywhere' />  {.!entire server.}

[box selection]
<fieldset id='select' class='onlyscript'>
<legend><img src="/~img15"> {.!Select.}</legend>
    <button onclick="
            var x = $('#files .selector');
            if (x.size() > x.filter(':checked').size())
                x.attr('checked', true).closest('tr').addClass('selected');
                x.attr('checked', false).closest('tr').removeClass('selected');
    <button onclick="
            $('#files .selector').attr('checked', function(i,v){ return !v }).closest('tr').toggleClass('selected');
    <button onclick=''>{.!Mask.}</button>
<p style='display:none; margin-top:1em;'><span id='selected-number'>0</span> items selected</p>

[box upload]
{.if| {.get|can upload.} |{:
<fieldset id='upload'>
    <legend><img src="/~img32"> {.!Upload.}</legend>
    <form action="." method='post' enctype="multipart/form-data" style='text-align:right;'>
    <input type='file' name='file' multiple style='display:block;' />
    <input type='submit' value='{.!Upload.}' style='margin-top:0.5em;' />

[box actions]
<fieldset id='actions'>
<legend><img src="/~img18"> {.!Actions.}</legend>
{.if|{.can mkdir.}|
<button id='newfolderBtn' onclick='ezprompt(this.innerHTML, {type:"text"}, function(s){
ajax("mkdir", {name:s});
    });'>{.!New folder.}</button>
{.if|{.can comment.}|
<button id='commentBtn' onclick=''>{.!Comment.}</button>
{.if|{.get|can delete.}|
<button id='deleteBtn' onclick='if (confirm("{.!confirm.}")) submit({action:"delete"}, "{.get|url.}")'>{.!Delete.}</button>

{.if|{.and|{.!option.move.}|{.can move.}.}| <button id='moveBtn' onclick='moveClicked()'>{.!Move.}</button> .}
{.if|{.can rename.}|
<button id='renameBtn' onclick='
            var a = selectedItems();
                if (a.size() != 1)
return alert("You must select a single item to rename");
ezprompt(this.innerHTML, {type:"text"}, function(s){
ajax("rename", {from:getItemName(a[0]), to:s});
{.if|{.get|can archive.}|
<button id='archiveBtn' onclick='if (confirm("{.!confirm.}")) submit({}, "{.get|url|mode=archive|recursive.}")'>{.!Archive.}</button>
<a href="{.get|url|tpl=list|sort=|{.if not|{.length|{.?search.}.}|{:folders-filter=\|recursive:}.}.}">{.!Get list.}</a>

[box server info]
<fieldset id='serverinfo'>
<legend><img src="/~img0"> {.!Server information.}</legend>
<a href="">HttpFileServer %version%</a>
<br />{.!Server time.}: %timestamp%
<br />{.!Server uptime.}: %uptime%
<p><strong><font size="3" color="orange"> run by some lint <img src="/e621.png" alt="e621_logo" width="30" height="30"> <img src="/BD_logo.png" alt="BD_logo" width="30" height="30"> </font></strong></p>
« Last Edit: May 01, 2019, 07:58:00 PM by legop3 »

Offline LeoNeeson

  • Tireless poster
  • ****
    • Posts: 700
  • Status: On hiatus (unspecified time)
    • View Profile
Hi!, welcome to the forum! :)

I've fixed the template. You can load it going to...

Menu > HTML template > Change file... (and load the attached file to this post).

WARNING! Before doing this, make a backup of your current template (hfs.tpl), just in case my fix doesn't work. I have ONLY modified the section you posted. If that doesn't solve the problem, it's recommended that you attach the COMPLETE template.

HFS in Spanish (HFS en Español) / How to compile HFS (Tutorial)
» Currently taking a break, until HFS v2.4 get his stable version.

Offline legop3

  • Occasional poster
  • *
    • Posts: 9
    • View Profile
i'm having this problem again after changing some more things, but this time, there are no checkboxes next to files either. the "Select" box is also missing its buttons. what did you do to fix it? / what causes it? / how can I fix it? My current (broken) template is below:
« Last Edit: May 01, 2019, 08:54:30 PM by legop3 »