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.


Topics - raybob

Pages: 1 2 3 4
1
Programmers corner / parsing hfs.ini in PHP
« on: July 08, 2014, 08:03:23 PM »
I don't know if anyone would ever have any use for this but I figured I'd share it... here's a PHP script that loads, parses and returns an array of keys in hfs.ini, including separating every account and decoding the usernames and notes.

Code: [Select]
<?php

function loadHFS($file) {

$output = array();

$hfsini preg_split("/\r\n|\n|\r/"file_get_contents("hfs.ini"));

foreach ($hfsini as $string) { if ($string) {

$split explode("=",$string,2);

if (isset($split[0]) && isset($split[1])) { $output[$split[0]] = $split[1]; }
}}

$accounts explode(";",$output['accounts']); $output['accounts'] = array();

foreach ($accounts as $string) { if ($string) {

$string explode("|",$string); $account = array();

foreach ($string as $info) {

$split explode(':',$info,2);

if (isset($split[0]) && isset($split[1])) { $account[$split[0]] = $split[1]; }
}

if (!empty($account['login'])) { $account['login'] = explode(":",base64_decode($account['login'])); }

if (!empty($account['notes'])) {

$notes preg_split("/\r\n|\n|\r/",zlib_decode(base64_decode($account['notes']))); $data = array();

foreach ($notes as $note) {

$split explode("=",$note);

$data[$split[0]] = $split[1];
}

$account['notes'] = $data;
}

array_push($output['accounts'],$account);
}}

return $output;
}

print_rloadHFS("hfs.ini") );

?>


2
I know this isn't exactly a place to look for PHP developers... but if anyone would like to help out with testing the next FHFS I would hugely appreciate it.  Just message me.

The project started in March/April of 2013 and it's nearing 90% completion.

3
Bug reports / variable showing wrong value...?
« on: November 03, 2013, 02:01:26 AM »
Copied from a macro log:

Code: [Select]
for each|user||raybob|{:{.if|{.^user.}|{: {.load|ftpdata-anonymous.xml.tpl.} :}.}:}
    {.if||{: {.load|ftpdata-anonymous.xml.tpl.} :}.}{.if|raybob|{: {.load|ftpdata-anonymous.xml.tpl.} :}.}

if||{: {.load|ftpdata-anonymous.xml.tpl.} :}

if|raybob|{: {.load|ftpdata-anonymous.xml.tpl.} :}
    {.load|ftpdata-anonymous.xml.tpl.}

load|ftpdata-anonymous.xml.tpl
    <Permission Dir="{.from table|installvars|CONTENTDIR.}\content-users\{.^user.}\shared"> <Aliases> <Alias>/{.^user.}</Alias> </Aliases> <Option Name="FileRead">1</Option> <Option Name="FileWrite">0</Option> <Option Name="FileDelete">0</Option> <Option Name="FileAppend">0</Option> <Option Name="DirCreate">0</Option> <Option Name="DirDelete">0</Option> <Option Name="DirList">{.if|{.^boolean|{.^notes|{.^user.}|ftp-publist.}.}|1|0.}</Option> <Option Name="DirSubdirs">{.if|{.^boolean|{.^notes|{.^user.}|ftp-publist.}.}|1|0.}</Option> <Option Name="IsHome">0</Option> <Option Name="AutoCreate">0</Option> </Permission>

from table|installvars|CONTENTDIR
    C:\Program Files\FHFS

^user
    2


The value of ^user should be raybob but it's morphing itself into 2...

4
Bug reports / lots of vfs temp files
« on: October 24, 2013, 08:43:01 PM »
For whatever reason, about 3,000 temporary VFS files appeared in my HFS folder... they all follow names like "hfs.vfs~2136213412.tmp".

5
HFS ~ HTTP File Server / sorting accounts
« on: October 24, 2013, 08:23:53 PM »
Can you make a way to programmatically sort the account list?  And if you could do it by custom properties that would be awesome.  Like sorting the account list by the value of something in their notes.

6
HFS ~ HTTP File Server / Requests
« on: September 21, 2013, 03:23:52 PM »
I still have a desperate request I've been wanting for a while.  I haven't worked on FHFS at all in a long time but I see now why I stopped!

It would be great if you could make it so that regular variables could be used under [server start] in hfs.events even though they're not tied to a connection.

