4images Forum & Community
Welcome, Guest. Please login or register.
Did you miss your activation email?
March 20, 2019, 10:20:48 AM

Login with username, password and session length
Search:     Advanced search
4images is now on facebook. Click here and become a fan!
Togle to toolbar
Translate this page with =>
Translate this page >
* Home Help Search Login Register
 
+  4images Forum & Community
|-+  4images Help / Hilfe
| |-+  Bug Fixes & Patches
| | |-+  1.7.2 - 1.7.4 [FIX] mit Umlauten in Kommentaren-/Suche - Comments-/Search
0 Members and 1 Guest are viewing this topic. « previous next »
Pages: «« « 1 2 3 [4] Print
Author Topic: 1.7.2 - 1.7.4 [FIX] mit Umlauten in Kommentaren-/Suche - Comments-/Search  (Read 106126 times)
Jan
Administrator
4images Guru
*****
Offline Offline

Posts: 5024

Thank You
-Given: 0
-Receive: 39


View Profile WWW
« Reply #45 on: February 18, 2008, 10:34:15 AM »

Mit diesem Plugin den Suchindex neu erstellen:
http://www.4homepages.de/forum/index.php?topic=6718.0
Logged

Your first three "must do" before you ask a question:
1. Forum rules
2. FAQ
3. Search
Thotty
Jr. Member
**
Offline Offline

Posts: 53

Thank You
-Given: 0
-Receive: 0


View Profile WWW
« Reply #46 on: February 18, 2008, 12:30:41 PM »

Hallo Jan,

vielen Dank für den Tipp! Smile
Hat prima funktioniert! Very Happy
Logged

RoadDogg
Sr. Member
****
Offline Offline

Posts: 488

Thank You
-Given: 1
-Receive: 1


View Profile WWW
« Reply #47 on: April 01, 2008, 07:23:58 PM »


Fantastisch. Damit funktioniert die Umlautsuche nun auch wieder. Very Happy
Logged

For support requests please don´t forget link to your Gallery/to phpinfo.php
1
2
3
<?
phpinfo()
?>
safe_mode must turned OFF
Please check Error Messages
Markus/TSC
Jr. Member
**
Offline Offline

Posts: 53

Thank You
-Given: 4
-Receive: 0


View Profile
« Reply #48 on: October 13, 2008, 11:41:07 AM »

Hallo!

Kurze Frage: Der zitierte Code ist doch bei der global.php in Version 1.7.6 schon drin, wie ich das gesehen habe.. Ich bin mit der Galerie umgezogen und habe gleichzeitig ein Update von 1.7.4 auf 1.7.6 gemacht und bekomme die Umlaute nicht mehr dargestellt. Nur wäre es ja Quatsch wenn ich den u.a. Code nochmal einfüge, da er ja schon vorhanden ist!?

