forum.coppermine-gallery.net
Support => cpg1.4.x Support => Older/other versions => cpg1.4 themes/skins/templates => Topic started by: dwo on June 27, 2008, 01:54:14 pm
-
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
-
test it with:
$info['link to photographer website'] = $user['user_profile1'];
-
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
-
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