How to use H5P in plain HTML 5,PHP and Mysql?

Submitted by kovarthanan on Fri, 09/26/2014 - 07:37

Hi,

I would like to use one of the samples in my plain html or plain PHP page with a MySQL backend.
I dont wish to use wordpress or joomla or drupal.
Can this be done ?
Can I call a JS function or a CSS class from within this plain html5 page?

Please keep me informed.

Thanks

Kovarthanan M

fnoks

Fri, 09/26/2014 - 11:08

Permalink

It can be done. But, what

It can be done. But, what exactly are you trying to accomplish? Do you need the H5Ps to be editable (using the web browser) on your site?

kovarthanan

Fri, 09/26/2014 - 11:45

Permalink

Yes, Using Web browser

Yes i need to apply in my site.

fnoks

Fri, 09/26/2014 - 13:21

Permalink

Sorry, but I do not

Sorry, but I do not understand what "apply in my site" means. Do you need the editor on your site?

kovarthanan

Fri, 09/26/2014 - 13:31

Permalink

Need editor

Yeah, I need editor to my site to create e-learning module.

fnoks

Fri, 09/26/2014 - 13:33

Permalink

Then you have to implement

Then you have to implement the platform specific code. You could look at how this is done in the H5P plugin for e.g. wordpress.

kovarthanan

Fri, 09/26/2014 - 13:42

Permalink

Using PHP and HTML 5

I dont want to use any framework. I need to implement H5P using core PHP and HTML 5 alone.

fnoks

Fri, 09/26/2014 - 13:49

Permalink

That's ok. I'm not saying you

That's ok. I'm not saying you need a framework. I am trying to say you could look at the wordpress-implementation, and convert it to "core PHP".

Dan

Fri, 01/23/2015 - 21:54

Permalink

Hi fnoksIsn't the https:/

Hi fnoks

Isn't the https://github.com/h5p/h5p-php-library a general PHP version that isn't specific to any franework?

If so, could you please send some documentation about how to get it up and running on a simple PHP server. I am not a PHP expert - I'm just picking it up so I can see H5P in action.

Many thanks

Dan

falcon

Mon, 01/26/2015 - 11:16

Permalink

Yes, we have a generic PHP

Yes, we have a generic PHP library for H5P core and also the H5P editor. However they don't work stand alone. They are plugins for publishing platforms. We don't have documentation for creating new publishing platform plugins yet.

You may try out H5P by pressing the Test Drive link at the front page of H5P.org.

Dan

Thu, 01/22/2015 - 16:36

Permalink

Has anyone taken this any further?

Hello

Does anyone know of any progress in this area to get H5P running in core PHP or in any other language like python (flask or django)?

Many thanks

falcon

Mon, 01/26/2015 - 11:17

Permalink

We're planning to improve our

We're planning to improve our Joomla! integration and also create a plugin for Moodle in the first half of 2015.

Dan

Mon, 01/26/2015 - 15:53

Permalink

Thanks FalconThe notes on the

Thanks Falcon

The notes on the php general library github page say:

"""

Any interaction with LMS, CMS or other frameworks is done through interfaces. Plattforms needs to implement
the following interfaces in order for the h5p libraries to work:

- TODO: Fill in here

In addition frameworks need to do the following:

- Provide a form for uploading h5p packages.
- Place the uploaded h5p packages in a temporary directory

"""

Is there any chance you could give some more detailed guidance as to what needs to be done to integrate into core php site build. In particular the TODO list.

I'd love to get this up and running on my site as I think this single file portability is a massive win for reusability and the growth of resources available. If only it was easier to incorporate the functionality into a generic PHP or Python web framework.

Thanks to you guys for developing this and providing it freely for us to use.

falcon

Tue, 01/27/2015 - 11:29

Permalink

We're planning to add a

We're planning to add a complete set of documentation for creating new platform integrations. I made some small adjustments to the Readme file specifying which interface you need to implement. We're not able to create a full documentation for it at the moment.

mungle

Sat, 01/14/2017 - 18:41

Permalink

Any updates?

This topic is quite old, but I'm interested as well in a plain php version without need to have a wordpress website or other frameworks. Is there any updates about this topic? Thank you!

tim

Mon, 01/16/2017 - 09:27

Permalink

Hi mungle, unfortunately

Hi mungle, unfortunately there isn't any documentation on writing a plain php version of H5P. There has been some discussion on porting H5P to django:

https://h5p.org/node/34142

Hopefully the information there will be of some relevance.

Lucthir

Mon, 12/04/2023 - 12:38

Permalink

Hi everyone,Many years after

Hi everyone,

Many years after this topic, I'm trying to use some H5P content in a Laravel app. Is there any news regarding documentation or links to examples from wich I can start ?

Thanks a lot

Lucthir

Wed, 12/13/2023 - 16:41

Permalink

Thank you for your reply, it

Thank you for your reply, it was very helpful.


I'm in another problem, I extracted files from the dragndrop.h5p file and trying to implement them into my code but I can't figure out what constructor I have to call to display the drag and drop exercice. I'm currently trying to call first a new DragNBar wich I put in first arg of a new DragnDrop but it's not working. Could you help me find the entry point that calls the rest of the constructors ?
Thank you very very much.

LT

otacke

Wed, 12/13/2023 - 23:06

Permalink

Hi Lucthir!H5P content types

Hi Lucthir!

H5P content types need the H5P framework to run. You cannot simply put the JavaScript files somewhere.

Best,
Oliver

Lucthir

Thu, 12/14/2023 - 09:12

Permalink

Hi Oliver,I managed to make

Hi Oliver,

I managed to make it work for the image sequencing content type, I adapted an event dispatcher I extracted from the core. But for the Drag and Drop i don't understand what constructor I should call first ...
If you have an idea to guide me it would be perfect !

Thanks

LT

otacke

Thu, 12/14/2023 - 20:45

Permalink

The constructor of an H5P

The constructor of an H5P content type that's correctly loaded and that has all dependencies in place (!) is always it's machine name, e.g. `H5P.InteractiveVideo(params: any, contentId: number|string, extras?: any)` or in your case that would be `H5P.DragQuestion(params: any, contentId: number|string, extras?: any)`.

Lucthir

Fri, 12/15/2023 - 11:23

Permalink

Thank you very much for your

Thank you very much for your response, it is really helpful !
I will work from there to make it work in my project

LT