Coder Social home page Coder Social logo

imath / altctrl-public-group Goto Github PK

View Code? Open in Web Editor NEW
22.0 17.0 6.0 80 KB

BuddyPress plugin to provide an alternative control to group admins on their public groups

Home Page: https://imathi.eu

License: GNU General Public License v2.0

PHP 99.54% CSS 0.46%
buddypress-plugin buddypress-groups

altctrl-public-group's People

Contributors

imath avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

altctrl-public-group's Issues

PHP Notice: Trying to get property of non-object in includes/alt-public-group-ctrl.php

Hello,

Found the following notices in the log;
[14-Oct-2015 08:07:21 UTC] PHP Notice: Trying to get property of non-object in /home/ljlee/public_html/wp-content/plugins/altctrl-public-group-master/includes/alt-public-group-ctrl.php on line 325
[14-Oct-2015 08:07:21 UTC] PHP Notice: Trying to get property of non-object in /home/ljlee/public_html/wp-content/plugins/altctrl-public-group-master/includes/alt-public-group-ctrl.php on line 325

Appears to be related to $activities_template as that component isn't enabled.

    public function maybe_disable_can_do( $can_do = true ) {
        global $activities_template;

        if ( 'groups' !=  $activities_template->activity->component ) {
            return $can_do;
        }

        if ( empty( $activities_template->activity->item_id ) ) {
            return $can_do;
        }

Cheers

Custom homepage not showing

With the latest version of WordPress and BuddyPress I can't get the custom homepage to show. When the setting is enabled, it still shows group activity to non-members and not the homepage. Could this be related to the custom post type?

Checkbox enabled by default

Hello imath, I installed the plugin “Alternative Public Group Control”. The checkbox “Users need to submit a request to join group” it is disabled by default. Is it possible that this option is always enabled?

captura
It is marked, but I have to save changes to take effect.

Can you help me? Thank you!

Prevent users to join groups based on xprofile field value?

Hi Mathieu,

I think this is a very interesting plugin to add alternative privacy to Groups, and it sits nicely in the middle of a private and a public group. I was wondering if this "new" group could have an additional feature which is an (group) admin option to allow only members with a certain xprofile field value to join. It could work something like this:

1: Site admin selects which fields are "available" to be used for "Group Access" right.

For example the site admin chooses "Your Position in our Company" which has the values:

  • Manager
  • Developer

2: On the "Control" tab the Group Admin now gets the following new option

"Enable access to members based on the profile field "Your Position in our Company"

[ ] All
[ x ] Manager
[ ] Developer

*currently you have allowed only Manager to join this group.

3: Displaying the Groups/Access Control message

There are a few possible ways this functionality could be implemented

  • Only the groups that the users has access to are shown (so basically show the ones where he/she has access too)
  • The "blocked" groups are still shown but a basic (customisable) message is shown on the group page "You are unable to join this group because it's meant for a Manager only.
  • Everything stays the same but as soon as a user presses the "Join Group" button the xProfile check is done and then the message is displayed (might be the easiest solution)

I'm not sure if this idea is doable or falls within the scope of the plugin, but I think it would be a neat feature and would also be extra awesome when it works together with the new upcoming "User Types" functionality!

groups open to all logged-in users

We're looking to create a new group privacy option which is basically like 'Public', but where it's open to all logged-in users (not to users who aren't logged in). This seems like quite a simple requirement, but I gather from looking through the code, and from reading about this plugin, that modifying group privacy options is quite a task with BuddyPress. However, it doesn't seem as if this plugin covers this simple requirement.

What's your sense of how easy this would be to achieve? Based on your experience with this plugin, could it be done with a bit of custom theme code, or would it make sense to extend this plugin?

content privacy

This scenario provoke privacy issue for contents.
Why not adding membership request for private groups too?

Images broken on group homepages

When you create a custom group homepage with the plugin and insert an image via the menubar in the box, it displays a broken image. Also, the prompt seems to only allow for pasting an image URL in and not the possibility of uploading one.

Redirection en boucle sur les groupes non préalablement configurés

Salut Mathieu,
J'espère que tu vas bien! j'ai testé ton plugin pour l'utiliser sur https://www.time2sail.com
J'ai trouvé un bug et j'ai appliqué une solution. Lorsque tu es connecté en front, en utilisateur lambda (non admin) et que tu souhaites accéder à un groupe public depuis l'annuaire des groupes, si les options de ton plugin n'ont pas été réglées préalablement pour ce groupe, alors je ne peux pas accéder au groupe à cause d'une redirection sans fin. La raison est que la groupmeta '_altctrl_tabs' n'a pas encore été enregistrée en bdd une première fois à priori...
Pour palier à ce bug et ne pas déclencher 'bp_core_redirect' et permettre à l'utilisateur non membre d'accéder au groupe en question, j'ai modifié le fichier : includes/alt-public-group-ctrl.php vers la ligne #133 en ajoutant la condition suivante:

if (groups_get_groupmeta( $this->group->id, '_altctrl_tabs')) { ... }

donc le snippet entier devient :

// Redirect if trying to access the page
        if (groups_get_groupmeta( $this->group->id, '_altctrl_tabs')) {
            if ( ! empty( $hidden_tabs ) && in_array( bp_current_action(), $hidden_tabs ) ) {
            bp_core_add_message( __( 'This area is restricted to group members', 'altctrl-public-group' ), 'error' );
            bp_core_redirect( bp_get_group_permalink( $this->group ) );
            }
        }

Peut-être trouveras-tu une solution plus simple mais dans mon cas ça fonctionne maintenant.

Merci pour ce plugin, qui je l'espère intégrera un jours le screen 'settings' du composant 'groups' de buddypress!
@+

Errors since BP 5.0.0

  • Looks like bp_register_group_extension() is used without checking bp_is_active( 'groups' )
  • groups_send_membership_request() was called with an argument that is deprecated since version 5.0.0! Arguments passed to groups_send_membership_request should be in an associative array

Enforcing rules feom wordpress admin

Is there a way to enforce the rule from the wordpress admin area rather than the group admin. Or even set it so as long as the plugging is active the following is achieved without any backend settings.

What I would like to achieve is, that for every public group that gets created it is default that its necessary for any members must request to join.

I don't want the group admin to control this.

One work around would be to add the options to the group creation pages and set the radio button by default to "users need to send a request".

I could hide the rest with CSS.

Any advise?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.