Arrow Home arrow Forums
larger font smaller font default font Fixed screen resolution Auto adjust screen size

Joomlapolis Forums  


A way to use Gallery on CB RC 1.2 and J1.5 ?
Date: 2008/07/15 17:11 By: Raj Status: CB Doc subscriber  
Karma: 28  
Gold Joomlapolitan

Posts: 397
graphgraph
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
Click here to see the profile of this user The administrator has disabled public write access.


      Topics Author Date
    thread link
A way to use Gallery on CB RC 1.2 and J1.5 ?
Raj 2008/07/15 17:11
    thread link
thread linkthread link Re:A way to use Gallery on CB RC 1.2 and J1.5 ?
hvus 2008/07/16 03:42
    thread link
thread linkthread linkthread link Re:A way to use Gallery on CB RC 1.2 and J1.5 ?
Raj 2008/07/16 03:49
    thread link
thread linkthread linkthread linkthread link Re:A way to use Gallery on CB RC 1.2 and J1.5 ?
hvus 2008/07/16 03:55
    thread link
thread linkthread linkthread linkthread linkthread link Re:A way to use Gallery on CB RC 1.2 and J1.5 ?
hvus 2008/07/16 22:58
    thread link
thread linkthread link Re:A way to use Gallery on CB RC 1.2 and J1.5 ?
wickhop 2008/07/27 22:21
    thread link
thread linkthread linkthread link Re:A way to use Gallery on CB RC 1.2 and J1.5 ?
Raj 2008/07/27 23:31
    thread link
thread linkthread linkthread linkthread link Re:A way to use Gallery on CB RC 1.2 and J1.5 ?
crow 2008/07/31 07:47
    thread link
thread linkthread linkthread linkthread linkthread link Re:A way to use Gallery on CB RC 1.2 and J1.5 ?
Raj 2008/08/17 01:38
    thread link
thread linkthread linkthread linkthread linkthread linkthread link Re:A way to use Gallery on CB RC 1.2 and J1.5 ?
piersol 2008/09/04 18:24
    thread link
thread linkthread linkthread linkthread linkthread linkthread linkthread link Re:A way to use Gallery on CB RC 1.2 and J1.5 ?
Raj 2008/09/04 22:21

Documentation

Documentation Subscription Service
(updated for CB 1.2 RC2)

What?

Why?

Where?

Just click here for answers!

Click here for a yearly subscription: subscribe now

Download Latest Release

The latest stable Community Builder Release is version 1.1 for Joomla 1.0 and Mambo.
You need to be a registered member of Joomlapolis to download.

The latest release candidate of Community Builder is version 1.2 RC3, native for Joomla 1.0, 1.5 and Mambo.
It is available as "thank you" to all CB documentation subscribers at this time.

CB Login