rejetto forum

Admin Panel : Creating a proper admin panel.

Ryan J · 84 · 53113

0 Members and 1 Guest are viewing this topic.

Offline Ryan J

  • Occasional poster
  • *
    • Posts: 38
  • Soon to be coder...
    • View Profile
I have made an admin panel that can go in any template.
With the admin panel you can: create new users, change users' passwords, enable/disable the "no limits" function, enable/disable accounts and allow users to access/upload/delete a folder of choice - all remotely!
For security I have added a function that only allows 1 certain user to access this panel-instructions are provided to change this account.
You are welcome to edit the code as much as you like as long as you post a copy here so I can improve my code.
To access the admin panel add: ~adminpanel to the end of your address (e.g http://localhost/~adminpanel)
I have included the Admin Panel in all the RAWR Templates, tested and uploaded them here.

Enjoy!
Ryan J
« Last Edit: January 05, 2009, 04:17:21 AM by Ryan J »


Offline scgdavis

  • Occasional poster
  • *
    • Posts: 5
    • View Profile
that sounds awesome!
how can It be integrated into TOG4.01??
a simple copy paste did not work.
Thanks!!!!!
 ;D


Offline r][m

  • Tireless poster
  • ****
    • Posts: 347
    • View Profile
I get the Administration Panel page but when I click on any of the 4
links I get the insufficient privileges - "you must be an admin" page.
I changed all instances of the
Code: [Select]
{.if|{.%user%=admin.}|
To be =my user name.
Is this code OS specific? I'm using an older version of windows on my
server machine. If so, can you advise on how to modify to work around this ?


Offline bigdady

  • Occasional poster
  • *
    • Posts: 5
    • View Profile
very handy feature. thanx. good work
I did it and it works, but there is a problem with Enable/disable a user accunt. it does'nt work.
I creat a accunt and then want to disable it, but nothing happen.
I have also a request. If I creat a new accunt, and my virtuel file system is protected ( just allowed users can see items ), how can I map new user to a file directory(folder).
is it possible under creation a new accunt, can admin see and choose folder avalable in HFS.


Offline Ryan J

  • Occasional poster
  • *
    • Posts: 38
  • Soon to be coder...
    • View Profile
Quote
that sounds awesome!
how can It be integrated into TOG4.01??
a simple copy paste did not work.
Thanks!!!!!
  ;D

Here you go - all I did was copy and paste the adminpanel document under the line:
Code: [Select]
{.!lv_unauthorizedError.}<br/><br/>Tested and working ;)
« Last Edit: January 03, 2009, 09:06:36 AM by Ryan J »


Offline TEA-Time

  • Occasional poster
  • *
    • Posts: 76
    • View Profile
Hi Ryan,

Sounds really cool, but I get a 0 byte Zip file when I try to download it.

I tried your modded TCOG template, but I don't know how to get to the admin panel without the docs in the Zip file. ;)


Edit: Aha!  I figured out how to get to the ~adminpanel. ;D
« Last Edit: January 03, 2009, 12:55:48 AM by TEA-Time »


Offline Ryan J

  • Occasional poster
  • *
    • Posts: 38
  • Soon to be coder...
    • View Profile
Sorry I should have mentioned it in the main post.
Will edit now ;)


Offline Ryan J

  • Occasional poster
  • *
    • Posts: 38
  • Soon to be coder...
    • View Profile

Offline bigdady

  • Occasional poster
  • *
    • Posts: 5
    • View Profile
Hello Ryan J
I tried to enable or disable a account again.
if an account is disable, you can active it, but if you want to disable an active account, it is not possible. please help


Offline SilentPliz

  • Operator
  • Tireless poster
  • *****
    • Posts: 1298
  • ....... chut ! shh!
    • View Profile
Hi Ryan J!

Very nice idea your administration panel ... We look forward to following.  :P
"mars" also working on a similar feature ... This promises good templates, this year...

I put your changes in a modified version of rejetto template.
This template already benefit of some changes.
(delete function "slowly" improved,  thumbnails,... and even the comments with the uploads...  only with the French version of hfs.exe).
And cherry on the cake, ;D it is bilingual English-French.
To use it in French, just remove the line:

Code: [Select]
[Remove entierely this line for use this template in french language]
Otherwise, I just changed the look of the Administration panel and I added some shortcuts, perhaps more practical.


After the Alpha version, I expect the Beta version.  ;)

...Soon...
« Last Edit: January 10, 2009, 12:34:09 AM by SilentPliz »


