|
|
A way to use Gallery on CB RC 1.2 and J1.5 ?
|
|
Date: 2008/07/15 17:11
|
By: Raj
|
Status:
|
|
|
Karma: 28  
|
|
Gold Joomlapolitan  | Posts: 397 |   | |
|
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:
| Code: |
$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.
Roger
Post edited by: Raj, at: 2008/07/15 17:13
Post edited by: Raj, at: 2008/07/15 17:24
|
|
The administrator has disabled public write access. |
|
|