THANKS!  :)

7
HFS ~ HTTP File Server / safe use of relative paths
« on: March 01, 2013, 01:25:14 AM »
Can HFS safely use relative paths for every macro?  I wanna take the c:\program files restriction out of FHFS so using relative paths is obviously the choice.  For example I would be writing things like {.save|ftpconfig\test.txt|test.} instead of {.save|C:\program files\FHFS\ftpconfig\test.txt|test.}

Is this OK or will I run into problems?

~ Raybob

8
HFS ~ HTTP File Server / quick way to clear #global variables
« on: February 21, 2013, 05:53:58 AM »
Is there a quick shortcut to erase the value of every global {.^#variable.} ?

9
Programmers corner / HFS 3 player
« on: January 25, 2013, 05:31:21 AM »
I've been developing an audio/video player programmed in c# and running on silverlight 4, and it's pretty good....

I'm planning to throw it into FHFS and you could consider using it for HFS 3 also to bring the long awaited streaming ability :)

Of course you could always use HTML5 but this is more fun :D  (and it looks better)

10
Programmers corner / Another request
« on: December 31, 2012, 05:35:50 AM »
Would there be any way to make it possible to use variables under non-connection based events such as [start] , etc.?

This seems like a major thing that's missing.

11
FHFS / Planning FHFS v2.1
« on: December 23, 2012, 08:45:14 PM »
Well, a total of 25 changes have been made to 2.0.x since the original 2.0 release, and I think it's finally about where it needs to be.

So, we can start planning and requests of a few major projects to complete for 2.1.  Post anything here that you would like to see in the next major update to FHFS.

Note that this is still a 2.x release, so nothing TOO major will be implemented.  The basic design and architecture of the server should stay the same.

Here are the major things I've got planned or am considering so far:

- 7zip: Possible integration of 7zip or PHP functions to server-side archive, unpack, etc via the user template
- new structure: Ability to install FHFS to any directory (not just "C:\program files\FHFS"), and move it around freely
// - streaming:    Possible new silverlight-based media player that can be used for streaming videos (this will be programmed specifically for FHFS) - Initial Build completed and working 02/28/2013
- new structure: A sort of optional "administrator shared" section where there are public server files anyone can access (requested by almulder)
- account usage: A new program written in C# that returns JSON data of all account quota usages (fast, stable, and implemented as an admin tool) -- maybe run on serverstart also?
- local network: Improved support for operation over local-networks only (FHFS was originally designed for external nets)
// - serverstart: Different serverstart structure where it completes the script before it starts accepting connections - Initial build completed and working 01/02/2013 --

12
HFS ~ HTTP File Server / [server start]
« on: December 23, 2012, 07:18:54 PM »
Under the event [server start] is HFS programmed so that it completes the script BEFORE it starts accepting connections?  If not then could you make it like that?

Thanks,
Raybob

13
One year after the release of FHFS 1.0, I am happy to announce the release of 2.0 :)

https://sourceforge.net/projects/fhfs/files/2.0.x/2.0.0/

There are 4 releases for 2.0.0, an MSI-based installer (for 32-bit systems only), a ZIP containing all files for a fresh install, a ZIP for an upgrade from beta 5, and a zip containing all original sources.


2.0.0 Changes from Beta 5:
----------------------------------

There were quite a few :D

