Create content type with database connection
Submitted by vincent on Tue, 05/17/2016 - 20:45
Forums:
Hello,
I would like to create a new content type in H5P that loads content from a database (Drupal 7, PostgreSQL).
I find it hard to make my way from the Hello World greeting card tutorial to such a complex plugin.
It would be helpful if anybody could tell me if there is already a plugin with database connection where I can look at how it works. Or if anybody could tell me what to read to get all the information I need.
falcon
Wed, 05/18/2016 - 11:55
Permalink
Hi! I don't know of any
vincent
Wed, 05/18/2016 - 14:50
Permalink
Is H5P the right thing for my application?
Thank you for your quick response! I wanted to create a calendar in H5P but now I'm unsure if H5P suits my requirements. My calendar was supposed to hold events that Drupal users add. And other Drupal users should be able to show that they participate in these events including things they bring with them.
Using JSON/Ajax seems to be a solution to read data from the database but could it also pass information from that H5P calender back into the database?
Example:
User A provides an event next week. User B says he takes part and brings something to drink (from a drop down menu). User C takes part and brings something to eat. So the calendar should show 3 participants in that event with drinks and eats.
For me it looks now like it would be a tricky thing to code and not really easy reuseable for others.
falcon
Thu, 05/19/2016 - 14:02
Permalink
The ajax requests could both