|
|
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. |
|
|
|
|
Re:A way to use Gallery on CB RC 1.2 and J1.5 ?
|
|
Date: 2008/07/16 03:42
|
By: hvus
|
Status: User
|
|
|
Karma: 0  
|
|
Fresh Joomlapolitan  | Posts: 4 |   | |
|
Is it possible to share the file with all of us?
Thank you very much in advance.
|
|
The administrator has disabled public write access. |
|
|
|
Re:A way to use Gallery on CB RC 1.2 and J1.5 ?
|
|
Date: 2008/07/16 03:49
|
By: Raj
|
Status:
|
|
|
Karma: 28  
|
|
Gold Joomlapolitan  | Posts: 397 |   | |
|
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.
Roger
Post edited by: Raj, at: 2008/07/16 03:51
|
|
The administrator has disabled public write access. |
|
|
|
|
Re:A way to use Gallery on CB RC 1.2 and J1.5 ?
|
|
Date: 2008/07/16 03:55
|
By: hvus
|
Status: User
|
|
|
Karma: 0  
|
|
Fresh Joomlapolitan  | Posts: 4 |   | |
|
Thank you! You are so fast!
|
|
The administrator has disabled public write access. |
|
|
|
|
Re:A way to use Gallery on CB RC 1.2 and J1.5 ?
|
|
Date: 2008/07/16 22:58
|
By: hvus
|
Status: User
|
|
|
Karma: 0  
|
|
Fresh Joomlapolitan  | Posts: 4 |   | |
|
|
RAJ, IT WORKS WONDERFUL! Thank you very much.
|
|
The administrator has disabled public write access. |
|
|
|
Re:A way to use Gallery on CB RC 1.2 and J1.5 ?
|
|
Date: 2008/07/27 22:21
|
By: wickhop
|
Status:
|
|
|
Karma: 0  
|
|
Fresh Joomlapolitan  | Posts: 11 |   | |
|
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 
THANKS!!
|
|
The administrator has disabled public write access. |
|
|