Author Topic: [Mod] EXIF 0.3  (Read 349893 times)

0 Members and 1 Guest are viewing this topic.

Offline artpics

  • Full Member
  • ***
  • Posts: 173
    • View Profile
    • my site
Re: [Mod] EXIF 0.3
« Reply #90 on: October 22, 2005, 09:51:07 AM »
i keep getting this error on my details page the main gallery still works though

Fatal error: Call to undefined function: exif_read_data() in /home/artpictu/public_html/gallery/includes/functions.php on line 416

is this a server issue or my codeing

RT

Offline artpics

  • Full Member
  • ***
  • Posts: 173
    • View Profile
    • my site
Re: [Mod] EXIF 0.3
« Reply #91 on: October 24, 2005, 05:29:07 AM »
okay so exif is enabled at the server

"Hello,

Exif module is complied on the server with apache, it is working fine.
If you have any more problems or questions please let us know.
Thank you.

"

so can anyone else help me use this mod

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: [Mod] EXIF 0.3
« Reply #92 on: October 24, 2005, 05:50:40 AM »
"Hello,

Exif module is complied on the server with apache, it is working fine.
If you have any more problems or questions please let us know.
Thank you.
"
doh! another "no problem on our side" issue...
acording the error message, exif is NOT ENABLED in php...

if you look in phpinfo of your server, can you see any references for exif?
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline artpics

  • Full Member
  • ***
  • Posts: 173
    • View Profile
    • my site
Re: [Mod] EXIF 0.3
« Reply #93 on: October 24, 2005, 06:22:32 AM »

"
Quote
doh! another "no problem on our side" issue...
acording the error message, exif is NOT ENABLED in php...

if you look in phpinfo of your server, can you see any references for exif?
Quote

Thanks V@nothe host just asked if i wanted exif compiled, you was right thanks will give the mod another try  :D

Offline artpics

  • Full Member
  • ***
  • Posts: 173
    • View Profile
    • my site
Re: [Mod] EXIF 0.3
« Reply #94 on: October 24, 2005, 06:37:05 AM »
 :D  thank you it now works thanks to you V@no  great stuff,  :D

Offline reklov

  • Newbie
  • *
  • Posts: 19
    • View Profile
Re: [Mod] EXIF 0.3
« Reply #95 on: November 05, 2005, 02:41:33 PM »
Hallo ich bekomme die Fehlermeldung:
Parse error: parse error, unexpected '}' in /mnt/ja2/07/460/00000013/htdocs/Album/includes/functions.php on line 835
meine Quelltexte sehen so aus:
Functions.php
Code: [Select]
<?php
/**************************************************************************
 *                                                                        *
 *    4images - A Web Based Image Gallery Management System               *
 *    ----------------------------------------------------------------    *
 *                                                                        *
 *             File: functions.php                                        *
 *        Copyright: (C) 2002 Jan Sorgalla                                *
 *            Email: jan@4homepages.de                                    *
 *              Web: http://www.4homepages.de                             *
 *    Scriptversion: 1.7                                                  *
 *                                                                        *
 *    Never released without support from: Nicky (http://www.nicky.net)   *
 *                                                                        *
 **************************************************************************
 *                                                                        *
 *    Dieses Script ist KEINE Freeware. Bitte lesen Sie die Lizenz-       *
 *    bedingungen (Lizenz.txt) für weitere Informationen.                 *
 *    ---------------------------------------------------------------     *
 *    This script is NOT freeware! Please read the Copyright Notice       *
 *    (Licence.txt) for further information.                              *
 *                                                                        *
 *************************************************************************/
if (!defined('ROOT_PATH')) {
  die(
"Security violation");
}
include(
ROOT_PATH.'includes/exif.php');
function 
get_gallery_image($image_name) {
  global 
$config;
  if (
file_exists(TEMPLATE_PATH."/images_".$config['language_dir']."/".$image_name)) {
    return 
TEMPLATE_PATH."/images_".$config['language_dir']."/".$image_name;
  }
  else {
    return 
TEMPLATE_PATH."/images/".$image_name;
  }
}

function 
is_remote($file_name) {
  return (
preg_match('#^https?\\:\\/\\/[a-z0-9\-]+\.([a-z0-9\-]+\.)?[a-z]+#i'$file_name)) ? 0;
}

function 
is_remote_file($file_name) {
  return (
preg_match("#^(https?:\/\/[a-z0-9\-]+?\.([a-z0-9\-]+\.)*[a-z]+(:[0-9]+)*\/.*?\.([a-z]{1,4})$)#is"$file_name)) ? 0;
}

function 
is_local_file($file_name) {
  return (
preg_match("#^((\.)*\/.*?\.([a-z]{1,4})$)#is"$file_name)) ? 0;
}

function 
check_remote_media($remote_media_file) {
  global 
$config;
  return (
preg_match("#^(https?:\/\/[a-z0-9\-]+?\.([a-z0-9\-]+\.)*[a-z]+(:[0-9]+)*\/.*?\.(".$config['allowed_mediatypes_match'].")$)#is"$remote_media_file)) ? 0;
}

function 
check_local_media($local_media_file) {
  global 
$config;
  return (
preg_match("#^((\.)*\/.*?\.(".$config['allowed_mediatypes_match'].")$)#is"$local_media_file)) ? 0;
}

function 
check_remote_thumb($remote_thumb_file) {
  return (
preg_match("#^(https?:\/\/[a-z0-9\-]+?\.([a-z0-9\-]+\.)*[a-z]+(:[0-9]+)*\/.*?\.(gif|jpg|jpeg|png)$)#is"$remote_thumb_file)) ? 0;
}

function 
check_local_thumb($remote_thumb_file) {
  return (
preg_match("#^((\.)*\/.*?\.(gif|jpg|jpeg|png)$)#is"$remote_thumb_file)) ? 0;
}

function 
get_file_extension($file_name) {
  
ereg("(.+)\.(.+)"basename($file_name), $regs);
  return 
strtolower($regs[2]);
}

function 
get_file_name($file_name) {
  
ereg("(.+)\.(.+)"basename($file_name), $regs);
  return 
$regs[1];
}

function 
check_media_type($file_name) {
  global 
$config;
  return (
in_array(get_file_extension($file_name), $config['allowed_mediatypes_array'])) ? 0;
}

function 
check_thumb_type($file_name) {
  return (
preg_match("#(gif|jpg|jpeg|png)$#is"$file_name)) ? 0;
}

function 
check_executable($file_name) {
  if (
substr(PHP_OS03) == "WIN" && !eregi("\.exe$"$file_name)) {
    
$file_name .= ".exe";
  }
  elseif (
substr(PHP_OS03) != "WIN") {
    
$file_name eregi_replace("\.exe$"""$file_name);
  }
  return 
$file_name;
}

function 
get_file_path($file_name ""$image_type "media"$cat_id 0$in_admin 0$return_icon 1$check_remote CHECK_REMOTE_FILES) {
  
$return_code = ($return_icon) ? ICON_PATH."/404.gif" 0;
  if (empty(
$file_name)) {
    return 
$return_code;
  }
  if (
is_remote($file_name)) {
    
$check_handle "check_remote_".$image_type;
    return (
$check_handle($file_name) && remote_file_exists($file_name$check_remote)) ? (($in_admin && !preg_match("#(gif|jpg|jpeg|png)$#is"$file_name)) ? ICON_PATH."/".get_file_extension($file_name).".gif" $file_name) : $return_code;
  }
  elseif (
is_local_file($file_name)) {
    
$check_handle "check_local_".$image_type;
    
$file_name = ($in_admin && preg_match("/^([\.]+|[^\/])/"$file_name)) ? "../".$file_name $file_name;
    if (!
file_exists($file_name)) {
      
$file_path preg_replace("/\/{2,}/""/"get_document_root()."/".$file_name);
      return (
$check_handle($file_name) && file_exists($file_path)) ? (($in_admin && !preg_match("#(gif|jpg|jpeg|png)$#is"$file_name)) ? ICON_PATH."/".get_file_extension($file_name).".gif" $file_name) : $return_code;
    }
    else {
      return 
$file_name;
    }
  }
  else {
    
$check_handle "check_".$image_type."_type";
    
$path = (($image_type == "media") ? (($cat_id) ? MEDIA_PATH."/".$cat_id MEDIA_TEMP_PATH) : (($cat_id) ? THUMB_PATH."/".$cat_id THUMB_TEMP_PATH))."/".$file_name;
    return (
$check_handle($file_name) && file_exists($path)) ? (($in_admin && !preg_match("#(gif|jpg|jpeg|png)$#is"$file_name)) ? ICON_PATH."/".get_file_extension($file_name).".gif" $path) : $return_code;
  }
}

