the admin users

Hi Guys 

Can someone please point me in the right direction as to how i can hide the admin users , i see that are listed as admins in the database so where can i stop them showing up in the search and lists. Im also not sure about composer and elgg , I tried to get the papal api up and running  , i can see there is a bunch of stuff in it and it activates ok, but how do you use it , where are the manuals for the plugins .

I would appreciate any help you guys can give me 

 

Colin

  • Hi iionly

    Thanks so much for the assistance , Its most welcome, you guys are wonderful 

  • are we winning , can i help , look somthing up or somthing anything ?

     

  • Hi

     

    Any luck with this , sorry to be pushy but im in desperate need of this ?

  • If using the Private profiles plugin:

    Removal of the lines

    $user_guid = elgg_extract('user_guid', $params);
    if ($user_guid) {
        // activity privacy setting only applies to logged out users
        return;
    }

    in the function applyActivityPrivacy() in the file mod/private_profiles/classes/Elgg/PrivateProfiles/Access.php will hide activity and entry in member list from logged-out and logged-in users if the member has set the corresponding user setting to do so.

    If the hiding functionality should be available for admin users only then the lines

    if (!elgg_get_config('walled_garden') && !elgg_is_active_plugin('loginrequired')) {
        $user_activity_setting = elgg_get_plugin_user_setting('user_activity_setting', $user->guid, 'private_profiles', Access::ACCESS_PUBLIC);
        $fields[] = elgg_view_field([
            '#type' => 'radio',
            'name' => 'params[user_activity_setting]',
            'options' => array_flip([
                Access::ACCESS_PUBLIC => elgg_echo('private_profiles:user_activity_setting_yes'),
                Access::ACCESS_LOGGED_IN => elgg_echo('private_profiles:user_activity_setting_members'),
            ]),
            'value' => $user_activity_setting,
            '#label' => elgg_echo('private_profiles:user_activity_setting'),
        ]);
    }

    in

    need to be changed in the file mod/private_profiles/views/default/forms/private_profiles_usersettings/save.php

    if ($user->isAdmin()) {
        $user_activity_setting = elgg_get_plugin_user_setting('user_activity_setting', $user->guid, 'private_profiles', Access::ACCESS_PUBLIC);
        $fields[] = elgg_view_field([
            '#type' => 'radio',
            'name' => 'params[user_activity_setting]',
            'options' => array_flip([
                Access::ACCESS_PUBLIC => elgg_echo('private_profiles:user_activity_setting_yes'),
                Access::ACCESS_LOGGED_IN => elgg_echo('private_profiles:user_activity_setting_members'),
            ]),
            'value' => $user_activity_setting,
            '#label' => elgg_echo('private_profiles:user_activity_setting'),
        ]);
    }

    If the option should be offered to all users the if-clause need to be removed completely.

    And as a sidenote: even if you think you need some functionality urgently, it's a bit annoying for others being so pushy. People might have other things to do sometimes.

  • im so sorry , i have been on my own for long i miss working with a team please accept ,my apologies ,'

  • It was just a bit too often too fast. After some days it might be okay but you need to keep in mind that people might come from different timezones, have a job, need to sleep etc... :-)

    Has my suggestion been of any use?

  • hi iionly

    You are 100% correct , I wilI try my best to be more considerate in the future :-), would like to make friends here , not aggravate people. 

    I do not know how to thank you enough,  it works perfectly, I got so frustrated trying to understand why i couldn't find it in the system, I have worked in php for years but have never seen anything like the way elgg works. I dont understand composer and what that's doing , i don't understand hooks m where can i start learning , I have so much more to do , but would also like to be abble to give back and the only way that can happen is if i can learn the system .

    Can you now paste this mod as a plugin , I,m sure there are lots and lots of people that want to do this .

    Im from South Africa, I would be grateful for any pointers - reading suggestions. I want to build at least 5 elgg sites , including this one I have tried youtube and google but Im either asking the wrong questions or not to many people know.

    Best Regards

     

  • Maybe it helps to read a bit from

    http://learn.elgg.org/en/stable/guides/index.html and

    http://learn.elgg.org/en/stable/design/index.html

    to get a basic understanding how Elgg works and how you can customize Elgg by plugins according to your needs (or alter existing plugins to add some functionality or modify some existing functionality). It's a bit of a learning curve at the beginning. But some things are easier to do as it might seem at first. I guess the best thing is to look for existing plugins first to find out if a desired functionality is already provided. Or at least a similar functionality. Then it's rather the altering of existing code than figuring out how to code it totally from the start.

    I'll keep the new features for the Private Profiles plugin in mind if I have some time to spare to work on a new release for the plugin.

  • Hi iionly

    I could really use your help again if you can have a look , on first glance that mod to the private profile l seemed perfect , but firstly the pages about terms and privacy only work if your longed in , and the second thing is it was just for admins so i did the code exactly like you said , but then normal users cant view each others profiles , I did try fix it but Im battling ,