Jump to content

Databases in Clubs


Sonya*

Recommended Posts

Posted (edited)

This app allows creating club features based on the Pages databases. E. g. if you have an Articles database, the app will allow the clubs‘ owners to create articles within the club. Any database that exists in Pages can be added to the club. The permission for databases is defined in the the clubs permissions for each user group. Only databases that use categories can be used in clubs. Visit a demo club to see how it looks like.

Features:

  • Set per group permission for every database in the group settings
  • Database category permissions are replaced by club permissions
  • Club header is added to category index and record
  • Club owner can change the category name and description
  • Show records in the club overview tab
  • Clubs use database templates for Category List, Record, and Record Form set in the database settings

NOTE: Pages must be installed and enabled to use this app.

Edited by Sonya*
  • 2 weeks later...
Posted

This is an amazing idea! 🙂 I have a couple of pre-sale questions:

1) Is it possible to limit adding records to only the club leaders and moderators? Is this adjustable on a per-database basis?

2) If I have custom fields defined for my clubs, is it possible to have certain databases only show up in clubs that have a certain value selected? For example, I have a custom club field where the user can select their club category and can choose from either discussion or books. If I have a database for chapters, is it possible the option to use that database is only available is the user selected the books category?

I suspect this may require custom coding. If so, are you available for custom work?

Posted
15 hours ago, PrettyPixels said:

1) Is it possible to limit adding records to only the club leaders and moderators? Is this adjustable on a per-database basis?

Not right now. The permission for the club category are overloaded with club permission. If the club is public, then everybody can create records. If open - only club members. If closed or private, the records are not shown anywhere else except of in the club. Restricting add permission to club owner only can be done in the future version.

15 hours ago, PrettyPixels said:

2) If I have custom fields defined for my clubs, is it possible to have certain databases only show up in clubs that have a certain value selected? For example, I have a custom club field where the user can select their club category and can choose from either discussion or books. If I have a database for chapters, is it possible the option to use that database is only available is the user selected the books category?

No, the permission to add a club feature is (like for any other feature) set on the group permission. It does not depend on club type or certain club values. This can be done as custom solution.

15 hours ago, PrettyPixels said:

I suspect this may require custom coding. If so, are you available for custom work?

Generally yes. But I am not able to make any urgent work right now due to pandemic measurements that are unpredictable. I depend entirely on kindergarten child care. If it is suddenly not available, then I am not available either. Unfortunately. 

  • 2 months later...
Posted

Hi there,

I'd like to understand a bit better how it works. When a record is added to the Database through a Club, it is then is it visible for all clubs with access to the same Database/Category, and Pages displaying the same Database? Or each record added by the club is "isolated" and accesible through the Club page. Also, related to the same concern: what happens to the Database entries when the Club requires users to join to display the contents?

Kind regards.

Posted (edited)
7 minutes ago, Daniel B. said:

When a record is added to the Database through a Club, it is then is it visible for all clubs with access to the same Database/Category, and Pages displaying the same Database? Or each record added by the club is "isolated" and accesible through the Club page.

Technically, it is a category in Pages database that is assigned to this club only. It behaves the same way other club nodes do, like forums, blogs, galleries and so on. 

7 minutes ago, Daniel B. said:

what happens to the Database entries when the Club requires users to join to display the contents?

The same as above. Database categories within clubs inherit club permissions and ignores permission set for the whole database in ACP. So, yes, if it is a private club, one has to join to see the content stored in this database category. If it is a public club, it is visible to any user, like any other node within public club. 

Edited by Sonya*
  • 4 months later...
Posted
On 6/10/2021 at 6:40 PM, DanielFb said:

@Sonya* I wonder if you have plans on making this app compatible with v4.6?

Kind regards.

Yes. I will look into it next week when German translation is ready.

  • 3 weeks later...
Posted

The application is updated and is waiting for approval. No changes are required, though. You can update your community to 4.6 and use the 4.5 version of this app without issues.

  • 3 months later...
Posted

This application isn't handling the category deletion correct because it's leaving the mapped club data in the database, which results in following error:

 

