Advanced search  

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

Pages: 1 2 [3] 4 5   Go Down

Author Topic: PHP-Fusion and Coppermine Photo Gallery integration  (Read 118490 times)

0 Members and 1 Guest are viewing this topic.

Horizon

  • Coppermine newbie
  • Offline Offline
  • Posts: 18
Re: PHP-Fusion and Coppermine Photo Gallery integration
« Reply #40 on: December 17, 2006, 10:30:36 pm »

I've not done anything since the last post, but at the moment I can't to come in the gallery in aggregate  (http://neformatas.net/galerija/ ) any ideas mates what's going on? There can I manager this bridge?

Please help me.
Logged

xphermg

  • Coppermine newbie
  • Offline Offline
  • Posts: 1
Re: PHP-Fusion and Coppermine Photo Gallery integration
« Reply #41 on: December 22, 2006, 09:35:20 pm »

Hi All!

I just did this last night and I love it.. cept for one small problem, my users can upload, they get this error:

Sorry there is no album where you are allowed to upload files

File: /home/beyond/public_html/pictures/upload.php - Line: 874

Now, I've gone into Groups and and modified it, I'm just not sure what is going wrong.  Any suggestions?
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: PHP-Fusion and Coppermine Photo Gallery integration
« Reply #42 on: December 24, 2006, 12:23:55 am »

Not related to the bridge. Please read the docs.
Logged

batbaru1

  • Coppermine newbie
  • Offline Offline
  • Gender: Male
  • Posts: 10
Re: PHP-Fusion and Coppermine Photo Gallery integration
« Reply #43 on: March 02, 2007, 06:31:25 pm »

I know it must be in front of me somewhere but I can't find any info on where to actually get the bridge (and associated usage info). Can someone help?
Logged

clutch23097

  • Coppermine newbie
  • Offline Offline
  • Posts: 1
Re: PHP-Fusion and Coppermine Photo Gallery integration
« Reply #45 on: March 20, 2007, 05:05:35 am »

any idea how do I got this error?

$this->boardurl = 'http://localhost/'; require_once('http://psrc.epinoy.com/config.php');
Fatal error: Call to a member function authenticate() on a non-object in /home/vhosts/psrc.epinoy.com/public_html/photogallery/include/init.inc.php on line 270

many thanks...
Logged

KristianS

  • Coppermine newbie
  • Offline Offline
  • Posts: 9
Re: PHP-Fusion and Coppermine Photo Gallery integration
« Reply #46 on: April 15, 2007, 12:20:52 pm »

Nice thread :-) Just what I was looking for!

Installed and working fine!

I have a question though...I can see someone already asked the same without luck...so I will try to bring it to life...

Fusion has two types of groups...1) then pre-defined (admin, superadmin, users...) 2) User-defined

In the bridge posted in here, I only get group 1. I really need group 2...Can someone point me in the right direction?

Thank you!

Br
Kristian
Logged

KristianS

  • Coppermine newbie
  • Offline Offline
  • Posts: 9
Re: PHP-Fusion and Coppermine Photo Gallery integration
« Reply #47 on: April 15, 2007, 06:14:14 pm »

Some more info to my last post:

My bridge table in the cpg db is empty when i browse it? Has something gone wrong? or should I fill it manually? to activate the groups?
Logged

Nibbler

  • Guest
Re: PHP-Fusion and Coppermine Photo Gallery integration
« Reply #48 on: April 15, 2007, 06:54:57 pm »

The bridge file does not support user defined groups, probably because I was not aware of their existence.
Logged

KristianS

  • Coppermine newbie
  • Offline Offline
  • Posts: 9
Re: PHP-Fusion and Coppermine Photo Gallery integration
« Reply #49 on: April 15, 2007, 08:40:41 pm »

Can you help or can you specify what areas I need to look into to modify the bridge. It is something that would help all fusion users wanting to use Coppermine. I'll be happy to give a try, but need some pointers...

Some details.

Basically the four groups that are now loaded through the bridge (or are they hardcode in the array?) are SuperGroups. You can only belong to one of these...SuperAdmin, Admins, Users, Guest. The other groups are subgroups to these. You can belong to many sub_groups.

Br
KristianS
Logged

Nibbler

  • Guest
Re: PHP-Fusion and Coppermine Photo Gallery integration
« Reply #50 on: April 15, 2007, 10:38:15 pm »

You need to fix this to read in the user defined groups from the database:

Code: [Select]
function collect_groups()
{

$udb_groups = array(103 =>'Super Administrators', 102=> 'Administrators', 101=>'Members', 100=> 'Guests');

return $udb_groups;

}

and then make sure the users get put into the correct groups.

Set

Code: [Select]
$this->multigroups = 1;
near the top of the file and add an implementation of get_groups() - see other bridge files for examples.

You should be able to do all this by only modifying the phpfusion bridge file.
Logged

KristianS

  • Coppermine newbie
  • Offline Offline
  • Posts: 9
Re: PHP-Fusion and Coppermine Photo Gallery integration
« Reply #51 on: April 17, 2007, 07:42:59 pm »

Hey again,

What does this switch do?
$this->multigroups = 0;

When I change it to 1 I get a fatal error.

I have updated the collect group function and without setting the above to 1 it collects the correct groups.

