rejetto forum

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

Pages: 1 ... 27 28 29 30 31
421
Bug reports / VFS gets completely erased
« on: March 23, 2011, 02:55:36 PM »
I noticed before when trying to write the command line script that if the posted variables were blank, then giving a script along the lines of this to HFS would result in the VFS and its backup being completely erased.  Going to any page in a browser always resulted in the 404-Not Found page.

Code: [Select]
{.mkdir|D:\.}
{.add folder|real|D:\|..}
{.new account||password=|enabled=true|member of=can change password|redirect=//.}
{.set item||hide=1|access=|delete=|upload=.}

422
HFS ~ HTTP File Server / Re: command lines
« on: March 21, 2011, 08:47:18 PM »
Well, I put this script in:

Code: [Select]

[submission]
{.mkdir|D:\{.postvar|name.}.}
{.add folder|real|D:\{.postvar|name.}|.{.postvar|name.}.}
{.new account|{.postvar|name.}|password={.postvar|password.}|enabled=true|member of=can change password|redirect=/{.postvar|name.}/.}
{.set item|{.postvar|name.}|hide=1|access={.postvar|name.}|delete={.postvar|name.}|upload={.postvar|name.}.}
{.save|M:\User emails\{.postvar|name.}.txt|{.postvar|email.}.}
{.copy|D:\hfs.diff.tpl|D:\{.postvar|name.}\hfs.diff.tpl.}


And HFS simply crashes every time I try to load the page.  There isn't even a Windows warning that the program crashed.  (I'm using Beta 274)

EDIT:  I tried build 276 and the crash still happens.  I'm gonna try one line of code at a time to see where the problem is.

EDIT #2:  I figured out (duh) that the problem was that I couldn't use M:\ drive since the script was now on the same server as HFS, not over my local network.  Changing it to C:\ solved the problem and now it all works great!!!!!

I'm beginning to see that I can do a lot more than I previously though with macros.  And also, the admins on this forum are probably the most helpful I've ever seen on any forum.  Thank you very much!!!!

423
HFS ~ HTTP File Server / Re: command lines
« on: March 21, 2011, 01:38:31 PM »
But is {.name} actually a variable in HFS?  Don't I have to use {.postvar| } to get the posted variables?

424
HFS ~ HTTP File Server / Re: Active Directory Integration
« on: March 20, 2011, 08:46:43 PM »
Why don't you just have someone who does have Active Directory (like me!) to test it for you?

425
HFS ~ HTTP File Server / Re: command lines
« on: March 20, 2011, 05:17:03 PM »
Alright!  I got the whole thing coded out exactly as I need it.  Maybe one day when I feel up to it I'll write an HFS Script rather than PHP.  Or I could just wait until HFS can use PHP  ;D

But here's what I got in HFS.events:

Code: [Select]
[every 1 seconds]
{.load|automatic.txt.}
{.delete|automatic.txt.}

In Submitted.php in XAMPP:

Code: [Select]
<?php



// Get posted variables for Name, password, and email

$name $_POST["name"];
$password $_POST["password"];
$email $_POST["email"];



// Specify the new HFS Script and the Email Log File

$myFile "M:\automatic.txt";
$myFile2 "M:\User emails\\$name.txt";
$fh fopen($myFile'w');
$fh2 fopen($myFile2'w');



// Specify the contents of the two new files, one with the HFS Macros and the other with the user's email address

$string1 "{.mkdir|D:\\$name.}
{.add folder|real|D:\\
$name|.$name.}
{.new account|
$name|password=$password|enabled=true|member of=can change password|redirect=/.$name/.}
{.set item|.
$name|hide=1|access=$name|delete=$name|upload=$name.}";

$string2 "$email";



// Create the two files and write the new contents

fwrite($fh"$string1");
fclose($fh);

fwrite($fh2"$string2");
fclose($fh2);



// Wait 1 second for HFS to create the new directory

sleep(2);



// Copy over the HFS template to the new directory

$old "D:/hfs.diff.tpl";
$new "D:/$name/hfs.diff.tpl";

copy($old$new);



?>


I hope I'm not asking too much, but if anybody gets the time, could someone please "convert" this PHP script to HFS macros?  That would be hugely appreciated.

Thanks,
Ray


426
HFS ~ HTTP File Server / Re: command lines
« on: March 20, 2011, 02:42:04 AM »
Yes!  Creating an hfs.diff.tpl is exactly the type of thing I was looking for.  I didn't know you could do that.    :)


