rejetto forum

Software => HFS ~ HTTP File Server => HTML & templates => Topic started by: Age on January 28, 2010, 12:40:15 AM

Title: Template For New Users? Adding Folders a Myth?
Post by: Age 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
Title: Re: Template For New Users? Adding Folders a Myth?
Post by: rejetto on January 28, 2010, 12:20:09 PM
1. the default template doesn't currently have such feature at the moment, it will in the future, but in the while it can be scripted.
i don't know if there's a registration form ready-to-use out there (or "in here", since we are posting in the main source of hfs add-ons).

2. same as for 1
Title: Re: Template For New Users? Adding Folders a Myth?
Post by: uvbeenzaned on January 28, 2010, 09:43:26 PM
Thanks for asking "Age".  As posted before in the forum there is a way to register users, the only reason that it's "not a great idea is because of security reasons and the users couldn't pick which folders the wanted access to and what rights they wanted anyway."  If you need a good option for creating folders download this tpl: http://www.adrive.com/public/2d3f5be333d0df159814747764a1c46bf77ff3f9bd1801c8ca64074d67bbd867.html
Hope I was of any help!
Title: Re: Template For New Users? Adding Folders a Myth?
Post by: rejetto on January 29, 2010, 09:31:50 AM
@uvbeenzaned
i remember having said that, but that reason is outdated now.
since then i added permission called "any account", that will fit both old accounts and accounts to come.
moreover, by scripting additional features you may even create per-user dedicated folders, etc.
so, at the moment the reason for it to be msising is that i still have to work on the default template to use new capabilities. It has been secondary to me since there are other people who's dedicating time to make and enhance templates, but i will.
Title: Re: Template For New Users? Adding Folders a Myth?
Post by: uvbeenzaned on January 29, 2010, 10:28:42 PM
Thanks for the update!
Title: Re: Template For New Users? Adding Folders a Myth?
Post by: Roessi on January 30, 2010, 02:00:46 PM
heres the default template with function to change password and create folder
Title: Re: Template For New Users? Adding Folders a Myth?
Post by: Age 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?
Title: Re: Template For New Users? Adding Folders a Myth?
Post by: Roessi on February 03, 2010, 12:24:41 PM
err just changed one line again cause for me the page didnt load right anymore in firefox when the password had changed O.o :) now it works fine :) template attached.

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 : - /

roessi


Edit: attached second verision with rename function but i have no idea what the best way would be to allow only certain users to rename files/folders
Title: Re: Template For New Users? Adding Folders a Myth?
Post by: uvbeenzaned on February 05, 2010, 02:46:54 AM
Thanks guys. ;D
Title: Re: Template For New Users? Adding Folders a Myth?
Post by: mudputty on February 11, 2010, 02:07:42 AM
Edit: attached second verision with rename function but i have no idea what the best way would be to allow only certain users to rename files/folders

I would guess that it would need to see from the notes from the hfs.comments.txt who it was that uploaded the file and if it matches the %user% that is currently logged in then they would have the option to rename. Is that do-able?
Title: Re: Template For New Users? Adding Folders a Myth?
Post by: rejetto on February 11, 2010, 01:32:34 PM
yes, it can be done
Title: Re: Template For New Users? Adding Folders a Myth?
Post by: Roessi on February 11, 2010, 03:02:16 PM
k and if its for everyone a fine solution i add the possibilty
to add a key in the notes part of a user,group or subgroup with
notes=true
or notes = false

if the key isnt in the notes part the user isnt allowed to rename . ...
if in any grou thhe user is member of the key is set to false the user also isnt allowed to rename except at the user account the key is set to true :)

hope u understand what i mean ^^
Title: Re: Template For New Users? Adding Folders a Myth?
Post by: rejetto on February 11, 2010, 03:33:55 PM
you should call it "can rename=1".

my suggestion is to use 1/0 instead of true/false, because it's the way the language consider true/false.
Title: Re: Template For New Users? Adding Folders a Myth?
Post by: Roessi on February 11, 2010, 03:37:27 PM
kk :) i'll do it this way :)