Without changing anything the button "Assign album" (http://../cpg1410/usermgr.php?op=group_alb_access&gid=1) then this links to a list of my users within fusion. I would expect that this function would open a box containing available albums...Any ideas?

The get_groups function what should it do? should collect the users for the groups? and add them to the coppermine tables? I confued about the named perhaps...since I already collected the groups...

br
Kristian

Logged

Nibbler

  • Guest
Re: PHP-Fusion and Coppermine Photo Gallery integration
« Reply #52 on: April 17, 2007, 08:19:28 pm »

multigroups means you need to provide a get_groups() function to get all the groups the user is in. Without this you get the simpler method of a single group for the user.

It says assigned albums, not assign albums. This is not related to what you are doing.

collect_groups() retrieves the list of all available groups that exist. This is only called during a group sync (via bridge manager or a groups page visit).
get_groups() gets the groups that the currently logged in user is a member of. This is called every time.

I'd love to be able to help you more with actual code, but I just don't have the time currently.

Logged

KristianS

  • Coppermine newbie
  • Offline Offline
  • Posts: 9
Re: PHP-Fusion and Coppermine Photo Gallery integration
« Reply #53 on: April 17, 2007, 10:01:31 pm »

No problem, this was a great help. The problem is that the bridge files are not over commented...so I need to ask :-)

I'll be back!
Logged

KristianS

  • Coppermine newbie
  • Offline Offline
  • Posts: 9
Re: PHP-Fusion and Coppermine Photo Gallery integration
« Reply #54 on: April 22, 2007, 07:32:21 pm »

Ok, here is where i've gotten so far...

Code: [Select]
function get_groups( &$user )
 {
//$groups = array($user['group_id'] - 100);
$sql = cpg_db_query("SELECT user_groups, user_level FROM {$this->usertable} WHERE {$this->field['user_id']}='{$user['id']}' and user_groups <> '' and user_level <> '';");

$user_level=mysql_result($sql,0,"user_level");
$user_groups=mysql_result($sql,0,"user_groups");

$groups = explode(".", $user_groups);
array_push($groups,$user_level);

print_r(array_values($groups));

return $groups;
}

I havent really looked at php before so if I have done something less secure etc. pls advice....Anyway here is my problem:

Error log from CPG:

Code: [Select]
While executing query "SELECT MAX(group_quota) as disk_max, MIN(group_quota) as disk_min, MAX(can_rate_pictures) as can_rate_pictures, MAX(can_send_ecards) as can_send_ecards, MAX(upload_form_config) as ufc_max, MIN(upload_form_config) as ufc_min, MAX(custom_user_upload) as custom_user_upload, MAX(num_file_upload) as num_file_upload, MAX(num_URI_upload) as num_URI_upload, MAX(can_post_comments) as can_post_comments, MAX(can_upload_pictures) as can_upload_pictures, MAX(can_create_albums) as can_create_albums, MAX(has_admin_access) as has_admin_access, MIN(pub_upl_need_approval) as pub_upl_need_approval, MIN( priv_upl_need_approval) as  priv_upl_need_approval FROM cpg1410_usergroups WHERE group_id in (1,4,103,)" on 0

mySQL error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')' at line 1


It seems that the array might have an extra entry or something since it adds that last "," which crashes the SQL....but can't figure it out since a print of the array gives: Array (
  • => [1] => 1 [2] => 4 [3] => 103 )


Any suggestions?

Br
Kristian
Logged

KristianS

  • Coppermine newbie
  • Offline Offline
  • Posts: 9
Re: PHP-Fusion and Coppermine Photo Gallery integration
« Reply #55 on: April 22, 2007, 07:59:44 pm »

Ok, more input:

It seems that in the file: udb_base.inc.php there is a check for the value primary group. This is empty, in which case it adds an empty value to the array...Where is this set and what should I do about it?

if (!in_array($pri_group, $groups)) array_push($groups, $pri_group);
Logged

KristianS

  • Coppermine newbie
  • Offline Offline
  • Posts: 9
Re: PHP-Fusion and Coppermine Photo Gallery integration
« Reply #56 on: April 23, 2007, 09:51:22 pm »

Ok I believe I have cracked it :-)

The bridge now reads the userdefined groups and adds them to the CPG tables when ever you click on the groups tab (logged in as admin). Also it reads the fusion users userdefined groups and the users current user_level. Depending of the level the user gets admin rights in CPG as well.

I would like some review, since i'am a major newbie at this (e.g. first php script ever).

Pls test/review for the following:

Security issues
Stability
Excessive use of variables etc.

Br
Kristian
Logged

KristianS

  • Coppermine newbie
  • Offline Offline
  • Posts: 9
Re: PHP-Fusion and Coppermine Photo Gallery integration
« Reply #57 on: April 24, 2007, 07:53:29 pm »

New version fixed bug if a user didn't belong to a user_defined group and only had a supergroup.
Logged

gaagaa

  • Coppermine newbie
  • Offline Offline
  • Gender: Female
  • Posts: 7
Re: PHP-Fusion and Coppermine Photo Gallery integration
« Reply #58 on: November 02, 2007, 02:01:27 pm »

i dont what i did wrong but after i put bridge on the server, when i go to gallery it redirect me to fusion site but nothing happend.. when ia back to gallery i'm still not logged..:((((
Logged

gaagaa

  • Coppermine newbie
  • Offline Offline
  • Gender: Female
  • Posts: 7
Re: PHP-Fusion and Coppermine Photo Gallery integration
« Reply #59 on: November 02, 2007, 02:02:41 pm »

my site address: www.advenduro.pl
my gallery adres: www.advenduro.pl/cpg
Logged
Pages: 1 2 [3] 4 5   Go Up
 

Page created in 0.037 seconds with 23 queries.