Jump to content
Fórum Script Brasil
  • 0

Sou Iniciante - Problema com Coppermine


Juverci

Question

Boa noite, amigos!

Estou iniciando meus estudo em PHP, e estou fazendo algumas alterações na Galeria de Imagem do Coppermine.

Consegui fazer muitas alterações, mas no arquivo theme.ini.php eu criei novos campos e não estou conseguindo fazer aparecer e puxar informações do banco de dados, se alguém poder me ajudar onde está erro.

estou tentando duplicar o parte {CAPTION2}, mas quando faço toda a duplicação, quando abre no site some o campo.

if (!isset($template_display_media)) { //{THEMES}

/******************************************************************************

** Section <<<$template_display_media>>> - START

******************************************************************************/

// HTML template for intermediate image display

$template_display_media = <<<EOT

<!-- BEGIN img_desc -->

<tr>

<!-- BEGIN quadrado -->

<td class="tableb tableb_alternate"><h2 class="pic_caption2">

{CAPTION2}

</h2></td>

</tr>

<!-- END quadrado -->

<tr>

<td align="center" class="tableb tableb_alternate">

{ADMIN_MENU}

</td>

</tr>

<td>

<table border="2" width="100%" align="center">

<tr>

<tr>

<td align="center" class="display_media" nowrap="nowrap">

<table width="100%" cellspacing="2" cellpadding="0">

<td class="tableh0" width="130px" align="center"><img src="images/spacer.gif" width="130" height="1" border="" alt="" /></br>Mais Fotos desse Veículo</td>

<td class="tableh1" width="800px" align="center">{TITLE}</td>

<td class="tableh0" width="130px" align="center"><img src="images/spacer.gif" width="130" height="1" border="" alt="" /></br>Mais Veículos com esse <br /> Prefixo</td>

</tr>

<!-- BEGIN caption -->

<td class="tableb tableb_alternate"><h2 class="pic_caption">

{CAPTION}

</h2></td>

<!-- END caption -->

<td align="center" style="{SLIDESHOW_STYLE}">

{IMAGE}

</td>

<!-- BEGIN caption2 -->

<td class="tableb tableb_alternate">

{CAPTION2}

</td>

<!-- END caption2 -->

</tr>

</table>

</td>

</tr>

</tr>

<tr>

<td>

<table cellpadding="0" cellspacing="0" class="tableb tableb_alternate" width="100%">

<tr>

<td class="tableb tableb_alternate"><h1 class="pic_title">

{TITLE}

</h1></td>

</tr>

<!-- END title -->

</table>

<!-- END img_desc -->

</td>

</tr>

EOT;

/******************************************************************************

** Section <<<$template_display_media>>> - END

******************************************************************************/

} //{THEMES}

/******************************************************************************

** Section <<<theme_html_picture>>> - START

******************************************************************************/

// Displays a picture

function theme_html_picture()

{

global $CONFIG, $CURRENT_PIC_DATA, $CURRENT_ALBUM_DATA, $USER, $LINEBREAK;

global $album, $lang_date, $template_display_media;

global $lang_display_image_php, $lang_picinfo, $lang_common, $lang_errors;

$superCage = Inspekt::makeSuperCage();

$pid = $CURRENT_PIC_DATA['pid'];

$pic_title = '';

if (!isset($USER['liv']) || !is_array($USER['liv'])) {

$USER['liv'] = array();

}

// Add 1 to hit counter

if ((!USER_IS_ADMIN && $CONFIG['count_admin_hits'] == 0 || $CONFIG['count_admin_hits'] == 1) && !in_array($pid, $USER['liv']) && $superCage->cookie->keyExists($CONFIG['cookie_name'] . '_data')) {

add_hit($pid);

if (count($USER['liv']) > 4) array_shift($USER['liv']);

array_push($USER['liv'], $pid);

}

if ($CURRENT_PIC_DATA['anofabricacao'] != '') {

$pic_title .= $CURRENT_PIC_DATA['anofabricacao'] . $LINEBREAK;

}

if ($CURRENT_PIC_DATA['title'] != '') {

$pic_title .= $CURRENT_PIC_DATA['title'] . $LINEBREAK;

}

if ($CURRENT_PIC_DATA['caption'] != '') {

$pic_title .= $CURRENT_PIC_DATA['caption'] . $LINEBREAK;

}

if ($CURRENT_PIC_DATA['caption2'] != '') {

$pic_title .= $CURRENT_PIC_DATA['caption2'] . $LINEBREAK;

}

if ($CURRENT_PIC_DATA['keywords'] != '') {

$pic_title .= $lang_common['keywords'] . ": " . $CURRENT_PIC_DATA['keywords'];

}

if (!$CURRENT_PIC_DATA['caption'] && !$CURRENT_PIC_DATA['title'] && !$CURRENT_PIC_DATA['caption2']) {

template_extract_block($template_display_media, 'img_desc');

} else {

if (!$CURRENT_PIC_DATA['caption']) {

template_extract_block($template_display_media, 'caption');

}

if (!$CURRENT_PIC_DATA['title']) {

template_extract_block($template_display_media, 'title');

}

if (!$CURRENT_PIC_DATA['caption2']) {

template_extract_block($template_display_media, 'caption2');

}

}

$params = array('{CELL_HEIGHT}' => '100',

'{CAPTION}' => bb_decode($CURRENT_PIC_DATA['caption']),

'{CAPTION2}' => bb_decode($CURRENT_PIC_DATA['caption2']),

'{IMAGE}' => $CURRENT_PIC_DATA['header'].$CURRENT_PIC_DATA['html'].$CURRENT_PIC_DATA['footer'],

'{ADMIN_MENU}' => $CURRENT_PIC_DATA['menu'],

'{TITLE}' => bb_decode($CURRENT_PIC_DATA['title']),

);

return template_eval($template_display_media, $params);

}

/******************************************************************************

** Section <<<theme_html_picture>>> - END

******************************************************************************/

} //{THEMES}


Link to comment
Share on other sites

0 answers to this question

Recommended Posts

There have been no answers to this question yet

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



  • Forum Statistics

    • Total Topics
      152.2k
    • Total Posts
      652k
×
×
  • Create New...