rejetto forum

Add delete function to template

0 Members and 1 Guest are viewing this topic.

Offline allclownsareevil

  • Occasional poster
  • *
    • Posts: 4
    • View Profile
Hello,

Firstly thanks for the program and templates.

I have a question that hopefully is easy enough to answer. I'm using a black template for hfs and until this morning was using ver 2.2 152build. However I notice there are many later beta builds released now.

My question is, how would I go about updating the program to the latest build and then adding the delete funtion to the template?

I've cheked out the tpl files and can see the delete function in there but I'd appreciate a little help, if anyone knows.

Thanks in advance.

clowns


Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13308
    • View Profile
edit the template
add this before the file list
<form method='post' id='filelist'>


this after
<input type='hidden' name='action' value='delete'>
<input style='margin-left:1em' type='submit' value='Delete selected' onclick='return confirm("Are you sure?")'>
</form>


this to every file and folder
{.if|{.get|can delete.}| <input type='checkbox' name='selection' value="%item-url%"> .}


Offline allclownsareevil

  • Occasional poster
  • *
    • Posts: 4
    • View Profile
Hey rejetto,

Thanks for the reply and again for the hard work with HFS.

I did what you suggested and had partial success.

My result was I had the checkboxes, the delete button and the ability to delete the files. The only problem was that the checkboxes refused to display in the table alongside the filenames. Instead they displayed across the top of the table in a row.

Not sure why. So close!  ;D

I don't want to hassle you any further, so I guess I'm going to try and edit the original template file with some new colours.

Thanks again.


Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13308
    • View Profile


Offline allclownsareevil

  • Occasional poster
  • *
    • Posts: 4
    • View Profile
Well it didn't help my html skills so much, I trawled through my template and finally got the bits working I needed ... some by trial and error though.  :-\


The problem was I'm was using an old template and trying to update lots of components.

Just thrown a donation your way, should have done it sooner. Thanks for the help, keep up the good work.
« Last Edit: October 10, 2008, 06:50:08 PM by allclownsareevil »


Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13308
    • View Profile
trial-error is a very common practice with computers ;)

Just thrown a donation your way, should have done it sooner. Thanks for the help, keep up the good work.

ah, it was you, thank you again ;)



Offline Fysack

  • Tireless poster
  • ****
    • Posts: 644
  • present picture
    • View Profile
    • Admin
man`o`man you gonna live to be 100 rejetto  :-*
GOD CAN READ YOUR MIND


Offline aceventurars

  • Occasional poster
  • *
    • Posts: 2
    • View Profile
Where should I add the codes to in the default template?? I wan to have a delete function using the default template but I do not know how to. Please help....Thanks


Offline SilentPliz

  • Operator
  • Tireless poster
  • *****
    • Posts: 1298
  • ....... chut ! shh!
    • View Profile
   
You have to use a recent beta version of hfs (The delete option is included):

Topic beta:
http://www.rejetto.com/forum/index.php?board=33.0
The last beta:
http://www.dovedove.it/hfs/hfs237.exe

Then you give the property "Delete" to the accounts allowed to... delete.  :)

Your choosing folder -> Right click -> Properties... -> Delete
« Last Edit: May 07, 2009, 02:19:46 PM by SilentPliz »


Offline aceventurars

  • Occasional poster
  • *
    • Posts: 2
    • View Profile
Thanks for your reply...How do i give the property "Delete" to the accounts allowed to... delete??I cannot find it.


Offline SilentPliz

  • Operator
  • Tireless poster
  • *****
    • Posts: 1298
  • ....... chut ! shh!
    • View Profile
   
In the VFS box, right-click on a folder, choose properties...

There is a small display bug with the "tabs" in the latest beta, click on "flags" then on "Permissions" to refresh.

Everything is here ... I will let you discover the rest.
« Last Edit: May 07, 2009, 12:18:11 PM by SilentPliz »