rejetto forum
May 25, 2012, 03:01:12 PM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: This forum is free, you do NOT need to register to post. But you may.
PROBLEMS? QUESTIONS? CLICK HERE!
Fill the survey!
 
   Home   Help Search Login Register  
Pages: 1 [2]
  Print  
Author Topic: Template For New Users? Adding Folders a Myth?  (Read 1909 times)
0 Members and 2 Guests are viewing this topic.
Roessi
Tireless poster
****
Offline Offline

Posts: 107


314780875
View Profile Email
« Reply #15 on: February 12, 2010, 07:44:53 AM »

got it Smiley
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 Smiley
i hope this is what was meant.

* template + Rename.tpl (20.81 KB - downloaded 50 times.)
Logged

mudputty
Occasional poster
*
Offline Offline

United States United States

Posts: 12



View Profile WWW
« Reply #16 on: February 12, 2010, 12: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  Wink

-----------
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, 12:15:33 PM by mudputty » Logged
Roessi
Tireless poster
****
Offline Offline

Posts: 107


314780875
View Profile Email
« Reply #17 on: February 12, 2010, 12: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 ... Smiley
and the 2. one :
i wanted to allow the user who uploaded a file to be able to rename Smiley
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 Smiley

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


the option to enable/disable users to be able to rename their own uploaded files would be easy Wink
Logged

mudputty
Occasional poster
*
Offline Offline

United States United States

Posts: 12



View Profile WWW
« Reply #18 on: February 12, 2010, 12: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.
Logged
Roessi
Tireless poster
****
Offline Offline

Posts: 107


314780875
View Profile Email
« Reply #19 on: February 12, 2010, 12:36:04 PM »

oh shit forgot to change it Smiley 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.}.}.}
Logged

mudputty
Occasional poster
*
Offline Offline

United States United States

Posts: 12



View Profile WWW
« Reply #20 on: February 12, 2010, 12: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!
Logged
rejetto forum
« Reply #20 on: February 12, 2010, 12:39:36 PM »

Do you like this software? Consider even $2
 Logged
rejetto
Administrator
Insane programmer
*
Offline Offline

Italy Italy

Posts: 11831


View Profile
« Reply #21 on: February 12, 2010, 01: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 Wink
Logged
Roessi
Tireless poster
****
Offline Offline

Posts: 107


314780875
View Profile Email
« Reply #22 on: February 13, 2010, 07:57:03 AM »

thx rejetto Smiley
^^

kk now it replaces the key in hfs.comments.txt Tongue

* template + Rename.tpl (20.98 KB - downloaded 61 times.)

Follow members gave a thank to your post:

Age, mudputty

For this post, 2 members gave a thank you!
Logged

Age
Regular poster
**
Offline Offline

Canada Canada

Posts: 17



View Profile WWW Email
« Reply #23 on: February 17, 2010, 11:17:14 PM »

...and bout the registration form ... ill try if i find sth to realize it Smiley 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!
Logged
Pages: 1 [2]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!


Google visited last this page May 14, 2012, 08:12:54 PM