Bridge for Joomla 1.5 ready - Page 2 Bridge for Joomla 1.5 ready - Page 2
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

Bridge for Joomla 1.5 ready

Started by extrabigmehdi, March 18, 2009, 11:02:53 PM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

Joachim Müller

Your posting is useless. cpg1.5.x goes unsupported as of now, as it's still in beta stage. Don't clutter threads with needless remarks like yours.

jeepguy_1980

Not a support request.

Can anyone verify that this bridge works with the latest CPG1.5. It has worked for me after the last few updates and I want to verify that it does still work before I begin trouble shooting.


phill104

It is a mistake to think you can solve any major problems just with potatoes.

Αndré


phill104

Ooops, I haven't checked that one for a bit. :-[
It is a mistake to think you can solve any major problems just with potatoes.

jeepguy_1980

Quote from: Αndré on March 15, 2010, 10:21:29 AM
The latest release is cpg1.5.3 (RC) ;)

Quote from: Phill Luckhurst on March 15, 2010, 04:25:06 PM
Ooops, I haven't checked that one for a bit. :-[

Thanks. It wasn't working under 1.5.2 for me either, so I can begin troubleshooting.

extrabigmehdi

hi,
finally updated my bridge for stable release of Coppermine.
Notably, a flash upload bug has been fixed.

I bypass the flash cookie bug, by posting the full cookie array, indirectly with the get_user_pass function.

Shane

#27
Site:  http://philmontforum.com/15test/cpg

Question about the bridge and compatibility with the Final Extract plugin.  I asked for help with the Final Extract plugin over on the plugin board and Andre answered with the following:

Quote from: Αndré on August 13, 2010, 01:43:30 PM
I think it's the bridging that makes trouble. If I go to Coppermine's group manager, the guest group has the id 50. If I watch as guest at Coppermine's debug output, my group id is 150. I'm not familiar with bridging nor have looked at the plugin code yet. As an alternative you could just edit your theme.php and remove the login/logout button. Please read the docs and/or search the board if you don't know what you have to do.

Apparently, the Final Extract plugin cannot work properly when the group id is the actual id+100.  I dug into the joomla15.inc.php file and found the following code:

//------------joomla groups don't change, so let's give them directly
       function collect_groups() {
           //------ actual joomla groups' values + 100
           $udb_groups = Array( $this->guestgroup => "Guests", 118 => "Registered" , 119 => "Author", 120 => "Editor", 121 => "Publisher", 123 => "Manager", 124 => "Administrator", 125 => "Super Administrator" );
           return $udb_groups;
       }
       
       //------------ function usertype_into_gid no more necessary ----------------
       //------------  just use :$user->get('gid') --------------------------------
       //------------- note: the old $my->gid is reached now by $user->get('aid') -
       
       //------------let's override the coppermine authenticate function ----------------------------------------------------
       //------------ this makes things much easier: no need to bother with cookies, session, or user password. sweet! ------
       
       function authenticate() {
           //well, the aim of this function is after all to convert data from "JFactory::getUser" object into "$USER_DATA"
           global $USER_DATA;
           
           $joomUser= & JFactory::getUser();
           if (!$joomUser->get('guest')) { //user connected
               //we don't call function load_user_data
               //we handle data directly
               
               $USER_DATA['user_id'] = $joomUser->get('id');
               $USER_DATA['user_name'] = $joomUser->get('username');
               $gid=100+$joomUser->get('gid');
               $supported_groups = Array(118,119,120,121,123,124,125);  //100 + numbers in core_acl_aro_groups table
               if (!in_array($gid,$supported_groups))
                   die("Non standard joomla group used. Sorry this is not supported by the bridge");
                   
               if ($this->use_post_based_groups) {
                   $USER_DATA['groups'] = array( 0 => $gid );
               } else {
                   $USER_DATA['groups'] = array( 0 => (in_array($gid-100,$this->admingroups) ? 1 : 2) );
               }
           }//end if user connected
           else { //this is a guest
               $this->load_guest_data();
           }//end if this is a guest


Is the change in group id necessary?  Is there any way to get the Joomla bridge and the Final Extract plugin to play nice with each other?

I appreciate any help!
Shane

(edited to correct misspelled link)

extrabigmehdi

#28
@Shane

QuoteIs the change in group id necessary?  
Frankly I just studied other bridge source code for coppermine, and imitated the change .
EDIT:
I  think that to avoid problems, coppermine  must use different group numbers , depending if it's user post based group or not.

Shane

I figured out how to get the additional Joomla groups to load into Coppermine (with Joomla 1.5, I just can't figure out how to get the additional groups to work with Joomla).

In my site database, the additional group "Reunion Committee" has a Joomla group id (gid) of 31.

I edited the bridge file joomla15.inc.php:

line 369: replace:
$udb_groups = Array( $this->guestgroup => "Guests", 118 => "Registered" , 119 => "Author", 120 => "Editor", 121 => "Publisher", 123 => "Manager", 124 => "Administrator", 125 => "Super Administrator" );

with:
$udb_groups = Array( $this->guestgroup => "Guests", 118 => "Registered" , 119 => "Author", 120 => "Editor", 121 => "Publisher", 123 => "Manager", 124 => "Administrator", 125 => "Super Administrator", 131 => "Reunion Committee" );

line 392: replace:
$supported_groups = Array(118,119,120,121,123,124,125);  //100 + numbers in core_acl_aro_groups table

with:
$supported_groups = Array(118,119,120,121,123,124,125,131);  //100 + numbers in core_acl_aro_groups table

Line numbers may or may not be accurate depending on any other changes to the file.  Once bridged (selecting that bridge will use Joomla groups) the additional "Reunion Committee" group is present in the CPG groups list and database.

extrabigmehdi

#30
@Shane
yes the group supported are hardcoded in the bridge code. I didn't want to bother with complicated code, knowing that default Joomla group do not change.
I'll try to update later bridge for Joomla 1.6 , and then the dynamic Joomla group will be supported.

Florian_W

Quote from: extrabigmehdi on September 16, 2010, 11:42:55 PM
@Shane
yes the group supported are hardcoded in the bridge code. I didn't want to bother with complicated code, knowing that default Joomla group do not change.
I'll try to update later bridge for Joomla 1.6 , and then the dynamic Joomla group will be supported.


@extrabigmehdi

I know that Joomla 1.6 is very new, but do you know, if and when you update your coppermine bridge for Joomla 1.6?

Cheers
Florian

extrabigmehdi

@Florian_W
I'm currently busy with a little project, and don't want to make false promises.
I hope soon...

Florian_W

Thank you MEHDI for you fast reply,
I hope that we hear from you soon ! I would be delighted

Florian_W

Quote from: extrabigmehdi on January 24, 2011, 12:47:55 PM
@Florian_W
I'm currently busy with a little project, and don't want to make false promises.
I hope soon...
@ Mehdi

I know that you're busy.....you wrote it in one of your last posts.
Is it possible that you contact me directly via mail. I have a question about your bridge for Joomla 1.6 I want to discuss with you personally.

Thank you
Florian

vlado85

Hi,

I try to add Facebook share and Facebook like button, but I have problems with sharing.

When you click on button, link is broken. Facebook see link like: www.mysite.com/coppermine
without link to my picture like: www.mysite.com/cpg/displayimage.php?pid=75#top_display_media

is there a way to solve this?