Page 1 of 1

Embedding Phoca Slide show plugin in a joomla module!!

Posted: 15 Dec 2008, 23:43
by Charbel89
Hi,

I needed to embed the Phoca gallery within a joomla module. So I resolved this problem and though of sharing it with others who might be interested.

1 - I installed the latest version of the phoca slide show plugin.
2 - I installed the custom code module (http://www.fijiwebdesign.com or http://www.joomlaspan.com).
3 - I created a new module based on the custom code module. (This is because I have more than one usage for it). To do this go to: Extensions->Module Manager -> new, then select Custom Code -> NExt , Add title and position and any other specific things you require.

4 - Paste the following code into the Custom code script section (module parameters) and parse php is set to yes:
(Please edit the 3rd line to your specific requirements)

Code: Select all

<?php
$params = array();
$text='{pgslideshow id=4|width=605|height=217|delay=3000|image=L}'; //EDIT THIS LINE

$article = new stdClass();
$article->text = $text;

JPluginHelper::importPlugin('content');
$dispatcher = &JDispatcher::getInstance();

$results = $dispatcher->trigger(
'onPrepareContent', array (&$article, &$params, 0));

print($article->text);
?>
Published my module to where I wanted it and magic I get the banner slide show.

I hope you will find this helpfull and maybe this could be added to the FAQ or docs.

Thanks

Charbel.

Re: Embedding Phoca Slide show plugin in a joomla module!!

Posted: 16 Dec 2008, 09:51
by caro84g
Hi,

thanks for sharing, when I have time I'll add it into the documentation.

By the way, when I was browsing the Joomla Extensions Directory (http://extensions.joomla.org) I came across this module 'Plugin In Module' http://extensions.joomla.org/component/ ... Itemid,35/
(it might do the same as your code - I haven't tried it)

Regards, Carolien

Re: Embedding Phoca Slide show plugin in a joomla module!!

Posted: 16 Dec 2008, 12:37
by Charbel89
Funny this module was only added to the extensions on the 14th of December that's is 2 days ago. :)

I think it might well do the same thing.

Re: Embedding Phoca Slide show plugin in a joomla module!!

Posted: 16 Dec 2008, 13:32
by Charbel89
I tested the module and it works.

I am just wondering if you had the chance to check out my other thread with regards to replacing the slideshow engine.

viewtopic.php?f=1&t=2468

Thanks a lot

Regards

Re: Embedding Phoca Slide show plugin in a joomla module!!

Posted: 16 Dec 2008, 13:54
by caro84g
Hi,

I'm sorry but I'm not a programmer :( . Jan develops the Phoca extensions, and I answer some user questions, moderate the forum board and edit/add documentation. So we have to wait for Jan.

Regards Carolien