function 
un_htmlspecialchars($chars) {
  
//$chars = preg_replace("/(&#)([0-9]*)(;)/esiU", "chr(intval('\\2'))", $chars);
  
$chars str_replace("&gt;"">"$chars);
  
$chars str_replace("&lt;""<"$chars);
  
$chars str_replace("&quot;""\""$chars);
  
$chars str_replace("&amp;""&"$chars);
  return 
$chars;
}

function 
get_iptc_info($info) {
  
$iptc_match = array();
  
$iptc_match['2#120'] = "caption";
  
$iptc_match['2#122'] = "caption_writer";
  
$iptc_match['2#105'] = "headline";
  
$iptc_match['2#040'] = "special_instructions";
  
$iptc_match['2#080'] = "byline";
  
$iptc_match['2#085'] = "byline_title";
  
$iptc_match['2#110'] = "credit";
  
$iptc_match['2#115'] = "source";
  
$iptc_match['2#005'] = "object_name";
  
$iptc_match['2#055'] = "date_created";
  
$iptc_match['2#090'] = "city";
  
$iptc_match['2#095'] = "state";
  
$iptc_match['2#101'] = "country";
  
$iptc_match['2#103'] = "original_transmission_reference";
  
$iptc_match['2#015'] = "category";
  
$iptc_match['2#020'] = "supplemental_category";
  
$iptc_match['2#025'] = "keyword";
  
$iptc_match['2#116'] = "copyright_notice";

  
$iptc iptcparse($info);
  
$iptc_array = array();
  if (
is_array($iptc)) {
    foreach (
$iptc as $key => $val) {
      if (isset(
$iptc_match[$key])) {
        
$iptc_info "";
        foreach (
$val as $val2) {
          
$iptc_info .= (($iptc_info != "" ) ? ", " "").$val2;
        }
        if (
$key == "2#055") {
          
$iptc_array[$iptc_match[$key]] = preg_replace("/([0-9]{4})([0-9]{2})([0-9]{2})/""\\3.\\2.\\1"$iptc_info);
        }
        else {
          
$iptc_array[$iptc_match[$key]] = replace_url($iptc_info);
        }
      }
    }
  }
  return 
$iptc_array;
}

function 
show_image($image_row$mode ""$show_link 1$detailed_view 0) {
  global 
$self_url$site_template$site_sess$user_info$config$cat_cache$lang$additional_image_fields$user_table_fields$url_show_profile;

  
$is_new = ($image_row['image_date'] >= (time() - 60 60 24 $config['new_cutoff'])) ? 0;
  
$description = (!empty($image_row['image_description'])) ? format_text($image_row['image_description'], 1) : REPLACE_EMPTY;

  if (!empty(
$image_row['image_keywords'])) {
    
$split_keywords explode(" "$image_row['image_keywords']);
    
$keywords "";
    foreach (
$split_keywords as $key => $val) {
      
$keywords .= (($keywords != "" ) ? ", " "")."<a href=\"".$site_sess->url(ROOT_PATH."search.php?search_keywords=".urlencode($val))."\">$val</a>";
    }
  }
  else {
    
$keywords REPLACE_EMPTY;
  }

  if (!
check_permission("auth_readcomment"$image_row['cat_id'])) {
    
$image_row['image_allow_comments'] = 0;
  }

  
$num_comments = ($image_row['image_allow_comments'] == 1) ? $image_row['image_comments'] : "";

  if (
$user_info['user_level'] != GUEST) {
    
$lightbox_url $self_url;
    
$lightbox_url .= (!empty($mode)) ? ((preg_match("/\?/"$lightbox_url)) ? "&amp;" "?")."mode=".$mode "";
    
$lightbox_url .= preg_match("/\?/"$lightbox_url) ? "&amp;" "?";
    if (
check_lightbox($image_row['image_id'])) {
      
$lightbox_url .= "action=removefromlightbox&amp;id=".$image_row['image_id'];
      
$lightbox_button "<a href=\"".$site_sess->url($lightbox_url)."\"><img src=\"".get_gallery_image("lightbox_yes.gif")."\" border=\"0\" alt=\"\" /></a>";
    }
    else {
      
$lightbox_url .= "action=addtolightbox&amp;id=".$image_row['image_id'];
      
$lightbox_button "<a href=\"".$site_sess->url($lightbox_url)."\"><img src=\"".get_gallery_image("lightbox_no.gif")."\" border=\"0\" alt=\"\" /></a>";
    }
  }
  else {
    
$lightbox_button "<img src=\"".get_gallery_image("lightbox_off.gif")."\" border=\"0\" alt=\"\" />";
  }

  if (!
check_permission("auth_download"$image_row['cat_id'])) {
    
$download_button "<img src=\"".get_gallery_image("download_off.gif")."\" border=\"0\" alt=\"\" />";
    
$download_zip_button = (function_exists("gzcompress") && function_exists("crc32")) ? "<img src=\"".get_gallery_image("download_zip_off.gif")."\" border=\"0\" alt=\"\" />" "";
    
$allow_download 0;
  }
  else {
    
$target = (!empty($image_row['image_download_url']) && !is_remote_file($image_row['image_download_url']) && !is_local_file($image_row['image_download_url'])) ? "target=\"_blank\"" "";
    
$download_button "<a href=\"".$site_sess->url(ROOT_PATH."download.php?".URL_IMAGE_ID."=".$image_row['image_id'])."\"".$target."><img src=\"".get_gallery_image("download.gif")."\" border=\"0\" alt=\"\" /></a>";
    
$download_zip_button = ($target == "" && function_exists("gzcompress") && function_exists("crc32")) ? "<a href=\"".$site_sess->url(ROOT_PATH."download.php?action=zip&amp;".URL_IMAGE_ID."=".$image_row['image_id'])."\"".$target."><img src=\"".get_gallery_image("download_zip.gif")."\" border=\"0\" alt=\"\" /></a>" "";
    
$allow_download 1;
  }

  if (!
check_permission("auth_sendpostcard"$image_row['cat_id'])) {
    
$postcard_button "<img src=\"".get_gallery_image("postcard_off.gif")."\" border=\"0\" alt=\"\" />";
  }
  else {
    
$postcard_button "<a href=\"".$site_sess->url(ROOT_PATH."postcards.php?".URL_IMAGE_ID."=".$image_row['image_id'].((!empty($mode)) ? "&amp;mode=".$mode ""))."\"><img src=\"".get_gallery_image("postcard.gif")."\" border=\"0\" alt=\"\" /></a>";
  }

  if (!
check_permission("auth_viewimage"$image_row['cat_id']) || !check_permission("auth_viewcat"$image_row['cat_id'])) {
    
$show_link 0;
  }

  
$file_size "n/a";
  if (!
is_remote($image_row['image_media_file'])) {
    if (
$file_size = @filesize(MEDIA_PATH."/".$image_row['cat_id']."/".$image_row['image_media_file'])) {
      
$file_size format_file_size($file_size);
    }
  }
  elseif (
$detailed_view) {
    
$file_size get_remote_file_size($image_row['image_media_file']);
  }

  if (isset(
$image_row[$user_table_fields['user_name']]) && $image_row['user_id'] != GUEST) {
    
$user_name $image_row[$user_table_fields['user_name']];
    
    
$user_profile_link = (!empty($url_show_profile)) ? preg_replace("/{user_id}/"$image_row['user_id'], $url_show_profile) : ROOT_PATH."member.php?action=showprofile&amp;".URL_USER_ID."=".$image_row['user_id'];
    
$user_name_link "<a href=\"".$site_sess->url($user_profile_link)."\">".$user_name."</a>";
  }
  else {
    
$user_name $lang['userlevel_guest'];
    
$user_name_link $user_name;
  }

  
$site_template->register_vars(array(
    
"image_id" => $image_row['image_id'],
    
"user_id" => $image_row['user_id'],
    
"user_name" => $user_name,
    
"user_name_link" => $user_name_link,
    
"image_name" => $image_row['image_name'],
    
"image_description" => $description,
    
"image_keywords" => $keywords,
    
"image_date" => format_date($config['date_format']." ".$config['time_format'],$image_row['image_date']),
    
"image_is_new" => $is_new,
    
"lang_new" => $lang['new'],
    
"image_active" => $image_row['image_active'],
    
"cat_id" => $image_row['cat_id'],
    
"cat_name" => $image_row['cat_name'],
    
"cat_url" => $site_sess->url(ROOT_PATH."categories.php?".URL_CAT_ID."=".$image_row['cat_id']),
    
"image_downloads" => $image_row['image_downloads'],
    
"image_votes" => $image_row['image_votes'],
    
"image_rating" => $image_row['image_rating'],
    
"image_hits" => $image_row['image_hits'],
    
"allow_comments" => $image_row['image_allow_comments'],
    
"lang_comments" => $lang['comments'],
    
"image_comments" => $num_comments,
    
"lightbox_button" => $lightbox_button,
    
"postcard_button" => $postcard_button,
    
"download_button" => $download_button,
    
"download_zip_button" => $download_zip_button,
    
"image_download_url" => $image_row['image_download_url'],
    
"allow_download" => $allow_download,
    
"url_download" => $site_sess->url(ROOT_PATH."download.php?".URL_IMAGE_ID."=".$image_row['image_id']),
    
"image_file_size" => $file_size,
    
"image" => get_media_code($image_row['image_media_file'], $image_row['image_id'], $image_row['cat_id'], $image_row['image_name'], $mode$show_link$detailed_view),
    
"thumbnail" => get_thumbnail_code($image_row['image_media_file'], $image_row['image_thumb_file'], $image_row['image_id'], $image_row['cat_id'], $image_row['image_name'], $mode$show_link),
    
"thumbnail_openwindow" => get_thumbnail_code($image_row['image_media_file'], $image_row['image_thumb_file'], $image_row['image_id'], $image_row['cat_id'], $image_row['image_name'], $mode$show_link1),
    
"image_file_name" => $image_row['image_media_file'],
    
"thumbnail_file_name" => $image_row['image_thumb_file']
  ));

  if (!empty(
$additional_image_fields)) {
    
$additional_field_array = array();
    foreach (
$additional_image_fields as $key => $val) {
      
$additional_field_array[$key] = (!empty($image_row[$key])) ? format_text($image_row[$key], 1) : REPLACE_EMPTY;
      
$additional_field_array['lang_'.$key] = $val[0];
    }
    if (!empty(
$additional_field_array)) {
      
$site_template->register_vars($additional_field_array);
    }
  }

  
$rate_form "";
  if (
check_permission("auth_vote"$image_row['cat_id'])) {
    
$site_template->register_vars("rate"$lang['rate']);
    
$rate_form $site_template->parse_template("rate_form");
  }
  
$site_template->register_vars("rate_form"$rate_form);
  return 
true;
}