Class 'IPS\cms\Categories12' not found
#0 /system/Member/Club/Club.php(1882): IPS\Member\_Club->nodes()
#1 /system/Member/Club/Club.php(2020): IPS\Member\_Club->tabs()
#2 /applications/core/modules/front/clubs/view.php(130): IPS\Member\_Club->firstTab()
#3 /system/Dispatcher/Controller.php(101): IPS\core\modules\front\clubs\_view->manage()
#4 /applications/core/modules/front/clubs/view.php(120): IPS\Dispatcher\_Controller->execute()
#5 /system/Dispatcher/Dispatcher.php(153): IPS\core\modules\front\clubs\_view->execute()
#6 /index.php(13): IPS\_Dispatcher->run()
#7 {main}

 

  • 3 weeks later...
Posted (edited)

Hi,

I have an issue when I try to edit the club database from ACP. I can't edit or delete any added database from anywhere else in Clubs.

SELECT * FROM `cms_database_categories` WHERE category_club_id=1 ORDER BY category_position
IPS\Db\Exception: Unknown column 'category_club_id' in 'where clause' (1054)
#0 /system/Db/Select.php(388): IPS\_Db->preparedQuery()
#1 /system/Db/Select.php(286): IPS\Db\_Select->runQuery()
#2 /system/Node/Model.php(224): IPS\Db\_Select->setKeyField()
#3 /init.php(902) : eval()'d code(251): IPS\Node\_Model::nodesWithPermission()
#4 /system/Node/Model.php(180): IPS\cms\clubdbs_hook_categories::nodesWithPermission()
#5 /applications/cms/sources/Categories/Categories.php(273): IPS\Node\_Model::roots()
#6 /applications/core/modules/admin/clubs/clubs.php(567): IPS\cms\_Categories::roots()
#7 /system/Helpers/Tree/Tree.php(130): IPS\core\modules\admin\clubs\_clubs->_getNodeRows()
#8 /system/Theme/Theme.php(860) : eval()'d code(3927): IPS\Helpers\Tree\_Tree->__toString()
#9 /system/Theme/SandboxedTemplate.php(61): IPS\Theme\class_core_admin_global->tabs()
#10 /applications/core/modules/admin/clubs/clubs.php(280): IPS\Theme\_SandboxedTemplate->__call()
#11 /system/Dispatcher/Controller.php(90): IPS\core\modules\admin\clubs\_clubs->edit()
#12 /applications/core/modules/admin/clubs/clubs.php(38): IPS\Dispatcher\_Controller->execute()
#13 /system/Dispatcher/Dispatcher.php(153): IPS\core\modules\admin\clubs\_clubs->execute()
#14 /admin/index.php(13): IPS\_Dispatcher->run()
#15 {main}

A-configuration-or-server-error-has-occurred.thumb.png.f1211780ec183f0a4ccb2fc66db64108.png

 

And from the System Logs. Type: uncaught_exception

SELECT * FROM `cms_database_categories` WHERE category_club_id=1 ORDER BY category_position
IPS\Db\Exception: Unknown column 'category_club_id' in 'where clause' (1054)
#0 /system/Db/Select.php(388): IPS\_Db->preparedQuery()
#1 /system/Db/Select.php(286): IPS\Db\_Select->runQuery()
#2 /system/Node/Model.php(224): IPS\Db\_Select->setKeyField()
#3 /init.php(902) : eval()'d code(251): IPS\Node\_Model::nodesWithPermission()
#4 /system/Node/Model.php(180): IPS\cms\clubdbs_hook_categories::nodesWithPermission()
#5 /applications/cms/sources/Categories/Categories.php(273): IPS\Node\_Model::roots()
#6 /applications/core/modules/admin/clubs/clubs.php(567): IPS\cms\_Categories::roots()
#7 /system/Helpers/Tree/Tree.php(130): IPS\core\modules\admin\clubs\_clubs->_getNodeRows()
#8 /system/Theme/Theme.php(860) : eval()'d code(3927): IPS\Helpers\Tree\_Tree->__toString()
#9 /system/Theme/SandboxedTemplate.php(61): IPS\Theme\class_core_admin_global->tabs()
#10 /applications/core/modules/admin/clubs/clubs.php(280): IPS\Theme\_SandboxedTemplate->__call()
#11 /system/Dispatcher/Controller.php(90): IPS\core\modules\admin\clubs\_clubs->edit()
#12 /applications/core/modules/admin/clubs/clubs.php(38): IPS\Dispatcher\_Controller->execute()
#13 /system/Dispatcher/Dispatcher.php(153): IPS\core\modules\admin\clubs\_clubs->execute()
#14 /admin/index.php(13): IPS\_Dispatcher->run()
#15 {main}

