clicking on most viewed image displays a white page if image's batch-uploaded clicking on most viewed image displays a white page if image's batch-uploaded
 

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

clicking on most viewed image displays a white page if image's batch-uploaded

Started by marcnyc, March 19, 2006, 01:24:21 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

marcnyc

hello, I have CPG running at www.socmail.com/gallery

if you click on "Piu' Viste" (which means "most viewed") and then you click on the picture with the asian girl in the green coat (the picture's title/comment is "Genevieve ammira le montagne...") instead of opening the picture full screen it opens a blank page with this url:

http://www.socmail.com/gallery/displayimage.php?album=topn&cat=1&pos=1

This happens with all the pictures that are in that same album, and what these pictures have in common is that they were batch-uploaded by the admin (me) using the Batch Upload feature...

is this a bug?
is there a way I can fix it?
does anybody have a suggestion?
thanks a lot!

Joachim Müller

Am I right in guessing that you have modified include/themes.inc.php ?
Post what else you have modified.

marcnyc

Except for a few minor modifications in style.css I haven't modified anything but themes.php (not themes.inc.php - are we talking about the same file)?

Here is my themes.php:

<?php
/*************************
  Coppermine Photo Gallery
  ************************
  Copyright (c) 2003-2006 Coppermine Dev Team
  v1.1 originally written by Gregory DEMAR

  This program is free software; you can redistribute it and/or modify
  it under the terms of the GNU General Public License as published by
  the Free Software Foundation; either version 2 of the License, or
  (at your option) any later version.
  ********************************************
  Coppermine version: 1.4.4
  $Source:
  $Revision:
  $Author:
  $Date:
**********************************************/

define('THEME_HAS_RATING_GRAPHICS'1);
define('THEME_HAS_NAVBAR_GRAPHICS'1);
define('THEME_HAS_FILM_STRIP_GRAPHIC'0);
define('THEME_HAS_FILM_STRIP_GRAPHICS'0);
define('THEME_IS_XHTML10_TRANSITIONAL',1);

// HTML template for template sys_menu spacer
$template_sys_menu_spacer ="::";

// HTML template for sys_menu
$template_sys_menu = <<<EOT
         |{BUTTONS}|
EOT;

// HTML template for template sys_menu spacer
$template_sys_menu_spacer ="|";

// HTML template for sys_menu
$template_sys_menu = <<<EOT
  <div class="topmenu">
          <table border="0" cellpadding="0" cellspacing="0">
                  <tr>
  {BUTTONS}
                  </tr>
          </table>
  </div>
EOT;

// HTML template for template sys_menu buttons
$template_sys_menu_button = <<<EOT
<!-- BEGIN {BLOCK_ID} -->
  <td class="admin_menu"><a href="{HREF_TGT}" title="{HREF_TITLE}">{HREF_LNK}</a></td>
<!-- END {BLOCK_ID} -->
EOT;

define('THEME_HAS_NO_SYS_MENU_BUTTONS'1);

// HTML template for sys menu
$template_sys_menu = <<<EOT

                        <table border="0" cellpadding="0" cellspacing="0">
                                <tr>
<!-- BEGIN home -->
                                        <td class="admin_menu"><a href="{HOME_TGT}" title="{HOME_TITLE}">{HOME_LNK}</td>
<!-- END home -->
<!-- BEGIN my_gallery -->
                                        <td class="admin_menu"><a href="{MY_GAL_TGT}" title="{MY_GAL_TITLE}">{MY_GAL_LNK}</td>
<!-- END my_gallery -->
<!-- BEGIN allow_memberlist -->
                                        <td class="admin_menu"><a href="{MEMBERLIST_TGT}" title="{MEMBERLIST_TITLE}">{MEMBERLIST_LNK}</td>
<!-- END allow_memberlist -->
<!-- BEGIN my_profile -->
                                        <td class="admin_menu"><a href="{MY_PROF_TGT}" title="{MY_PROF_LNK}">{MY_PROF_LNK}</td>
<!-- END my_profile -->
<!-- BEGIN faq -->
                                        <td class="admin_menu"><a href="{FAQ_TGT}" title="{FAQ_TITLE}">{FAQ_LNK}</td>
<!-- END faq -->
<!-- BEGIN enter_admin_mode -->
                                        <td class="admin_menu"><a href="{ADM_MODE_TGT}" title="{ADM_MODE_TITLE}">{ADM_MODE_LNK}</td>
<!-- END enter_admin_mode -->
<!-- BEGIN leave_admin_mode -->
<td class="admin_menu"><a href="{USR_MODE_TGT}" title="{USR_MODE_TITLE}">{USR_MODE_LNK}</td>
<!-- END leave_admin_mode -->
<!-- BEGIN upload_pic -->
                                        <td class="admin_menu"><a href="{UPL_PIC_TGT}" title="{UPL_PIC_TITLE}">{UPL_PIC_LNK}</td>
<!-- END upload_pic -->
<!-- BEGIN register -->
                                        <td class="admin_menu"><a href="{REGISTER_TGT}" title="{REGISTER_TITLE}">{REGISTER_LNK}</td>
<!-- END register -->
<!-- BEGIN login -->
                                        <td class="admin_menu"><a href="{LOGIN_TGT}" title="{LOGIN_LNK}">{LOGIN_LNK}</td>
<!-- END login -->
<!-- BEGIN logout -->
<td class="admin_menu"><a href="{LOGOUT_TGT}" title="{LOGOUT_LNK}">{LOGOUT_LNK}</td>
<!-- END logout -->
                                </tr>
                        </table>
EOT;

define('THEME_HAS_NO_SUB_MENU_BUTTONS'1);

// HTML template for sub menu
$template_sub_menu = <<<EOT

                        <table border="0" cellpadding="0" cellspacing="0">
                                <tr>
<!-- BEGIN custom_link -->
                                        <td class="admin_menu"><a href="{CUSTOM_LNK_TGT}" title="{CUSTOM_LNK_TITLE}">{CUSTOM_LNK_LNK}</td>
<!-- END custom_link -->                            
<!-- BEGIN album_list -->
                                        <td class="admin_menu"><a href="{ALB_LIST_TGT}" title="{ALB_LIST_TITLE}">{ALB_LIST_LNK}</td>
<!-- END album_list -->
                                        <td class="admin_menu"><a href="{LASTUP_TGT}" title="{LASTUP_LNK}">{LASTUP_LNK}</td>
                                        <td class="admin_menu"><a href="{LASTCOM_TGT}" title="{LASTCOM_LNK}">{LASTCOM_LNK}</td>
                                        <td class="admin_menu"><a href="{TOPN_TGT}" title="{TOPN_LNK}">{TOPN_LNK}</td>
                                        <td class="admin_menu"><a href="{TOPRATED_TGT}" title="{TOPRATED_LNK}">{TOPRATED_LNK}</td>
                                        <td class="admin_menu"><a href="{FAV_TGT}" title="{FAV_LNK}">{FAV_LNK}</td>
                                        <td class="admin_menu"><a href="{SEARCH_TGT}" title="{SEARCH_LNK}">{SEARCH_LNK}</td>
                                </tr>
                        </table>

EOT;

// Function to start a 'standard' table
function starttable($width '-1'$title ''$title_colspan '1')
{
    global 
$CONFIG;

    if (
$width == '-1'$width $CONFIG['picture_table_width'];
    if (
$width == '100%'$width $CONFIG['main_table_width'];
    if (
$title) {
        echo <<<EOT
<!-- Start standard table title -->
<table align="center" width="
$width" cellspacing="0" cellpadding="0" class="maintablea">
        <tr>
                <td>
                        <table width="100%" cellspacing="0" cellpadding="0" class="tableh1a">
                                <tr>
                                        <td class="tableh1a"></td>
                                        <td class="tableh1a" style="background-color:#58984E;font-style:bold;color:#FFFFFF;" width="100%">
$title</td>
                                        <td class="tableh1a"></td>
                                </tr>
                        </table>
                </td>
        </tr>
</table>
<!-- Start standard table -->
<table align="center" width="
$width" cellspacing="0" cellpadding="0">
  <tr>
   <td valign="top"></td>
        <td width="100%"><table width="100%" cellspacing="1" cellpadding="0" class="maintableb">

EOT;
    } else {
        echo <<<EOT

<!-- Start standard table -->
<table align="center" width="
$width" cellspacing="0" cellpadding="0">
  <tr>
   <td valign="top"></td>
        <td width="100%"><table width="100%" cellspacing="1" cellpadding="0" class="maintable">

EOT;
    }
}

function 
endtable()
{
    echo <<<EOT
        </table>
   </td>
   <td valign="top"></td>
  </tr>
</table>
<!-- End standard table -->

EOT;
}

// HTML template for title row of the thumbnail view (album title + sort options)
$template_thumb_view_title_row = <<<EOT

                        <table width="100%" cellpadding="0" cellspacing="0">
                        <tr>
                                <td width="100%" class="statlink">{ALBUM_NAME}</td>
                                <td class="sortorder_options" style="font-size: 100%;">{TITLE}</td>
                                <td class="sortorder_options" style="font-size: 100%;"><span class="statlink"><a href="thumbnails.php?album={AID}&amp;page={PAGE}&amp;sort=ta" title="{SORT_TA}">&nbsp;+&nbsp;</a></span></td>
                                <td class="sortorder_options" style="font-size: 100%;"><span class="statlink"><a href="thumbnails.php?album={AID}&amp;page={PAGE}&amp;sort=td" title="{SORT_TD}">&nbsp;-&nbsp;</a></span></td>
                                <td>&nbsp;&nbsp;</td>
                                <td class="sortorder_options" style="font-size: 100%;">{NAME}</td>
                                <td class="sortorder_options" style="font-size: 100%;"><span class="statlink"><a href="thumbnails.php?album={AID}&amp;page={PAGE}&amp;sort=na" title="{SORT_NA}">&nbsp;+&nbsp;</a></span></td>
                                <td class="sortorder_options" style="font-size: 100%;"><span class="statlink"><a href="thumbnails.php?album={AID}&amp;page={PAGE}&amp;sort=nd" title="{SORT_ND}">&nbsp;-&nbsp;</a></span></td>
                                <td>&nbsp;&nbsp;</td>
                                <td class="sortorder_options" style="font-size: 100%;">{DATE}</td>
                                <td class="sortorder_options" style="font-size: 100%;"><span class="statlink"><a href="thumbnails.php?album={AID}&amp;page={PAGE}&amp;sort=da" title="{SORT_DA}">&nbsp;+&nbsp;</a></span></td>
                                <td class="sortorder_options" style="font-size: 100%;"><span class="statlink"><a href="thumbnails.php?album={AID}&amp;page={PAGE}&amp;sort=dd" title="{SORT_DD}">&nbsp;-&nbsp;</a></span></td>
                                <td>&nbsp;&nbsp;</td>
                                <td class="sortorder_options" style="font-size: 100%;">{POSITION}</td>
                                <td class="sortorder_options" style="font-size: 100%;"><span class="statlink"><a href="thumbnails.php?album={AID}&amp;page={PAGE}&amp;sort=pa" title="{SORT_PA}">&nbsp;+&nbsp;</a></span></td>
                                <td class="sortorder_options" style="font-size: 100%;"><span class="statlink"><a href="thumbnails.php?album={AID}&amp;page={PAGE}&amp;sort=pd" title="{SORT_PD}">&nbsp;-&nbsp;</a></span></td>
                        </tr>
                        </table>

EOT;
?>

marcnyc