Forums | Mahara Community

Developers /
External Content Plugin


anonymous profile picture
Account deleted
Posts: 12

10 February 2012, 8:48

New artefact plugin for Mahara : http://code.google.com/p/mahara-artefact-external-resource/

This artefact allows you to add embedable content (videos, pictures, books, news, ...) and resources (pdf, rss, etc) to your Mahara portfolio. All providers that implement the supported protocols (oembed, ogp, ...) can be added.

Supported providers includes: Youtube, Dailymotion, Slideshare, Google Books, Google Gadgets, Flikr, Tsr, Rss, pdf, doc and more.

Kristina Hoeppner's profile picture
Posts: 4863

10 February 2012, 21:50

Hello Laurent,

This plugin also sounds great. I hope to test it once I find out how I can get it into my local installation.

Cheers

Kristina

anonymous profile picture
Account deleted
Posts: 12

13 February 2012, 5:03

You can now download the zip from the  download tab - http://code.google.com/p/mahara-artefact-external-resource/. Or go for the source code tab if you preffer that.

Kristina Hoeppner's profile picture
Posts: 4863

16 February 2012, 17:21

Hello Laurent,

Thank you for making a zip file of the code. That helped me getting it. Smile

I like the ease of use of this block type. Similar to the external media block type, you don't need to hunt down the embed code.

It would be great if you included a help file with a link to the site where all possible sites are listed for which the code works. You put an "ect." into the information  but that doesn't give an indication of where I could read more about which others might work as well.

I did run into some error messages:

----------------

on the pages overview page:

WAR] df (artefact/extresource/lib.php:137) Undefined index: url

Call stack (most recent first):
log_message("Undefined index: url", 8, true, true, "/home/kristina/code/mahara14_testing/htdocs/artefa...", 137) at /home/kristina/code/mahara14_testing/htdocs/lib/errors.php:446
error(8, "Undefined index: url", "/home/kristina/code/mahara14_testing/htdocs/artefa...", 137, array(size 3)) at /home/kristina/code/mahara14_testing/htdocs/artefact/extresource/lib.php:137
ArtefactTypeExtresource::create("http://www.slideshare.net/4nitsirk/mahara-15-the-f...") at /home/kristina/code/mahara14_testing/htdocs/artefact/extresource/blocktype/extresource/lib.php:138
PluginBlocktypeExtresource::instance_config_save(array(size 3)) at Unknown:0
call_user_func_array(array(size 2), array(size 1)) at /home/kristina/code/mahara14_testing/htdocs/lib/mahara.php:1181
call_static_method("PluginBlocktypeExtresource", "instance_config_save", array(size 3)) at /home/kristina/code/mahara14_testing/htdocs/blocktype/lib.php:517
BlockInstance->instance_config_store(object(Pieform), array(size 9)) at Unknown:0
call_user_func_array(array(size 2), array(size 2)) at /home/kristina/code/mahara14_testing/htdocs/lib/pieforms/pieform.php:512
Pieform->__construct(array(size 15)) at /home/kristina/code/mahara14_testing/htdocs/blocktype/lib.php:832
BlockInstance->build_configure_form() at /home/kristina/code/mahara14_testing/htdocs/view/blocks.php:83 ---------------------------
on the "Edit display" page after adding a block, in this case with a Slideshare URL
[WAR] 04 (artefact/extresource/blocktype/extresource/lib.php:72) Undefined index: artefactid
Call stack (most recent first):
log_message("Undefined index: artefactid", 8, true, true, "/home/kristina/code/mahara14_testing/htdocs/artefa...", 72) at /home/kristina/code/mahara14_testing/htdocs/lib/errors.php:446
error(8, "Undefined index: artefactid", "/home/kristina/code/mahara14_testing/htdocs/artefa...", 72, array(size 3)) at /home/kristina/code/mahara14_testing/htdocs/artefact/extresource/blocktype/extresource/lib.php:72
PluginBlocktypeExtresource::override_instance_title(object(BlockInstance)) at Unknown:0
call_user_func_array(array(size 2), array(size 1)) at /home/kristina/code/mahara14_testing/htdocs/lib/mahara.php:1181
call_static_method("PluginBlocktypeExtresource", "override_instance_title", object(BlockInstance)) at /home/kristina/code/mahara14_testing/htdocs/blocktype/lib.php:556
BlockInstance->get_title() at /home/kristina/code/mahara14_testing/htdocs/blocktype/lib.php:583
BlockInstance->render_editing(false, true) at /home/kristina/code/mahara14_testing/htdocs/lib/view.php:1485
View->addblocktype(array(size 4)) at /home/kristina/code/mahara14_testing/htdocs/lib/view.php:1206
View->process_changes() at /home/kristina/code/mahara14_testing/htdocs/view/blocks.json.php:46
-------------------------- 

Were it also possible to adjust the size of the embedded content?

Cheers

Kristina

anonymous profile picture
Account deleted
Posts: 12

01 March 2012, 4:50

Hello Kristina,

Thanks for the feedback. I removed the warnings and twisted the help to be more explicit - I added several providers and moved that to a help popup.

Yet it is not really possible to list all providers as the protocols are open ended. Any site that provides embedable content - videos, sound, rich content, etc - can freely decide to implement one of them. If they do that the url will work with the plugin. So I believe the best thing is still very much to test urls to see if they work - the other option would be to have a look at page's header and see if proper tags are there.

I added too a size (width) option as it was missing from the previous version. I refrained to add a height option as it breaks the width/height ratio.

01 March 2012, 5:47

Hello Laurent,

Just a quick question on the go. With François Marier, we are trying to decide if there is an issue with the way Mahara uses the langpacks folder, maybe we discovered a bug.

How your French version display on your Mahara?

By me, i am set Mahara on French from the admin setting screen. I have installed your new verision of Extenal Content Plugin but I get the interface in English only.

Then, if I put the fr.utf8 folder into the maharadata/langpacks/... it works and your plugin operates in French.

Do you have the same issue on your server. Knowing this will help me. Could we talk over the phone about this today or at the begining of next week?

Cheers,

-dajan

anonymous profile picture
Account deleted
Posts: 12

01 March 2012, 6:43

Indeed I have the same issue. I believe only English is available under the Mahara folder. Other languages has to be deployed under maharadata/langpacks. I put everything under the plugin directory only because it makes sense to have everything under one hood. I can't remember for sure but I think it was working in older versions.

Now it may not be a bug per see but I don't think that having two places for language packs is such a good idea. I would rather have both of them working for all languages or have only one place.

01 March 2012, 7:38

Thank you Laurent for your quick answer.

With François, I think we could say this is a bug because it is working with other plugins which have the translation together and inside their own folders.

So I will put a bug/feature request on launchpad.

Thanks again,

Cheers,

-dajan

anonymous profile picture
Account deleted
Posts: 26

01 March 2012, 7:59

Hi,

  I also think it is a bug (recently introduced ?) since I had the same trouble with my auth CAS plugin. 

I had the french translation in auth/cas/lang/fr.utf8 but the french words only appeared when I copied the folder auth/cas/lang/fr.utf8 into maharadata//langpacks/fr.utf8/auth/cas/lang/

Cheers.

9 results