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: Weblog Rights

Development and Programming

Laisvunas's avatar
Laisvunas
879 posts
16 years ago
Laisvunas's avatar Laisvunas

The attached add-on files may be out of date. Please visit Devot-ee for the latest versions.

There is a quite popular feature request - to allow membership in multiple groups. One of the main reasons for such feature is the need to have more power in assigning weblogs to users. For example, if you have 3 weblogs - A, B and C - and need to allow some users to post into A, some others - into B, yet some others into C, yet some others into A and B, yet some others into A and C etc., then for managing weblog permissions you need a lot of member groups. To be exact, if you have number N of weblogs, you may need

2N - 1

member groups.

To solve the problem of too many member groups I created Weblog Rights extension. It allows you to assign weblogs on per-member basis. So, for managing weblog permissions of the above example you will need only 1 member group.

Unfortunately, for this extension to work a hack is needed.

In /system/core/core.functions.php around line: 1195 (inside function fetch_assigned_weblogs($all_sites = FALSE) )

find:

return array_values($allowed_blogs);

Replace it with:

// -------------------------------------------
// 'assigned_weblogs_array' hook.
//  - Exclude/Include weblogs in the asigned weblogs array.
//
global $EXT; 
if ($EXT->active_hook('assigned_weblogs_array') === TRUE)
{
 $allowed_blogs = $EXT->call_extension('assigned_weblogs_array', $allowed_blogs);
}

return array_values($allowed_blogs);
       
Mark Bowen's avatar
Mark Bowen
12,637 posts
16 years ago
Mark Bowen's avatar Mark Bowen

Wow, that’s a great extension you’ve created there. Hope that the guys do add in that hook for you as I know this one could really help out a lot of people.

Well done on this one mate.

Best wishes,

Mark

       
Adam Khan's avatar
Adam Khan
319 posts
16 years ago
Adam Khan's avatar Adam Khan

Congratulations on this one, you’re a treasure.

       
Sean C. Smith's avatar
Sean C. Smith
3,818 posts
16 years ago
Sean C. Smith's avatar Sean C. Smith

Very nice - also hoping that the hook gets added since I don’t like to hack the core files.

       
Laisvunas's avatar
Laisvunas
879 posts
16 years ago
Laisvunas's avatar Laisvunas

Hi,

I released version 1.0.2 of Weblog Rights extension. In this release a couple of bugs were fixed - PHP errors being outputted in certain cases.

       
the_crimsonrooster's avatar
the_crimsonrooster
264 posts
16 years ago
the_crimsonrooster's avatar the_crimsonrooster

I’m assuming you still need the hack.

       
esuhre's avatar
esuhre
5 posts
16 years ago
esuhre's avatar esuhre

Ok noob here. I installed the extension and updated the core code. Enabled the extension and now I do not know where to go to associate weblogs with members.

Can someone point me in the right direction?

Thanks, - Eric

       
Laisvunas's avatar
Laisvunas
879 posts
16 years ago
Laisvunas's avatar Laisvunas

Hi,

Go CP Home > Admin > Utilities > Extensions Manager > Weblog Rights extension settings.

       
Laisvunas's avatar
Laisvunas
879 posts
15 years ago
Laisvunas's avatar Laisvunas

Hi,

I released version 1.0.3 of Weblog Rights extension. In this release a bug was fixed - ugly styling of weblog rights info in Control Panel’s View Members page.

       

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.