Author Topic: 4images 1.8 - Feedback  (Read 31254 times)

0 Members and 1 Guest are viewing this topic.

Offline kai

  • Administrator
  • Addicted member
  • *****
  • Posts: 1.418
    • View Profile
    • 4images - Image Gallery Management System
4images 1.8 - Feedback
« on: November 16, 2016, 12:49:33 PM »
Please use this thread for feedback and comments about the 4images 1.8 release.
For general bug reporting and troubleshooting please use this forum.

Bitte nutzt diesen Thread für Feedback, Kommentare und Anregungen zum 4images 1.8 Release.
Für allgemeine Bug Reports und Troubleshooting bitte dieses Forum nutzen.
Your first three "must do" before you ask a question:
1. Forum rules
2. FAQ
3. Search

Offline senloel

  • Full Member
  • ***
  • Posts: 196
    • View Profile
Re: 4images 1.8 - Feedback
« Reply #1 on: November 16, 2016, 05:00:59 PM »
Erstmal ist es natürlich schön, dass sich hier noch etwas tut, aber...

... gibt es keinen genauen Changelog?
Hat man 4images den eigenen Bedürfnissen angepasst (und das ist bei mir definitiv sehr umfangreich der Fall), steht man jetzt vor einem kleinen Problemchen.

Grüße
Patrick

Offline nobby

  • 4images Guru
  • *******
  • Posts: 2.873
    • View Profile
Re: 4images 1.8 - Feedback
« Reply #2 on: November 16, 2016, 05:54:23 PM »
Erstmal ist es natürlich schön, dass sich hier noch etwas tut, aber...

... gibt es keinen genauen Changelog?
Hat man 4images den eigenen Bedürfnissen angepasst (und das ist bei mir definitiv sehr umfangreich der Fall), steht man jetzt vor einem kleinen Problemchen.

Grüße
Patrick

Changelog gibt es doch hier  :arrow: http://www.4homepages.de/forum/index.php?topic=31920.msg166611#new

 8O

nobby

Offline senloel

  • Full Member
  • ***
  • Posts: 196
    • View Profile
Re: 4images 1.8 - Feedback
« Reply #3 on: November 16, 2016, 08:08:59 PM »
Und welche Dateien wurden alle geändert?

Ich glaube kaum, dass die email.php die einzige Datei ist.

Offline nobby

  • 4images Guru
  • *******
  • Posts: 2.873
    • View Profile
Re: 4images 1.8 - Feedback
« Reply #4 on: November 16, 2016, 08:35:10 PM »
Und welche Dateien wurden alle geändert?

Ich glaube kaum, dass die email.php die einzige Datei ist.

Kommt vielleicht ja noch  :wink:

Offline Sunny C.

  • Addicted member
  • ******
  • Posts: 1.804
  • I ♥ 4I
    • View Profile
Re: 4images 1.8 - Feedback
« Reply #5 on: November 17, 2016, 11:20:36 PM »
Here is a detailed list of what has been changed in the php files from 4images 1.7.13 -> 1.8.
(The best way for yourself to compare the code of files is to use Winmerge.)


Open: admin/comments.php
Quote
search:
if ($action == "") {
  
$action "modifycomments";
}

add after
$orderbyOptions = array(
  
'i.image_name' => $lang['field_image_name'],
  
'c.image_id' => $lang['image'] . ' ID',
  
'c.user_name' => $lang['field_username'],
  
'c.comment_headline' => $lang['field_headline'],
  
'c.comment_date' => $lang['field_date'],
);

search
  <select name="orderby">
  <
