rejetto forum

Template For New Users? Adding Folders a Myth?

Age · 24 · 4988

0 Members and 1 Guest are viewing this topic.

Offline Roessi

  • Tireless poster
  • ****
    • Posts: 107
    • View Profile
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.


Offline mudputty

  • Occasional poster
  • *
    • Posts: 12
    • View Profile
    • Tridell Utah
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.
« Last Edit: February 12, 2010, 06:15:33 PM by mudputty »


Offline Roessi

  • Tireless poster
  • ****
    • Posts: 107
    • View Profile
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 ;)


Offline mudputty

  • Occasional poster
  • *
    • Posts: 12
    • View Profile
    • Tridell Utah
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.


Offline Roessi

  • Tireless poster
  • ****
    • Posts: 107
    • View Profile
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.}.}.}


Offline mudputty

  • Occasional poster
  • *
    • Posts: 12
    • View Profile
    • Tridell Utah
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!


Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13308
    • View Profile
i had a look at your code to see if you was checking permissions after submit of the form. and you do. good ;)


Offline Roessi

  • Tireless poster
  • ****
    • Posts: 107
    • View Profile

Offline Age

  • Occasional poster
  • *
    • Posts: 17
    • View Profile
    • Integers of K
...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!