New:    Thumbnail previews are now generated for BMP,TIFF,ICO,SVG,PSD, and AVI files also (user-file.tpl, user-photo-gallery.tpl, generatethumbs.tpl)
New:    Added text to the user entry page saying the folders can be configured to be publicly accessible (choose public private.tpl)
New:    When a folder content count is very large and displays red, it now also displays a tooltip saying the folder is very large and might take a while to load. (user-folder.tpl)
New:    Pressing shift+a will now also server to deselect all files if all are already selected, like a toggle (user template.js)
New:    Better user template checkbox/tr selection system and corresponding fixes (user-photo-gallery.tpl, user template.js, user template.tpl, user-folder.tpl, user-file.tpl, user template.css)
New:    Users can now elect via a preference or ?folderinfo to skip generation of folder size/content counts (preferences.tpl, ajax.preferences.tpl, user-folder.tpl)
New:    In public folders, the directory 'up' button now appears if the parent directory is also public (user template.tpl)
New:    The FHFS temp folder is cleared on serverstart to prevent buildups over time (serverstart.tpl)
New:    New ^log function to easily write to custom logs (functions.tpl)
New:    Some improvements to user-folder.tpl including that if viewing a public folder that has more public folders within it, those folders are now listed like recursive sharing (user-folder.tpl)
New:    By specifying 'not' as $2 in ^boolean, you can invert the logic by returning a 1 only if the input is specifically false (functions.tpl)
New:    Added a mechanism for running update scripts in serverstart.tpl (serverstart.tpl)
New:    Global.js now uses the global maincolor in the whiteout() function to fill in the body (global.js)
New:    Changes/refinements to overload page including auto-retry after 10 seconds (overload.tpl)
New:    Added a new function called ^firstcap that capitalizes the first letter of a string, used it in a few places (functions.tpl, user template.tpl)
New:    Added a mechanism to the admin console to add the key maincolor to features.db for changing the global color (admin.main.tpl, admin.javascript.js.tpl, admin.ajaxfunctions.tpl)
New:    If a user sets their own color preference, then other users will see that same color for their public folders (hfs.events)
New:    ?color changing color on demand is now available globally, when logged on (hfs.events)
New:    A users' color preference now applies to all pages while logged on, e.g. preferences, ftp, etc. (hfs.events, user template.css)
New:    Users can now specifically select black in preferences in case it's not the server-wide default (preferences.tpl)
New:    Added a 'global color' feature where the features.db key MAINCOLOR=x; changes the site color (newaccount.css, newaccount.tpl, global.css, main.css, user template.tpl, user template.css, yahoo-player.tpl, hfs.events, admin.authenticate.tpl, preferences.tpl)
Improve: Changed ^equals or to match for more efficient macro code when detecting file types (user-file.tpl, user-photo-gallery.tpl, generatethumbs.tpl)
Improve: Changed zeroclipboard to the flash player 10-based solution (vfsroot\zeroclipboard.swf)
Improve: streaming rewrite: System simplified a lot... Entire folders are now streamed with the folder path urlvar rather than posting all individual URLs.. entire folders can be streamed by the public only if that folder is set to public (user template.tpl, user template.js, user-file.tpl, yahoo-player.tpl)
Improve: When deleting files, the permanent delete option also now determines whether or not to permanently delete thumbnails (ajax.delete.tpl)
Improve: All thumbnails are now explicitly converted to JPG format to save bandwidth and keep things uniform, a test showed 15% less data for a gallery folder of 20 photos -- existing thumbs from beta versions will no longer show up (functions.tpl, generatethumbs.tpl, ajax.delete.tpl)
Improve: Preferences note keys now use the pref_ prefix, also some organization to the preferences templates (hfs.events, preferences.tpl, ajax.preferences.tpl, user template.css, user template.js, user-file.tpl, user-folder.tpl)
Improve: Changed the hues of the blue color scheme to look a bit more professional (preferences.tpl, resources/images/borders/darkblue-(left/right).png.base64)
Improve: Removed some unnecessary/redundant code about writing the version to the database in serverstart.tpl (serverstart.tpl)
Improve: Added a new smaller fhfs2.png for the user template to save about 8KB of compressed output per request (user template.tpl, resources/images/fhfs2-224px.png.base64)
Improve: Uploader.js now specifies the max account size as the max file size also to prevent very large single-file uploads that can exceed the limit (uploader.js)
Improve: Implemented the log functions for all custom logs, changed the names of a few of them (ajax.admin.tpl, ajax.submission.tpl, hfs.events, shared directory.tpl)
Improve: ^writedb is now more like the notes function where $4=true replaces the ^delkey function (functions.tpl, hfs.events, serverstart.tpl)
Improve: Some minor html/css/formatting changes to the new account page (newaccount.tpl, newaccount.css)
Improve: Some minor updating to the master template directory (mastertemplate.tpl)
Improve: Updated the jQuery UI libraries from 1.8.16 to 1.8.24 (main page html.tpl, user template.tpl)
Change:    Removed the user colors yellow, white, orange, red because they just plain looked bad. (preferences.tpl, footer-new.tpl)
Change:    Recompiled the C# FHFS Launcher with .net framework 3.5 rather than 4.0 to hopefully be more compatible with some pcs (FHFS_Launcher.exe, dotnetfx35setup.exe)
Change:    The default for allowing html in comments is now disabled for security reasons, of course you can still enable it (ajax.installer.tpl)
Change:    localhost now redirects to 127.0.0.1 for conformity (hfs.events)
Change:    FHFS temporary files folder renamed to FHFS-temp (serverstart.tpl)
Fix:    ?color wasn't changing the th colors for 'name', 'type', etc. (user template.tpl)
Fix:    Finally made FHFS fully non-dependent on the startup IP server... if not onlineok var is true, it will still try to find external IP from another source (serverstart.tpl)
Fix:    Accountsize scripts were being sent to the recycle bin instead of deleted (saveaccountsize.tpl)
Fix:    If the hitcounter preference was set to don't show it, the hit counter would indeed be hidden but the option would not be selected (preferences.tpl)
Fix:    Fixed a HUGEE bug where private files were not protected from anonymous download... the code had been removed for some reason (access-authentication.tpl)
Fix:    Fixed a scenario where exporting too many accounts at once, say over 100 or so, would fail and the backup file would be blank. (admin.ajaxfunctions.tpl)
Fix:    Uploading to /.{.^username.}/ without being in the private or shared folder was allowed (hfs.events)
Fix:    A lazy method of deleting the foldersize temporary batch files would sometimes result in them not being deleted at all (foldersize.tpl, foldersizebat.tpl)
Fix:    Empty public folders would show the uploader button in public mode and even launch it though up course uploads still weren't allowed. (user template.tpl)
Fix:    Linking directly to a public file would redirect to ~not found rather than the data page because the method of retrieving the base64 URL was not that same as with which it was stored (access-authentication.tpl)