Offline r][m

  • Tireless poster
  • ****
    • Posts: 347
    • View Profile
Tried your recent update. Still doesn't work here, nor does the default
template mod.
I get the "you must be an admin" page.
Anyway, thanks for the effort.
Oddly, your first post
http://www.rejetto.com/forum/index.php?topic=6492.msg1039460#msg1039460
to just change user password does work. I may be able to add the other sections
so that it will work on older computers used as NAS, and webservers.
Or perhaps the Mars version will solve this?


Offline TEA-Time

  • Occasional poster
  • *
    • Posts: 76
    • View Profile
(using beta build 218)

Disabling accounts doesn't work for me either.  In fact, if I disable an account from inside HFS and then go through the motions of trying to disable it (again) through Admin Panel, it actually gets re-enabled. :-\  Is this maybe a bug in HFS?

The bulk of the contents of template files is still a mystery to me, but I *think* I manged to change the command after a new account is created to set it to be disabled as a test, but it still ends up enabled.  Here is what I changed:

{.set account|{.^accountname.}|enabled=true.}

to:

{.set account|{.^accountname.}|enabled=false.}

:-\

Also, I believe there is a typo in the following line.  In the parenthesis after "false", shouldn't it be "without quotes" instead of "with quotes"?

Then type "true" (without quotes, to enable) or "false" (with quotes, to disable), click submit then click Change.


And finally, I'm afraid I have to ask.  Why is it necessary to click two things to invoke a change?  Isn't it possible to do these things in one step using variables instead of two with intermediate .txt files?
« Last Edit: January 03, 2009, 08:10:03 PM by TEA-Time »


Offline Mars

  • Operator
  • Tireless poster
  • *****
    • Posts: 2063
    • View Profile
The same work but purified well and without my work taken in my chat.tpl

And in more everything works:

On the place  to put 'false' to invalidate the status and the no limits, leave the field empty in opposition to 'true'
« Last Edit: January 08, 2009, 08:17:18 PM by mars »


Offline Ryan J

  • Occasional poster
  • *
    • Posts: 38
  • Soon to be coder...
    • View Profile
Thanks Mars
Will take a look at it now ;D
(using beta build 218)
And finally, I'm afraid I have to ask.  Why is it necessary to click two things to invoke a change?  Isn't it possible to do these things in one step using variables instead of two with intermediate .txt files?
I'm sorry but if you read my first post:
http://www.rejetto.com/forum/index.php?topic=6492.0
You can see; that I am a complete n00b when it comes to programming of any kind, and the stages it took me to learn about macros.
I am still quite pleased that I managed to learn alot about macros/html and make this in only two days.
I hope I will be able to do things like this properly in the future but for now I am still learning.
(using beta build 218)

The bulk of the contents of template files is still a mystery to me, but I *think* I manged to change the command after a new account is created to set it to be disabled as a test, but it still ends up enabled.  Here is what I changed:

{.set account|{.^accountname.}|enabled=true.}

to:

{.set account|{.^accountname.}|enabled=false.}

:-\
This does indeed disable the account but the line I use is not
Code: [Select]
{.set account|{.^accountname.}|enabled=true.}it is:
Code: [Select]
{.set account|{.^accountname.}|enabled={.^accountstatus.}.}
Are you sure you are editing the:[statuschange] section and not the:[newusermake] section?

The typo is my bad though.

I will hopefully make a newer version later on - probably based on Mars' one in the post above :D

Tried your recent update. Still doesn't work here, nor does the default
template mod.
I get the "you must be an admin" page.
Anyway, thanks for the effort.
Oddly, your first post
http://www.rejetto.com/forum/index.php?topic=6492.msg1039460#msg1039460
to just change user password does work. I may be able to add the other sections
so that it will work on older computers used as NAS, and webservers.
Or perhaps the Mars version will solve this?
By all means see if the Mars version works if not I can't help for the moment.
What version of HFS are you using?
What browser are you using? (e.g firefox 3, IE 6?)


Offline Ryan J

  • Occasional poster
  • *
    • Posts: 38
  • Soon to be coder...
    • View Profile
Hi Ryan J!

Very nice idea your administration panel ... We look forward to following.  :P
"mars" also working on a similar feature ... This promises good templates, this year...

I put your changes in a modified version of rejetto template.
This template already benefit of some changes.
(delete function "slowly" improved,  thumbnails,... and even the comments with the uploads...  only with the French version of hfs.exe).
And cherry on the cake, ;D it is bilingual English-French.
To use it in French, just remove the line:

Code: [Select]
[Remove entierely this line for use this template in french language]
Otherwise, I just changed the look of the Administration panel and I added some shortcuts, perhaps more practical.

(the Administrator button is at the bottom of the page). :D

After the Alpha version, I expect the Beta version.  ;)

...Soon...

Haha I hope to make another version.
Working on it now as a matter of fact ;)

I see you use the admin panel on your website  :o
Thanks ;D