function 
get_thumbnail_code($media_file_name$thumb_file_name ""$image_id$cat_id$image_name ""$mode ""$show_link 1$open_window 0) {
  global 
$site_sess$config;

  if (!
check_media_type($media_file_name)) {
    
$thumb "<img src=\"".ICON_PATH."/404.gif\" border=\"0\" alt=\"\" />";
  }
  else {
    if (!
get_file_path($thumb_file_name"thumb"$cat_id00)) {
      
$file_src ICON_PATH."/".get_file_extension($media_file_name).".gif";
      
$image_info = @getimagesize($dummy);
      
$width_height = (!empty($image_info[3])) ? " ".$image_info[3] : "";
      
$thumb "<img src=\"".$file_src."\" border=\"0\"".$width_height." alt=\"".$image_name."\" />";
    }
    else {
      
$file_src get_file_path($thumb_file_name"thumb"$cat_id01);
      
$image_info = @getimagesize($file_src);
      
$width_height = (!empty($image_info[3])) ? " ".$image_info[3] : "";
      
$thumb "<img src=\"".$file_src."\" border=\"".$config['image_border']."\"".$width_height." alt=\"".$image_name."\" />";
    }
  } 

  if (
$show_link) {
    if (
$open_window) {
      
$thumb "<a href=\"".$site_sess->url(ROOT_PATH."details.php?".URL_IMAGE_ID."=".$image_id.((!empty($mode)) ? "&amp;mode=".$mode ""))."\" onclick=\"opendetailwindow()\" target=\"detailwindow\">".$thumb."</a>";
    }
    else {
      
$thumb "<a href=\"".$site_sess->url(ROOT_PATH."details.php?".URL_IMAGE_ID."=".$image_id.((!empty($mode)) ? "&amp;mode=".$mode ""))."\">".$thumb."</a>";
    }
  }
  return 
$thumb;
}

function 
get_media_code($media_file_name$image_id 0$cat_id 0$image_name ""$mode ""$show_link 0$detailed_view 0) {
  global 
$site_template$site_sess$lang$mode;

  if (!
get_file_path($media_file_name"media"$cat_id00)) {
    
$media "<img src=\"".ICON_PATH."/404.gif\" border=\"0\" alt=\"\" />";
    
$site_template->register_vars("iptc_info""");
  }
  else {
    
$media_src get_file_path($media_file_name"media"$cat_id01);
    
$file_extension get_file_extension($media_file_name);
    
$media_icon "<img src=\"".ICON_PATH."/".$file_extension.".gif\" border=\"0\" alt=\"".$image_name."\" />";
    if (
$show_link) {
      
$media_icon "<a href=\"".$site_sess->url(ROOT_PATH."details.php?".URL_IMAGE_ID."=".$image_id.((!empty($mode)) ? "&amp;mode=".$mode ""))."\">".$media_icon."</a>";
    }
    
$width_height "";
    
$width "";
    
$height "";
    
$iptc_info "";
    
$src = (!file_exists($media_src) && file_exists(preg_replace("/\/{2,}/""/"get_document_root()."/".$media_src))) ? preg_replace("/\/{2,}/""/"get_document_root()."/".$media_src) : $media_src;
    if (
$image_info = @getimagesize($src$info)) {
      
$width_height " ".$image_info[3];
      
$width $image_info[0];
      
$height $image_info[1];
      if (
$detailed_view && isset($info['APP13'])) {
        
$iptc_array get_iptc_info($info['APP13']);
        
$bgcounter 0;
        foreach (
$iptc_array as $key => $val) {
          
$row_bg_number = ($bgcounter++ % == 0) ? 2;
          
$site_template->register_vars(array(
            
"iptc_value" => $val,
            
"iptc_name" => $lang['iptc_'.$key],
            
"row_bg_number" => $row_bg_number
          
));
          
$iptc_info .= $site_template->parse_template("iptc_bit");
        }
      }
  
define('BACKUPDIR'"/home/huellasp/public_html/4images/backupimages");
    
$exif_info "";
$src_backup BACKUPDIR."/".$cat_id."/".$media_file_name;
      if (((
$file_extension == "jpg") || ($file_extension == "jpeg")) &&($detailed_view)) {
        
$exif exif_read_data ($src_backup,'IFD0');
        
$bgcounter 0;
        if (
$exif) {
          
$exif exif_read_data ($src_backup,0,true);              
          foreach(
$exif as $key=>$section) {
            if ((
$key == "IFD0") || ($key == "EXIF")) {
              foreach(
$section as $name=>$val) {
                 if (!(
exif_filter($name)) && exif_filter_control()) continue;
                
$row_bg_number = ($bgcounter++ % == 0) ? 2;
                
$site_template->register_vars(array(
                  
"exif_value" => exif_parse_value($name$val),
                  
"exif_name" => $name ":",
                  
"row_bg_number" => $row_bg_number
                
));
                
$exif_info .= $site_template->parse_template("exif_bit");
              }
            }
          }
        }
      }
    }
     
$site_template->register_vars(array(
      
"media_src" => $media_src,
      
"media_icon" => $media_icon,
      
"image_name" => $image_name,
      
"width_height" => $width_height,
      
"width" => $width,
      
"height" => $height,
      
"iptc_info" => $iptc_info,
      
"exif_info" => $exif_info
    
));
    
$media $site_template->parse_template("media/".$file_extension);
  }
  return 
$media;
}

