Author Topic: Add delete function to template  (Read 8697 times)

0 Members and 1 Guest are viewing this topic.

Offline allclownsareevil

  • Occasional poster
  • *
  • Posts: 4
    • View Profile
Add delete function to template
« on: October 10, 2008, 01:57:18 PM »
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: 12949
    • View Profile
Re: Add delete function to template
« Reply #1 on: October 10, 2008, 02:01:08 PM »
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
Re: Add delete function to template
« Reply #2 on: October 10, 2008, 03:04:41 PM »
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: 12949
    • View Profile
Re: Add delete function to template
« Reply #3 on: October 10, 2008, 03:14:05 PM »
it will improve your html knowledge ;)

Offline allclownsareevil

  • Occasional poster
  • *
  • Posts: 4
    • View Profile
Re: Add delete function to template
« Reply #4 on: October 10, 2008, 03:16:53 PM »
that it will  :D

Offline allclownsareevil

  • Occasional poster
  • *
  • Posts: 4
    • View Profile
Re: Add delete function to template
« Reply #5 on: October 10, 2008, 06:45:50 PM »
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: 12949
    • View Profile
Re: Add delete function to template
« Reply #6 on: October 11, 2008, 12:36:36 AM »
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 rejetto

  • Administrator
  • Tireless poster
  • *
  • Posts: 12949
    • View Profile
Re: Add delete function to template
« Reply #7 on: January 19, 2009, 02:12:18 PM »

Offline Fysack

  • Tireless poster
  • ****
  • Posts: 615
  • present picture
    • View Profile
    • Admin
Re: Add delete function to template
« Reply #8 on: March 03, 2009, 11:32:07 PM »
man`o`man you gonna live to be 100 rejetto  :-*
GOD CAN READ YOUR MIND

Offline aceventurars

  • Occasional poster
  • *
  • Posts: 2
    • View Profile
Re: Add delete function to template
« Reply #9 on: May 07, 2009, 05:07:30 AM »
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: 1234
  • ....... chut ! shh!
    • View Profile
Re: Add delete function to template
« Reply #10 on: May 07, 2009, 11:01:59 AM »
   
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
Re: Add delete function to template
« Reply #11 on: May 07, 2009, 11:44:12 AM »
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: 1234
  • ....... chut ! shh!
    • View Profile
Re: Add delete function to template
« Reply #12 on: May 07, 2009, 12:08:19 PM »
   
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 »