picinfo display picinfo display
 

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

picinfo display

Started by dwo, June 24, 2008, 10:24:59 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

dwo

Hello.

In theme.php I can only switch the picinfo on and off.

I displyinfo.php I can add or delete some entrys under the pic.

What I want to do is following and I found no solution yet:

I want to remove the text of the left hand side of the picinfo table under the pics called :

filename
album name
keywords
...

(so, the filename should be displayed, only before, the word filename shall vanish)


Could you tell me: is this possible?

I tried to simply edit language file, but always some : still remains.


Thank you very much, regards, Dietmar

Stramm

Copy this function into the theme.php you're actually using (themes/your_theme/theme.php) and modify it to your needs.

function theme_html_picinfo(&$info)
{
    global $lang_picinfo, $mime_content, $CONFIG, $CURRENT_PIC_DATA;
$path_to_pic = $CONFIG['fullpath'] . $CURRENT_PIC_DATA['filepath'] . $CURRENT_PIC_DATA['filename'];
if ($mime_content['content']=='movie') {
$info[$lang_picinfo['download_URL']] = '<a href="' . $CONFIG["ecards_more_pic_target"] . (substr($CONFIG["ecards_more_pic_target"], -1) == '/' ? '' : '/') . $path_to_pic.'">'. $lang_picinfo['movie_player'] .'</a>';
}

    $html = '';

    $html .= "        <tr><td colspan=\"2\" class=\"tableh2_compact\"><b>{$lang_picinfo['title']}</b></td></tr>\n";
    $template = "        <tr><td class=\"tableb_compact\" valign=\"top\" >%s:</td><td class=\"tableb_compact\">%s</td></tr>\n";
    foreach ($info as $key => $value) $html .= sprintf($template, $key, $value);

    return $html;
}


A start eg. would be to just remove {$lang_picinfo['title']}

dwo

Thank You, but I already totally deleted these lines.

$html = '';

    $html .= "        <tr><td colspan=\"2\" class=\"tableh2_compact\"><b>{$lang_picinfo['title']}</b></td></tr>\n";


from the code above.

But this only eliminates the header "File Information", not the descriptions to the right.

regards, Dietmar

dwo

Next step.

I managed to remove the automatically inserted : by removing it from the code above aster %s.

That was the first, good step.

Then I tried the second best soltuion, changing the language.php file. This worked.

$lang_picinfo = array(
  'title' =>'',
  'Filename' => '',
...



But not for the custom fields. I tried to rename/change these lines, but this did not affect the text for the custom fields.

  'Custom fields for image description (leave blank if unused)',
  array('Field 1 name', 'user_field1_name', 0, 'f=index.htm&amp;as=admin_custom_image&amp;ae=admin_custom_image_end'), //cpg1.4
  array('Field 2 name', 'user_field2_name', 0),
  array('Field 3 name', 'user_field3_name', 0),
  array('Field 4 name', 'user_field4_name', 0),


Could anyone help me there?

Thanks, Dietmar


Nibbler

Can't you just change


$template = "        <tr><td class=\"tableb_compact\" valign=\"top\" >%s:</td><td class=\"tableb_compact\">%s</td></tr>\n";


to


$template = "        <tr><td class=\"tableb_compact\" valign=\"top\" ><!-- %s: --></td><td class=\"tableb_compact\">%s</td></tr>\n";


dwo

I would call that the "egg of columbus"  ;D

Because: I already tried to delete %s

But simply commenting it out, that helped.

Thanks Nibbler!