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

Pages: 1 2
1
HFS ~ HTTP File Server / Re: Recently Uploaded Files List?
« on: November 09, 2010, 02:44:00 AM »
Alright, I'm committed to this.
So just for testing purposes, I'll use a variable because that seems like it's easier.

In my macros I put:

Code: [Select]
[upload completed]
{.set|variablerecentuploads|%item-name%
|mode=prepend.}

This should now start logging the names of uploads into a sort of list with "variablerecentuploads" for a name, and each new item is represented by $1, $2, $3, etc. as I can sort of tell from the wiki?(http://www.rejetto.com/wiki/index.php/HFS:_scripting_commands#Variables_and_functions)

Now, assuming that's correct, in order for me to display this list, I am a little confused. Should I put something like this somewhere in my template?

Code: [Select]
{{.^variablerecentuploads|$1.}}to display the first "spot" on the list?

Then follow with:

Code: [Select]
{{.^variablerecentuploads|$2.}}
{{.^variablerecentuploads|$3.}}
{{.^variablerecentuploads|$4.}}
etc... ?

Is there something similar you could direct me to so that I could read up on this?

Thanks for your direction.

<3

2
HFS ~ HTTP File Server / Re: How to disable hits
« on: November 05, 2010, 05:52:12 PM »
As efournes underlined above, you should be able to remove the <td align=right>%item-dl-count% and <td align=right>%item-dl-count% from the [file] and [folder] sections.

3
HFS ~ HTTP File Server / Recently Uploaded Files List?
« on: November 05, 2010, 05:42:45 PM »
Hello,

Long time fan of HFS here, and I try my best to learn everything I can from the wiki and the forum before posting, but I'm having trouble figuring this out.

Is there anyway to display a list of the top ten latest files that were uploaded? (I'm using Beta 271)

Any advice would be well received.

Thanks,

4
HFS ~ HTTP File Server / Re: Ban Unless User
« on: March 01, 2010, 09:15:29 PM »
rejetto you're amazing. Thank you so much.

To summarize:

My goal was to deny access to everyone except for those who a)Have a username and password or b)Are using IP addresses that begin with 132.
The problem was that the login page was being blocked from letting users who did not have a 132.x.x.x IP address from logging in.
The solution (thanks to rejetto) was to use the beta, press ALT-F6 to get into events and then paste this into it:

[request]
{.if
|{.and|{.%folder% != /.}|{.match|\*/~login|%url%.}|{.not|%user%.}|{.match address|\132.*|%ip%.}/and.}
|{:{.disconnection reason|You're either not logged in as a user or not on a 132.x.x.x IP address. <a href="~login">Please Login</a>.}:}
.}

Thanks again rejetto.

5
HFS ~ HTTP File Server / Re: Ban Unless User
« on: March 01, 2010, 02:18:01 AM »
what's this "unallowed" page?
maybe you set a ban rule.
you should remove it.

Sorry, I don't think I explained that correctly. There aren't any ban rules.
|{:{.disconnection reason|i'm sorry.}:} appears to trigger the [deny] section of the template, which by default says "Unallowed."

Basically,
|{.and|{.%folder% != /.}|{.not|{.match|*/~login|%folder%.}.}|{.not|%user%.}|{.match address|\132.*|%ip%.}/and.}
still doesn't allow users to login if they're not on a 132 IP. I'll keep fiddling and re-read the wiki, thanks for your continued guidance. I'll post findings for people looking at this in the future.

6
HFS ~ HTTP File Server / Re: Ban Unless User
« on: March 01, 2010, 12:54:01 AM »
use this line (untested)

|{.and|{.%folder% != /.}|{.not|{.match|*/~login|%folder%.}.}|{.not|%user%.}|{.match address|\132.*|%ip%.}/and.}

Alright, so I've been fiddling around. Using this:

[request]
{.if
|{.and|{.%folder% != /.}|{.not|{.match|*/~login|%folder%.}.}|{.not|%user%.}|{.match address|\132.*|%ip%.}/and.}
|{:{.disconnection reason|i'm sorry <a href="~login">please login</a>.}:}
.}

When I visit the server externally from a 132 IP it lets me in fine, so that's good. Also, when I login at that point, then go to http://localhost (to pretend that I'm not on a 132 IP) I am able to get in fine because I'm logged in already. Great. Perfect, that works.

But when I visit from a non-132 IP while not logged in, I continue to get the Unallowed page, even when going to http://localhost/~login in order to login.

7
HFS ~ HTTP File Server / Re: Ban Unless User
« on: February 28, 2010, 11:16:11 PM »
put a link like this
<a href="~login">please login</a>

Normally you'd think that would work, except that it would seem that the same rules that are preventing non-users/non-132.x.x.x IPs from having access, also prevents them from accessing the login page.

Is there anyway to prevent all folder access except ~login ?

8
HFS ~ HTTP File Server / Re: Ban Unless User
« on: February 28, 2010, 10:00:37 PM »
This is great guys, thanks a lot.

Also, do you know how I could go about allowing users to log-in on the Unallowed page?

9
HTML & templates / Re: Template For New Users? Adding Folders a Myth?
« on: February 18, 2010, 05:17:14 AM »
...and bout the registration form ... ill try if i find sth to realize it :) you want everyone to be able to create an account ? i thinkl this is the problem bout an registration form ... who do you want to be able to create an account and what acces does he get : - /

Since all of my users to register would be on a LAN and people I live with, I'm expecting little to no abuse of the user system. I was just hoping for people to have full/any permissions when they "create" a username for themselves.  This way they can make folders and comments with "uploaded by ___" will be added to their uploads.

This current template with folder creation and renaming is amazing though, thanks so much!

10
HFS ~ HTTP File Server / Re: Blocked by DynDNS! :(
« on: February 14, 2010, 02:20:02 AM »
Many router companies have a free dns service.

I use dlinkddns with my dlink router (the router updates my external ip automatically). Then I setup a CNAME record for www.myurl.com to direct to username.dlinkddns.com.

11
HTML & templates / Re: Template For New Users? Adding Folders a Myth?
« on: February 03, 2010, 05:52:06 AM »
heres the default template with function to change password and create folder

Awesome, that works great. Thank you... I'll poke around.

So is there no way/template way for a user to "register" as far as we know?

12
HTML & templates / Template For New Users? Adding Folders a Myth?
« on: January 28, 2010, 12:40:15 AM »
Hey, I'm just exploring the beta and templates and learning about all this fun stuff. (Hopefully in the future I'll start being helpful instead of being the dumb one asking all of the questions.)

1. Is there a template/easy way for new users to "register?" (I can't seem to find anything that actually allows this.)
2. I keep seeing people saying, "Add folders!" but I've yet to actually find anyway to add a folder from the HFS interface (with or without templates).

Really, I just want people to be able to "take credit" for their uploads, and the best way seems to be for everyone to be a user and have the comments appended with "uploaded by:" as it the beta does now for those with existing user accounts.   And like the rest of the HFS population, I'd like to see those users be able to make folders (I don't care about permissions, anyone can see everyone else's stuff for all I care, but the option would be really handy).

Thanks for any links you can provide. I'm sorry if this questions is asked a hundred times; I really did search.

-Age

13
Oh yes, of course!

Thanks again rejetto. Works great.

14
Oh awesome. Thank you sir! It works great!


However (yeah there always seems to be a "but" doesn't there?), it returns the disk free value in bytes. Is there anyway to display it in the 'regular' %diskfree% style?


Right now it displays:
"Disk space: 14535438336"
When I think we would prefer that it displays:
"Disk space: 13.54 GB"

15
Was this actually added in 252? I'm having trouble getting it to work, but it's probably just lack of experience with these fun macros.

Pages: 1 2