Embedding Phoca Slide show plugin in a joomla module!!

Phoca Gallery - image gallery extension
Charbel89
Phoca Newbie
Phoca Newbie
Posts: 5
Joined: 15 Dec 2008, 23:31

Embedding Phoca Slide show plugin in a joomla module!!

Post 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.
User avatar
caro84g
Phoca Hero
Phoca Hero
Posts: 1369
Joined: 11 Feb 2008, 17:52
Location: Holland
Contact:

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

Post 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
Please ask your support questions in the forums and not via PM - I delete those PM's
Backup before you do any major change to your website (and test first)
Charbel89
Phoca Newbie
Phoca Newbie
Posts: 5
Joined: 15 Dec 2008, 23:31

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

Post 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.
Charbel89
Phoca Newbie
Phoca Newbie
Posts: 5
Joined: 15 Dec 2008, 23:31

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

Post 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
User avatar
caro84g
Phoca Hero
Phoca Hero
Posts: 1369
Joined: 11 Feb 2008, 17:52
Location: Holland
Contact:

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

Post 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
Please ask your support questions in the forums and not via PM - I delete those PM's
Backup before you do any major change to your website (and test first)
Post Reply