Edit:

kk the account notes work :) and its with 1/0
but for the hfs.comments.txt
umm how you mean this exactly ^^
Title: Re: Template For New Users? Adding Folders a Myth?
Post by: rejetto on February 11, 2010, 04:29:59 PM
but for the hfs.comments.txt
umm how you mean this exactly ^^

i guess you're asking this to mudputty, not to me.
Title: Re: Template For New Users? Adding Folders a Myth?
Post by: Roessi on February 12, 2010, 01:44:53 PM
got it :)
kk now it works this way :

if  %item-comment% is "uploaded by %user%"
the user is able to rename those items

if in notes a key is can rename 1 the user is able to rename all files :)
i hope this is what was meant.
Title: Re: Template For New Users? Adding Folders a Myth?
Post by: mudputty on February 12, 2010, 06:11:34 PM
Oh, I was thinking of it in a different way. I was just thinking of basing it on the original poster's name. If the currently logged in user is the same as the poster of the file then he/she would be allowed to rename. Actually both methods would be nice to be able to use, and somehow provide a way to enable/disable or modify each option.

Using the method you thought of would allow certain people or groups to always be able to rename if it is their file or not; great for administrators and community groups. The method of allowing original posters rename would restrict renaming to just the person that posted it. That method, I would think, could be eisily enabled or disabled, but I don't know from where. Perhaps from within the template itself (0=off, 1=on)?

Just a thought  ;)

-----------
Oh, haha. I just saw that you posted about it...I didn't see your last post. Yup, you got it! That was what I was thinking of.
Title: Re: Template For New Users? Adding Folders a Myth?
Post by: Roessi on February 12, 2010, 06:18:25 PM
i think thats what i made O.o ^^
the 1. way of allowing users always to rename files is thought to be used by administrators ... :)
and the 2. one :
i wanted to allow the user who uploaded a file to be able to rename :)
but i dont know any other way to get the user who uploaded the file except looking at the hfs.comment.txt for the key of the file name and look if the users name is in there :)

if you know an other way to get the user uploaded a file ... would be nice :)


the option to enable/disable users to be able to rename their own uploaded files would be easy ;)
Title: Re: Template For New Users? Adding Folders a Myth?
Post by: mudputty on February 12, 2010, 06:26:35 PM
One thing I just noticed in trying out the template was after renaming the file the poster's name is lost. So, when I renamed the file I couldn't rename it again because the poster information was lost. Perhaps when the rename takes place a new entry has to made into the hfs.comment.txt.

I just now looked in the file and noticed two things. 1) the old filename entry needs to be taken out, 2) the new filename with the poster's name needs to be put in.
Title: Re: Template For New Users? Adding Folders a Myth?
Post by: Roessi on February 12, 2010, 06:36:04 PM
oh shit forgot to change it :) sry ... but should be possible by sth like this
{.save|%folder%/hfs.comment.txt|{.replace|{.postvar|oldrenamename.}=uploaded by %user%|{.postvar|newrenamename.}=uploaded by %user%.}|{.load|%folder%/hfs.comment.txt.}.}.}
Title: Re: Template For New Users? Adding Folders a Myth?
Post by: mudputty on February 12, 2010, 06:39:36 PM
No biggie. I'm quite the novice at this compared to you. I'm still learning the syntax, and figuring out what all you can do.

Quote
mudputty bows down at your vast knowledge of templating!
Title: Re: Template For New Users? Adding Folders a Myth?
Post by: rejetto on February 12, 2010, 07:14:40 PM
i had a look at your code to see if you was checking permissions after submit of the form. and you do. good ;)
Title: Re: Template For New Users? Adding Folders a Myth?
Post by: Roessi on February 13, 2010, 01:57:03 PM
thx rejetto :)
^^

kk now it replaces the key in hfs.comments.txt :P
Title: Re: Template For New Users? Adding Folders a Myth?
Post by: Age 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!