Author Topic: help! something is wrong with my template! (again!)  (Read 196 times)

0 Members and 1 Guest are viewing this topic.

Offline legop3

  • Occasional poster
  • *
  • Posts: 9
    • View Profile
help! something is wrong with my template! (again!)
« on: March 20, 2019, 03:45:22 AM »
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.}
</div>

[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'>
</ul>
</fieldset>



[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> .}
/if.}
</div>

<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>

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

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

[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.}">
</form>
<div style='margin-top:0.5em;' class='hidden popup'>
<fieldset>
<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.}
</fieldset>
</div>
</fieldset>
/if.}

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

[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;' />
    </form>
</fieldset>
:}.}


[box actions]
<fieldset id='actions'>
<legend><img src="/~img18"> {.!Actions.}</legend>
<center>
{.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='setComment.call(this)'>{.!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});
    });'>{.!Rename.}</button>
.}
{.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>
</center>
</fieldset>




[box server info]
<fieldset id='serverinfo'>
<legend><img src="/~img0"> {.!Server information.}</legend>
<a href="http://www.rejetto.com/hfs/">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>
</fieldset>
« Last Edit: May 01, 2019, 07:58:00 PM by legop3 »

Offline LeoNeeson

  • Tireless poster
  • ****
  • Posts: 684
  • Still busy...
    • View Profile
    • twitter.com/LeoNeeson
Re: help! something is wrong with my template!
« Reply #1 on: March 20, 2019, 04:50:27 AM »
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.

Cheers,
Leo.-
HFS in Spanish (HFS en Español) / How to compile HFS (Tutorial)
» All my work/posts/data anywhere on internet is on Public License!

Offline legop3

  • Occasional poster
  • *
  • Posts: 9
    • View Profile
Re: help! something is wrong with my template!
« Reply #2 on: March 20, 2019, 11:13:58 AM »
It worked! Thanks for the help!

Offline legop3

  • Occasional poster
  • *
  • Posts: 9
    • View Profile
Re: help! something is wrong with my template!
« Reply #3 on: May 01, 2019, 03:56:20 PM »
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 »