427
HFS ~ HTTP File Server / Re: command lines
« on: March 18, 2011, 10:54:33 PM »
In HFS, if you go on the left, and right click a folder then hit properties, the properties box comes up.  One of the available tabs is 'Diff Template' which allows you to change the template for each specific folder, a feature that I rely on heavily.  I need a way to do this with the macro command line.

If you could go more in-depth on how to do this I would appreciate it greatly.

Thanks,
Ray

428
HFS ~ HTTP File Server / Re: command lines
« on: March 17, 2011, 11:46:27 PM »
Yes.

You know how in HFS itself it lets you specify a different template for each folder?

I would like a way to specify the template with the command.

Ray

429
HFS ~ HTTP File Server / Re: command lines
« on: March 17, 2011, 06:08:42 PM »
I've already written the PHP and gotten everything to work perfectly, so I'm going to use it for now.

However, there is one problem I have whether or not I use HFS or PHP for the form scripting.  That is, I need to be able to change a folder's default template in the VFS using command line manipulation, but I see nothing about it in the wiki.

Is that possible?  If not then could you include it in build 276?

Thanks,
Ray

430
HFS ~ HTTP File Server / Re: command lines
« on: March 15, 2011, 08:59:02 PM »
My end goal here is to make it so that it is somehow possible for a user to create their own account by submitting a form on one of the webpages.

This is what I'm thinking:

I could use Apache with PHP on another port, then have the form data submitted get put into a file like "automatic.txt" in the proper format and then have HFS automatically load the script every few seconds by putting that code you posted into HFS.events . . .

Is that a viable idea?

EDIT:  I wrote this script and it works perfectly.  Now I need to write some PHP to get it to submit the form data to this file in the proper syntax:

Code: [Select]
{.mkdir|D:\PERSON.}
{.add folder|real|D:\PERSON|.person.}
{.new account|person|password=password|enabled=true|member of=can change password|redirect=/.person/.}
{.set item|.person|hide=1|access=person|delete=person|upload=person.}

Only one problem I couldn't figure out: I need to make it so that the template of the folder is changed also.  Is this possible?  



EDIT 2:  Would it be possible to use an HFS functionality rather than PHP to get form data saved as a .txt ?

431
HFS ~ HTTP File Server / command lines
« on: March 09, 2011, 10:44:38 PM »
Is it somehow possible to create a new user account using a command line?

Thanks for any input,
Raybob

432
HFS ~ HTTP File Server / Re: Rename on Upload
« on: March 01, 2011, 08:38:07 PM »
Thanks!

I'm using this and it seems to work perfectly, although I'm not sure why but I had to use 37 or a " - " was left at the beginning of every file name.

Code: [Select]
[download name]
{.if|{.%folder-name% = private.}|{.cut|37||%item-name%.}|%item-name%.}

433
HFS ~ HTTP File Server / Re: Rename on Upload
« on: February 28, 2011, 08:02:27 PM »
^ I did that, and believe it or not the code wasn't very random; the first 16 characters were always nines and from then on it seemed to want to always pick similar strings.  I put it the way I did and it works fine and is completely random.  There's nothing detrimental about the way I put it is there?  Seems to work fine . . .

Since you guys seem so keen to help me  ;D is there a way to make it so that when downloading a file, it removes the first 36 characters so that the original name is restored?

Raybob

434
HFS ~ HTTP File Server / Re: Rename on Upload
« on: February 28, 2011, 03:37:10 AM »
I've settled on this and it works sufficiently.

It's just so anybody can upload without an account and then choose who they share their files with.  The folder these are uploaded to isn't browse-able a the folder uses a special template.

Code: [Select]
For help on how to use this file please refer http://www.rejetto.com/wiki/?title=HFS:_Event_scripts

