Advanced search  

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]

Pages: 1 [2]   Go Down

Author Topic: Bildansicht ändern.  (Read 17226 times)

0 Members and 1 Guest are viewing this topic.

Hexo

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Gender: Male
  • Posts: 62
Re: Bildansicht ändern.
« Reply #20 on: June 08, 2009, 08:31:36 pm »

Verdammt. Ich suche echt den Editbutton....

Wie dem auch sei: Es klappt doch nicht. Ich hab den Header und den Footer nur wenn ich die Thumbs sehe. Sonst sind beide immer deaktiviert.

Ich hab mal so gelassen: www.emsfriends.com . Da kann man das sehen.

Meine theme.php
Code: [Select]
<?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.9
**********************************************/

// ------------------------------------------------------------------------- //
// This theme has all CORE items removed                                     //
// ------------------------------------------------------------------------- //
define('THEME_IS_XHTML10_TRANSITIONAL',1);

$chCounter_visible 0;
$chCounter_status 'active';
include( 
'/var/www/web2/web/counter/counter.php' );

// Function for writing a pageheader
function pageheader($section$meta '')
{
    global 
$CONFIG$THEME_DIR;
    global 
$template_header$lang_charset$lang_text_dir;

    global 
$PHP_SELF;
if ($PHP_SELF == 'thumbnails.php') {
$custom_header cpg_get_custom_include($CONFIG['custom_header_path']);
}

        
$charset = ($CONFIG['charset'] == 'language file') ? $lang_charset $CONFIG['charset'];

    
header('P3P: CP="CAO DSP COR CURa ADMa DEVa OUR IND PHY ONL UNI COM NAV INT DEM PRE"');
        
header("Content-Type: text/html; charset=$charset");
    
user_save_profile();

    
$template_vars = array('{LANG_DIR}' => $lang_text_dir,
        
'{TITLE}' => $CONFIG['gallery_name'] . ' - ' strip_tags(bb_decode($section)),
        
'{CHARSET}' => $charset,
        
'{META}' => $meta,
        
'{GAL_NAME}' => $CONFIG['gallery_name'],
        
'{GAL_DESCRIPTION}' => $CONFIG['gallery_description'],
        
'{SYS_MENU}' => theme_main_menu('sys_menu'),
        
'{SUB_MENU}' => theme_main_menu('sub_menu'),
        
'{ADMIN_MENU}' => theme_admin_mode_menu(),
        
'{CUSTOM_HEADER}' => $custom_header,
        );

    echo 
template_eval($template_header$template_vars);
}


// Function for writing a pagefooter
function pagefooter()
{
    
//global $HTTP_GET_VARS, $HTTP_POST_VARS, $HTTP_SERVER_VARS;
    
global $USER$USER_DATA$ALBUM_SET$CONFIG$time_start$query_stats$queries;
    global 
$template_footer;

global $PHP_SELF;
if ($PHP_SELF == 'thumbnails.php') {
$custom_footer cpg_get_custom_include($CONFIG['custom_footer_path']);
}

    if (
$CONFIG['debug_mode']==|| ($CONFIG['debug_mode']==&& GALLERY_ADMIN_MODE)) {
    
cpg_debug_output();
    }

    
$template_vars = array(
        
'{CUSTOM_FOOTER}' => $custom_footer,
        
'{VANITY}' => (defined('THEME_IS_XHTML10_TRANSITIONAL') && $CONFIG['vanity_block']) ? theme_vanity() : '',
    );

    echo 
template_eval($template_footer$template_vars);
}



// 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"><h2>{ALBUM_NAME}</h2></td>
                                <td><img src="images/spacer.gif" width="1" alt="" /></td>
                                <td class="sortorder_cell">
                                        <table cellpadding="0" cellspacing="0">
                                        <tr>
                                                <!--<td class="sortorder_options">{TITLE}</td>-->
                                                <!--<td class="sortorder_options"><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"><span class="statlink"><a href="thumbnails.php?album={AID}&amp;page={PAGE}&amp;sort=td" title="{SORT_TD}">&nbsp;-&nbsp;</a></span></td>-->
                                        </tr>
                                        <tr>
                                                <!--<td class="sortorder_options">{NAME}</td>-->
                                                <!--<td class="sortorder_options"><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"><span class="statlink"><a href="thumbnails.php?album={AID}&amp;page={PAGE}&amp;sort=nd" title="{SORT_ND}">&nbsp;-&nbsp;</a></span></td>-->
                                        </tr>
                                        <tr>
                                                <!--<td class="sortorder_options">{DATE}</td>-->
                                                <!--<td class="sortorder_options"><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"><span class="statlink"><a href="thumbnails.php?album={AID}&amp;page={PAGE}&amp;sort=dd" title="{SORT_DD}">&nbsp;-&nbsp;</a></span></td>-->
                                        </tr>
                                        <tr>
                                                <!--<td class="sortorder_options">{POSITION}</td>-->
                                                <!--<td class="sortorder_options"><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"><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>
                                </td>
                        </tr>
                        </table>