global.php

 Deutsch das ist der Fix /  English here the fix:

 Deutsch Die komplette Funktion /  English complete function

 Deutsch durch /  English replace with

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
function clean_string($string) {
  $canCheckUTF8Error = defined('PREG_BAD_UTF8_ERROR') && function_exists('preg_last_error');

  // Remove any attribute starting with "on" or xmlns
  $tmp = preg_replace('#(<[^>]+[\x00-\x20\"\'])(on|xmlns)[^>]*>#iUu',"$1>",$string);
  if ($canCheckUTF8Error && (PREG_BAD_UTF8_ERROR == preg_last_error())) {
      $tmp = preg_replace('#(<[^>]+[\x00-\x20\"\'])(on|xmlns)[^>]*>#iU',"$1>",$string);
  }
  $string = $tmp;

  // Remove javascript: and vbscript: protocol
  $tmp = preg_replace('#([a-z]*)[\x00-\x20]*=[\x00-\x20]*([\`\'\"]*)[\x00-\x20]*j[\x00-\x20]*a[\x00-\x20]*v[\x00-\x20]*a[\x00-\x20]*s[\x00-\x20]*c[\x00-\x20]*r[\x00-\x20]*i[\x00-\x20]*p[\x00-\x20]*t[\x00-\x20]*:#iUu','$1=$2nojavascript...',$string);
  if ($canCheckUTF8Error && (PREG_BAD_UTF8_ERROR == preg_last_error())) {
      $tmp = preg_replace('#([a-z]*)[\x00-\x20]*=[\x00-\x20]*([\`\'\"]*)[\x00-\x20]*j[\x00-\x20]*a[\x00-\x20]*v[\x00-\x20]*a[\x00-\x20]*s[\x00-\x20]*c[\x00-\x20]*r[\x00-\x20]*i[\x00-\x20]*p[\x00-\x20]*t[\x00-\x20]*:#iU','$1=$2nojavascript...',$string);
  }
  $string = $tmp;
  $tmp = preg_replace('#([a-z]*)[\x00-\x20]*=[\x00-\x20]*([\`\'\"]*)[\x00-\x20]*v[\x00-\x20]*b[\x00-\x20]*s[\x00-\x20]*c[\x00-\x20]*r[\x00-\x20]*i[\x00-\x20]*p[\x00-\x20]*t[\x00-\x20]*:#iUu','$1=$2novbscript...',$string);
  if ($canCheckUTF8Error && (PREG_BAD_UTF8_ERROR == preg_last_error())) {
      $tmp = preg_replace('#([a-z]*)[\x00-\x20]*=[\x00-\x20]*([\`\'\"]*)[\x00-\x20]*v[\x00-\x20]*b[\x00-\x20]*s[\x00-\x20]*c[\x00-\x20]*r[\x00-\x20]*i[\x00-\x20]*p[\x00-\x20]*t[\x00-\x20]*:#iU','$1=$2novbscript...',$string);
  }
  $string = $tmp;

  // <span style="width: expression(alert('Ping!'));"></span>
  // only works in ie...
  $string = preg_replace('#(<[^>]+)style[\x00-\x20]*=[\x00-\x20]*([\`\'\"]*).*expression[\x00-\x20]*\([^>]*>#iU',"$1>",$string);
  $string = preg_replace('#(<[^>]+)style[\x00-\x20]*=[\x00-\x20]*([\`\'\"]*).*behaviour[\x00-\x20]*\([^>]*>#iU',"$1>",$string);
  $tmp = preg_replace('#(<[^>]+)style[\x00-\x20]*=[\x00-\x20]*([\`\'\"]*).*s[\x00-\x20]*c[\x00-\x20]*r[\x00-\x20]*i[\x00-\x20]*p[\x00-\x20]*t[\x00-\x20]*:*[^>]*>#iUu',"$1>",$string);
  if ($canCheckUTF8Error && (PREG_BAD_UTF8_ERROR == preg_last_error())) {
      $tmp = preg_replace('#(<[^>]+)style[\x00-\x20]*=[\x00-\x20]*([\`\'\"]*).*s[\x00-\x20]*c[\x00-\x20]*r[\x00-\x20]*i[\x00-\x20]*p[\x00-\x20]*t[\x00-\x20]*:*[^>]*>#iU',"$1>",$string);
  }
  $string = $tmp;

  // Remove namespaced elements (we do not need them...)
  $string = preg_replace('#</*\w+:\w[^>]*>#i',"",$string);

  // Remove all control (i.e. with ASCII value lower than 0x20 (space),
  // except of 0x0A (line feed) and 0x09 (tabulator)
  $search =
    "\x00\x01\x02\x03\x04\x05\x06\x07\x08\x0B\x0C\x0E\x0F\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1A\x1B\x1C\x1D\x1E\x1F";
  $replace = //str_repeat("\r", strlen($search2));
    "\x0D\x0D\x0D\x0D\x0D\x0D\x0D\x0D\x0D\x0D\x0D\x0D\x0D\x0D\x0D\x0D\x0D\x0D\x0D\x0D\x0D\x0D\x0D\x0D\x0D\x0D\x0D\x0D\x0D";

  $string = str_replace("\r\n", "\n", $string);
  $string = str_replace("\r",   "\n", $string);
  $string = strtr($string, $search, $replace);
  $string = str_replace("\r", '', $string);  // \r === \x0D

  // Remove really unwanted tags
  do {
    $oldstring = $string;
    $string = preg_replace('#</*(applet|meta|xml|blink|link|style|script|embed|object|iframe|frame|frameset|ilayer|layer|bgsound|title|base)[^>]*>#i',"",$string);
  } while ($oldstring != $string);

  return $string;
}

function clean_array($array) {
  foreach ($array as $key => $val) {
    $key = clean_string($key);

    if (is_array($val)) {
      $val = clean_array($val);
    } else {
      $val = clean_string($val);
    }

    $array[$key] = $val;
  }

  return $array;
}

 Deutsch ersetzen.
Logged
kai
Administrator
Addicted member
*****
Offline Offline

Posts: 1405

Thank You
-Given: 66
-Receive: 205


View Profile WWW
« Reply #49 on: October 13, 2008, 12:53:28 PM »

@ Markus / TSC:
Beim Import der DB hast Du wahrscheinlich eine andere collation gewählt.

http://www.4homepages.de/forum/index.php?topic=16651.0
Logged


Your first three "must do" before you ask a question:
1. Forum rules
2. FAQ
3. Search
ivan
4images Moderator
4images Guru
*****
Offline Offline

Posts: 2279

Thank You
-Given: 4
-Receive: 31


View Profile WWW
« Reply #50 on: October 13, 2008, 01:03:58 PM »

dies ist in der 1.7.6 schon enthalten.
prüfe, ob der fehler aus der datenbank oder in den sprach texten vorkommt!
(wie kai schon beschrieben hat)

gruss ivan
Logged

greetings / grüsse
ivan

Facebook Fan Page | Follow Twitter

Blog: Reisen Blog
Bilder Gallery: Bilder Gallery
shahrahan
Pre-Newbie

Offline Offline

Posts: 6

Thank You
-Given: 0
-Receive: 0


View Profile WWW
« Reply #51 on: December 30, 2018, 07:36:42 AM »

als anhang noch die datenbank struktur mit kollation latin1_general_ci
Logged

میلگرد | قیمت میلگرد
Pages: «« « 1 2 3 [4] Print 
« previous next »
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!
Page created in 0.218 seconds with 19 queries.