option value="i.image_name" selected><?php echo $lang['field_image_name'?></option>
  <option value="c.image_id" selected><?php echo $lang['image'?> ID</option>
  <option value="c.user_name"><?php echo $lang['field_username'?></option>
  <option value="c.comment_headline"><?php echo $lang['field_headline'?></option>
  <option value="c.comment_date"><?php echo $lang['field_date'?></option>
  </select>

replace with

  
<select name="orderby">
  <?
php foreach ($orderbyOptions as $field => $label): ?>
  <option value="<?php echo $field?>"><?php echo $label?></option>
  <?php endforeach; ?>
  </select>

search
  $orderby trim($HTTP_POST_VARS['orderby']);
  if (
$orderby == "") {
    
$orderby "i.image_name";

replace with
  $orderby trim($HTTP_POST_VARS['orderby']);
  if (!isset(
$orderbyOptions[$orderby])) {
    
$orderby "i.image_name";
  }

search
  if (isset($HTTP_GET_VARS['direction']) || isset($HTTP_POST_VARS['direction'])) {
    
$direction = (isset($HTTP_GET_VARS['direction'])) ? trim($HTTP_GET_VARS['direction']) : trim($HTTP_POST_VARS['direction']);
  }
  else {
    
$direction "ASC";
  }

replace with
  $direction "ASC";
  if (isset(
$HTTP_GET_VARS['direction']) || isset($HTTP_POST_VARS['direction'])) {
    
$requestedDirection = (isset($HTTP_GET_VARS['direction'])) ? trim($HTTP_GET_VARS['direction']) : trim($HTTP_POST_VARS['direction']);

    if (
'DESC' === $requestedDirection) {
      
$direction "DESC";
    }
  }

Open: admin/images.php
Quote
search
if ($action == "") {
  
$action "modifyimages";
}

add after
$orderbyOptions = array(
  
'i.image_name' => $lang['field_image_name'],
  
'i.image_media_file' => $lang['field_image_file'],
  
'i.image_thumb_file' => $lang['field_thumb_file'],
  
'i.cat_id' => $lang['field_category'],
  
'i.image_date' => $lang['field_date'],
  
'i.image_downloads' => $lang['field_downloads'],
  
'i.image_rating' => $lang['field_rating'],
  
'i.image_votes' => $lang['field_votes'],
  
'i.image_hits' => $lang['field_hits'],
);

search
  <select name="orderby">
  <
option value="i.image_name" selected><?php echo $lang['field_image_name'?></option>
  <option value="i.image_media_file"><?php echo $lang['field_image_file'?></option>
  <option value="i.image_thumb_file"><?php echo $lang['field_thumb_file'?></option>
  <option value="i.cat_id"><?php echo $lang['field_category'?></option>
  <option value="i.image_date"><?php echo $lang['field_date'?></option>
  <option value="i.image_downloads"><?php echo $lang['field_downloads'?></option>
  <option value="i.image_rating"><?php echo $lang['field_rating'?></option>
  <option value="i.image_votes"><?php echo $lang['field_votes'?></option>
  <option value="i.image_hits"><?php echo $lang['field_hits'?></option>
  </select>

replace with
  <select name="orderby">
  <?
php foreach ($orderbyOptions as $field => $label): ?>
  <option value="<?php echo $field?>"><?php echo $label?></option>
  <?php endforeach; ?>
  </select>

search
  $orderby trim($HTTP_POST_VARS['orderby']);
  if (
$orderby == "") {
    
$orderby "i.image_name";
  }

replace with
  $orderby trim($HTTP_POST_VARS['orderby']);
  if (!isset(
$orderbyOptions[$orderby])) {
    
$orderby "i.image_name";
  }

search
  if (isset($HTTP_GET_VARS['direction']) || isset($HTTP_POST_VARS['direction'])) {
    
$direction = (isset($HTTP_GET_VARS['direction'])) ? trim($HTTP_GET_VARS['direction']) : trim($HTTP_POST_VARS['direction']);
  }
  else {
    
$direction "ASC";
  }

replace with
  $direction "ASC";
  if (isset(
$HTTP_GET_VARS['direction']) || isset($HTTP_POST_VARS['direction'])) {
    
$requestedDirection = (isset($HTTP_GET_VARS['direction'])) ? trim($HTTP_GET_VARS['direction']) : trim($HTTP_POST_VARS['direction']);

    if (
'DESC' === $requestedDirection) {
      
$direction "DESC";
    }
  }


Open: admin/progress.php
Quote
search
Code: [Select]
<body onload="start_animation()">replace with
Code: [Select]
<body onLoad="start_animation()">

Open: admin/users.php
Quote
search
if ($action == "") {
  
$action "modifyusers";
}

add after
$orderbyOptions = array(
  
get_user_table_field("""user_name") => $lang['field_username'],
  
get_user_table_field("""user_email") => $lang['field_email'],
  
get_user_table_field("""user_joindate") => $lang['field_joindate'],
  
get_user_table_field("""user_lastaction") => $lang['field_lastaction'],
);

search
  <select name="orderby">
  <
option value="<?php echo get_user_table_field("", "user_name"); ?>" selected><?php echo $lang['field_username']; ?></option>
  <option value="<?php echo get_user_table_field("""user_email"); ?>"><?php echo $lang['field_email']; ?></option>
  <option value="<?php echo get_user_table_field("""user_joindate"); ?>"><?php echo $lang['field_joindate']; ?></option>
  <option value="<?php echo get_user_table_field("""user_lastaction"); ?>"><?php echo $lang['field_lastaction']; ?></option>
  </select>

replace with
  <select name="orderby">
  <?
php foreach ($orderbyOptions as $field => $label): ?>
  <option value="<?php echo $field?>"><?php echo $label?></option>
  <?php endforeach; ?>
  </select>

search
  $orderby trim($HTTP_POST_VARS['orderby']);
  if (
$orderby == "") {
    
$orderby get_user_table_field("""user_name");
  }

replace with
  $orderby trim($HTTP_POST_VARS['orderby']);
  if (!isset(
$orderbyOptions[$orderby])) {
    
$orderby get_user_table_field("""user_name");
  }

search
  if (isset($HTTP_GET_VARS['direction']) || isset($HTTP_POST_VARS['direction'])) {
    
$direction = (isset($HTTP_GET_VARS['direction'])) ? trim($HTTP_GET_VARS['direction']) : trim($HTTP_POST_VARS['direction']);
  }
  else {
    
$direction "ASC";
  }

replace with
  $direction "ASC";
  if (isset(
$HTTP_GET_VARS['direction']) || isset($HTTP_POST_VARS['direction'])) {
    
$requestedDirection = (isset($HTTP_GET_VARS['direction'])) ? trim($HTTP_GET_VARS['direction']) : trim($HTTP_POST_VARS['direction']);

    if (
'DESC' === $requestedDirection) {
      
$direction "DESC";
    }
  }


Open: admin/validateimages.php
Quote
search
  if (isset($HTTP_GET_VARS['orderby']) || isset($HTTP_POST_VARS['orderby'])) {
    
$orderby = (isset($HTTP_GET_VARS['orderby'])) ? stripslashes(trim($HTTP_GET_VARS['orderby'])) : stripslashes(trim($HTTP_POST_VARS['orderby']));
  }
  else {
    
$orderby "i.image_date";
  }

replace with
  $orderbyOptions = array(
    
'i.image_name' => $lang['field_image_name'],
    
'i.cat_id' => $lang['field_category'],
    
'i.image_date' => $lang['field_date'],
    
get_user_table_field("u.""user_name") => $lang['field_username']
  );

  
$orderby "i.image_date";

  if (isset(
$HTTP_GET_VARS['orderby']) || isset($HTTP_POST_VARS['orderby'])) {
    
$requestedOrderby = (isset($HTTP_GET_VARS['orderby'])) ? stripslashes(trim($HTTP_GET_VARS['orderby'])) : stripslashes(trim($HTTP_POST_VARS['orderby']));

    if (isset(
$orderbyOptions[$requestedOrderby])) {
      
$orderby $requestedOrderby;
    }
  }

search
  if (isset($HTTP_GET_VARS['direction']) || isset($HTTP_POST_VARS['direction'])) {
    
$direction = (isset($HTTP_GET_VARS['direction'])) ? trim($HTTP_GET_VARS['direction']) : trim($HTTP_POST_VARS['direction']);
  }
  else {
    
$direction "ASC";
  }

replace with
  $direction "ASC";
  if (isset(
$HTTP_GET_VARS['direction']) || isset($HTTP_POST_VARS['direction'])) {
    
$requestedDirection = (isset($HTTP_GET_VARS['direction'])) ? trim($HTTP_GET_VARS['direction']) : trim($HTTP_POST_VARS['direction']);

    if (
'DESC' === $requestedDirection) {
      
$direction "DESC";
    }
  }

search
  <select name="orderby">
  <
option value="i.image_name" selected><?php echo $lang['field_image_name'?></option>
  <option value="i.cat_id"><?php echo $lang['field_category'?></option>
  <option value="i.image_date"><?php echo $lang['field_date'?></option>
  <option value="<?php echo get_user_table_field("u.""user_name"); ?>"><?php echo $lang['field_username'?></option>
  </select>

replace with
  <select name="orderby">
  <?
php foreach ($orderbyOptions as $field => $label): ?>
  <option value="<?php echo $field?>"><?php echo $label?></option>
  <?php endforeach; ?>
  </select>


Open: includes/constants.php
Quote
search
define('SCRIPT_VERSION''1.7.13');
replace with
define('SCRIPT_VERSION''1.8');

Open: includes/db_mysql.php
Quote
search
  function Db($db_host$db_user$db_password ""$db_name ""$db_pconnect 0) {
replace with
  function __construct($db_host$db_user$db_password ""$db_name ""$db_pconnect 0) {
search
$this->error("Could not connect to the database server ($db_host$db_user)."1);
replace with
$this->error("Could not connect to the database server (".safe_htmlspecialchars($db_host).", ".safe_htmlspecialchars($db_user).")."1);
search
$this->error("Could not select database ($db_name)."1);
replace with
$this->error("Could not select database (".safe_htmlspecialchars($db_name).")."1);
search
    return $this->connection;
  }

  function 
escape($value) {
    return 
mysql_real_escape_string($value$this->connection);
  }

replace with
    mysql_set_charset('utf8'$this->connection);
    return 
$this->connection;
  }

  function 
escape($value) {
    return 
mysql_real_escape_string($value$this->connection);
  }

search
$this->error("<b>Bad SQL Query</b>: ".htmlentities($query)."<br /><b>".mysql_error()."</b>");
replace with
$this->error("<b>Bad SQL Query</b>: ".safe_htmlspecialchars($query)."<br /><b>".safe_htmlspecialchars(mysql_error())."</b>");

Open: includes/email.php
Quote
search
  function Email() {
replace with
  function __construct() {
search
global $config;
add after
global $lang;
search
    return $header;
  }

replace with
    $header .= "Content-Type: text/plain; charset=" strtolower($lang['charset']) . "\r\n";
    return 
$header;
  }


Open: includes/page_header.php
Quote
search
if ($csrf_protection_enable && $csrf_protection_frontend) {
    
csrf_start(true);
}

add after
if (!headers_sent()) {
  
header('Content-Type: text/html;charset=' $lang['charset'], true);
}


Open: includes/paging.php
Quote
search
 function Paging($page 1$perpage 0$num_rows_all 0$link_args "") {
replace with
  function __construct($page 1$perpage 0$num_rows_all 0$link_args "") {

Open: includes/sessions.php
Quote
search
  function Session() {
replace with
 function __construct() {

Open: includes/template.php
Quote
search
  function Template($template_path "") {
replace with
  function __construct($template_path "") {

Open: includes/upload.php
Quote
search
  function Upload() {
replace with
  function __construct() {

Open: includes/zip.php
Quote
search
 function Zipfile($level 9) {
replace with
  function __construct($level 9) {

Open: lang/(deutsch/spanish/english)/main.php
Quote
search
$lang['charset'] = "iso-8859-1";
replace with
$lang['charset'] = "UTF-8";
« Last Edit: November 19, 2016, 05:44:26 PM by Sumale.my »

Offline Nosferatu

  • Full Member
  • ***
  • Posts: 230
    • View Profile
    • Project-Firepower
Re: 4images 1.8 - Feedback
« Reply #6 on: November 20, 2016, 02:52:17 PM »
Many thanks!!!

Problem 1:
Ich hab allerdings einen fehler beim Text wenn ich auf

 $lang
['charset'] = "UTF-8";


ändere - dann habe ich ein paar "?"  

somit lasse ich
$lang['charset'] = "iso-8859-1";

Ist das Problematisch?

Problem 2
Weiteres habe ich immer noch das Problem, dass bei einigen Dingen wo man ändern will - der Link falsch angezeigt wird also

z.b: in der images.php
habe ich http://www.domain.com/picgallerie/.data/media/334/taylor.jpg
statt http://www.domain.com/picgallerie/data/media/334/taylor.jpg

Und die verlinken zu images hauen auch nicht hin die habe ich damals mit müh und not umgebaut, damit ich Bilder bearbeiten kann bzw. das selbe problem ist auch wenn ich ein kommentar bearbeiten will, dass ich gar nicht hin komme weil er

http://www.domain.com/picgallerie/admin/index.php?goto=comments.php%3Faction%3Deditcomment%26amp%3Bcomment_id%3D19603

kommt dann
Not Found
The requested URL /picgallerie/admin/comments.php?action=editcomment&amp;comment_id=19604 was not found on this server.

Wenn ich dann händisch eingebe
http://www.domain.com/picgallerie/admin/comments.php?action=editcomment&comment_id=19604

dann funktioniert es

Offline Sunny C.

  • Addicted member
  • ******
  • Posts: 1.804
  • I ♥ 4I
    • View Profile
Re: 4images 1.8 - Feedback
« Reply #7 on: November 20, 2016, 03:57:53 PM »
Zu Problem 1: Kannst du ruhig so lassen

Zu Problem zwei, die Umlaute werden falsch gesetzt.
Da wirst du wohl durch modifikationen etwas geändert haben.

http://www.domain.com/picgallerie/admin/index.php?goto=comments.php%3Faction%3Deditcomment%26amp%3Bcomment_id%3D19603
%3F ist ?
%3D ist =
&amp; ist &


Offline Nosferatu

  • Full Member
  • ***
  • Posts: 230
    • View Profile
    • Project-Firepower
Re: 4images 1.8 - Feedback
« Reply #8 on: November 21, 2016, 12:26:33 PM »
Meinst beim Script selber?
Wüsste nicht, dass ich beim Script da was gemacht habe bzw. benötige ich nur ganz selten die Edit oder Löschen Funktion - daher ist es mir erst irgendwann aufgefallen  :oops:

Wo wäre dies denn und wie könnte ich es ändern?

Offline ASAD

  • Jr. Member
  • **
  • Posts: 62
    • View Profile
    • Fotos von Grozny
Re: 4images 1.8 - Feedback
« Reply #9 on: March 24, 2017, 11:07:55 PM »
Hi Leute!
Kann ich von 1.7.11 Update auf 1.8?

Offline nobby

  • 4images Guru
  • *******
  • Posts: 2.873
    • View Profile
Re: 4images 1.8 - Feedback
« Reply #10 on: March 25, 2017, 08:35:24 AM »
Hi Leute!
Kann ich von 1.7.11 Update auf 1.8?

Hi,

aber JA doch  :wink:

nobby

Offline ASAD

  • Jr. Member
  • **
  • Posts: 62
    • View Profile
    • Fotos von Grozny
Re: 4images 1.8 - Feedback
« Reply #11 on: March 28, 2017, 06:57:38 PM »
Danke  nobby.

Hab noch frage, ich bekomme ein Fehler wenn Upload Bilder:

Fatal errorCall to undefined function imagecreatefromjpeg() in /public_html/includes/image_utils.php on line 78

Hilft mir niemand?

Danke

Offline nobby

  • 4images Guru
  • *******
  • Posts: 2.873
    • View Profile
Re: 4images 1.8 - Feedback
« Reply #12 on: March 29, 2017, 03:45:01 PM »
Hallo,

gebe mal in der Suche folgendes ein
Code: [Select]
imagecreatefromjpeg
Sollte weiterhelfen...


nobby

Offline ASAD

  • Jr. Member
  • **
  • Posts: 62
    • View Profile
    • Fotos von Grozny
Re: 4images 1.8 - Feedback
« Reply #13 on: March 29, 2017, 05:54:01 PM »
Hallo,

gebe mal in der Suche folgendes ein
Code: [Select]
imagecreatefromjpeg
Sollte weiterhelfen...


nobby
Danke, schon erledigt.
Probleme war mit PHP

Offline kp

  • Newbie
  • *
  • Posts: 17
    • View Profile
    • www.hell-is-open.de
Re: 4images 1.8 - Feedback
« Reply #14 on: October 05, 2017, 08:37:05 PM »
Many thanks!!!

Problem 1:
Ich hab allerdings einen fehler beim Text wenn ich auf

 $lang
['charset'] = "UTF-8";


ändere - dann habe ich ein paar "?"  

somit lasse ich
$lang['charset'] = "iso-8859-1";



Hallo,
ich habe im Prinzip das gleiche Problem.
Da meine ganze Seite NICHT in UTF-8 programmiert ist (und es sich auch nicht so ohne weiteres ändern lässt), muss ich die Galerie auf iso-8859-1 oder windows-1252 weiterlaufen lassen.
Leider tritt das Problem auf, dass alle Texte wie Catergorie oder Description etc. die aus der Datenbank gelesen werden, falsch dargestellt werden.
Zum Beispiel wird München als  München ausgegeben.
Ein Umstellen auf UFT-8 macht es wieder richtig, aber der Rest meiner Seite wird dann falsch dargestellt.

Glaubt mir, ich habe schon 2 volle Tage meines Urlaubs mit probieren und debuggen verbracht.
Habe Funktionen wie formattext htmlspechialschars usw. untersucht aber keine Lösung gefunden.
Habe auch z.B. alle 4Image Dateien in ANSI Foirmat konvertiert usw. aber es bringt nichts.

Man kann es sogar schon gut an der Kategorie-Dropdown-Box sehen.
Der oberste Text der aus der PHP selbst kommt heißt korrekt "Kategorie wählen" mit ä
wohingegen die anderen Texte die Fehler bei den Umlauten aufweisen.

Habe jetzt erst mal aus Verzweiflung und Resignation auf V1.7.13 zurück gewechselt.

Hat jemand eine Idee wieso/wo die Texte aus der mysql DB falsch interpretiert werden?

P.S: Kann bei Bedarf auch die Version 1.8 wieder aufspielen.

Schon mal vielen Dank wenn sich jemand dem Problem anehmen kann.