Wiki source for Mod009fAdminUsers
==== Wikka Mod 009 ====
Type: Feature Addition
----
===Credit:===
**[[http://www.wakkawiki.com/SticK | SticK]] **
""WakkaAdminHack"" //Warning: don't go to original site or follow links on ""SticK""'s page: infected!//
and
** [[http://www.wakkawiki.com/SilBaer | SilBaer]] **
[[http://www.wakkawiki.com/PsudoAdminUser | PsudoAdminUser @ WakkaWiki]]
----
Added the ability to have admin users. Admin users can override things such as the ACL lists and have the ability to delete pages and comments.
Instructions to add admin users:
- Edit the wakka.config.php file.
- Modify the admin_users line, adding additional Wiki Names between the quotes, separated by commas....
e.g., "admin_users" => """JsnX, HendrikMans, AnotherCoolAdmin""",
Modified files:
/wakka.php
actions/footer.php
There is a bug in Stick's instructions. The admin user list is not trimmed correctly. Modified the function to read as follows.....
%%(php)
//returns true if user is listed in configuration list as admin
function IsAdmin() {
$adminstring = $this->config["admin_users"];
$adminarray = explode(',' , $adminstring);
foreach ($adminarray as $admin) {
if (trim($admin) == $this->GetUserName()) return true;
}
}
%%
Type: Feature Addition
----
===Credit:===
**[[http://www.wakkawiki.com/SticK | SticK]] **
""WakkaAdminHack"" //Warning: don't go to original site or follow links on ""SticK""'s page: infected!//
and
** [[http://www.wakkawiki.com/SilBaer | SilBaer]] **
[[http://www.wakkawiki.com/PsudoAdminUser | PsudoAdminUser @ WakkaWiki]]
----
Added the ability to have admin users. Admin users can override things such as the ACL lists and have the ability to delete pages and comments.
Instructions to add admin users:
- Edit the wakka.config.php file.
- Modify the admin_users line, adding additional Wiki Names between the quotes, separated by commas....
e.g., "admin_users" => """JsnX, HendrikMans, AnotherCoolAdmin""",
Modified files:
/wakka.php
actions/footer.php
There is a bug in Stick's instructions. The admin user list is not trimmed correctly. Modified the function to read as follows.....
%%(php)
//returns true if user is listed in configuration list as admin
function IsAdmin() {
$adminstring = $this->config["admin_users"];
$adminarray = explode(',' , $adminstring);
foreach ($adminarray as $admin) {
if (trim($admin) == $this->GetUserName()) return true;
}
}
%%