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]   Go Down

Author Topic: Fatal error: Call to undefined function: pageheader()  (Read 4480 times)

0 Members and 1 Guest are viewing this topic.

SomethingBlue

  • Coppermine newbie
  • Offline Offline
  • Posts: 3
Fatal error: Call to undefined function: pageheader()
« on: June 13, 2006, 03:24:40 pm »

Grrr... What's wrong? I can't seem to edit the template.html without errors :(

Error:
Fatal error: Call to undefined function: pageheader() in /[path]/gallery/index.php on line 687
From:
template.html...
Code: [Select]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html dir="{LANG_DIR}">
<head>
<meta http-equiv="Content-Type" content="text/html; charset={CHARSET}" />
<meta http-equiv="Pragma" content="no-cache" />
<title>{TITLE}</title>
{META}
<link rel="stylesheet" href="themes/classic/style.css" type="text/css" />
<script type="text/javascript" src="scripts.js"></script>
<!-- $Id: template.html,v 1.6 2005/12/04 03:22:35 donnoman Exp $ -->
</head>
<body>
  {CUSTOM_HEADER}
  <table width="100%" border="0" cellpadding="20" cellspacing="20">
    <tr>
      <td valign="top" style="border: 1px solid #666666;background-color:#FFFFFF;">
        <table width="100%" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td>
              <DIV style="position: absolute; top:0px; right:0px; width:1000px; overflow:auto">


<IMG NAME="fairytale" SRC="http://fairytalebeginnings.dream-like-mist.net/FairytaleV2.png" WIDTH="1000" HEIGHT="600" BORDER="0" USEMAP="#FairytaleV2_Map">

<!-- ImageReady Slices (FairytaleV2.png) -->
<map name="FairytaleV2_Map">
<area shape="rect" alt="" coords="882,517,979,566" href="http://fairytalebeginnings.dream-like-mist.net/site.php">
<area shape="rect" alt="" coords="739,514,836,563" href="http://fairytalebeginnings.dream-like-mist.net/written.php">
<area shape="rect" alt="" coords="596,515,693,564" href="http://fairytalebeginnings.dream-like-mist.net/fiction/">
<area shape="rect" alt="" coords="452,514,549,563" href="http://fairytalebeginnings.dream-like-mist.net/media.php">
<area shape="rect" alt="" coords="309,515,406,564" href="http://fairytalebeginnings.dream-like-mist.net/gallery/">
<area shape="rect" alt="" coords="164,515,261,564" href="http://fairytalebeginnings.dream-like-mist.net/">
</map>
<!-- End ImageReady Slices -->

</DIV>

<DIV style="position: absolute; top:600px; left:199px; width:788px; overflow:auto">
            </td>
            <td width="788" align="center">
              <h1>{GAL_NAME}</h1>
              <h3>{GAL_DESCRIPTION}</h3><br />
              {SYS_MENU} <br /> {SUB_MENU}
            </td>
          </tr>
        </table>
        <table width="788" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td align="center" valign="top">
              {LANGUAGE_SELECT_FLAGS}
            </td>
          </tr>
          <tr>
            <td align="center" valign="top">
              {THEME_SELECT_LIST}
              {LANGUAGE_SELECT_LIST}
            </td>
          </tr>
        </table>
        <img src="images/spacer.gif" width="1" height="15" alt="" />
        <br />
        <table width="788" border="0" align="center" cellpadding="0" cellspacing="0">
          <tr>
            <td align="left" valign="top">
              {ADMIN_MENU}
              {GALLERY}
            </td>
          </tr>
        </table>
      </td>
    </tr>
  </table>
  {CUSTOM_FOOTER}{VANITY}
</body>
</html>
Logged

Sami

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 3686
  • BMossavari
    • My Project
Re: Fatal error: Call to undefined function: pageheader()
« Reply #1 on: June 13, 2006, 04:03:25 pm »

there is nothing wrong with your template.html , the error goes to your themes.php, posibilites:
- wrongly edited include/themes.inc.php(I think that you didn't have that file at all, it's manadatory to keep this file)
- wrongly edited theme.php


update: the only wrong thing in your template.html is a never closed div tag after your
Code: [Select]
<!-- End ImageReady Slices --></div>
« Last Edit: June 13, 2006, 04:11:49 pm by bmossavari »
Logged
‍I don't answer to PM with support question
Please post your issue to related board

SomethingBlue

  • Coppermine newbie
  • Offline Offline
  • Posts: 3
Re: Fatal error: Call to undefined function: pageheader()
« Reply #2 on: June 13, 2006, 04:27:22 pm »

Thanks.

 - include/themes.inc.php is there
 - theme.php (below)

Code: [Select]
<?php
/*************************
  Coppermine Photo Gallery
  ************************
  Copyright (c) 2003-2005 Coppermine Dev Team
  v1.1 originaly 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.3
  $Source: /cvsroot/coppermine/stable/themes/classic/theme.php,v $
  $Revision: 1.13 $
  $Author: donnoman $
  $Date: 2005/12/04 03:22:35 $
**********************************************/

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

// Added to display flim_strip
function theme_display_film_strip(&$thumb_list$nbThumb$album_name$aid$cat$pos$sort_options$mode 'thumb')
{
    global 
$CONFIG$THEME_DIR;
    global 
$template_film_strip$lang_film_strip;

    static 
$template '';
    static 
$thumb_cell '';
    static 
$empty_cell '';
    static 
$spacer '';

    if ((!
$template)) {
        
$template $template_film_strip;
        
$thumb_cell template_extract_block($template'thumb_cell');
        
$empty_cell template_extract_block($template'empty_cell');
    }

    
$cat_link is_numeric($aid) ? '' '&amp;cat=' $cat;

    
$thumbcols $CONFIG['thumbcols'];
    
$cell_width ceil(100 $CONFIG['max_film_strip_items']) . '%';

    
$i 0;
    
$thumb_strip '';
    foreach(
$thumb_list as $thumb) {
        
//modify $new_size for max dimension of thumbnails in filmstrip
        
$new_size 65;
        
preg_match('/(?<=width=")[0-9]*/',$thumb['image'],$matches,PREG_OFFSET_CAPTURE);
        
$srcWidth=$matches[0][0];
        
preg_match('/(?<=height=")[0-9]*/',$thumb['image'],$matches,PREG_OFFSET_CAPTURE);
        
$srcHeight=$matches[0][0];
        
$ratio max($srcWidth$srcHeight) / $new_size;
        
$ratio max($ratio1.0);
        
$destWidth = (int)($srcWidth $ratio);
        
$destHeight = (int)($srcHeight $ratio);
        
$thumb['image']=preg_replace('/width="[^"]*"/','width="'.$destWidth.'"',$thumb['image']);
        
$thumb['image']=preg_replace('/height="[^"]*"/','height="'.$destHeight.'"',$thumb['image']);
        
$i++;
        if (
$mode == 'thumb') {
            
$params = array('{CELL_WIDTH}' => $cell_width,
                
'{LINK_TGT}' => "displayimage.php?album=$aid$cat_link&amp;pos={$thumb['pos']}",
                
'{THUMB}' => $thumb['image'],
                
'{CAPTION}' => $thumb['caption'],
                
'{ADMIN_MENU}' => ''
                
);
        } else {
            
$params = array('{CELL_WIDTH}' => $cell_width,
                
'{LINK_TGT}' => "index.php?cat={$thumb['cat']}",
                
'{THUMB}' => $thumb['image'],
                
'{CAPTION}' => '',
                
'{ADMIN_MENU}' => ''
                
);
        }
        
$thumb_strip .= template_eval($thumb_cell$params);
    }

    if (
defined('THEME_HAS_FILM_STRIP_GRAPHICS')) {
        
$tile1 $THEME_DIR 'images/tile1.gif';
        
$tile2 $THEME_DIR 'images/tile2.gif';
    } elseif (
defined('THEME_HAS_FILM_STRIP_GRAPHIC')) {
        
$tile1=$tile2=$THEME_DIR 'images/tile.gif';
    } else {
        
$tile1=$tile2'images/tile.gif';
    }

    
$params = array('{THUMB_STRIP}' => $thumb_strip,
        
'{COLS}' => $i,
        
'{TILE1}' => $tile1,
        
'{TILE2}' => $tile2,
        );

    
ob_start();
    
starttable($CONFIG['picture_table_width']);
    echo 
template_eval($template$params);
    
endtable();
    
$film_strip ob_get_contents();
    
ob_end_clean();

    return 
$film_strip;
}
?>

Logged

Sami

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 3686
  • BMossavari
    • My Project
Re: Fatal error: Call to undefined function: pageheader()
« Reply #3 on: June 13, 2006, 04:31:23 pm »

no !! there is not include/themes.inc.php check this out http://fairytalebeginnings.dream-like-mist.net/gallery/include/themes.inc.php
- resend your include/themes.inc.php
- also I think you are using old version (1.3.3) and you should upgrade it ASAP(it's mandatory)
Logged
‍I don't answer to PM with support question
Please post your issue to related board

SomethingBlue

  • Coppermine newbie
  • Offline Offline
  • Posts: 3
Re: Fatal error: Call to undefined function: pageheader()
« Reply #4 on: June 13, 2006, 04:42:04 pm »

Will upgrade to lastest version :P
Logged

Nibbler

  • Guest
Re: Fatal error: Call to undefined function: pageheader()
« Reply #5 on: June 13, 2006, 04:45:14 pm »

Upgrading will resolve the issue, you can't use a 1.4 theme on a 1.3 gallery.
Logged
Pages: [1]   Go Up
 

Page created in 0.017 seconds with 19 queries.