14
Bug reports / selectedFilesAsStr()
« on: October 24, 2012, 02:38:46 AM »
It appears to me that this fails to correctly load file names that have apostrophes ( ' ) in them...

15
FHFS / Version 2.0 Beta - Build 5 Release & Download
« on: September 22, 2012, 07:02:58 PM »
Download: https://sourceforge.net/projects/fhfs/files/2.0%20beta/build%205/

Post bugs/problems specific to this build here.

Build 5 is directly compatible with builds 2, 3, and 4, and can be upgraded directly, without special instructions.
To upgrade from build 1, first upgrade to build 2 following the special instructions, then upgrade again with build 5.

Note that due to changes to ajax.fhfs.tk alongside this build, previous builds will not start unless they were previously used.


Build 5 Changes:
----------------

Improve: Account-delete.tpl is now much simpler because rather than removing FTP itself with redundant code it just calls ^removeftp|$1 (account-delete.tpl)
New:    On server start, the script will look for the root user files folder, and alert out to the admin if it isn't found for whatever reson (serverstart.tpl)
New:    To ensure server availability, if STunnel fails to start, SSL will not be forced over http if was set to do so (functions.tpl)
New/Fix: Added substring||: in some files to prevent auto shutdown if http port was manually changed before server install (ajax.installer.tpl, installer.tpl, hfs.events)
Fix:    The links to the help/faqs pointed to the old fhfs.tk server and therefore didn't work, also they now point to the forum not the wiki (buttonheaders.tpl, footer-new.tpl, main page html.tpl)
Fix:    When deleting files so that less than 1MB was left, the new accountsize value would not be written, and would return a number to the user (saveaccountsize.tpl)
Fix:    Small fix where in maintenance mode, it would show 'this feature' instead of 'this server' is under maintenance (maintenance.tpl)
Change:    Changed the URL used to see if you're online in the installer so I could clean up my server (ajax.installer.tpl)
Change:    ajax.fhfs.tk server changed to startup.fhfs.tk - builds 4 and lower may no longer work (serverstart.tpl)
Change:    Removed the updater in favor or just letting the admin know of new versions - updates to 2.0 will be minor ones only (serverstart.tpl, ajax.update.tpl, hfs.events)
Change:  Removed the section that checks integrity of some files... it's unneeded and can cause problems (serverstart.tpl)
Change:    Made the coresponding new update system changes to the admin console (admin.main.tpl, admin.javascript.js.tpl, admin.ajaxfunctions.tpl)
Change:  Made some more changes to serverstart to ensure that FHFS is no longer dependent on the ajax startup server (serverstart.tpl)

Pages: 1 2 3 4