How to overwrite default access permissions?: Revision

Overwrite default access permissions could be acomplished easily using the "Elgg way" philosophy. In other words you just need to overwrite the default behavior using the plugin architecture.

In this specific case you need:

  1. Create a theme plugin
  2. Create the view path for access permissions (yourplugin/views/default/input)
  3. Copy there the code from (views/default/input/access.php)
  4. Add the following line after the line 28:
    if(empty($vars["value"]) && intval($vars["value"])!==0){
      $vars["value"]=2;
    }
  5. Done!

You can use this method for add specific access permissions or to overwrite the display order.