Higher Walls: Disable public access options

In order to make Elgg a viable option at my school, I need to prevent students from providing access to material to the public. All must be restricted to logged in, groups, or private. (unless there is a way to moderate that which is public: user submit and admin publish)

Anyone have a quick and easy way to remove it as an option? I'm looking through the code and may find a solution myself.

I also may need to close rss feeds. Probably can work that out too.

It may sound draconian, but this is the only way it will pass muster.

  • Great Dave! I can work my way through making a plugin to do 1 and 3. Sounds like you have a plan for 2.

    Thanks!

  • I see where to edit engine/lib/access.php

    What I can't get is the start.php for the plugin. Not sure what to hook into.

    <?php

     

    function nopublic_init() {

     

    // Extend system CSS with our own styles

     

    extend_view('css','nopublic/css');

     

     

    register_plugin_hook('access','all','new_access');

     }

     

    function new_access() {

     

        if (!@include_once(dirname(dirname(__FILE__))) . "/nopublic/access.php") return false;

        

       return true;

    }

     

    // Make sure the plugin has been registered

    register_elgg_event_handler('init','system','nopublic_init');

    ?>

  • Diego pointed to a clever way to do much of this using the views system: http://community.elgg.org/pg/pages/view/4834/

    Unfortunately, it is not bulletproof and I need to have it bulletproof as I see access levels being changed by users as the move from private drafts.

    I hope to offer a k12 plugin for educators Nov 23, so others can jump into using Elgg for schools.

  • Well, I just got it to work and have created a plugin that removes "public" as an option when creating content. Next step is to disable rss feeds.

    I'll put out the plugin shortly!

    Steve

  • I combined this with the Walled Garden plugin. It removes the public option for access and the RSS/OpenDD options on the owner's block. I called it Higher Walls.