 |
AutoIndex PHP Script A Website Directory Indexer
|
| View previous topic :: View next topic |
| Author |
Message |
robinh Member

Joined: 08 Aug 2005 Posts: 19 Location: North Carolina
|
Posted: Mon Jan 23, 2006 12:34 am Post subject: Moderator access and creating directories |
|
|
I need to implement a "superuser" type of account, and would like to just modify the moderator account. I've looked at the Admin.php file and found where the moderator settings are but before I go jerking around with them I wanted to see if there's a simple mod I can do to add this functionality.
I don't want moderator's to have admin rights, they don't need to see user data except their own, but they must have the ability to delete files and folders and create new folders. Any suggestions?
I love this version 2, but not sure it's going to work for me without this. I have been able to make my way through the files, add in my own header graphics and footer comments, that was easy (almost as easy as he older version).
Any suggestions (creative) would be most welcome!!!
Justin - great product!!! Fix this for me and I'll drop a donation through PayPal, if you have a PayPal account... |
|
| Back to top |
|
 |
robinh Member

Joined: 08 Aug 2005 Posts: 19 Location: North Carolina
|
Posted: Mon Jan 23, 2006 12:46 am Post subject: |
|
|
I knew there was something else I wanted to ask, that is about file opening. In your program, when you click on a file of a known type, it will open the item directly. What I'd like to do is instead of leaving the link you are in, have it open in either a new tab or new window.
Sort of like when you type an <a href statement, using target="_blank", forcing your browser to open the link in another window.
Do you think this is possible and if so what kind of a mod would I have to do? I've not gone through all the files yet to see how you treat your links, and it may be as simple as modding a file to add in the target comment above. |
|
| Back to top |
|
 |
Justin AutoIndex Developer

Joined: 14 Nov 2003 Posts: 785
|
Posted: Mon Jan 23, 2006 7:28 pm Post subject: |
|
|
| Quote: | | Sort of like when you type an <a href statement, using target="_blank", forcing your browser to open the link in another window. |
You could add the target="_blank" property to the URL in the file each_file.tpl, on the line | Code: | | <a class="autoindex_a" href="{file:link}"> | .
| Quote: | | I don't want moderator's to have admin rights, they don't need to see user data except their own, but they must have the ability to delete files and folders and create new folders. Any suggestions? |
To allow a moderator to do something that only an admin could normally do, edit the line in Admin.php | Code: | //This is a list of the actions moderators can do (otherwise, the user must be an admin)
$mod_actions = array('edit_description', 'change_password', 'ftp'); |
To figure out the valid string you could add to that list, look for the lines in the files such as or
Adding something to the $mod_actions will allow the moderator to give the script that command, but it still won't have the options show up as links when they log in. To do that, edit the code towards the bottom of Admin.php where it says | Code: | | //MODERATOR and ADMIN accounts |
Copy and paste the options from the upper section wher it says //only ADMIN accounts into the bottom section. |
|
| Back to top |
|
 |
wim New Member

Joined: 05 Mar 2008 Posts: 1 Location: Netherlands
|
Posted: Wed Mar 05, 2008 6:15 pm Post subject: how to make options 'delete' and 'rename' show up as links |
|
|
Dear Justin (if it's you who reads this)
Thank you for your good work! Your clues helped me a lot too to configure the mod to a supermod. But you still leave me with a question: where can I find the <a hrefs> to the options 'delete' and 'rename', to make them show up as links for the supermod?
Thanks in advance,
Wim |
|
| Back to top |
|
 |
sefikail New Member

Joined: 14 Oct 2008 Posts: 1
|
Posted: Tue Oct 14, 2008 1:56 pm Post subject: |
|
|
Hi, how can I make moderators hidden directory available?
Example:
/ taylor /*privatefolder*/1234 - read
/*hidden_files*/example/1234 - he see nothing, only administrator has permition to see files in this directory
* => *hidden*
Thank you  |
|
| Back to top |
|
 |
sokolum New Member

Joined: 16 Jul 2009 Posts: 1
|
Posted: Thu Jul 16, 2009 9:05 am Post subject: case 'delete' not appear in menu |
|
|
Hi,
1st, this is a very nice directory lister, thank you for that!
I have followed the instructions and they are clear. I am able to appear the other functions within the moderator account, expect the part where the moderator can delete a file!
The only thing that appears is: [edit description]
I am trying to find out how a moderator can also Delete.
I have added 'delete' in:
//This is a list of the actions moderators can do (otherwise, the user must be an admin)
$mod_actions = array('edit_description', 'change_password', 'delete', 'create_dir');
But there is no code to make that 'delete' option appear.
//only ADMIN |
|
| Back to top |
|
 |
VvM New Member

Joined: 24 Oct 2009 Posts: 1
|
Posted: Sat Oct 24, 2009 2:15 pm Post subject: Re: case 'delete' not appear in menu |
|
|
Hi!
| sokolum wrote: | Hi,
1st, this is a very nice directory lister, thank you for that!
I have followed the instructions and they are clear. I am able to appear the other functions within the moderator account, expect the part where the moderator can delete a file!
The only thing that appears is: [edit description]
I am trying to find out how a moderator can also Delete.
I have added 'delete' in:
//This is a list of the actions moderators can do (otherwise, the user must be an admin)
$mod_actions = array('edit_description', 'change_password', 'delete', 'create_dir');
But there is no code to make that 'delete' option appear.
//only ADMIN |
You have to edit the TemplateFiles.php too:
Search for:
case 'delete_link':
and alter the text from is_admin to is_mod
Regards Volker |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|