Author Topic: 4images 1.7.10 - Feedback  (Read 75609 times)

0 Members and 1 Guest are viewing this topic.

Offline kai

  • Administrator
  • Addicted member
  • *****
  • Posts: 1.407
    • View Profile
    • 4images - Image Gallery Management System
4images 1.7.10 - Feedback
« on: May 01, 2011, 11:20:12 PM »
Bitte nutzt diesen Thread für Feedback, Kommentare und Anregungen zum 4images 1.7.10 Release.
Für Bug Reports und Troubleshooting bitte dieses Forum nutzen.

Please use this thread for feedback and comments about the 4images 1.7.10 release.
For bug reporting and troubleshooting please use this forum.
Your first three "must do" before you ask a question:
1. Forum rules
2. FAQ
3. Search

Offline nobby

  • 4images Guru
  • *******
  • Posts: 2.851
    • View Profile
Re: 4images 1.7.10 - Feedback
« Reply #1 on: May 02, 2011, 02:15:21 PM »
Hallo ihr Zuckerschnuten  :mrgreen:

Besten Dank! Update hat wie immer Hervorragend geklappt.

Macht weiter so  :wink: :wink:  :) :D

LG nobby
« Last Edit: May 02, 2011, 02:29:03 PM by nobby »

Offline Crazymodder

  • Jr. Member
  • **
  • Posts: 57
    • View Profile
Re: 4images 1.7.10 - Feedback
« Reply #2 on: May 03, 2011, 08:57:18 PM »
Hi,
Update works perfectly on my Demo Site:)
Does someone works on a tutorial how to update manually? I hope someone can find out the difference and make a detailed post what changes are nessary like in versions before thanks:)

Regards
Crazymodder

Offline praveen

  • Newbie
  • *
  • Posts: 31
    • View Profile
Re: 4images 1.7.10 - Feedback
« Reply #3 on: May 06, 2011, 10:39:03 AM »
I just updated my 1.7.9 gallery to 1.7.10 and these are the changed files. If any is left out, sorry.

/root folder/

global.php
search.php

/includes folder/

captcha_utils.php
constants.php
csrf_utils.php
functions.php
page_header.php
paging.php
search_utils.php
sessions.php

/admin folder/

categories.php
checkimages.php
images.php
thumbnailer.php
users.php
validateimages.php

i used to win merge to check for changes between 1.7.9 and 1.7.10


Rembrandt

  • Guest
Re: 4images 1.7.10 - Feedback
« Reply #4 on: May 06, 2011, 04:42:26 PM »

Offline Crazymodder

  • Jr. Member
  • **
  • Posts: 57
    • View Profile
Re: 4images 1.7.10 - Feedback
« Reply #5 on: May 06, 2011, 05:17:39 PM »
Thanks I really love that community... :)

Offline Sumale.my

  • Addicted member
  • ******
  • Posts: 1.784
  • Neverdie
    • View Profile
Re: 4images 1.7.10 - Feedback
« Reply #6 on: May 08, 2011, 09:33:30 PM »
Ist das richtig so, dass in der member.php Teile aus der details.php vorhanden sind wie Comments Zeugs und BBcode zeugs?
if (isset($HTTP_GET_VARS[URL_COMMENT_ID]) || isset($HTTP_POST_VARS[URL_COMMENT_ID])) {
  
$comment_id = (isset($HTTP_GET_VARS[URL_COMMENT_ID])) ? intval($HTTP_GET_VARS[URL_COMMENT_ID]) : intval($HTTP_POST_VARS[URL_COMMENT_ID]);
}
else {
  
$comment_id 0;
}

