[Solved]: Add link out of user profile to picinfo [Solved]: Add link out of user profile to picinfo
 

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

[Solved]: Add link out of user profile to picinfo

Started by dwo, June 27, 2008, 01:54:14 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

dwo

Hello.

Under the picture title, I want to show a link to the website of the photographer.
The link adress is written by the user in the user profile field 1.

I changed inserted code like this in displayimage.php

$info['link to photographer website'] = $CONFIG['user_profile1_name'];

But this only gives me back the description of the user field, not its content.

$info['link to photographer website'] = $CONFIG['user_profile1'];

does not work either.

Anyone could further help, please?

Thank You.

Best, Dietmar

dawid8

test it with:

$info['link to photographer website'] = $user['user_profile1'];

dwo

no.

and an array like

for ($i = 1; $i <= 4; $i++) {
        if ($CONFIG['user_profile' . $i . '_name']) {
            if ($CURRENT_PIC_DATA['user' . $i] != "") {
                $info[$CONFIG['user_profile' . $i . '_name']] = make_clickable($CURRENT_PIC_DATA['user' . $i]);
            }
        }
    }


does not work either

regards, Dietmar

dwo

Hello.

Thanks to eenemeenemuu this is the solution to the problem:

Enter following code in displayimage.php

    global $cpg_udb;
    $user_data = $cpg_udb->get_user_infos($CURRENT_PIC_DATA['owner_id']);
    for ($i=1; $i<=6; $i++)
    {
        if ($CONFIG['user_profile'.$i.'_name'] && $user_data['user_profile'.$i])
           $info[$CONFIG['user_profile'.$i.'_name']] = process_smilies(bb_decode(make_clickable($user_data['user_profile'.$i])));
    }


if you have smilies enabled, and following code if not

    global $cpg_udb;
    $user_data = $cpg_udb->get_user_infos($CURRENT_PIC_DATA['owner_id']);
    for ($i=1; $i<=6; $i++)
    {
        if ($CONFIG['user_profile'.$i.'_name'] && $user_data['user_profile'.$i])
           $info[$CONFIG['user_profile'.$i.'_name']] = bb_decode(make_clickable($user_data['user_profile'.$i]));
    }



After

// Display picture information
function html_picinfo()
{



Thank you all for making this possible, regards, Dietmar