A way to use Gallery on CB RC 1.2 and J1.5 ?

14 years 10 months ago #68425 by Raj
I needed to get Nick's Profile Gallery working at least somewhat under CB RC 1.2 and Joomla 1.5x, legacy mode enabled.

Here's what I did. I don't know if this will work for you.

First, I installed CB Profile Gallery on a fresh site. The parameters that should be appearing on the tab aren't showing up for me, so I can't edit them. I'm assuming I got the default parameters, but I don't know.

Second, I discovered that I was able to upload images and their thumbnails would indeed show on user profiles. So far so good.

Third, I tried clicking these thumbnails while logged in as the administrator. A new window opened, but it was blank. Not good. I logged out, and tried viewing the page. There was a message that only registered users could view the gallery. Not good.

Fourth, I started inspecting the code. Around line 806 I found

switch ($tabparams["cbpgaccessmode"]) {

Before this line, I added

$tabparams["cbpgaccessmode"] = 'PUB';

thus bypassing the default settings.

I also wanted to enable lightbox, so around line 953 I found

switch ($tabparams["cbpgdisplayformat"])

Before this line, I added

$tabparams["cbpgdisplayformat"] = 'DF3';

This bypasses the default settings and forces the Gallery to display the images in a lightbox.

I tested it, and the lightbox opened, but the image was blank. I looked at the code (around line 1005) and noticed a script loading prototype and scripaculous, which probably doesn't play well with mootools.

I replaced that script with:

$htmltext2 .= "<script type=\"text/javascript\" src=\"components/com_comprofiler/plugin/user/plug_cbprofilegallery/js/mootools.js\"></script>";

$htmltext2 .= "<link rel=\"stylesheet\" href=\"components/com_comprofiler/plugin/user/plug_cbprofilegallery/js/slimbox.css\" type=\"text/css\" media=\"screen\" />";

$htmltext2 .= "<script type=\"text/javascript\" src=\"components/com_comprofiler/plugin/user/plug_cbprofilegallery/js/slimbox.js\"></script>";

$htmltext2 .= "<script language=\"JavaScript\">\n";
$htmltext2 .= "</script>\n";

I uploaded mootools.js and slimbox.js and slimbox.css and the gifs that slimbox needs to YourSite.com/components/com_comprofiler/plugin/user/plug_cbprofilegallery/js

And it works.

If your template is already loading mootools, then you won't need that line.

I don't know if the remaining functionality of the Gallery is okay. I just wanted to upload images and have them display in a lightbox.


Post edited by: Raj, at: 2008/07/15 17:13

Post edited by: Raj, at: 2008/07/15 17:24

Please Log in to join the conversation.

14 years 10 months ago #68455 by hvus
Is it possible to share the file with all of us?

Thank you very much in advance.


Please Log in to join the conversation.

14 years 10 months ago #68456 by Raj
Here ya go... You'll still have to make sure mootools, slimbox, and it's graphics get in the right places. I put it all into the js directory of the plug in.

If someone knows how to make the tab parameters appear under Joomla 1.5, that would move things way forward.


Attachment cb-349462eef3ae4103d86f52642ae7d26b.zip not found

Post edited by: Raj, at: 2008/07/16 03:51

Please Log in to join the conversation.

14 years 10 months ago #68457 by hvus
Thank you! You are so fast! ;)

Please Log in to join the conversation.

14 years 10 months ago #68542 by hvus
RAJ, IT WORKS WONDERFUL! Thank you very much.

Please Log in to join the conversation.

14 years 10 months ago #69558 by wickhop
I have the same problem and tried solving this with your update of the php file.

And somehow it now only opens images in a different page.. so no lightbox.. :(
So now I solved the lightbox coming up but not displaying pics.. with no lightbox at all ;) heheh

anyone has got any clue about how to solve this correctly?
Im not a php magician unfortunately :(

I read somewhere that it could be a different javascript ruining the cbgallery script..
i have
joomla 1.5
CB 1.2 Rc 2
i have disabled some other plugins on my site like 'Simple Image Gallery' to see if that influenced the display of the CB gallery, but no luck unfortunately.

Please gimme some help about what it could be.
I hope to be able to launch my site A.S.A.P. but would like to have it completely working correctly ;)


Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.323 seconds

Facebook Twitter LinkedIn