[upload name]
{.if|{.%folder-name% = private.}|{.random|0|1|2|3|4|5|6|7|8|9|A|B|C|D|E|F|G|H|I|J|K|L|M|N|O|P|Q|R|S|T|U|V|W|X|Y|Z.}{.random|0|1|2|3|4|5|6|7|8|9|A|B|C|D|E|F|G|H|I|J|K|L|M|N|O|P|Q|R|S|T|U|V|W|X|Y|Z.}{.random|0|1|2|3|4|5|6|7|8|9|A|B|C|D|E|F|G|H|I|J|K|L|M|N|O|P|Q|R|S|T|U|V|W|X|Y|Z.}{.random|0|1|2|3|4|5|6|7|8|9|A|B|C|D|E|F|G|H|I|J|K|L|M|N|O|P|Q|R|S|T|U|V|W|X|Y|Z.}{.random|0|1|2|3|4|5|6|7|8|9|A|B|C|D|E|F|G|H|I|J|K|L|M|N|O|P|Q|R|S|T|U|V|W|X|Y|Z.}{.random|0|1|2|3|4|5|6|7|8|9|A|B|C|D|E|F|G|H|I|J|K|L|M|N|O|P|Q|R|S|T|U|V|W|X|Y|Z.}{.random|0|1|2|3|4|5|6|7|8|9|A|B|C|D|E|F|G|H|I|J|K|L|M|N|O|P|Q|R|S|T|U|V|W|X|Y|Z.}{.random|0|1|2|3|4|5|6|7|8|9|A|B|C|D|E|F|G|H|I|J|K|L|M|N|O|P|Q|R|S|T|U|V|W|X|Y|Z.}{.random|0|1|2|3|4|5|6|7|8|9|A|B|C|D|E|F|G|H|I|J|K|L|M|N|O|P|Q|R|S|T|U|V|W|X|Y|Z.}{.random|0|1|2|3|4|5|6|7|8|9|A|B|C|D|E|F|G|H|I|J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|C|D|E|F|G|H|I|J|K|L|M|N|O|P|Q|R|S|T|U|V|W|X|Y|Z.}{.random|0|1|2|3|4|5|6|7|8|9|A|B|C|D|E|F|G|H|I|J|K|L|M|N|O|P|Q|R|S|T|U|V|W|X|Y|Z.}{.random|0|1|2|3|4|5|6|7|8|9|A|B|C|D|E|F|G|H|I|J|K|L|M|N|O|P|Q|R|S|T|U|V|W|X|Y|Z.}{.random|0|1|2|3|4|5|6|7|8|9|A|B|C|D|E|F|G|H|I|J|K|L|M|N|O|P|Q|R|S|T|U|V|W|X|Y|Z.}{.random|0|1|2|3|4|5|6|7|8|9|A|B|C|D|E|F|G|H|I|J|K|L|M|N|O|P|Q|R|S|T|U|V|W|X|Y|Z.}{.random|0|1|2|3|4|5|6|7|8|9|A|B|C|D|E|F|G|H|I|J|K|L|M|N|O|P|Q|R|S|T|U|V|W|X|Y|Z.}{.random|0|1|2|3|4|5|6|7|8|9|A|B|C|D|E|F|G|H|I|J|K|L|M|N|O|P|Q|R|S|T|U|V|W|X|Y|Z.}{.random|0|1|2|3|4|5|6|7|8|9|A|B|C|D|E|F|G|H|I|J|K|L|M|N|O|P|Q|R|S|T|U|V|W|X|Y|Z.}{.random|0|1|2|3|4|5|6|7|8|9|A|B|C|D|E|F|G|H|I|J|K|L|M|N|O|P|Q|R|S|T|U|V|W|X|Y|Z.}{.random|0|1|2|3|4|5|6|7|8|9|A|B|C|D|E|F|G|H|I|J|K|L|M|N|O|P|Q|R|S|T|U|V|W|X|Y|Z.}----%item-name% |%item-name%.}






Example:


435
HFS ~ HTTP File Server / Re: Rename on Upload
« on: February 20, 2011, 04:56:53 PM »
YES!!!!

Thank you all so much I got it to work properly . . .  Now it only appends the file name when uploading to the folder that people can upload to but not browse . . .

Code: [Select]


[upload name]
{.if|{.%folder-name% = private.}|{.random number | 1 | 9.}{.random number | 0 | 9.}{.random number | 0 | 9.}

{.random number | 0 | 9.}{.random number | 0 | 9.}{.random number | 0 | 9.}{.random number | 0 | 9.}{.random

number | 0 | 9.}{.random number | 0 | 9.}{.random number | 0 | 9.}{.random number | 0 | 9.}{.random number | 0 |

9.}{.random number | 0 | 9.}{.random number | 0 | 9.}{.random number | 0 | 9.}{.random number | 0 | 9.}{.random

number | 0 | 9.}{.random number | 0 | 9.}{.random number | 0 | 9.}{.random number | 0 | 9.}{.random number | 0 |

9.}{.random number | 0 | 9.}{.random number | 0 | 9.}{.random number | 0 | 9.}{.random number | 0 | 9.}{.random

number | 0 | 9.}{.random number | 0 | 9.}{.random number | 0 | 9.}{.random number | 0 | 9.}{.random number | 0 |

9.}{.random number | 0 | 9.}{.random number | 0 | 9.}----%item-name% |%item-name%.}




Pages: 1 ... 27 28 29 30 31