We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

Extension: Restrict Entries (to Member Groups or Guests)

Development and Programming

ErwinVanLun's avatar
ErwinVanLun
235 posts
17 years ago
ErwinVanLun's avatar ErwinVanLun

Hi Dry, In January I was very enthusiastic about your extensions (and I still am) but as it wasn’t working with MSM I still couln’t use it. I was wondering whether you have been able to do some fixing in the mean time to make this extension MSN-proof. Let me know! Thanks

Erwin

       
Greg Salt's avatar
Greg Salt
3,988 posts
17 years ago
Greg Salt's avatar Greg Salt

Hi Erwin (and everybody else),

My apologies but we’ve had no time to update the extension. It is still on my todo list though I think that it will have to wait until EE2.0 appears before doing it. Some of the requested changes are significant and I’d want to make it available for both the 2.0 and the 1.6 branches without much reworking.

Cheers

Dry

       
Danny T.'s avatar
Danny T.
426 posts
17 years ago
Danny T.'s avatar Danny T.

Sounds like a sweet plugin. Especially for the lazy types such as myself looking to broadcast something to editors and moderators on my sites. 😊

Looking forward to it. As others have said, I don’t mind paying for this extension to push some of those features out. While I hope not all add-on’s go the way of commercial, I do believe many are validated in charging a price for their services. Since I’m a bit less knowledgeable on PHP development, I feed on crap like this.

Good job man.. Looking forward to MSM and Mark’s request in regards to selecting groups that can view it rather than not. Of course, the varchar(100) sounds like an issue as well.

D.

       
Michael Swanson's avatar
Michael Swanson
32 posts
16 years ago
Michael Swanson's avatar Michael Swanson

Drylouvre,

This sounds like a great extension. Exactly what I am looking for. Unfortunately I am using MSM. :down: But I am really looking forward to the updated MSM compatible version! I also wanted to throw my vote in with Mark Bowen and others for switching the check boxes around to be the groups included instead of the one’s that are excluded.

Just a thought on functionality… You could have a guest box be automatically checked so that the default for an entry is publicly viewable. Then, users could uncheck that box and select specific groups based on what level of access they wanted… OR perhaps have a option in the weblog admin section to set the default access level for entries in that weblog…

Anyway great work! I am looking forward to testing this out. Maybe I’ll download it and play with it on one of my other sites that is not using MSM.

Michael

       
Tim Smith's avatar
Tim Smith
15 posts
16 years ago
Tim Smith's avatar Tim Smith

Very, very useful extension. Thanks a LOT!

I hope you don’t mind, but I also wanted the permissions to work the other way around (as per Mark’s request) and have come up with following tweak for those that are interested until you have time to make a full update.

Change at line 257 of ext.restrict_entries.php from

foreach($SESS->cache['restricted_member_group_data']->result AS $key)
        {            
            if ($key['entry_id'] == $row['entry_id'])
            {
                $groups = unserialize($key['member_groups']);
                
                foreach($groups AS $key => $value)
                {
                    if($SESS->userdata['group_id'] == $value)
                    {
                        $tagdata = '';
                        break;
                    }
                }
            }
        }

to

foreach($SESS->cache['restricted_member_group_data']->result AS $key)
        {            
            if ($key['entry_id'] == $row['entry_id'])
            {
                $groups = unserialize($key['member_groups']);
                $ok=FALSE;
                foreach($groups AS $key => $value)
                {
                    if($SESS->userdata['group_id'] == $value)
                    {
                        $ok=TRUE;
                        break;
                    }
                }
                if ($ok===FALSE && $SESS->userdata['group_id']!=1){
                    $tagdata = '';
                }
            }
        }

Also change line 12 of lang.restrict_entries.php from

"Select the groups that you wish to prevent from viewing this entry",

to

"Select the groups that you wish to allow to view this entry",

Super-Admins will always get to see everything.

       
Tim Smith's avatar
Tim Smith
15 posts
16 years ago
Tim Smith's avatar Tim Smith

