Ver Mensaje Individual
  #3 (permalink)  
Antiguo 26/04/2005, 13:16
okram
Invitado
 
Mensajes: n/a
Puntos:
gracias por responder, revise la base de datos, pero no se especifica ningun codigo que muestre la ruta de la imagen ahi, tan solo se encuentra el nombre de la imagen, pero encontre esto en el archivo /includes/functions.php

Código PHP:
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)) ? ((strpos($lightbox_url'?') !== false) ? "&amp;" "?")."mode=".$mode "";
    
$lightbox_url .= strpos($lightbox_url'?') !== false "&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;

esta funcion supuestamente es la que usa para crear el codigo de la imagen, pero igual no veo nada que pueda cambiar lo que yo quiero.... alguna idea???

un saludo gracias