EOT;

// HTML template for thumbnails display
if (!isset($template_thumbnail_view))  //{THEMES}
$template_thumbnail_view = <<<EOT

<!-- BEGIN header -->
        <tr>
<!-- END header -->
<!-- BEGIN thumb_cell -->
        <td valign="top" class="thumbnails" width ="{CELL_WIDTH}" align="center">
         <table width="100%" cellpadding="0" cellspacing="0">
                        <tr>
                                <td align="center">
                        <a href="javascript:newwin=window.open('{LINK_TGT}', 'newwin', 'width=650,height=650'); newwin.focus();">{THUMB}<br /></a>
                                                                    {CAPTION}
                                        {ADMIN_MENU}
                                </td>
                        </tr>
                </table>
        </td>
<!-- END thumb_cell -->
<!-- BEGIN empty_cell -->
                <td valign="top" class="thumbnails" align="center">&nbsp;</td>
<!-- END empty_cell -->
<!-- BEGIN row_separator -->
        </tr>
        <tr>
<!-- END row_separator -->
<!-- BEGIN footer -->
        </tr>
<!-- END footer -->
<!-- BEGIN tabs -->
        <tr>
                <td colspan="{THUMB_COLS}" style="padding: 0px;">
                        <table width="100%" cellspacing="0" cellpadding="0">
                                <tr>
                                       {TABS}
                                </tr>
                        </table>
                </td>
        </tr>
<!-- END tabs -->
<!-- BEGIN spacer -->
        <img src="images/spacer.gif" width="1" height="7" border="" alt="" /><br />
<!-- END spacer -->

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"><h2>{ALBUM_NAME}</h2></td>
                                <td><img src="images/spacer.gif" width="1" alt="" /></td>
                                <td class="sortorder_cell">
                                        <table cellpadding="0" cellspacing="0">
                                        <tr>
                                                <!--<td class="sortorder_options">{TITLE}</td>-->
                                                <!--<td class="sortorder_options"><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"><span class="statlink"><a href="thumbnails.php?album={AID}&amp;page={PAGE}&amp;sort=td" title="{SORT_TD}">&nbsp;-&nbsp;</a></span></td>-->
                                        </tr>
                                        <tr>
                                                <!--<td class="sortorder_options">{NAME}</td>-->
                                                <!--<td class="sortorder_options"><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"><span class="statlink"><a href="thumbnails.php?album={AID}&amp;page={PAGE}&amp;sort=nd" title="{SORT_ND}">&nbsp;-&nbsp;</a></span></td>-->
                                        </tr>
                                        <tr>
                                                <!--<td class="sortorder_options">{DATE}</td>-->
                                                <!--<td class="sortorder_options"><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"><span class="statlink"><a href="thumbnails.php?album={AID}&amp;page={PAGE}&amp;sort=dd" title="{SORT_DD}">&nbsp;-&nbsp;</a></span></td>-->
                                        </tr>
                                        <tr>
                                                <!--<td class="sortorder_options">{POSITION}</td>-->
                                                <!--<td class="sortorder_options"><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"><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>
                                </td>
                        </tr>
                        </table>

EOT;

// Display the full size image
function theme_display_fullsize_pic()
{
    global 
$CONFIG$THEME_DIR$ALBUM_SET;
    global 
$lang_errors$lang_fullsize_popup$lang_charset;

    if (isset(
$_GET['picfile']))
    {
        if (!
GALLERY_ADMIN_MODEcpg_die(ERROR$lang_errors['access_denied'], __FILE____LINE__);

    
$picfile $_GET['picfile'];
    
$picname $CONFIG['fullpath'] . $picfile;
    
$imagesize = @getimagesize($picname);
    
$imagedata = array('name' => $picfile'path' => path2url($picname), 'geometry' => $imagesize[3]);
    }
    elseif (isset(
$_GET['pid']))
    {
    
$pid = (int)$_GET['pid'];
    
$sql "SELECT * " "FROM {$CONFIG['TABLE_PICTURES']} " "WHERE pid='$pid$ALBUM_SET";
    
$result cpg_db_query($sql);

    if (!
mysql_num_rows($result)) cpg_die(ERROR$lang_errors['non_exist_ap'], __FILE____LINE__);

    
$row mysql_fetch_array($result);
    
$pic_url get_pic_url($row'fullsize');
    
$geom 'width="' $row['pwidth'] . '" height="' $row['pheight'] . '"';
    
$imagedata = array('name' => $row['filename'], 'path' => $pic_url'geometry' => $geom);
    }

?>

<html>
  <head>
  <meta http-equiv="content-type" content="text/html; charset=<?php echo $CONFIG['charset'] == 'language file' $lang_charset $CONFIG['charset'?>" />
  <title><?php echo $CONFIG['gallery_name'?>: <?php echo $lang_fullsize_popup['click_to_close'];
      
?>
</title>
  <script type="text/javascript" src="scripts.js"></script>
  <style type="text/css">
  body { margin: 0; padding: 0; background-color: grey; }
  img { margin:0; padding:0; border:0; }
  #content { margin:0 auto; padding:0; border:0; }
  table { border:0; height:100%; width:100%; border-collapse:collapse}
  td {         vertical-align: middle; text-align:center; }
  </style>
  </head>
  <body>
    <script language="JavaScript" type="text/JavaScript">
      adjust_popup();
    </script>
    <table>
      <tr>
            <td>
          <div id="content">
              <?php     echo  '<a href="javascript: window.close()"><img src="'
                
htmlspecialchars($imagedata['path']) . '" '
                
$imagedata['geometry']
                . 
'alt="'
                
htmlspecialchars($imagedata['name'])
                . 
'" title="'
                
htmlspecialchars($imagedata['name'])
                . 
"\n" $lang_fullsize_popup['click_to_close']
                . 
'" /></a><br />' ."\n";
               
?>

          </div>
        </td>
      </tr>
    </table>
  </body>
</html>
<?php
}

// HTML template for e-cards
$template_ecard = <<<EOT
<html dir="{LANG_DIR}">
<head>
<meta http-equiv="content-type" content="text/html; charset={CHARSET}" />
<title>{TITLE}</title>
</head>
<body bgcolor="#FFFFFF" text="#0F5475" link="#0F5475" vlink="#0F5475" alink="#0F5475">
<br />
<p align="center"><a href="{VIEW_ECARD_TGT}"><b>{VIEW_ECARD_LNK}</b></a></p>
<table border="0px" cellspacing="0px" cellpadding="1px" align="center">
  <tr>
    <td bgcolor="#000000">
      <table border="0px" cellspacing="0px" cellpadding="10px" bgcolor="#ffffff">
        <tr>
          <td valign="top">
           <a href="{VIEW_MORE_TGT}/displayimage.php?pos=-{PID}">
                                         <img src="{PIC_URL}" border="1px" alt="" /></a>
                                         <br />
                                         <div align="center">
                                                 <h2>{PIC_TITLE}</h2>
                                         </div>

          </td>
          <td valign="top" width="300px">
            <div align="right"><img src="{URL_PREFIX}images/stamp.gif" border="0px" alt="" /></div>
            <br />
            <b><font face="arial" color="#000000" size="4">{GREETINGS}</font></b>
            <br />
            <br />
            <font face="arial" color="#000000" size="2">{MESSAGE}</font>
            <br />
            <br />
            <font face="arial" color="#000000" size="2">{SENDER_NAME}</font>
            (<a href="mailto:{SENDER_EMAIL}"><font face="arial" color="#000000" size="2">{SENDER_EMAIL}</font></a>)
          </td>
        </tr>
                <tr>
                        <td colspan="2">
                                {PIC_CAPTION}
                        </td>
                </tr>
      </table>
    </td>
  </tr>
</table>
</body>
</html>
EOT;

// plain-text template for e-cards (as fallback for clients that can't display html-formatted mails)
$template_ecard_plaintext = <<<EOT
{TITLE}
=========================================

{VIEW_ECARD_LNK_PLAINTEXT}:
{VIEW_ECARD_TGT}

{GREETINGS}


{PLAINTEXT_MESSAGE}

{SENDER_NAME} ({SENDER_EMAIL})

-----------------------------------------
EOT;
?>

Αndré

  • Administrator
  • Coppermine addict
  • ****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Bildansicht ändern.
« Reply #21 on: June 09, 2009, 07:43:30 am »

Ups. Kleiner Fehler meinerseits :P

Code: [Select]
global $PHP_SELF;
if ($PHP_SELF == 'thumbnails.php') {
$custom_header = cpg_get_custom_include($CONFIG['custom_header_path']);
}
muss natürlich
Code: [Select]
global $PHP_SELF;
if ($PHP_SELF != 'thumbnails.php') {
$custom_header = cpg_get_custom_include($CONFIG['custom_header_path']);
}
heissen.
« Last Edit: June 09, 2009, 09:06:08 am by eenemeenemuu »
Logged

Hexo

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Gender: Male
  • Posts: 62
Re: Bildansicht ändern.
« Reply #22 on: June 09, 2009, 09:03:26 am »

Ok, wieder ein schritt weiter, aber es klappt leider noch nicht so 100% wie ich mir das vorstelle.

Jetzt hab ich bei meinen Eigenen Seiten, sowie in der Albumübersicht den Header und den Footer. So soll es sein.
Wenn ich in ein Album rein gehe und die Thumbs sehe, dann ist der Footer und Header weg. Das soll so nicht sein. Dort soll eigentlich der Header und Footer auch zu sehen sein.
Wenn ich ein Thumb anklicke und das Popup sich aufmacht, ist der Header und der Footer da. Das soll so nicht sein. Genau in diesem Bild will ich den Header und Footer nicht sehen.

Gruß Hexo

Αndré

  • Administrator
  • Coppermine addict
  • ****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Bildansicht ändern.
« Reply #23 on: June 09, 2009, 09:07:41 am »

Ersetze
Code: [Select]
global $PHP_SELF;
if ($PHP_SELF != 'thumbnails.php') {
$custom_header = cpg_get_custom_include($CONFIG['custom_header_path']);
}
mit
Code: [Select]
global $PHP_SELF;
if ($PHP_SELF != 'displayimage.php') {
$custom_header = cpg_get_custom_include($CONFIG['custom_header_path']);
}
Logged

Hexo

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Gender: Male
  • Posts: 62
Re: Bildansicht ändern.
« Reply #24 on: June 09, 2009, 12:26:12 pm »

Genial. Mit Displayimage hatte ich es gestern schon probiert aber irgendwie wollte das gestern nicht.
Jetzt klappt es. Super genial.
10000000 Dank!!!!

Gruß Hexo

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Bildansicht ändern.
« Reply #25 on: June 09, 2009, 11:15:30 pm »

Dann ändere
Code: [Select]
if ($PHP_SELF == 'thumbnails.php') {in
Code: [Select]
if ($PHP_SELF == 'thumbnails.php' || $PHP_SELF == 'start.php') {
Logged

Hexo

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Gender: Male
  • Posts: 62
Re: Bildansicht ändern.
« Reply #26 on: June 10, 2009, 12:06:29 am »

Dann ändere
Code: [Select]
if ($PHP_SELF == 'thumbnails.php') {in
Code: [Select]
if ($PHP_SELF == 'thumbnails.php' || $PHP_SELF == 'start.php') {

Hey.
Ich meine nur, dass ich es mit Displayimage ausprobiert hatte, aber es klappte gestern nicht.
Anscheinend hatte ich irgendwo einen kleinen Fehler drin.
Mit dem Code von eenemeenemuu
Code: [Select]
global $PHP_SELF;
if ($PHP_SELF != 'displayimage.php') {

hat es auch wunderbar geklappt!

Danke nochmals für die Hilfen!
« Last Edit: June 11, 2009, 12:50:05 am by Joachim Müller »
Logged
Pages: 1 [2]   Go Up
 

Page created in 0.027 seconds with 20 queries.