if (
$action == "deletecomment") {
  if (!
$comment_id || ($config['user_delete_comments'] != && $user_info['user_level'] != ADMIN)) {
    
show_error_page($lang['no_permission']);
    exit;
  }

  
$sql "SELECT c.comment_id, c.user_id AS comment_user_id, i.image_id, i.cat_id, i.user_id, i.image_name
          FROM ("
.COMMENTS_TABLE." c, ".IMAGES_TABLE." i)
          WHERE c.comment_id = 
$comment_id AND i.image_id = c.image_id";
  
$comment_row $site_db->query_firstrow($sql);
  if (!
$comment_row || $comment_row['user_id'] <= USER_AWAITING || ($user_info['user_id'] != $comment_row['user_id'] && $user_info['user_level'] != ADMIN)) {
    
show_error_page($lang['no_permission']);
    exit;
  }

  
$txt_clickstream get_category_path($comment_row['cat_id'], 1).$config['category_separator']."<a href=\"".$site_sess->url(ROOT_PATH."details.php?".URL_IMAGE_ID."=".$comment_row['image_id'])."\" class=\"clickstream\">".format_text($comment_row['image_name'], 2)."</a>".$config['category_separator'];
  
$txt_clickstream .= $lang['comment_delete'];

  
$sql "UPDATE ".IMAGES_TABLE."
          SET image_comments = image_comments - 1
          WHERE image_id = "
.$comment_row['image_id'];
  
$site_db->query($sql);

  if (
$comment_row['comment_user_id'] != GUEST) {
    
$sql "UPDATE ".USERS_TABLE."
            SET "
.get_user_table_field("""user_comments")." = ".get_user_table_field("""user_comments")." - 1
            WHERE "
.get_user_table_field("""user_id")." = ".$comment_row['comment_user_id'];
    
$site_db->query($sql);
  }

  
$sql "DELETE FROM ".COMMENTS_TABLE."
          WHERE comment_id = 
$comment_id";
  
$result $site_db->query($sql);
  
$msg = ($result) ? $lang['comment_delete_success'] : $lang['comment_delete_error'];
}

if (
$action == "removecomment") {
  if (!
$comment_id || ($config['user_delete_comments'] != && $user_info['user_level'] != ADMIN)) {
    
redirect($url);
  }

  
$sql "SELECT c.comment_id, c.image_id, c.user_id AS comment_user_id, c.user_name AS comment_user_name, c.comment_headline, c.comment_text, i.image_name, i.cat_id, i.user_id".get_user_table_field(", u.""user_name")."
          FROM ("
.COMMENTS_TABLE." c, ".IMAGES_TABLE." i)
          LEFT JOIN "
.USERS_TABLE." u ON (".get_user_table_field("u.""user_id")." = c.user_id)
          WHERE c.comment_id = 
$comment_id AND i.image_id = c.image_id";
  
$comment_row $site_db->query_firstrow($sql);
  if (!
$comment_row || $comment_row['user_id'] <= USER_AWAITING || ($user_info['user_id'] != $comment_row['user_id'] && $user_info['user_level'] != ADMIN)) {
    
redirect($url);
  }

  
$txt_clickstream get_category_path($comment_row['cat_id'], 1).$config['category_separator']."<a href=\"".$site_sess->url(ROOT_PATH."details.php?".URL_IMAGE_ID."=".$comment_row['image_id'])."\" class=\"clickstream\">".format_text($comment_row['image_name'], 2)."</a>".$config['category_separator'];
  
$txt_clickstream .= $lang['comment_delete'];

  if (isset(
$comment_row[$user_table_fields['user_name']]) && $comment_row['comment_user_id'] != GUEST) {
    
$user_name $comment_row[$user_table_fields['user_name']];
  }
  else {
    
$user_name $comment_row['comment_user_name'];
  }

  
$site_template->register_vars(array(
    
"comment_id" => $comment_id,
    
"image_name" => format_text($comment_row['image_name']),
    
"user_name" => format_text($user_name),
    
"comment_headline" => format_text($comment_row['comment_headline'], 0$config['wordwrap_comments'], 00),
    
"comment_text" => format_text($comment_row['comment_text'], $config['html_comments'], $config['wordwrap_comments'], $config['bb_comments'], $config['bb_img_comments']),
    
"lang_delete_comment" => $lang['comment_delete'],
    
"lang_delete_comment_confirm" => $lang['comment_delete_confirm'],
    
"lang_image_name" => $lang['image_name'],
    
"lang_name" => $lang['name'],
    
"lang_headline" => $lang['headline'],
    
"lang_comment" => $lang['comment'],
    
"lang_submit" => $lang['submit'],
    
"lang_reset" => $lang['reset'],
    
"lang_yes" => $lang['yes'],
    
"lang_no" => $lang['no']
  ));
  
$content $site_template->parse_template("member_deletecomment");
}

if (
$action == "updatecomment") {
  if (!
$comment_id || ($config['user_edit_comments'] != && $user_info['user_level'] != ADMIN)) {
    
show_error_page($lang['no_permission']);
    exit;
  }
  
$sql "SELECT c.comment_id, c.image_id, i.image_name, i.cat_id, i.user_id".get_user_table_field(", u.""user_name")."
          FROM ("
.COMMENTS_TABLE." c, ".IMAGES_TABLE." i)
          LEFT JOIN "
.USERS_TABLE." u ON (".get_user_table_field("u.""user_id")." = c.user_id)
          WHERE c.comment_id = 
$comment_id AND i.image_id = c.image_id";
  
$comment_row $site_db->query_firstrow($sql);
  if (!
$comment_row || $comment_row['user_id'] <= USER_AWAITING || ($user_info['user_id'] != $comment_row['user_id'] && $user_info['user_level'] != ADMIN)) {
    
show_error_page($lang['no_permission']);
    exit;
  }

  
$txt_clickstream get_category_path($comment_row['cat_id'], 1).$config['category_separator']."<a href=\"".$site_sess->url(ROOT_PATH."details.php?".URL_IMAGE_ID."=".$comment_row['image_id'])."\" class=\"clickstream\">".format_text($comment_row['image_name'], 2)."</a>".$config['category_separator'];
  
$txt_clickstream .= $lang['comment_edit'];

  
$error 0;

  
$comment_headline un_htmlspecialchars(trim($HTTP_POST_VARS['comment_headline']));
  
$comment_text un_htmlspecialchars(trim($HTTP_POST_VARS['comment_text']));

  if (
$comment_headline == "")  {
    
$error 1;
    
$field_error preg_replace("/".$site_template->start."field_name".$site_template->end."/siU"str_replace(":"""$lang['headline']), $lang['field_required']);
    
$msg .= (($msg != "") ? "<br />" "").$field_error;
  }
  if (
$comment_text == "")  {
    
$error 1;
    
$field_error preg_replace("/".$site_template->start."field_name".$site_template->end."/siU"str_replace(":"""$lang['comment']), $lang['field_required']);
    
$msg .= (($msg != "") ? "<br />" "").$field_error;
  }

  if (!
$error) {
    
$sql "UPDATE ".COMMENTS_TABLE."
            SET comment_headline = '
$comment_headline', comment_text = '$comment_text'
            WHERE comment_id = 
$comment_id";
    
$result $site_db->query($sql);
    
$msg = ($result) ? $lang['comment_edit_success'] : $lang['comment_edit_error'];
  }
  else {
    
$action "editcomment";
    
$sendprocess 1;
  }
}

if (
$action == "editcomment") {
  if (!
$comment_id || ($config['user_edit_comments'] != && $user_info['user_level'] != ADMIN)) {
    
redirect($url);
  }

  
$sql "SELECT c.comment_id, c.image_id, c.user_id AS comment_user_id, c.user_name AS comment_user_name, c.comment_headline, c.comment_text, i.image_name, i.cat_id, i.user_id".get_user_table_field(", u.""user_name")."
          FROM ("
.COMMENTS_TABLE." c, ".IMAGES_TABLE." i)
          LEFT JOIN "
.USERS_TABLE." u ON (".get_user_table_field("u.""user_id")." = c.user_id)
          WHERE c.comment_id = 
$comment_id AND i.image_id = c.image_id";
  
$comment_row $site_db->query_firstrow($sql);
  if (!
$comment_row || $comment_row['user_id'] <= USER_AWAITING || ($user_info['user_id'] != $comment_row['user_id'] && $user_info['user_level'] != ADMIN)) {
    
header("Location: ".$site_sess->url($url"&"));
    exit;
  }

  
$txt_clickstream get_category_path($comment_row['cat_id'], 1).$config['category_separator']."<a href=\"".$site_sess->url(ROOT_PATH."details.php?".URL_IMAGE_ID."=".$comment_row['image_id'])."\" class=\"clickstream\">".format_text($comment_row['image_name'], 2)."</a>".$config['category_separator'];
  
$txt_clickstream .= $lang['comment_edit'];

  
$comment_headline = (isset($HTTP_POST_VARS['comment_headline'])) ? un_htmlspecialchars(stripslashes(trim($HTTP_POST_VARS['comment_headline']))) : $comment_row['comment_headline'];
  
$comment_text = (isset($HTTP_POST_VARS['comment_text'])) ? un_htmlspecialchars(stripslashes(trim($HTTP_POST_VARS['comment_text']))) : $comment_row['comment_text'];

  if (isset(
$comment_row[$user_table_fields['user_name']]) && $comment_row['comment_user_id'] != GUEST) {
    
$user_name $comment_row[$user_table_fields['user_name']];
  }
  else {
    
$user_name $comment_row['comment_user_name'];
  }

  
$bbcode "";
  if (
$config['bb_comments'] == 1) {
    
$site_template->register_vars(array(
      
"lang_bbcode" => $lang['bbcode'],
      
"lang_tag_prompt" => $lang['tag_prompt'],
      
"lang_link_text_prompt" => $lang['link_text_prompt'],
      
"lang_link_url_prompt" => $lang['link_url_prompt'],
      
"lang_link_email_prompt" => $lang['link_email_prompt'],
      
"lang_list_type_prompt" => $lang['list_type_prompt'],
      
"lang_list_item_prompt" => $lang['list_item_prompt']
    ));
    
$bbcode $site_template->parse_template("bbcode");
  }

  
$site_template->register_vars(array(
    
"bbcode" => $bbcode,
    
"comment_id" => $comment_id,
    
"image_name" => format_text($comment_row['image_name'], 2),
    
"user_name" => format_text($user_name2),
    
"comment_headline" => format_text($comment_headline2),
    
"comment_text" => format_text($comment_text2),
    
"lang_edit_comment" => $lang['comment_edit'],
    
"lang_image_name" => $lang['image_name'],
    
"lang_name" => $lang['name'],
    
"lang_headline" => $lang['headline'],
    
"lang_comment" => $lang['comment'],
    
"lang_submit" => $lang['submit'],
    
"lang_reset" => $lang['reset'],
    
"lang_yes" => $lang['yes'],
    
"lang_no" => $lang['no']
  ));
  
$content $site_template->parse_template("member_editcomment");
}

if (
$action == "deleteimage") {
  if (!
$image_id || ($config['user_delete_image'] != && $user_info['user_level'] != ADMIN)) {
    
show_error_page($lang['no_permission']);
    exit;
  }
  
$sql "SELECT image_id, cat_id, user_id, image_name, image_media_file, image_thumb_file
          FROM "
.IMAGES_TABLE."
          WHERE image_id = 
$image_id";
  
$image_row $site_db->query_firstrow($sql);
  if (!
$image_row || $image_row['user_id'] <= USER_AWAITING || ($user_info['user_id'] != $image_row['user_id'] && $user_info['user_level'] != ADMIN)) {
    
show_error_page($lang['no_permission']);
    exit;
  }

  
$txt_clickstream $lang['image_delete'];

  
$sql "DELETE FROM ".IMAGES_TABLE."
          WHERE image_id = 
$image_id";
  
$del_img $site_db->query($sql);

  if (!
is_remote($image_row['image_media_file']) && !is_local_file($image_row['image_media_file'])) {
    @
unlink(MEDIA_PATH."/".$image_row['cat_id']."/".$image_row['image_media_file']);
  }
  if (!empty(
$image_row['image_thumb_file']) && !is_remote($image_row['image_thumb_file']) && !is_local_file($image_row['image_thumb_file'])) {
    @
unlink(THUMB_PATH."/".$image_row['cat_id']."/".$image_row['image_thumb_file']);
  }

  include(
ROOT_PATH.'includes/search_utils.php');
  
remove_searchwords($image_id);

  if (!empty(
$user_table_fields['user_comments'])) {
    
$sql "SELECT user_id
            FROM "
.COMMENTS_TABLE."
            WHERE image_id = 
$image_id";
    
$result $site_db->query($sql);
    
$user_id_sql "";
    while (
$row $site_db->fetch_array($result)) {
      if (
$row['user_id'] != GUEST) {
        
$sql "UPDATE ".USERS_TABLE."
                SET "
.get_user_table_field("""user_comments")." = ".get_user_table_field("""user_comments")." - 1
                WHERE "
.get_user_table_field("""user_id")." = ".$row['user_id'];
        
$site_db->query($sql);
      }
    }
  }

  
$sql "DELETE FROM ".COMMENTS_TABLE."
          WHERE image_id = 
$image_id";
  
$del_com $site_db->query($sql);

  if (
$del_img) {
    
$msg $lang['image_delete_success'];
  }
  else {
    
$msg $lang['image_delete_error'];
  }
}

if (
$action == "removeimage") {
  if (!
$image_id || ($config['user_delete_image'] != && $user_info['user_level'] != ADMIN)) {
    
redirect($url);
  }
  
$sql "SELECT image_id, cat_id, user_id, image_name
          FROM "
.IMAGES_TABLE."
          WHERE image_id = 
$image_id";
  
$image_row $site_db->query_firstrow($sql);
  if (!
$image_row || $image_row['user_id'] <= USER_AWAITING || ($user_info['user_id'] != $image_row['user_id'] && $user_info['user_level'] != ADMIN)) {
    
show_error_page($lang['no_permission']);
    exit;
  }

  
$txt_clickstream get_category_path($image_row['cat_id'], 1).$config['category_separator']."<a href=\"".$site_sess->url(ROOT_PATH."details.php?".URL_IMAGE_ID."=".$image_id)."\" class=\"clickstream\">".format_text($image_row['image_name'], 2)."</a>".$config['category_separator'];
  
$txt_clickstream .= $lang['image_delete'];

  
$site_template->register_vars(array(
    
"image_id" => $image_id,
    
"image_name" => format_text($image_row['image_name'], 2),
    
"lang_delete_image" => $lang['image_delete'],
    
"lang_delete_image_confirm" => $lang['image_delete_confirm'],
    
"lang_submit" => $lang['submit'],
    
"lang_reset" => $lang['reset'],
    
"lang_yes" => $lang['yes'],
    
"lang_no" => $lang['no']
  ));
  
$content $site_template->parse_template("member_deleteimage");
}

if (
$action == "updateimage") {
  if (!
$image_id || ($config['user_edit_image'] != && $user_info['user_level'] != ADMIN)) {
    
show_error_page($lang['no_permission']);
  }
  
$sql "SELECT image_id, cat_id, user_id, image_name
          FROM "
.IMAGES_TABLE."
          WHERE image_id = 
$image_id";
  
$image_row $site_db->query_firstrow($sql);
  if (!
$image_row || $image_row['user_id'] <= USER_AWAITING || ($user_info['user_id'] != $image_row['user_id'] && $user_info['user_level'] != ADMIN)) {
    
show_error_page($lang['no_permission']);
    exit;
  }

  
$txt_clickstream get_category_path($image_row['cat_id'], 1).$config['category_separator']."<a href=\"".$site_sess->url(ROOT_PATH."details.php?".URL_IMAGE_ID."=".$image_id)."\" class=\"clickstream\">".format_text($image_row['image_name'], 2)."</a>".$config['category_separator'];
  
$txt_clickstream .= $lang['image_edit'];

  
$error 0;

  
$image_name un_htmlspecialchars(trim($HTTP_POST_VARS['image_name']));
  
$image_description un_htmlspecialchars(trim($HTTP_POST_VARS['image_description']));
  
$image_keywords un_htmlspecialchars(trim($HTTP_POST_VARS['image_keywords']));

  
$image_keywords preg_replace("/[\n\r]/is"","$image_keywords);
  
$image_keywords_arr explode(','$image_keywords);
  
array_walk($image_keywords_arr'trim_value');
  
$image_keywords implode(','array_unique(array_filter($image_keywords_arr)));

  if (
$image_name == "")  {
    
$error 1;
    
$field_error preg_replace("/".$site_template->start."field_name".$site_template->end."/siU"str_replace(":"""$lang['image_name']), $lang['field_required']);
    
$msg .= (($msg != "") ? "<br />" "").$field_error;
  }

  if (!empty(
$additional_image_fields)) {
    foreach (
$additional_image_fields as $key => $val) {
      if (isset(
$HTTP_POST_VARS[$key]) && intval($val[2]) == && trim($HTTP_POST_VARS[$key]) == "") {
        
$error 1;
        
$field_error preg_replace("/".$site_template->start."field_name".$site_template->end."/siU"str_replace(":"""$val[0]), $lang['field_required']);
        
$msg .= (($msg != "") ? "<br />" "").$field_error;
      }
    }
  }

  if (!
$error) {
    
$additional_sql "";

    if (isset(
$HTTP_POST_VARS['image_allow_comments'])) {
      
$additional_sql .= ", image_allow_comments = ".intval($HTTP_POST_VARS['image_allow_comments']);
    }

    if (!empty(
$additional_image_fields)) {
      
$table_fields $site_db->get_table_fields(IMAGES_TABLE);
      foreach (
$additional_image_fields as $key => $val) {
        if (isset(
$HTTP_POST_VARS[$key]) && isset($table_fields[$key])) {
          
$additional_sql .= ", $key = '".un_htmlspecialchars(trim($HTTP_POST_VARS[$key]))."'";
        }
      }
    }

    
$sql "UPDATE ".IMAGES_TABLE."
            SET image_name = '
$image_name', image_description = '$image_description', image_keywords = '$image_keywords'".$additional_sql."
            WHERE image_id = 
$image_id";
    
$result $site_db->query($sql);
    if (
$result) {
      include(
ROOT_PATH.'includes/search_utils.php');
      
$search_words = array();
      foreach (
$search_match_fields as $image_column => $match_column) {
        if (isset(
$HTTP_POST_VARS[$image_column])) {
          
$search_words[$image_column] = stripslashes($HTTP_POST_VARS[$image_column]);
        }
      }
      
remove_searchwords($image_id);
      
add_searchwords($image_id$search_words);
      
$msg $lang['image_edit_success'];
    }
    else {
      
$msg $lang['image_edit_error'];
    }
  }
  else {
    
$action "editimage";
    
$sendprocess 1;
  }
}

if (
$action == "editimage") {
  if (!
$image_id || ($config['user_edit_image'] != && $user_info['user_level'] != ADMIN)) {
    
redirect($url);
  }

  
$additional_sql "";
  if (!empty(
$additional_image_fields)) {
    foreach (
$additional_image_fields as $key => $val) {
      
$additional_sql .= ", ".$key;
    }
  }
  
$sql "SELECT image_id, cat_id, user_id, image_name, image_description, image_keywords, image_allow_comments".$additional_sql."
          FROM "
.IMAGES_TABLE."
          WHERE image_id = 
$image_id";
  
$image_row $site_db->query_firstrow($sql);
  if (!
$image_row || $image_row['user_id'] <= USER_AWAITING || ($user_info['user_id'] != $image_row['user_id'] && $user_info['user_level'] != ADMIN)) {
    
redirect($url);
  }

  
$txt_clickstream get_category_path($image_row['cat_id'], 1).$config['category_separator']."<a href=\"".$site_sess->url(ROOT_PATH."details.php?".URL_IMAGE_ID."=".$image_id)."\" class=\"clickstream\">".format_text($image_row['image_name'], 2)."</a>".$config['category_separator'];
  
$txt_clickstream .= $lang['image_edit'];

  
$image_name = (isset($HTTP_POST_VARS['image_name'])) ? un_htmlspecialchars(stripslashes(trim($HTTP_POST_VARS['image_name']))) : $image_row['image_name'];
  
$image_description = (isset($HTTP_POST_VARS['image_description'])) ? un_htmlspecialchars(stripslashes(trim($HTTP_POST_VARS['image_description']))) : $image_row['image_description'];
  
$image_keywords = (isset($HTTP_POST_VARS['image_keywords'])) ? un_htmlspecialchars(stripslashes(trim($HTTP_POST_VARS['image_keywords']))) : $image_row['image_keywords'];
  
$image_allow_comments = (isset($HTTP_POST_VARS['image_allow_comments'])) ? intval($HTTP_POST_VARS['image_allow_comments']) : $image_row['image_allow_comments'];

  
$site_template->register_vars(array(
    
"image_id" => $image_id,
    
"image_name" => format_text($image_name2),
    
"image_description" => format_text($image_description2),
    
"image_keywords" => format_text($image_keywords2),
    
"image_allow_comments_yes" => ($image_allow_comments) ? " checked=\"checked\"" "",
    
"image_allow_comments_no" => (!$image_allow_comments) ? " checked=\"checked\"" "",
    
"lang_edit_image" => $lang['image_edit'],
    
"lang_image_name" => $lang['image_name'],
    
"lang_description" => $lang['description'],
    
"lang_keywords" => $lang['keywords_ext'],
    
"lang_allow_comments" => isset($lang['allow_comments']) ? $lang['allow_comments'] : "",
    
"lang_submit" => $lang['submit'],
    
"lang_reset" => $lang['reset'],
    
"lang_yes" => $lang['yes'],
    
"lang_no" => $lang['no']
  ));

  if (!empty(
$additional_image_fields)) {
    
$additional_field_array = array();
    foreach (
$additional_image_fields as $key => $val) {
      if (
$val[1] == "radio") {
        
$value = (isset($HTTP_POST_VARS[$key])) ? intval($HTTP_POST_VARS[$key]) : $image_row[$key];
        if (
$value == 1) {
          
$additional_field_array[$key.'_yes'] = " checked=\"checked\"";
          
$additional_field_array[$key.'_no'] = "";
        }
        else {
          
$additional_field_array[$key.'_yes'] = "";
          
$additional_field_array[$key.'_no'] = " checked=\"checked\"";
        }
      }
      else {
        
$value = (isset($HTTP_POST_VARS[$key])) ? format_text(stripslashes(trim($HTTP_POST_VARS[$key]))) : $image_row[$key];
      }
      
$additional_field_array[$key] = $value;
      
$additional_field_array['lang_'.$key] = $val[0];
    }
    if (!empty(
$additional_field_array)) {
      
$site_template->register_vars($additional_field_array);
    }
  }
  
$content $site_template->parse_template("member_editimage");
}

if (
$action == "uploadimage") {
  if (
$cat_id != && (!isset($cat_cache[$cat_id]) || !check_permission("auth_upload"$cat_id))) {
    
show_error_page($lang['no_permission']);
    exit;
  }

  
$txt_clickstream "";
  if (
$cat_id && isset($cat_cache[$cat_id])) {
    
$txt_clickstream .= get_category_path($cat_id1).$config['category_separator'];
  }
  
$txt_clickstream .= $lang['user_upload'];

  
$remote_media_file format_url(un_htmlspecialchars(trim($HTTP_POST_VARS['remote_media_file'])));
  
$remote_thumb_file format_url(un_htmlspecialchars(trim($HTTP_POST_VARS['remote_thumb_file'])));

  
$image_name un_htmlspecialchars(trim($HTTP_POST_VARS['image_name']));
  
$image_description un_htmlspecialchars(trim($HTTP_POST_VARS['image_description']));
  
$image_keywords un_htmlspecialchars(trim($HTTP_POST_VARS['image_keywords']));

  
$image_keywords preg_replace("/[\n\r]/is"","$image_keywords);
  
$image_keywords_arr explode(','$image_keywords);
  
array_walk($image_keywords_arr'trim_value');
  
$image_keywords implode(','array_unique(array_filter($image_keywords_arr)));

  
$image_active = (isset($HTTP_POST_VARS['image_active']) && $HTTP_POST_VARS['image_active'] == 0) ? 1;
  
$image_allow_comments = (isset($HTTP_POST_VARS['image_allow_comments']) && $HTTP_POST_VARS['image_allow_comments'] == 0) ? 1;
  
$image_download_url = (isset($HTTP_POST_VARS['image_download_url'])) ? format_url(un_htmlspecialchars(trim($HTTP_POST_VARS['image_download_url']))) : "";

  
$captcha = (isset($HTTP_POST_VARS['captcha'])) ? un_htmlspecialchars(trim($HTTP_POST_VARS['captcha'])) : "";

  
$direct_upload = (check_permission("auth_directupload"$cat_id)) ? 0;
  
$upload_cat = ($direct_upload) ? $cat_id 0;

  
$error 0;
  
$uploaderror 0;

  if (
$cat_id == 0)  {
    
$error 1;
    
$field_error preg_replace("/".$site_template->start."field_name".$site_template->end."/siU"str_replace(":"""$lang['category']), $lang['field_required']);
    
$msg .= (($msg != "") ? "<br />" "").$field_error;
  }
  if ((empty(
$HTTP_POST_FILES['media_file']['tmp_name']) || $HTTP_POST_FILES['media_file']['tmp_name'] == "none") && ($remote_media_file == "" || !check_remote_media($remote_media_file))) {
    
$error 1;
    
$msg .= (($msg != "") ? "<br />" "").$lang['image_file_required'];
  }
  if (
$image_name == "")  {
    
$error 1;
    
$field_error preg_replace("/".$site_template->start."field_name".$site_template->end."/siU"str_replace(":"""$lang['image_name']), $lang['field_required']);
    
$msg .= (($msg != "") ? "<br />" "").$field_error;
  }

  if (
$captcha_enable_upload && !captcha_validate($captcha)) {
    
$msg .= (($msg != "") ? "<br />" "").$lang['captcha_required'];
    
$error 1;
  }

  if (!empty(
$additional_image_fields)) {
    foreach (
$additional_image_fields as $key => $val) {
      if (isset(
$HTTP_POST_VARS[$key]) && intval($val[2]) == && trim($HTTP_POST_VARS[$key]) == "") {
        
$error 1;
        
$field_error preg_replace("/".$site_template->start."field_name".$site_template->end."/siU"str_replace(":"""$val[0]), $lang['field_required']);
        
$msg .= (($msg != "") ? "<br />" "").$field_error;
      }
    }
  }

  if (!
$error) {
    
// Start Upload
    
include(ROOT_PATH.'includes/upload.php');
    
$site_upload = new Upload();

    
// Upload Media file
    
if (!empty($HTTP_POST_FILES['media_file']['tmp_name']) && $HTTP_POST_FILES['media_file']['tmp_name'] != "none") {
      
$new_name $site_upload->upload_file("media_file""media"$upload_cat);
      if (!
$new_name) {
        
$msg .= (($msg != "") ? "<br />" "")."<b>".$lang['file_upload_error'].": ".$new_name."</b><br />".$site_upload->get_upload_errors();
        
$uploaderror 1;
      }
    }
    else {
      
$new_name $remote_media_file;
    }

    
// Upload thumb file
    
$new_thumb_name "";
    if (!empty(
$HTTP_POST_FILES['thumb_file']['tmp_name']) && $HTTP_POST_FILES['thumb_file']['tmp_name'] != "none" && !$uploaderror) {
      
$new_thumb_name $site_upload->upload_file("thumb_file""thumb"$upload_catget_basefile($new_name));
      if (!
$new_thumb_name) {
        
$msg .= (($msg != "") ? "<br />" "")."<b>".$lang['thumb_upload_error'].": ".$new_thumb_name."</b><br />".$site_upload->get_upload_errors();
        @
unlink(MEDIA_TEMP_PATH."/".$new_name);
        
$uploaderror 1;
      }
    }
    elseif (
check_remote_thumb($remote_thumb_file)) {
      
$new_thumb_name $remote_thumb_file;
    }
    elseif (
$config['auto_thumbnail'] == && !empty($new_name) && !$uploaderror && ((!empty($HTTP_POST_FILES['media_file']['tmp_name']) && $HTTP_POST_FILES['media_file']['tmp_name'] != "none") || is_remote($new_name))) {
      if (
$direct_upload) {
        if (
is_remote($new_name)) {
          
$src $new_name;
          
$thumb create_unique_filename(THUMB_PATH."/".$cat_idfilterFileName($new_name));
        } else {
          
$src MEDIA_PATH."/".$cat_id."/".$new_name;
          
$thumb $new_name;
        }
        
$dest THUMB_PATH."/".$cat_id."/".$thumb;
      }
      else {
        if (
is_remote($new_name)) {
          
$src $new_name;
          
$thumb create_unique_filename(THUMB_TEMP_PATHfilterFileName($new_name));
        } else {
          
$src MEDIA_TEMP_PATH."/".$new_name;
          
$thumb $new_name;
        }
        
$dest THUMB_TEMP_PATH."/".$thumb;
      }
      
$do_create 0;
      if (
$image_info = @getimagesize($src)) {
        if (
$image_info[2] == || $image_info[2] == || $image_info[2] == 3) {
          
$do_create 1;
        }
      }
      if (
$do_create) {
        require(
ROOT_PATH.'includes/image_utils.php');
        
$convert_options init_convert_options();
        if (!
$convert_options['convert_error']) {
          
$dimension = (intval($config['auto_thumbnail_dimension'])) ? intval($config['auto_thumbnail_dimension']) : 100;
          
$resize_type = (intval($config['auto_thumbnail_resize_type'])) ? intval($config['auto_thumbnail_resize_type']) : 1;
          
$quality = (intval($config['auto_thumbnail_quality']) && intval($config['auto_thumbnail_quality']) <= 100) ? intval($config['auto_thumbnail_quality']) : 100;

          if (
create_thumbnail($src$dest$quality$dimension$resize_type)) {
            
$new_thumb_name $thumb;
          }
        }
      }
    }

    if (!
$uploaderror) {
      
$additional_field_sql "";
      
$additional_value_sql "";
      if (!empty(
$additional_image_fields)) {
        
$table = ($direct_upload) ? IMAGES_TABLE IMAGES_TEMP_TABLE;
        
$table_fields $site_db->get_table_fields($table);
        foreach (
$additional_image_fields as $key => $val) {
          if (isset(
$HTTP_POST_VARS[$key]) && isset($table_fields[$key])) {
            
$additional_field_sql .= ", $key";
            
$additional_value_sql .= ", '".un_htmlspecialchars(trim($HTTP_POST_VARS[$key]))."'";
          }
        }
      }

      
$current_time time();
      if (
$direct_upload) {
        
$sql "INSERT INTO ".IMAGES_TABLE."
                (cat_id, user_id, image_name, image_description, image_keywords, image_date, image_active, image_media_file, image_thumb_file, image_download_url, image_allow_comments"
.$additional_field_sql.")
                VALUES
                (
$cat_id, ".$user_info['user_id'].", '$image_name', '$image_description', '$image_keywords', $current_time$image_active, '$new_name', '$new_thumb_name', '$image_download_url', $image_allow_comments".$additional_value_sql.")";
        
$result $site_db->query($sql);
        
$image_id $site_db->get_insert_id();
        if (
$result) {
          include(
ROOT_PATH.'includes/search_utils.php');
          
$search_words = array();
          foreach (
$search_match_fields as $image_column => $match_column) {
            if (isset(
$HTTP_POST_VARS[$image_column])) {
              
$search_words[$image_column] = stripslashes($HTTP_POST_VARS[$image_column]);
            }
          }
          
add_searchwords($image_id$search_words);
        }
      }
      else {
        
$sql "INSERT INTO ".IMAGES_TEMP_TABLE."
                (cat_id, user_id, image_name, image_description, image_keywords, image_date, image_media_file, image_thumb_file, image_download_url"
.$additional_field_sql.")
                VALUES
                (
$cat_id, ".$user_info['user_id'].", '$image_name', '$image_description', '$image_keywords', $current_time, '$new_name', '$new_thumb_name', '$image_download_url'".$additional_value_sql.")";
        
$result $site_db->query($sql);
      }

      if (
$config['upload_notify'] == && !$direct_upload) {
        include(
ROOT_PATH.'includes/email.php');
        
$site_email = new Email();

        
$config['upload_emails'] = str_replace(" """$config['upload_emails']);
        
$emails explode(","$config['upload_emails']);

        
$validation_url $script_url."/admin/index.php?goto=".urlencode("validateimages.php?action=validateimages");

        
$site_email->set_to($config['site_email']);
        
$site_email->set_subject($lang['new_upload_emailsubject']);
        
$site_email->register_vars(array(
          
"image_name" => stripslashes($image_name),
          
"file_name" => $new_name,
          
"cat_name" => $cat_cache[$cat_id]['cat_name'],
          
"validation_url" => $validation_url,
          
"site_name" => $config['site_name']
        ));
        
$site_email->set_body("upload_notify"$config['language_dir_default']);
        
$site_email->set_bcc($emails);
        
$site_email->send_email();
      }

      
$msg .= $lang['image_add_success'].": <b>".format_text(stripslashes($image_name))."</b> (".$new_name.")";
      
$msg .= (!$direct_upload) ? "<br />".$lang['new_upload_validate_desc'] : "";

      
$file_extension get_file_extension($new_name);
      
$file = (is_remote($new_name)) ? $new_name : (($direct_upload) ? MEDIA_PATH."/".$cat_id."/".$new_name MEDIA_TEMP_PATH."/".$new_name);
      
$width_height "";
      if (!
is_remote($file) && $imageinfo = @getimagesize($file)) {
        
$width_height " ".$imageinfo[3];
      }
      
$media_icon "<img src=\"".ICON_PATH."/".$file_extension.".gif\" border=\"0\" alt=\"\" />";
      
$site_template->register_vars(array(
        
"media_src" => $file,
        
"media_icon" => $media_icon,
        
"image_name" => format_text(stripslashes($image_name)),
        
"width_height" => $width_height
      
));
      
$media $site_template->parse_template("media/".$file_extension);
      
$content .= "<table border=\"0\" align=\"center\">\n<tr>\n<td>\n".$media."\n</td>\n</tr>\n</table>\n";
    }
    else {
      
$action "uploadform";
      
$sendprocess 1;
    }
  }
  else {
    
$action "uploadform";
    
$sendprocess 1;
  }
}

if (
$action == "uploadform") {
  if (
$cat_id != && (!isset($cat_cache[$cat_id]) || !check_permission("auth_upload"$cat_id))) {
    
show_error_page($lang['no_permission']);
    exit;
  }

  
$txt_clickstream "";
  if (
$cat_id && isset($cat_cache[$cat_id])) {
    
$txt_clickstream .= get_category_path($cat_id1).$config['category_separator'];
  }
  
$txt_clickstream .= $lang['user_upload'];

  if (!
$sendprocess) {
    
$remote_media_file "";
    
$remote_thumb_file "";
    
$image_name "";
    
$image_description "";
    
$image_keywords "";
    
$image_download_url "";
    
$image_allow_comments 1;
  }

  
$site_template->register_vars(array(
    
"cat_id" => $cat_id,
    
"cat_name" => ($cat_id != 0) ? format_text($cat_cache[$cat_id]['cat_name'], 2) : get_category_dropdown($cat_id),
    
"remote_media_file" => format_text(stripslashes($remote_media_file), 2),
    
"remote_thumb_file" => format_text(stripslashes($remote_thumb_file), 2),
    
"image_name" => format_text(stripslashes($image_name), 2),
    
"image_description" => format_text(stripslashes($image_description), 2),
    
"image_keywords" => format_text(stripslashes($image_keywords), 2),
    
"image_allow_comments_yes" => ($image_allow_comments) ? " checked=\"checked\"" "",
    
"image_allow_comments_no" => (!$image_allow_comments) ? " checked=\"checked\"" "",
    
"image_download_url" => format_text(stripslashes($image_download_url), 2),
    
"lang_category" => $lang['category'],
    
"lang_user_upload" => $lang['user_upload'],
    
"lang_media_file" => $lang['media_file'],
    
"lang_thumb_file" => $lang['thumb_file'],
    
"lang_allowed_file_types" => $lang['allowed_mediatypes_desc'],
    
"allowed_media_types" => str_replace(",",", ",$config['allowed_mediatypes']),
    
"allowed_thumb_types" => "jpg, gif, png",
    
"lang_max_filesize" => $lang['max_filesize'],
    
"lang_max_imagewidth" => $lang['max_imagewidth'],
    
"lang_max_imageheight" => $lang['max_imageheight'],
    
"max_thumb_filsize" => $config['max_thumb_size']."&nbsp;".$lang['kb'],
    
"max_thumb_imagewidth" => $config['max_thumb_width']."&nbsp;".$lang['px'],
    
"max_thumb_imageheight" => $config['max_thumb_height']."&nbsp;".$lang['px'],
    
"max_media_filsize" => $config['max_media_size']."&nbsp;".$lang['kb'],
    
"max_media_imagewidth" => $config['max_image_width']."&nbsp;".$lang['px'],
    
"max_media_imageheight" => $config['max_image_height']."&nbsp;".$lang['px'],
    
"lang_image_name" => $lang['image_name'],
    
"lang_description" => $lang['description'],
    
"lang_keywords" => $lang['keywords_ext'],
    
"lang_allow_comments" => isset($lang['allow_comments']) ? $lang['allow_comments'] : "",
    
"lang_submit" => $lang['submit'],
    
"lang_reset" => $lang['reset'],
    
"lang_yes" => $lang['yes'],
    
"lang_no" => $lang['no'],
    
"lang_captcha" => $lang['captcha'],
    
"lang_captcha_desc" => $lang['captcha_desc'],
    
"captcha_upload" => (bool)$captcha_enable_upload
  
));

  if (!empty(
$additional_image_fields)) {
    
$additional_field_array = array();
    foreach (
$additional_image_fields as $key => $val) {
      if (
$val[1] == "radio") {
        
$value = (isset($HTTP_POST_VARS[$key])) ? intval($HTTP_POST_VARS[$key]) : 1;
        if (
$value == 1) {
          
$additional_field_array[$key.'_yes'] = " checked=\"checked\"";
          
$additional_field_array[$key.'_no'] = "";
        }
        else {
          
$additional_field_array[$key.'_yes'] = "";
          
$additional_field_array[$key.'_no'] = " checked=\"checked\"";
        }
      }
      else {
        
$value = (isset($HTTP_POST_VARS[$key])) ? format_text(stripslashes(trim($HTTP_POST_VARS[$key]))) : "";
      }
      
$additional_field_array[$key] = $value;
      
$additional_field_array['lang_'.$key] = $val[0];
    }
    if (!empty(
$additional_field_array)) {
      
$site_template->register_vars($additional_field_array);
    }
  }
  
$content $site_template->parse_template("member_uploadform");
}

Ich habe ein Textfeld angelegt un wollte die Bbcode funktion nutzen.
Code: [Select]
<tr>
   <td class="row2"><b>{lang_aboutme}</b></td>
   <td class="row2"><textarea name="aboutme" cols="30" class="textarea" rows="10">{aboutme}</textarea></td>
</tr>
                <tr>
                  <td width="90" valign="top">&nbsp;</td>
                  <td>{bbcode}</td>
                </tr>
Aber das Bbcode wird nicht angezeigt und die manuelle eingabe wird auch nicht umgewandelt.
=> http://www.4homepages.de/forum/index.php?topic=20747.msg157256#msg157256

Offline ASAD

  • Jr. Member
  • **
  • Posts: 62
    • View Profile
    • Fotos von Grozny
Re: 4images 1.7.10 - Feedback
« Reply #7 on: May 15, 2011, 01:15:17 AM »
Guten Abend Leute,
Ich habe Version 1.7.8, wenn ich aktualisiere bis 1.7.10 bleibt meine Änderungen oder nicht?

Rembrandt

  • Guest
Re: 4images 1.7.10 - Feedback
« Reply #8 on: May 15, 2011, 05:09:20 AM »
Guten Abend Leute,
Ich habe Version 1.7.8, wenn ich aktualisiere bis 1.7.10 bleibt meine Änderungen oder nicht?
http://www.4homepages.de/forum/index.php?topic=29541.msg157243#msg157243

Offline Nosferatu

  • Full Member
  • ***
  • Posts: 230
    • View Profile
    • Project-Firepower
Re: 4images 1.7.10 - Feedback
« Reply #9 on: May 19, 2011, 03:25:11 PM »
es ist schön zu sehen, dass es vorwärts geht ;) thx 4 update ;)

Offline Nosferatu

  • Full Member
  • ***
  • Posts: 230
    • View Profile
    • Project-Firepower
Re: 4images 1.7.10 - Feedback
« Reply #10 on: May 26, 2011, 04:54:45 PM »
Wollt ihr nicht mal ne version 1.8.0 rausbringen oder 2.0 ^^ wo ihr die wichtigsten mods einbaut, wie sitemap, highslide, mulit download size, share this (addthis) ....

mfg
Nosferatu

Rembrandt

  • Guest
Re: 4images 1.7.10 - Feedback
« Reply #11 on: May 26, 2011, 06:57:24 PM »
.... die wichtigsten mods einbaut, wie sitemap, highslide, mulit download size, share this (addthis) ....
...
und was ist daran wichtig?  8)

mfg Andi

Offline Sumale.my

  • Addicted member
  • ******
  • Posts: 1.784
  • Neverdie
    • View Profile
Re: 4images 1.7.10 - Feedback
« Reply #12 on: May 26, 2011, 09:58:33 PM »
 :P

Offline teddy02

  • Newbie
  • *
  • Posts: 27
    • View Profile
Re: 4images 1.7.10 - Feedback
« Reply #13 on: May 30, 2011, 02:26:19 PM »
Hallo,

seit 1.7.10 funktioniert bei einigen unserer Usern und auch bei mir selbst die AutoLogin Funktion nicht mehr.
Cookies und Cache wurden schon mehrfach gelöscht, es will einfach nicht klappen.
Was kann ich tun?

Sonst läuft alles prima, danke für das Update.

Offline Jan-Lukas

  • Addicted member
  • ******
  • Posts: 1.283
    • View Profile
    • Discover the New World of Kindersurprise
Re: 4images 1.7.10 - Feedback
« Reply #14 on: May 30, 2011, 04:59:45 PM »
machst Du jetzt in jeder Rubrik ein Frage und Antwort Spiel ?
http://www.4homepages.de/forum/index.php?topic=29625.msg157525;topicseen#msg157525
Danke Harald




 

Post your comments here