function 
get_random_image_cache() {
  global 
$site_db$cat_cache$total_images;

  
$random_image_cache = array();
  
$cat_id_sql get_auth_cat_sql("auth_viewcat""NOTIN");

  if (
SHOW_RANDOM_CAT_IMAGE) {
    
$sql "SELECT DISTINCT i.image_id, i.cat_id, i.user_id, i.image_name, i.image_description, i.image_keywords, i.image_date, i.image_active, i.image_media_file, i.image_thumb_file, i.image_download_url, i.image_allow_comments, i.image_comments, i.image_downloads, i.image_votes, i.image_rating, i.image_hits, c.cat_name".get_user_table_field(", u.""user_name").
            FROM "
.IMAGES_TABLE." i,  ".CATEGORIES_TABLE." c 
            LEFT JOIN "
.USERS_TABLE." u ON (".get_user_table_field("u.""user_id")." = i.user_id) 
            WHERE i.image_active = 1 AND i.cat_id NOT IN (
$cat_id_sql) AND c.cat_id = i.cat_id 
            ORDER BY RAND()"
;
    
$result $site_db->query($sql);
    while (
$row $site_db->fetch_array($result)) {
      
$random_image_cache[$row['cat_id']] = $row;
    }
  }
  else {
    if (empty(
$total_images)) {
      
$sql "SELECT COUNT(*) as total_images 
              FROM "
.IMAGES_TABLE.
              WHERE image_active = 1 AND cat_id NOT IN (
$cat_id_sql)";
      
$row $site_db->query_firstrow($sql);
      
$total_images $row['total_images'];
    }
    if (empty(
$total_images)) {
      return 
$random_image_cache;
    }
    
mt_srand((double)microtime() * 1000000);
    
$number = ($total_images 1) ? mt_rand(0$total_images 1) : 0;

    
$sql "SELECT i.image_id, i.cat_id, i.user_id, i.image_name, i.image_description, i.image_keywords, i.image_date, i.image_active, i.image_media_file, i.image_thumb_file, i.image_download_url, i.image_allow_comments, i.image_comments, i.image_downloads, i.image_votes, i.image_rating, i.image_hits, c.cat_name".get_user_table_field(", u.""user_name").
            FROM "
.IMAGES_TABLE." i,  ".CATEGORIES_TABLE." c 
            LEFT JOIN "
.USERS_TABLE." u ON (".get_user_table_field("u.""user_id")." = i.user_id) 
            WHERE i.image_active = 1 AND i.cat_id NOT IN (
$cat_id_sql) AND c.cat_id = i.cat_id 
            LIMIT 
$number, 1";
    
$random_image_cache[0] = $site_db->query_firstrow($sql);
  }
  return 
$random_image_cache;
}

function 
get_random_image($cat_id 0$show_link 1$return_file 0) {
  global 
$site_template$random_image_cache;

  if (!isset(
$random_image_cache)) {
    
$random_image_cache get_random_image_cache();
  }

  if (
$cat_id && SHOW_RANDOM_CAT_IMAGE) {
    
$template 'random_cat_image';
    
$category_id $cat_id;
  }
  else {
    
$template 'random_image';
    if (
SHOW_RANDOM_CAT_IMAGE) {
      
srand((float)microtime() * 1000000);
      
$category_id array_rand($random_image_cache);
    }
    else {
      
$category_id 0;
    }
  }

  if (!empty(
$random_image_cache[$category_id])) {
    if (!
$return_file) {
      
show_image($random_image_cache[$category_id], ""$show_link);
      
$random_image $site_template->parse_template($template);
      return 
$random_image;
    }
    else {
      return 
get_file_path($random_image_cache[$category_id]['image_thumb_file'], "thumb"$category_id01);
    }
  }
}

function 
format_file_size($file_size 0) {
  
$file_size intval($file_size);
  if (!
$file_size) {
    return 
"n/a";
  }
  if (
strlen($file_size) <= && strlen($file_size) >= 7) {
    
$file_size number_format($file_size 1048576,1);
    return 
$file_size."&nbsp;MB";
  }
  elseif (
strlen($file_size) >= 10) {
    
$file_size number_format($file_size 1073741824,1);
    return 
$file_size."&nbsp;GB";
  }
  else {
    
$file_size number_format($file_size 1024,1);
    return 
$file_size."&nbsp;KB";
  }
}

function 
get_remote_file_size($file_path) {
  
ob_start();
  @
readfile($file_path);
  
$file_data ob_get_contents();
  
ob_end_clean();
  return 
format_file_size(strlen($file_data));
}

function 
update_comment_count($image_id 0$user_id 0) {
  global 
$site_db$user_table_fields;
  if (
$image_id) {
    
$sql "SELECT COUNT(comment_id) AS comments 
            FROM "
.COMMENTS_TABLE.
            WHERE image_id = 
$image_id";
    
$countcomments $site_db->query_firstrow($sql);
    
$sql "UPDATE ".IMAGES_TABLE.
            SET image_comments = "
.$countcomments['comments'].
            WHERE image_id = 
$image_id";
    
$site_db->query($sql);
  }
  if (
$user_id != GUEST && $user_id && !empty($user_table_fields['user_comments'])) {
    
$sql "SELECT COUNT(comment_id) AS comments
            FROM "
.COMMENTS_TABLE."
            WHERE user_id = 
$user_id";
    
$countcomments $site_db->query_firstrow($sql);
    
$sql "UPDATE ".USERS_TABLE.
            SET "
.get_user_table_field("""user_comments")." = ".$countcomments['comments'].
            WHERE "
.get_user_table_field("""user_id")." = $user_id";
    
$site_db->query($sql);
  }
}

function 
update_image_rating($image_id$rating) {
  global 
$site_db;
  
$sql "SELECT cat_id, image_votes, image_rating 
          FROM "
.IMAGES_TABLE.
          WHERE image_id = 
$image_id";
  
$image_row $site_db->query_firstrow($sql);
  if (
check_permission("auth_vote"$image_row['cat_id'])) {
    
$old_votes $image_row['image_votes'];
    
$old_rating $image_row['image_rating'];
    
$new_rating = (($old_rating $old_votes) + $rating) / ($old_votes 1);
    
$new_rating sprintf("%.2f"$new_rating);
    
$sql "UPDATE ".IMAGES_TABLE.
            SET image_votes = (
$old_votes + 1), image_rating = '$new_rating
            WHERE image_id = 
$image_id";
    
$site_db->query($sql);
  }
}

function 
check_email($email) {
  return (
preg_match('/^[-!#$%&\'*+\\.\/0-9=?A-Z^_`{|}~]+@([-0-9A-Z]+\.)+([0-9A-Z]){2,4}$/i'$email)) ? 0;
}

function 
format_date($format$timestamp) {
  global 
$user_info;
  
$timezone_offset = (defined("TIME_OFFSET")) ? TIME_OFFSET 0;
  return 
date($format$timestamp + (3600 $timezone_offset));
}

function 
format_url($url) {
  if (!
preg_match("/^http:\/\//i"$url)) {
    
$url "http://".$url;
  }
  if (!
preg_match("/^https?\\:\\/\\/[a-z0-9\-]+\.([a-z0-9\-]+\.)?[a-z]+/i"$url)) {
    
$url "";
  }
  return 
$url;
}

function 
replace_url($text) {
  
$text " ".$text." ";
  
$url_search_array = array(
    
"#([^]_a-z0-9-=\"'\/])([a-z]+?)://([^, \(\)<>\n\r]+)#si",
    
"#([^]_a-z0-9-=\"'\/])www\.([a-z0-9\-]+)\.([a-z0-9\-.\~]+)((?:/[^, \(\)<>\n\r]*)?)#si"
  
);

  
$url_replace_array = array(
    
"\\1<a href=\"\\2://\\3\" target=\"_blank\">\\2://\\3</a>",
    
"\\1<a href=\"http://www.\\2.\\3\\4\" target=\"_blank\">www.\\2.\\3\\4</a>"
  
);
  
$text preg_replace($url_search_array$url_replace_array$text);

  if (
strpos($text"@")) {
    
$text preg_replace("#([\n ])([a-z0-9\-_.]+?)@([\w\-]+\.([\w\-\.]+\.)?[\w]+)#i""\\1<a href=\"mailto:\\2@\\3\">\\2@\\3</a>"$text);
  }
  return 
trim($text);
}

function 
replace_badwords($text) {
  global 
$config$split_badwords;
  if (
$config['badword_list'] != "") {
    if (!isset(
$split_badwords)) {
      
$badwords trim($config['badword_list']);
      
$badwords preg_replace("/[\n\r]/is"" "$badwords);
      
$badwords str_replace(","," ",$badwords);
      
$badwords preg_quote($badwords);
      
$badwords str_replace('/''\\/'$badwords);
      
$split_badwords preg_split("/\s+/"$badwords);
    }

    foreach (
$split_badwords as $key => $val) {
      if (
$val != "") {
        if (
substr($val02) == "\\{") {
          
$val substr($val2, -2);
          
$text trim(preg_replace("/([^A-Za-z])".$val."(?=[^A-Za-z])/si""\\1".str_repeat($config['badword_replace_char'], strlen($val)), $text "));
        }
        else {
          
$text trim(preg_replace("/$val/si"str_repeat($config['badword_replace_char'], strlen($val)), $text "));
        }
      }
    }
  }
  return 
$text;
}

function 
format_text($text$html 0$word_wrap 0$bbcode 0$bbcode_img 0) {
  
$text trim($text);
  if (
$word_wrap && $text != "") {
    
$text preg_replace("/([^\n\r ?&\.\/<>\"\\-]{".$word_wrap."})/i"" \\1\n"$text);
  }

  if (
$html == 0) {
    
$text str_replace("&lt;""&amp;lt;"$text);
    
$text str_replace("&gt;""&amp;gt;"$text);
    
$text str_replace("<""&lt;"$text);
    
$text str_replace(">""&gt;"$text);
  }
  
$text str_replace("\n""<br />"$text);
  
$text replace_url($text);

  if (
$bbcode == 1) {
    
$search_array = array(
      
"/(\[)(list)(=)(['\"]?)([^\"']*)(\\4])(.*)(\[\/list)(((=)(\\4)([^\"']*)(\\4]))|(\]))/siU",
      
"/(\[)(list)(])(.*)(\[\/list\])/siU",
      
"/(\[\*\])/siU",
      
"/(\[)(url)(=)(['\"]?)(www\.)([^\"']*)(\\4])(.*)(\[\/url\])/siU",
      
"/(\[)(url)(=)(['\"]?)([^\"']*)(\\4])(.*)(\[\/url\])/siU",
      
"/(\[)(url)(])(www\.)([^\"]*)(\[\/url\])/siU",
      
"/(\[)(url)(])([^\"]*)(\[\/url\])/siU",
      
"/(\[)(code)(])(\r\n)*(.*)(\[\/code\])/siU",
      
"/javascript:/si",
      
"/about:/si"
    
);
    
$replace_array = array(
      
"<ol type=\"\\5\">\\7</ol>",
      
"<ul>\\4</ul>",
      
"<li>",
      
"<a href=\"http://www.\\6\" target=\"_blank\">\\8</a>",
      
"<a href=\"\\5\" target=\"_blank\">\\7</a>",
      
"<a href=\"http://www.\\5\" target=\"_blank\">www.\\5</a>",
      
"<a href=\"\\4\" target=\"_blank\">\\4</a>",
      
"<pre>Code:<hr size=1>\\5<hr size=1></pre>",
      
"java script:",
      
"about :"
    
);
    
$text preg_replace($search_array$replace_array$text);
    if (!
$bbcode_img)  {
      
$text preg_replace("/(\[)(img)(])(\r\n)*([^\"]*)(\[\/img\])/siU""<a href=\"\\5\" target=\"_blank\">\\5</a>"$text);
    }
    else  {
      
$text preg_replace("/(\[)(img)(])(\r\n)*([^\"]*)(\[\/img\])/siU""<img src=\"\\5\">"$text);
    }
    
$text preg_replace("/(\[)(b)(])(\r\n)*([^\"]*)(\[\/b\])/siU""<b>\\5</b>"$text);
    
$text preg_replace("/(\[)(i)(])(\r\n)*([^\"]*)(\[\/i\])/siU""<i>\\5</i>"$text);
    
$text preg_replace("/(\[)(u)(])(\r\n)*([^\"]*)(\[\/u\])/siU""<u>\\5</u>"$text);
  }
  
$text str_replace("\\'""'"$text);
  return 
replace_badwords($text);
}

function 
get_user_info($user_id 0) {
  global 
$site_db$user_table_fields;
  
$user_info 0;
  if (
$user_id != && $user_id != GUEST) {
    
$sql "SELECT *
            FROM "
.USERS_TABLE."
            WHERE "
.get_user_table_field("""user_id")." = $user_id";
    if (
$user_info $site_db->query_firstrow($sql)) {
      foreach (
$user_table_fields as $key => $val) {
        if (isset(
$user_info[$val])) {
          
$user_info[$key] = $user_info[$val];
        }
        elseif (!isset(
$user_info[$key])) {
          
$user_info[$key] = "";
        }
      }
    }
  }
  return 
$user_info;
}

function 
get_icq_status($uin) {
  
// From: http://www.koehntopp.de/php/snippets.html#code-icq
  
if (!is_numeric($uin)) return FALSE;

  
$fp = @fsockopen('wwp.icq.com'80$errno$errstr8);
  if (!
$fp) return FALSE;

  
$request "HEAD /scripts/online.dll?icq=$uin&img=5 HTTP/1.0\r\n"
            
."Host: wwp.icq.com\r\n"
            
."Connection: close\r\n\r\n";
  
fputs($fp$request);

  do {
     
$response fgets($fp1024);
  }
  while (!
feof($fp) && !stristr($response'Location'));

  
fclose($fp);

  if (
strstr($response'4367')) return 'online';
  if (
strstr($response'4349')) return 'offline';
  if (
strstr($response'4386')) return 'disabled';
  return 
FALSE;
}

function 
add_to_lightbox($id) {
  global 
$user_info$site_db;
  
$id intval($id);
  if (!
$id) {
    return 
false;
  }
  
$lightbox_ids $user_info['lightbox_image_ids'];
  
$lightbox_array explode(" "$lightbox_ids);
  if (!
in_array($id$lightbox_array)) {
    
$lightbox_ids .= " ".$id;
  }
  
$user_info['lightbox_image_ids'] = trim($lightbox_ids);
  
$user_info['lightbox_lastaction'] = time();
  
$sql "UPDATE ".LIGHTBOXES_TABLE.
          SET lightbox_lastaction = "
.$user_info['lightbox_lastaction'].", lightbox_image_ids = '".$user_info['lightbox_image_ids']."' 
          WHERE user_id = "
.$user_info['user_id'];
  return (
$site_db->query($sql)) ? 0;
}

function 
remove_from_lightbox($id) {
  global 
$user_info$site_db;
  
$lightbox_array explode(" ",$user_info['lightbox_image_ids']);
  foreach (
$lightbox_array as $key => $val) {
    if (
$val == $id) {
      unset(
$lightbox_array[$key]);
    }
  }
  
$user_info['lightbox_image_ids'] = trim(implode(" "$lightbox_array));
  
$user_info['lightbox_lastaction'] = time();
  
$sql "UPDATE ".LIGHTBOXES_TABLE.
          SET lightbox_lastaction = "
.$user_info['lightbox_lastaction'].", lightbox_image_ids = '".$user_info['lightbox_image_ids']."' 
          WHERE user_id = "
.$user_info['user_id'];
  return (
$site_db->query($sql)) ? 0;
}

function 
clear_lightbox() {
  global 
$user_info$site_db;
  
$current_time time();
  
$sql "UPDATE ".LIGHTBOXES_TABLE.
          SET lightbox_image_ids = '', lightbox_lastaction = 
$current_time 
          WHERE user_id = "
.$user_info['user_id'];
  if (
$site_db->query($sql)) {
    
$user_info['lightbox_image_ids'] = "";
    
$user_info['lightbox_lastaction'] = $current_time;
    return 
true;
  }
  else {
    return 
false;
  }
}

function 
check_lightbox($id) {
  global 
$user_info;
  
$lightbox_array explode(" "$user_info['lightbox_image_ids']);
  return 
in_array($id$lightbox_array);
}

function 
get_random_key($db_table ""$db_column "") {
  global 
$site_db;
  
$key md5(uniqid(microtime()));
  if (
$db_table != "" && $db_column != "") {
    
$i 0;
    while (
$i == 0) {
      
$sql "SELECT ".$db_column.
              FROM "
.$db_table.
              WHERE "
.$db_column." = '$key'";
      if (
$site_db->is_empty($sql)) {
        
$i 1;
      }
      else {
        
$i 0;
        
$key md5(uniqid(microtime()));
      }
    }
  }
  return 
$key;
}

function 
get_subcat_ids($cid 0$cat_id 0$cat_parent_cache) {
  global 
$subcat_ids;

  if (!isset(
$cat_parent_cache[$cid])) {
    return 
false;
  }
  foreach (
$cat_parent_cache[$cid] as $key => $val) {
    if (
check_permission("auth_viewcat"$val)) {
      
$subcat_ids[$cat_id][] = $val;
      
get_subcat_ids($val$cat_id$cat_parent_cache);
    }
  }
  return 
$subcat_ids;
}

function 
get_subcategories($parent_id) {
  global 
$cat_parent_cache$cat_cache$site_sess$config;

  if (!isset(
$cat_parent_cache[$parent_id]) || $config['num_subcats'] < 1) {
    return 
"";
    }
  }
}
?>

exif.php
[code]<?php

/*
   4images EXIF MOD
   Version : 0.3
   Date: 2003-01-17
   By: fatman (fatman_li@yahoo.com.hk)
   
*/

// true: enable the field filter
// false: disable the field filter

define('EXIF_CONTROL', true);

// add the field name for show in exif section
// remember the field name with the colon ":"
define('EXIF_FILTER', "
Make:
Model:
DateTime:
Orientation:
ExposureTime:
FNumber:
ShutterSpeedValue:
ISOSpeedRatings:
ExposureBiasValue:
MeteringMode:
Flash:
FocalLength:
ColorSpace:
WhiteBalance:
DigitalZoomRatio:
");

function exif_filter_control() {
  return EXIF_CONTROL;
}

function exif_filter($name) {
  if (strpos(EXIF_FILTER, ($name . ":")) > 0) {
    return true;
  } else {
    return false;
  }
 
}   


function exif_get_str_val($val) {
  $val = (substr($val, 0, strpos($val, "/"))) / (substr($val, strpos($val, "/") + 1));
  return $val;
}

function exif_parse_value($name, $val) {
  switch($name) {
     case "Orientation":
       if($val==1) $val = "Normal";
       if($val==2) $val = "Mirrored";
       if($val==3) $val = "Upsidedown";
       if($val==4) $val = "Upsidedown Mirrored";
       if($val==5) $val = "90deg CW Mirrored";
       if($val==6) $val = "90deg CCW";
       if($val==7) $val = "90deg CCW Mirrored";
       if($val==8) $val = "90deg CW";
       break;
     case "ResolutionUnit":
       if($val==1) $val = "No Unit";
       if($val==2) $val = "Inch";
       if($val==3) $val = "Centimeter";
       break;
     case "YCbCrPositioning":
       if($val==1) $val = "Pixel Array";
       if($val==2) $val = "Datum Point";
       break;
     case "ExposureTime":
       $val = $val . " seconds";
       break;
     case "FNumber":
       $val = "F/" . exif_get_str_val($val);
       break;
     case "ExposureProgram":
       if($val==1) $val = "Manual control";
       if($val==2) $val = "Program normal";
       if($val==3) $val = "Aperture priority";
       if($val==4) $val = "Shutter priority";
       if($val==5) $val = "Program creative(slow program)";
       if($val==6) $val = "Program action(high-speed program)";
       if($val==7) $val = "Portrait mode";
       if($val==8) $val = "Landscape mode";
       break;       
     case "ExifVersion":
       $val = round($val / 100, 2);
       break;
     case "ComponentsConfiguration":
       $val = bin2hex($val);
       $val = str_replace("01","Y",$val);
       $val = str_replace("02","Cb",$val);
       $val = str_replace("03","Cr",$val);
       $val = str_replace("04","R",$val);
       $val = str_replace("05","G",$val);
       $val = str_replace("06","B",$val);
       $val = str_replace("00","",$val);       
       break;
     case "CompressedBitsPerPixel":
       $val = exif_get_str_val($val);
       break;
     case "ShutterSpeedValue":
       $val = "1/" . round(pow(2, exif_get_str_val($val))) . " seconds";
       break;
     case "ApertureValue":
       $val = "F/" . round(pow(sqrt(2), exif_get_str_val($val)),1);
       break;
     case "BrightnessValue ":
       $val = exif_get_str_val($val);
       break;       
     case "ExposureBiasValue":
       if ((substr($val, 0, strpos($val, "/"))) == "0") {
           $val = "0 Step";
       } else {
           $val = $val . " Step";
       }
       break;
     case "MaxApertureValue":
       $val = "F/" . round(pow(sqrt(2), exif_get_str_val($val)),1);
       break;
     case "SubjectDistance":
       $val = exif_get_str_val($val) . " M";
       break;       
     case "MeteringMode":
       if($val==0) $val = "Unknown";
       if($val==1) $val = "Average";
       if($val==2) $val = "Center Weighted Average";
       if($val==3) $val = "Spot";
       if($val==4) $val = "Multi-spot";
       if($val==5) $val = "Multi-segment";
       if($val==6) $val = "Partial";
       if($val==255) $val = "Other";       
       break;
     case "LightSource":
       if($val==0) $val = "Unknown";
       if($val==1) $val = "Daylight";
       if($val==2) $val = "Fluorescent";
       if($val==3) $val = "Tungsten";
       if($val==10) $val = "Flash";
       if($val==17) $val = "Standard light A";
       if($val==18) $val = "Standard light B";
       if($val==19) $val = "Standard light C";
       if($val==20) $val = "D55";
       if($val==21) $val = "D65";
       if($val==22) $val = "D75";
       if($val==255) $val = "Other";
       break;       
     case "Flash":
       if($val==0) $val = "No Flash";
       if($val==1) $val = "Flash fired";
       if($val==5) $val = "Flash fired but strobe return light not detected";
       if($val==7) $val = "Flash fired and strobe return light detected";
       if($val==9) $val = "Undefined";
       break;
     case "FocalLength":
       $val = exif_get_str_val($val) . " mm";
       break;
     case "FlashPixVersion":
       $val = round($val / 100, 2);
       break;
     case "ColorSpace":
       if($val==1) $val = "sRGB";
       if($val=='65535') $val = "Uncalibrated";
       break;
     case "FocalPlaneXResolution":
       $val = round(exif_get_str_val($val));
       break;
     case "FocalPlaneYResolution":
       $val = round(exif_get_str_val($val));
       break;                       
     case "FocalPlaneResolutionUnit":
       if($val==1) $val = "No Unit";
       if($val==2) $val = "Inch";
       if($val==3) $val = "Centimeter";
       break;
     case "SensingMethod":
       if($val==2) $val = "1 chip color area sensor";
       break;
     case "FileSource":
       $val = bin2hex($val);
       if($val==0x03) $val = "Digital still camera";     
       break;
     case "FileSource":
       $val = bin2hex($val);
&nbs

Offline Acidgod

  • 4images Moderator
  • 4images Guru
  • *****
  • Posts: 2.421
  • It's me?
    • View Profile
    • Flash-Webdesign
Re: [Mod] EXIF 0.3
« Reply #96 on: November 05, 2005, 02:47:55 PM »
  }
}
?>

in der functions.php ist die letzte } zuviel

Offline reklov

  • Newbie
  • *
  • Posts: 19
    • View Profile
Re: [Mod] EXIF 0.3
« Reply #97 on: November 05, 2005, 02:49:24 PM »
exif.php
weiter
Code: [Select]
       break;
     case "FileSource":
       $val = bin2hex($val);
       if($val==0x01) $val = "Directly photographed";     
       break;




     }
     
  return $val;
}
?>

exif_bit.html
Code: [Select]
<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title></title>
</head>

<body>
<tr>
 <td valign="top" class="row{row_bg_number}"><b>{exif_name}</b></td>
 <td valign="top" class="row{row_bg_number}">{exif_value}</td>
</tr>
</body>

</html>

Und
details.htlm
Code: [Select]
{header}
<table width="100%" border="0" cellspacing="0" cellpadding="0" align="center">
  <tr>
    <td>
<table cellpadding="0" cellspacing="0"  width="100%" border="0" bgcolor="#000000">
 <tr>
  <td width="100%">
   <table border="0" cellpadding="0" cellspacing="0" bgcolor="#000000" width="100%" height="62" background="{template_url}/images/bbcell.gif">
    <tr>
     <td width="50%" align="left">
<img src="{template_url}/images/header_logo.gif" align="center" alt="" /></td>
     <td width="50%" align="right" >
<form method="post" action="{url_search}">
              <table border="0" cellspacing="0" cellpadding="1">
                <tr>
                  <td>
                    <input type="text" name="search_keywords" size="15" class="searchinput" />
                  </td>
                  <td>
                    <input type="submit" value="{lang_search}" class="button" name="submit" />&nbsp;
                  </td>
                </tr>
                <tr valign="top">
                  <td colspan="2"><a href="{url_search}" class="smalltext">{lang_advanced_search}</a></td>
                </tr>
              </table>
            </form>
     </td>
   </tr>
  </table>
</td>
</tr>
</table>
     
    </td>
  </tr>
  <tr>
    <td class="bordercolor">
      <table width="100%" border="0" cellspacing="1" cellpadding="0">
        <tr>
          <td class="tablebgcolor">
           

<table width="100%" border="0" cellspacing="0" cellpadding="0">
   <tr>
    <td class="navbar" height="23">
     <table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
       <td align="left" width="50%">
        <img src="{template_url}/images/spacer.gif" width="4" height="4" alt="" />{clickstream}
       </td>
       <td align="right" width="50%">
     
        <a href="{url_top_images}"><b>{lang_top_images}</b></a>&nbsp;
        <a href="{url_new_images}"><b>{lang_new_images}</b></a>&nbsp;&nbsp;
       </td>
      </tr>
     </table>
    </td>
   </tr>
  </table>




            <table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td width="150" class="row2" valign="top">
                  <table width="150" border="0" cellspacing="0" cellpadding="0">
                    <tr>
                      <td class="head2" height="20"><img src="{template_url}/images/spacer.gif" alt="" width="4" height="4" />{lang_registered_user}</td>
                    </tr>
                    <tr>
                      <td class="tablebgcolor"><img src="{template_url}/images/spacer.gif" alt="" width="1" height="1" /></td>
                    </tr>
                    <tr>
                      <td align="center" class="row1">{user_box} </td>
                    </tr>
                    <tr>
                      <td class="tablebgcolor"><img src="{template_url}/images/spacer.gif" alt="" width="1" height="1" /></td>
                    </tr>
                  </table>
                  {if random_cat_image}
                  <table width="150" border="0" cellspacing="0" cellpadding="0">
                    <tr>
                      <td class="head2" height="20"> <img src="{template_url}/images/spacer.gif" alt="" width="4" height="4" />{lang_random_image}</td>
                    </tr>
                    <tr>
                      <td class="tablebgcolor"><img src="{template_url}/images/spacer.gif" alt="" width="1" height="1" /></td>
                    </tr>
                    <tr>
                      <td align="center" class="row1">
                        <br />
                        {random_cat_image}
                        <br />
                        <br />
                      </td>
                    </tr>
                    <tr>
                      <td class="tablebgcolor"><img src="{template_url}/images/spacer.gif" alt="" width="1" height="1" /></td>
                    </tr>
                  </table>
                  {endif random_cat_image}
                  <p align="center">
                    <?php
                    
echo date("d.m.Y, H:i"); 
 ?>

                  </p>
<?php include("4darkm.php"); ?>
                 
                  <br />
                </td>
                <td width="1" class="bordercolor" valign="top"><img src="{template_url}/images/spacer.gif" width="1" height="1" alt="" /></td>
                <td width="18" valign="top"><img src="{template_url}/images/spacer.gif" width="18" height="18" alt="" /></td>
                <td width="100%" valign="top"><br />

<table width="100%" border="0" cellspacing="0" cellpadding="1">
                    <tr>
                      <td class="bordercolor">
                        <table width="100%" border="0" cellspacing="0" cellpadding="3">
                          <tr valign="top">
                            <td class="row2">
  {if prev_image_name}{lang_prev_image}<br />
                              <b><a href="{prev_image_url}">{prev_image_name}</a></b>
  <!-- <br /><br /><a href="{prev_image_url}"><img src="{prev_thumb_file}" border="1"></a> -->
  {endif prev_image_name}&nbsp;</td>
                            <td align="right" class="row2">
  &nbsp;{if next_image_name}{lang_next_image}<br />
                              <b><a href="{next_image_url}">{next_image_name}</a></b>
  <!-- <br /><br /><a href="{next_image_url}"><img src="{next_thumb_file}" border="1"></a> -->
  {endif next_image_name}</td>
                          </tr>
                        </table>
                      </td>
                    </tr>
                  </table>
<br>
                  <b class="title">{image_name}</b>{if image_is_new} <sup class="new">{lang_new}</sup>{endif image_is_new}
                  <hr size="1" />
                  {if msg}<b>{msg}<br /><br /></b>{endif msg}
                  <div align="center">
    {image}
    {if admin_links}<br />{admin_links}<br />{endif admin_links}
    <br />{lightbox_button}&nbsp;&nbsp;{postcard_button}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{download_button}&nbsp;&nbsp;{download_zip_button}
  </div><br />
                  <table width="100%" border="0" cellspacing="0" cellpadding="1">
                    <tr>
                      <td class="bordercolor">
                        <table width="100%" border="0" cellpadding="3" cellspacing="0">
  <tr>
                            <td class="head1" valign="top" colspan="2">{image_name}</td>
                          </tr>
                          <tr>
                            <td valign="top" class="row1"><b>{lang_description}</b></td>
                            <td valign="top" class="row1">{image_description}</td>
                          </tr>
                          <tr>
                            <td valign="top" class="row2"><b>{lang_keywords}</b></td>
                            <td valign="top" class="row2">{image_keywords}</td>
                          </tr>
                          <tr>
                            <td valign="top" class="row1"><b>{lang_date}</b></td>
                            <td valign="top" class="row1">{image_date}</td>
                          </tr>
                          <tr>
                            <td valign="top" class="row2"><b>{lang_hits}</b></td>
                            <td valign="top" class="row2">{image_hits}</td>
                          </tr>
                          <tr>
                            <td valign="top" class="row1"><b>{lang_downloads}</b></td>
                            <td valign="top" class="row1">{image_downloads}</td>
                          </tr>
                          <tr>
                            <td valign="top" class="row2"><b>{lang_rating}</b></td>
                            <td valign="top" class="row2">{image_rating} ({image_votes}
                              {lang_votes})</td>
                          </tr>
                          <tr>
                            <td valign="top" class="row1"><b>{lang_file_size}</b></td>
                            <td valign="top" class="row1">{image_file_size}</td>
                          </tr>
  <tr>
                            <td valign="top" class="row2"><b>{lang_added_by}</b></td>
                            <td valign="top" class="row2">{user_name_link}</td>
                          </tr>
 
  <tr>
                            <td valign="top" class="row1"><b>{lang_image_test}</b></td>
                            <td valign="top" class="row1">{image_test}</td>
                          </tr>
  <tr>
                            <td valign="top" class="row2"><b>{lang_image_test2}</b></td>
                            <td valign="top" class="row2">{image_test2}</td>
                          </tr>
                        </table>
                      </td>
                    </tr>
                  </table>
  {if iptc_info}<br />
  <table width="100%" border="0" cellspacing="0" cellpadding="1">
                  <tr>
                    <td class="bordercolor">
                      <table width="100%" border="0" cellpadding="3" cellspacing="0">
                        <tr>
                            <td class="head1" valign="top">IPTC Info</td>
                          </tr>
                  {iptc_info}
                        </table>
                      </td>
                    </tr>
                  </table>
                  {endif iptc_info}
                  {if exif_info}
                  <br />
                  <table width="100%" border="0" cellspacing="0" cellpadding="1">
 <tr>
    <td class="bordercolor">
     <table width="100%" border="0" cellpadding="3" cellspacing="0">
      <tr>
       <td class="head1" valign="top" colspan="2">EXIF Info</td>
        </tr>
               {exif_info}
       </table>
     </td>
   </tr>
 </table>
 {endif exif_info}
  {if rate_form}<div align="center">{rate_form}</div>{endif rate_form}
                  {if allow_comments}
  <br />
                  <table width="100%" border="0" cellspacing="0" cellpadding="0" align="center">
                    <tr>
                      <td class="head1" valign="top">
                        <table width="100%" border="0" cellpadding="3" cellspacing="1">
                          <tr>
                            <td valign="top" class="head1">
  {lang_author}
</td>
<td valign="top" class="head1">
  {lang_comment}
</td>
                          </tr>
                          {comments}
                        </table>
                      </td>
                    </tr>
                  </table>
  <br />
  {comment_form}
                  {endif allow_comments}
  <br /><br />
                  <table width="100%" border="0" cellspacing="0" cellpadding="1">
                    <tr>
                      <td class="bordercolor">
                        <table width="100%" border="0" cellspacing="0" cellpadding="3">
                          <tr valign="top">
                            <td class="row2">
  {if prev_image_name}{lang_prev_image}<br />
                              <b><a href="{prev_image_url}">{prev_image_name}</a></b>
  <!-- <br /><br /><a href="{prev_image_url}"><img src="{prev_thumb_file}" border="1"></a> -->
  {endif prev_image_name}&nbsp;</td>
                            <td align="right" class="row2">
  &nbsp;{if next_image_name}{lang_next_image}<br />
                              <b><a href="{next_image_url}">{next_image_name}</a></b>
  <!-- <br /><br /><a href="{next_image_url}"><img src="{next_thumb_file}" border="1"></a> -->
  {endif next_image_name}</td>
                          </tr>
                        </table>
                      </td>
                    </tr>
                  </table>
                  <p>&nbsp;</p>
                </td>
            <td width="19" valign="top"><img src="{template_url}/images/spacer.gif" alt="" width="19" height="19" /></td>
              </tr>
            </table>
          </td>
        </tr>
      </table>
    </td>
  </tr>
  <tr>
    <td>
     
    </td>
  </tr>
</table>
{footer}

Offline Acidgod

  • 4images Moderator
  • 4images Guru
  • *****
  • Posts: 2.421
  • It's me?
    • View Profile
    • Flash-Webdesign
Re: [Mod] EXIF 0.3
« Reply #98 on: November 05, 2005, 02:50:46 PM »
na das war doch schon nicht mehr nötig...

Offline reklov

  • Newbie
  • *
  • Posts: 19
    • View Profile
Re: [Mod] EXIF 0.3
« Reply #99 on: November 05, 2005, 02:54:20 PM »
Doch den jetzt bekomme ich diese Fehlmeldung:
Fatal error: Call to undefined function: get_category_dropdown() in /mnt/ja2/07/460/00000013/htdocs/Album/includes/page_header.php on line 157

Offline Acidgod

  • 4images Moderator
  • 4images Guru
  • *****
  • Posts: 2.421
  • It's me?
    • View Profile
    • Flash-Webdesign
Re: [Mod] EXIF 0.3
« Reply #100 on: November 05, 2005, 02:58:24 PM »
du musst die änderungen die Du an der functions.php vorgenommen hast nochmal überprüfen, den ohne Grund ist die Klammer ja nicht übrig gewesen...

Der Fehler liegt sicherlich in der Datei, weil die page_header.php versucht eine Funktion in der functions.php aufzurufen welche fehlerhaft ist oder ganz fehlt.... (o:

Offline reklov

  • Newbie
  • *
  • Posts: 19
    • View Profile
Re: [Mod] EXIF 0.3
« Reply #101 on: November 05, 2005, 03:12:54 PM »
Oh man ich hch habe nur Kopiert und Kopiert :(
Aber was ich genau geändert habe weiß ich auch nicht mehr.
Nun ich glaube ich gebe zwangsläufig auf :cry:
Und ich fand die Funktion so gut....
Die frage ist jetzt bloß wie bekomme ich den alten Stand wieder her???
Muss ich doch weiter machen...
Hat jemand die Function.php für mich :oops:
Gruß Volker

PHP ist ein Brief mit sieben Siegeln für mich.

Offline Acidgod

  • 4images Moderator
  • 4images Guru
  • *****
  • Posts: 2.421
  • It's me?
    • View Profile
    • Flash-Webdesign
Re: [Mod] EXIF 0.3
« Reply #102 on: November 05, 2005, 03:21:02 PM »
also als erstest immer ein Backup von den Dateien machen.
Dann schnappst Du dir einfach die 4images zip datei und schiebst die functions.php aus dem zip auf den Server, aber nur wenn Du bisher nur diese Änderungen vorgenommen hast.

Aber ich würde echt versuchen es nochmal zu machen, ich denke du hast nur einen kleinen Fehler drin gehabt... (o:

Offline reklov

  • Newbie
  • *
  • Posts: 19
    • View Profile
Re: [Mod] EXIF 0.3
« Reply #103 on: November 05, 2005, 04:09:14 PM »
Verzweifel......................................................... :evil:

Offline Acidgod

  • 4images Moderator
  • 4images Guru
  • *****
  • Posts: 2.421
  • It's me?
    • View Profile
    • Flash-Webdesign
Re: [Mod] EXIF 0.3
« Reply #104 on: November 05, 2005, 04:12:04 PM »
HAste das wiederherstellen nicht hinbekommen?