BACKTRACE

#0 /public/init.php(1004): IPS\_Log::log()
#1 /system/Helpers/Tree/Tree.php(166): IPS\IPS::exceptionHandler()
#2 /system/Theme/Theme.php(860) : eval()'d code(3927): IPS\Helpers\Tree\_Tree->__toString()
#3 /system/Theme/SandboxedTemplate.php(61): IPS\Theme\class_core_admin_global->tabs()
#4 /applications/core/modules/admin/clubs/clubs.php(280): IPS\Theme\_SandboxedTemplate->__call()
#5 /system/Dispatcher/Controller.php(90): IPS\core\modules\admin\clubs\_clubs->edit()
#6 /applications/core/modules/admin/clubs/clubs.php(38): IPS\Dispatcher\_Controller->execute()
#7 /system/Dispatcher/Dispatcher.php(153): IPS\core\modules\admin\clubs\_clubs->execute()
#8 /admin/index.php(13): IPS\_Dispatcher->run()
#9 {main}

System-Logs.thumb.png.fdde71816803e6e672b4f636da5289af.png

Edited by Ioannis D
Posted (edited)

@Ioannis D, thanks for your report. I will submit a fix today @Daniel has reported before. I am not sure, if it is the same issue, you have. 

Can you please provide the steps in ACP to reproduce the error? Thank you!

Edit: I could reproduce the error and make a fix asap.

Edited by Sonya*
Posted

With this update I can't add any new database in Clubs. Each new database doesn't appear in "Allowed content areas in clubs" Group settings and I can't see it in "Add Club Feature" 

Also, with the "Show Club Content Areas: Only within Clubs" setting, every new database category (to an existing database) in Clubs, appears in database categories.

Is it a bug or I missing something?

Posted
5 minutes ago, Ioannis D said:

With this update I can't add any new database in Clubs. Each new database doesn't appear in "Allowed content areas in clubs" Group settings and I can't see it in "Add Club Feature" 

No changes, it works. Please ensure that new database is assigned to a page. If it is not, it is not displayed in Allowed content areas.

10 minutes ago, Ioannis D said:

Also, with the "Show Club Content Areas: Only within Clubs" setting, every new database category (to an existing database) in Clubs, appears in database categories.

Confirmed.

Posted
9 minutes ago, Sonya* said:

No changes, it works. Please ensure that new database is assigned to a page. If it is not, it is not displayed in Allowed content areas.

Can I assigned 2 databases to a page? I can't see in left area the database block in order to drag and drop it to the page that is also another database.

  • 4 months later...
Posted
14 hours ago, Manuel Molina said:

Hi @Sonya*, quick question, if database is wiki style, can club members collaborate on documents created in DB?

I have not tried it yet. I suppose it will not respect the wiki permissions, as wiki permissions will be overloaded with club permissions. Generally, club permissions are very limited and are incompatible with member groups permissions. This is IPS, not my app.

BTW, There will also be display issues when you try to add categories block to the database page. I am aware of this, but I have not found any simple solution for it.

This app is quite limited to just CRUD of database records inside one category using default display and listing template. Nothing more 😞 

Posted
3 hours ago, Sonya* said:

I have not tried it yet. I suppose it will not respect the wiki permissions, as wiki permissions will be overloaded with club permissions. Generally, club permissions are very limited and are incompatible with member groups permissions. This is IPS, not my app.

BTW, There will also be display issues when you try to add categories block to the database page. I am aware of this, but I have not found any simple solution for it.

This app is quite limited to just CRUD of database records inside one category using default display and listing template. Nothing more 😞 

Thank you Sonya.

  • 3 months later...
  • 3 months later...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...