Having trawled through the code the preview option and quick save lose the group settings because the group data needs to be retrieved from the groups post variable. Unfortunately it’s in an array and EE code wipes out POST arrays in a couple of places. I have a workaround for this.

However more problematic is that there is no hook in the right place to make quick save work. This is already the subject of a bug report here.

       
Nick Foxall's avatar
Nick Foxall
189 posts
16 years ago
Nick Foxall's avatar Nick Foxall

Tried to upload this extension, but as soon as I enter the Extensions panel in the CP, I get this at the top (and I can’t see the extension in the list, so it isn’t even activated):

Warning: Utilities::include(/opt/home2/jccacweb/public_html/systemfolder33/extensions/ext.restrict_entries.php) [function.Utilities-include]: failed to open stream: Permission denied in /opt/home2/jccacweb/public_html/systemfolder33/cp/cp.utilities.php on line 147 Warning: Utilities::include() [function.include]: Failed opening ‘/opt/home2/jccacweb/public_html/systemfolder33/extensions/ext.restrict_entries.php’ for inclusion (include_path=’.:/usr/share/pear’) in /opt/home2/jccacweb/public_html/systemfolder33/cp/cp.utilities.php on line 147

any ideas….? Nick

       
Ingmar Greil's avatar
Ingmar Greil
29,243 posts
16 years ago
Ingmar Greil's avatar Ingmar Greil

Sounds like a permission problem, not an issue with the extension itself. Make sure you set correct permissions on the file and the extensions folder.

       
Nick Foxall's avatar
Nick Foxall
189 posts
16 years ago
Nick Foxall's avatar Nick Foxall

Thx Ingmar…

What should the permissions be? Both my /extensions and /language folders are set to 755. Should they be 777? What about files inside… 777 too?

Nick

       
Ruud L. Heerkens's avatar
Ruud L. Heerkens
45 posts
16 years ago
Ruud L. Heerkens's avatar Ruud L. Heerkens

Hello,

I just noticed that this Extension and Show Categories (v.1.1) do not play niceley tegether. The edit page table only will show the values for this Extension.

Any ideas to overcome this ?

  • Ruud -
       
Efrain B.'s avatar
Efrain B.
42 posts
16 years ago
Efrain B.'s avatar Efrain B.

Very nice… just what I needed. Thanks.

       
jtree's avatar
jtree
255 posts
15 years ago
jtree's avatar jtree

I believe I’ve found a conflict with this extension and LG Image Preview - http://leevigraham.com/cms-customisation/expressionengine/lg-image-preview/

The extension installed fine but entries wouldn’t show up as restricted even though I was setting them to be in the Groups tab. I went one by one and disabled extensions to see if that might be causing the issue. I finally narrowed it down to the LG Image Preview extension. Once I disabled LG Image Preview the Restrict Entries extension worked. Thanks!

       
Ruud L. Heerkens's avatar
Ruud L. Heerkens
45 posts
15 years ago
Ruud L. Heerkens's avatar Ruud L. Heerkens

Hi,

Finally I came to a (near) perfect fit for this extension. However I notice that EE tags still account for the non displayed entries. Page navigation, counts to name some I’ve seen. This in some cases could end up in some weird pages I forsee.

How would I achieve a notification display that a entry has permissions attached ? Any suggestions are welcome.

       
Angie Herrera's avatar
Angie Herrera
357 posts
15 years ago
Angie Herrera's avatar Angie Herrera

I just installed this extension and it doesn’t even show up in the Extensions Manager. All other extensions show up and work fine. Running 1.6.9. Not sure where to begin troubleshooting. Thanks!

angie

       
Richard Frank's avatar
Richard Frank
200 posts
15 years ago
Richard Frank's avatar Richard Frank

Angle, I had same problem. The permissions on the extension file are too tight. chmod 755 it.

       
First 2 3 4 5

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.