Results 1 to 7 of 7

Thread: Moderators?

  1. #1
    Pligg Donor dollars5's Avatar
    Joined
    Dec 2006
    Posts
    1,960

    Exclamation Moderators?

    Is it possible to have a set of users as moderators who will take responsibility of managing spam users, editing topics posted in wrong categories.

    They essentially are more than basic users but less than admins they wil have administration only on content and users, but not the Pligg site itself - is this possible? if it is possible the Pligg sites will become truly a community effort in generating and maintaining content.

    pls advise is this possible, or any advices to ge this done - we are willing to implement it for the Pligg community - if rite directions are pointed.

    Thanks in advance.

  2. #2
    Constant Pligger savant's Avatar
    Joined
    Apr 2006
    Posts
    1,181
    here what I was thinking.

    create a permissions mod.
    which allows you to make a group and then you can add users to a specific group.

    so the tables are like.

    mod_group ( group_id, group_name)
    mod_groupuser(group_id,user_id)
    mod_permission(permission_id,permission_text,permi ssion_field, permission_value, group_id)

    mod_permission(1,"Allow editing a link", "editlink_top", true,1) //example

    index.php has check_actions('index_top'); at the top.
    so you add a similar one in editlink.php check_actions('editlink_top');

    create a function in the module that hooks 'editlink_top'

    so when the hook function runs

    check user id.
    check group permissions
    check if group is allowed to "editlink_top"
    if it is then define("ALLOW_EDIT_LINK", true); because we can't return values from forum.

    thats all the module stuff.

    in editlink.php
    PHP Code:
    if ($link->link_author==$current_user->user_id || $current_user->user_level == "admin" || $current_user->user_level == "god"
    edit that to
    PHP Code:
    if ($link->link_author==$current_user->user_id || $current_user->user_level == "admin" || $current_user->user_level == "god" || ALLOW_EDIT_LINK
    Well thats just for edit link.


    This is just a few things that i came up with as I was writing. We definitely should refine this more and let people contribute ideas.

    And Dollar5 and his Developer, great work. good to see people wanting to contribute back to the community.

  3. #3
    Pligg Donor dollars5's Avatar
    Joined
    Dec 2006
    Posts
    1,960
    Thanks for the idea savant, i will discuss and put forward to Vinoth, I think he will be able to come up with it. Mean while looking and thinking of a solution that can be done without an extra table (there are already too many tables with Pligg and I donot want to over load it much)

  4. #4
    Constant Pligger savant's Avatar
    Joined
    Apr 2006
    Posts
    1,181
    you should see the number of tables in mambo 50 i think

    doesn't matter how many tables you have,
    what matters is the number of database calls you make

  5. #5
    Pligg Donor dollars5's Avatar
    Joined
    Dec 2006
    Posts
    1,960
    Thanks for all suggestions, but I got this with a simple way, using the existing tables and almost no code change. The below things explain this in detail:

    The God user fall under the user_level category 'God' - he is the super-being in the Pligg site, with all powers.
    There are other user levels too 'normal' - any registered user fall under this category.
    'Admin' - this is kinda moderator or Pligg site administrator - he can manage users, manage story contents (edit, set category etc).
    There are other levels of users like 'Blogger' and 'Special' - which I did not test it or donot know what they are intended for.

    All I did is to create users/convery them to Admins user-level - and now they can moderate the Pligg site with what ever I requested above. This seems more simpler than new tables things - only it took time and effort to investigate and find them

    It would be great if someone who added or created the user-level can comment more on this.. kb, Yanki, Ash?

    TIA.

  6. #6
    Constant Pligger savant's Avatar
    Joined
    Apr 2006
    Posts
    1,181
    kiss - damn i never follow that rule

  7. #7
    Pligg Donor dollars5's Avatar
    Joined
    Dec 2006
    Posts
    1,960
    Yep - we follow KISS as we are a bit lazy so we always look for easy solutions; this was actually an accident that we bothered to look into the pligg_users tables to find this out.

    There are many other user_levels, but there is no proper documentation or explanation for them and they remain useless in the tables without getting any notice (may be someday we might even forget this completely). If anyone knows more abt this it would be great to have a detailed explanation on this user_levels and what they were originally meant for.

    May be it is time for Pligg user group to begin the documentation process.

    To change the user level, follow these steps:
    Goto Admin >> User Management >> Edit user
    Change the user level from the level drop down. Currently it displays only Admin, God and Normal.

Similar Threads

  1. To the moderators of the forum
    By nolie in forum Questions & Comments
    Replies: 8
    Last Post: 10-04-2011, 03:28 PM
  2. Pligg Moderators - how to restrict them?
    By mwwoj in forum Questions & Comments
    Replies: 1
    Last Post: 06-29-2009, 10:07 AM
  3. Moderators/Developers - Help Remove TAGS from summary
    By hotsitez in forum Questions & Comments
    Replies: 10
    Last Post: 03-21-2008, 03:29 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •