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

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

Hi,

This extension enables another tab in the Publish page (configurable by weblog) that allows you to restrict that entry to certain member groups including the Guest group (anonymous site visitors).

It was originally conceived as a more robust way of ‘sandboxing’ content rather than either creating separate templates or defining member group/status conditionals within the main templates.

In the extension settings you can define which weblogs will have the new tab on the Publish page. If you choose the ‘Select All’ radio button then all existing and new weblogs will have the new tab.

When you publish a new entry or edit one in a weblog that you have chosen in the settings a new tab will appear called Groups. This has checkboxes for all member groups except Super Admin, Banned and Pending. All groups selected will not see that entry even if its status is Open. Super Admins can always see any entry. The Guest group is the one to select if you wish to stop anonymous visitors from viewing that entry.

Once the extension is installed a new column is shown in the Edit tab. This is called Restricted and shows which entries have had some sort of restriction applied.

I think it will only work in versions 1.5.0 and up but I’d be grateful for feedback.

Updated to version 1.0.1

Download the latest version from my site

Cheers

Dry

       
textdriven's avatar
textdriven
107 posts
18 years ago
textdriven's avatar textdriven

Sounds good. I’ll be trying this out

       
textdriven's avatar
textdriven
107 posts
18 years ago
textdriven's avatar textdriven

Well this extension is awesome. However there is one really weird bug for me. The moment I activate it it stops Mark Huot’s Multi text extension from rendering it’s code. I just get output like this…

{track_list limit="30"} {/track_list}
No.     Track     Samples     Length
{col_1}     {col_2}         {col_3}

If this could be fixed that would be awesome.

This is such a useful extension.

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

Hi Textdriven,

Ah ok. I guess that I need to add a last call variable to it. My bad. I’ll have a look at that and update it.

Cheers

Dry

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

Hi,

Okay, I’ve updated the extension to version 1.0.1 and added the $EXT->last_call check to the functions. Hopefully this will fix the problem. Please download the update from the first post link.

Cheers

Dry

       
textdriven's avatar
textdriven
107 posts
18 years ago
textdriven's avatar textdriven

Excellent, works perfectly now. Thank you.

Btw, you might want to make the download link clearer in your first post (think people look for that before reading).

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

Okay. I’ll do that. Thanks very much.

Cheers

Dry

       
textdriven's avatar
textdriven
107 posts
18 years ago
textdriven's avatar textdriven

One other thing. The “publish/update” button will set/change the groups that can view the entry but the “quick save” button doesn’t set or update these options.

       
Greg Salt's avatar
Greg Salt
3,988 posts
18 years ago
Greg Salt's avatar Greg Salt
One other thing. The “publish/update” button will set/change the groups that can view the entry but the “quick save” button doesn’t set or update these options.

Hmm,

I’m not sure about this one. I’ll have to check out the available hooks. At the moment I am using the ‘submit_new_entry_absolute_end’ hook that is right before the redirect at the end of submission. There is another hook that might be in the right place but I need to go and check it.

I’ll get back to you about this, hopefully tomorrow.

Cheers

Dry

       
Ryan M.'s avatar
Ryan M.
1,511 posts
18 years ago
Ryan M.'s avatar Ryan M.

Oh my. I just quoted on a job and certain user groups only seeing certain posts was one of the things that I was racking my brain about. This might come in very handy. Thanks!

       
Mark Bowen's avatar
Mark Bowen
12,637 posts
18 years ago
Mark Bowen's avatar Mark Bowen

Hi Dry,

Looks really good! Great idea and really well implemented, should come in really handy for sites in the future.

Really good work so thankyou.

Best wishes,

Mark

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

Hi Mark,

Glad you like it.

Cheers

Dry

       
Greg Salt's avatar
Greg Salt
3,988 posts
18 years ago
Greg Salt's avatar Greg Salt
One other thing. The “publish/update” button will set/change the groups that can view the entry but the “quick save” button doesn’t set or update these options.

Hi Textdriven,

It doesn’t look like this is possible for new entries, at least not without hijacking the way EE inserts the entry data. But, if anyone has any light to shed on this I’d be interested to figure out a way to do it without compromising the checks that EE makes.

Cheers

Dry

       
ms's avatar
ms
274 posts
18 years ago
ms's avatar ms

This extension - when enabled - seems to break the tag submit extension for Solspace’ Tag 2.0 module (currently in beta). Tested V 1.01 and the Tag tab disappears when enabling ext.restrict_entries.php.

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

Hi MS,

Thanks for the heads up. I don’t use the Tag module so I’ll have to download it and see why this might be happening.

Cheers

Dry

       
1 2 3 Last

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.