[Solved]: phpBB3.0.4 + CPG 1.4.20.. Linking phpBB profile to coppermine gallery and back.. [Solved]: phpBB3.0.4 + CPG 1.4.20.. Linking phpBB profile to coppermine gallery and back..
 

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Main Menu

[Solved]: phpBB3.0.4 + CPG 1.4.20.. Linking phpBB profile to coppermine gallery and back..

Started by LrgrThnLf, February 16, 2009, 09:38:11 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

LrgrThnLf

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.

Joachim Müller

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.

LrgrThnLf

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?

Joachim Müller

Generally speaking: edit profile.php
We have a strict "one issue per thread" policy that you agreed to respect when signing up.

LrgrThnLf

Quote from: 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.
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 :)

LrgrThnLf

Quote from: Joachim Müller on February 18, 2009, 09:24:46 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 :)

LrgrThnLf

Did an upgrade recently and realised I hadn't said how I'd specifically done it..

profile.php
$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'),
    );
...        $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.