forum.coppermine-gallery.net

Support => cpg1.4.x Support => Older/other versions => cpg1.4 bridging => Topic started by: LrgrThnLf on February 16, 2009, 09:38:11 pm

Title: [Solved]: phpBB3.0.4 + CPG 1.4.20.. Linking phpBB profile to coppermine gallery and back..
Post by: LrgrThnLf on February 16, 2009, 09:38:11 pm
Has anyone figured out how to get phpBB3 to link to a person's CPG gallery from their profile short of having the person use their webpage link option?

1. View a profile on phpBB, have a link to take you to that person's CPG gallery or profile.
2. View a profile on CPG, have a link to take you to that person's phpBB profile.
Title: Re: phpBB3.0.4 + CPG 1.4.20.. Linking phpBB profile to coppermine gallery and back..
Post by: Joachim Müller on February 17, 2009, 09:24:12 am
We can not provide phpBB support. Having the phpBB profile display something that isn't already there would require editing of phpBB's code, which is something we're not familiar with.
Ask phpBB, not us.
Title: Re: phpBB3.0.4 + CPG 1.4.20.. Linking phpBB profile to coppermine gallery and back..
Post by: LrgrThnLf on February 17, 2009, 05:33:13 pm
I understand that the dev team here specifically work on CPG and not phpBB, but people who use phpBB + CPG often congregate here to ask integration questions, so it makes sense to ask the question here so someone who might have done it can respond.

Also, this was a two parter - how to link back from CPG to phpBB3 (a CPG editing question)..

Or, more generally, how does one edit CPG1.4.20's profile page to have a link back to the integrated board's user's profile?
Title: Re: phpBB3.0.4 + CPG 1.4.20.. Linking phpBB profile to coppermine gallery and back..
Post by: Joachim Müller on February 18, 2009, 09:24:46 am
Generally speaking: edit profile.php
We have a strict "one issue per thread" policy that you agreed to respect when signing up.
Title: Re: phpBB3.0.4 + CPG 1.4.20.. Linking phpBB profile to coppermine gallery and back..
Post by: LrgrThnLf on February 18, 2009, 09:30:32 am
Generally speaking: edit profile.php
We have a strict "one issue per thread" policy that you agreed to respect when signing up.
Heheh.. weeell.. it's a single "bidirectional" issue :D ... but I admit this could be considered semantics :)

I'll have a look at profile.php and start a separate thread if I get stuck :)
Title: Re: phpBB3.0.4 + CPG 1.4.20.. Linking phpBB profile to coppermine gallery and back..
Post by: LrgrThnLf on March 03, 2009, 09:49:19 am
Generally speaking: edit profile.php
Thankyou Joachim for the suggestion..

Took me a few goes to get my head around how profile.php worked, but I've now edited the display_profile_form_param array to add a new text entry, and a new matching entry in the form_data array to inject the actual data.

Now to tackle the phpBB side of things to link back :)
Title: Re: phpBB3.0.4 + CPG 1.4.20.. Linking phpBB profile to coppermine gallery and back..
Post by: LrgrThnLf on March 07, 2010, 01:07:54 pm
Did an upgrade recently and realised I hadn't said how I'd specifically done it..

profile.php
Code: [Select]
$display_profile_form_param = array(
    array('text', 'username', $lang_register_php['username']),
    array('text', 'reg_date', $lang_register_php['reg_date']),
    array('text', 'group', $lang_register_php['group']),
    array('text', 'user_profile1', $CONFIG['user_profile1_name']),
    array('text', 'user_profile2', $CONFIG['user_profile2_name']),
    array('text', 'user_profile3', $CONFIG['user_profile3_name']),
    array('text', 'user_profile4', $CONFIG['user_profile4_name']),
    array('text', 'user_profile5', $CONFIG['user_profile5_name']),
    array('text', 'user_profile6', $CONFIG['user_profile6_name']),
    array('text', 'pic_count', $lang_register_php['pic_count']),
    array('text', 'profile_link', 'Messageboard profile'), <--- Added this line
    array('thumb', 'user_thumb'),
    );
...
Code: [Select]
        $form_data = array('username' => $user_data['user_name'],
            'reg_date' => localised_date($user_data['user_regdate'], $register_date_fmt),
            'group' => $user_data['group_name'],
                        'user_profile1' => $user_data['user_profile1'],
                        'user_profile2' => $user_data['user_profile2'],
                        'user_profile3' => $user_data['user_profile3'],
                        'user_profile4' => $user_data['user_profile4'],
                        'user_profile5' => $user_data['user_profile5'],
                        'user_profile6' => bb_decode($user_data['user_profile6']),
                        'user_thumb' => $quick_jump,
                        'pic_count' => $pic_count,
                        'profile_link' => '<a href="http://.../phpbb3/memberlist.php?mode=viewprofile&u=' . $uid . '">' . $user_data['user_name'] . '</a>' <-- Added this line
            );

Ok, probably not the nicest way of doing it, but it achieved the purpose.