Support ⇒ Explain Please ⇒ Is there a Psuedo-group or Group of Groups mod? ⇒ Community Forums ⇒ CPG Dragonfly™ CMS
Forum IndexExplain Please

Is there a Psuedo-group or Group of Groups mod? Reply to topic


I'm wondering if there is a mod around that allows a group consisting of just other groups?

In the situation where you have a number of groups for a site, you sometimes want 2 or more groups to have the same rights/properties for at least a few modules. Eg. if you have a Sponsors groups and a Founders group, you may want both to have the same rights to, say, edit their posts in a particular module. But many (most?) modules only allow 1 group to be assigned a particular right. Hence the desire for a psuedo-group for that module.

[ I know I can create a new group Trustee and assign every member of Sponsors and Founders to that group, but this quickly spirals out of control in terms of the number of group assignments that you need to add members to and tomaintain, plus lots of semi-meaningless emails sent out to members. ]

If someone has or knows of a hack, or a similar feature in a module's existing code - or even ideas on how it might be implemented - it would be appreciated. TIA!

Pro_News CM™ - Content Management for Dragonfly CMS™

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
Linux / 1.3.39 - 2.4.9 / 5.5.42 - 5.6.16 / 5.4.37 - 5.5.11 / 9.4


No that I'm aware of.
Instead of creating another group, the user could join any of them.

.:: I met php the 03 December 2003 :: Unforgettable day! ::.

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
CloudLinux / Apache 2.4 LSAPI / MySQLi 5.7 / PHP 7.3 / head


Thanks for the reply, Nano. In this case they are "earned" group memberships (donations, number of postings, etc.).

I can see ways to implement, but not without changing lots of code in every module.

Maybe I'll just see if I can do it in Pro_News to meet my immediate need ... using Ctrl-{click} to select more than 1 group. May make the group membership SQL select statement too complex though Laughing

Pro_News CM™ - Content Management for Dragonfly CMS™

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
Linux / 1.3.39 - 2.4.9 / 5.5.42 - 5.6.16 / 5.4.37 - 5.5.11 / 9.4


Number of posting uses ranks, are you confusing groups with ranks or that's exactly what you meant?

I don't thing the SQL selects needs any change if you use the built-in in_group() function.

.:: I met php the 03 December 2003 :: Unforgettable day! ::.

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
CloudLinux / Apache 2.4 LSAPI / MySQLi 5.7 / PHP 7.3 / head


No, it's definitely Groups. It's access privileges that I'm trying to control. (Ranks is really just "dressing" - it doesn't facilitate anything.)

MY SQL needs changing, but that's my own fault! Laughing In Pro_News I often need to get back just small number of records which meet the group select, so rather than have MySQL return huge number of records and then parse with in_group() I use an (elaborate) select function to parse group in SQL. Eg this snippet:

} else if ($member_a_group) { $sql .= ' AND EXISTS (SELECT 1 FROM '.$prefix.'_bbuser_group as g WHERE g.user_id='.is_user().' AND ((s.view<4 AND (s.view=0 OR s.view=1)) OR (s.view>3 AND s.view-3=g.group_id)))'; }

I didn't know PHP - DF - when thrown in the deep end after Kuragari dropped Pro_News, but learnt SQL way back in '79 when developing early commercial SQL RDBMS!

Hmmm, looking at that code again maybe I don't need to change it, as membership in 1 or more groups will still return a record. But ... no, maybe not ... need to think about membership of 2 groups the 2nd of which has higher privileges. Sad

Pro_News CM™ - Content Management for Dragonfly CMS™

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
Linux / 1.3.39 - 2.4.9 / 5.5.42 - 5.6.16 / 5.4.37 - 5.5.11 / 9.4

All times are UTC


Jump to: