vTiger – deutsche Auswahllisten in vTiger 5.3 sortieren

  • Beitrags-Autor:
  • Beitrags-Kategorie:EDV / vTiger
  • Beitrags-Kommentare:0 Kommentare

Warning: preg_match(): Compilation failed: invalid range in character class at offset 4 in /home/users/stefanwarnat/www/wp-content/plugins/lightbox-plus/classes/shd.class.php on line 1384

Warning: preg_match(): Compilation failed: invalid range in character class at offset 4 in /home/users/stefanwarnat/www/wp-content/plugins/lightbox-plus/classes/shd.class.php on line 1384

Warning: preg_match(): Compilation failed: invalid range in character class at offset 4 in /home/users/stefanwarnat/www/wp-content/plugins/lightbox-plus/classes/shd.class.php on line 1384

Warning: preg_match(): Compilation failed: invalid range in character class at offset 4 in /home/users/stefanwarnat/www/wp-content/plugins/lightbox-plus/classes/shd.class.php on line 1384

Warning: preg_match(): Compilation failed: invalid range in character class at offset 4 in /home/users/stefanwarnat/www/wp-content/plugins/lightbox-plus/classes/shd.class.php on line 1384

Warning: preg_match(): Compilation failed: invalid range in character class at offset 4 in /home/users/stefanwarnat/www/wp-content/plugins/lightbox-plus/classes/shd.class.php on line 1384

Warning: preg_match(): Compilation failed: invalid range in character class at offset 4 in /home/users/stefanwarnat/www/wp-content/plugins/lightbox-plus/classes/shd.class.php on line 1384

Warning: preg_match(): Compilation failed: invalid range in character class at offset 4 in /home/users/stefanwarnat/www/wp-content/plugins/lightbox-plus/classes/shd.class.php on line 1384

Warning: preg_match(): Compilation failed: invalid range in character class at offset 4 in /home/users/stefanwarnat/www/wp-content/plugins/lightbox-plus/classes/shd.class.php on line 1384

Warning: preg_match(): Compilation failed: invalid range in character class at offset 4 in /home/users/stefanwarnat/www/wp-content/plugins/lightbox-plus/classes/shd.class.php on line 1384

Warning: preg_match(): Compilation failed: invalid range in character class at offset 4 in /home/users/stefanwarnat/www/wp-content/plugins/lightbox-plus/classes/shd.class.php on line 1384

Warning: preg_match(): Compilation failed: invalid range in character class at offset 4 in /home/users/stefanwarnat/www/wp-content/plugins/lightbox-plus/classes/shd.class.php on line 1384

Warning: preg_match(): Compilation failed: invalid range in character class at offset 4 in /home/users/stefanwarnat/www/wp-content/plugins/lightbox-plus/classes/shd.class.php on line 1384

Warning: preg_match(): Compilation failed: invalid range in character class at offset 4 in /home/users/stefanwarnat/www/wp-content/plugins/lightbox-plus/classes/shd.class.php on line 1384

Warning: preg_match(): Compilation failed: invalid range in character class at offset 4 in /home/users/stefanwarnat/www/wp-content/plugins/lightbox-plus/classes/shd.class.php on line 1384

Warning: preg_match(): Compilation failed: invalid range in character class at offset 4 in /home/users/stefanwarnat/www/wp-content/plugins/lightbox-plus/classes/shd.class.php on line 1384

Warning: preg_match(): Compilation failed: invalid range in character class at offset 4 in /home/users/stefanwarnat/www/wp-content/plugins/lightbox-plus/classes/shd.class.php on line 1384

Warning: preg_match(): Compilation failed: invalid range in character class at offset 4 in /home/users/stefanwarnat/www/wp-content/plugins/lightbox-plus/classes/shd.class.php on line 1384

Warning: preg_match(): Compilation failed: invalid range in character class at offset 4 in /home/users/stefanwarnat/www/wp-content/plugins/lightbox-plus/classes/shd.class.php on line 1384

Warning: preg_match(): Compilation failed: invalid range in character class at offset 4 in /home/users/stefanwarnat/www/wp-content/plugins/lightbox-plus/classes/shd.class.php on line 1384

Warning: preg_match(): Compilation failed: invalid range in character class at offset 4 in /home/users/stefanwarnat/www/wp-content/plugins/lightbox-plus/classes/shd.class.php on line 1384

Warning: preg_match(): Compilation failed: invalid range in character class at offset 4 in /home/users/stefanwarnat/www/wp-content/plugins/lightbox-plus/classes/shd.class.php on line 1384

Warning: preg_match(): Compilation failed: invalid range in character class at offset 4 in /home/users/stefanwarnat/www/wp-content/plugins/lightbox-plus/classes/shd.class.php on line 1384

Warning: preg_match(): Compilation failed: invalid range in character class at offset 4 in /home/users/stefanwarnat/www/wp-content/plugins/lightbox-plus/classes/shd.class.php on line 1384

Warning: preg_match(): Compilation failed: invalid range in character class at offset 4 in /home/users/stefanwarnat/www/wp-content/plugins/lightbox-plus/classes/shd.class.php on line 1384

Warning: preg_match(): Compilation failed: invalid range in character class at offset 4 in /home/users/stefanwarnat/www/wp-content/plugins/lightbox-plus/classes/shd.class.php on line 1384

Warning: preg_match(): Compilation failed: invalid range in character class at offset 4 in /home/users/stefanwarnat/www/wp-content/plugins/lightbox-plus/classes/shd.class.php on line 1384

Warning: preg_match(): Compilation failed: invalid range in character class at offset 4 in /home/users/stefanwarnat/www/wp-content/plugins/lightbox-plus/classes/shd.class.php on line 1384

Warning: preg_match(): Compilation failed: invalid range in character class at offset 4 in /home/users/stefanwarnat/www/wp-content/plugins/lightbox-plus/classes/shd.class.php on line 1384

Warning: preg_match(): Compilation failed: invalid range in character class at offset 4 in /home/users/stefanwarnat/www/wp-content/plugins/lightbox-plus/classes/shd.class.php on line 1384

Warning: preg_match(): Compilation failed: invalid range in character class at offset 4 in /home/users/stefanwarnat/www/wp-content/plugins/lightbox-plus/classes/shd.class.php on line 1384

Warning: preg_match(): Compilation failed: invalid range in character class at offset 4 in /home/users/stefanwarnat/www/wp-content/plugins/lightbox-plus/classes/shd.class.php on line 1384

Warning: preg_match(): Compilation failed: invalid range in character class at offset 4 in /home/users/stefanwarnat/www/wp-content/plugins/lightbox-plus/classes/shd.class.php on line 1384

Warning: preg_match(): Compilation failed: invalid range in character class at offset 4 in /home/users/stefanwarnat/www/wp-content/plugins/lightbox-plus/classes/shd.class.php on line 1384

Warning: preg_match(): Compilation failed: invalid range in character class at offset 4 in /home/users/stefanwarnat/www/wp-content/plugins/lightbox-plus/classes/shd.class.php on line 1384

Warning: preg_match(): Compilation failed: invalid range in character class at offset 4 in /home/users/stefanwarnat/www/wp-content/plugins/lightbox-plus/classes/shd.class.php on line 1384

Warning: preg_match(): Compilation failed: invalid range in character class at offset 4 in /home/users/stefanwarnat/www/wp-content/plugins/lightbox-plus/classes/shd.class.php on line 1384

Warning: preg_match(): Compilation failed: invalid range in character class at offset 4 in /home/users/stefanwarnat/www/wp-content/plugins/lightbox-plus/classes/shd.class.php on line 1384

Warning: preg_match(): Compilation failed: invalid range in character class at offset 4 in /home/users/stefanwarnat/www/wp-content/plugins/lightbox-plus/classes/shd.class.php on line 1384

Warning: preg_match_all(): Compilation failed: invalid range in character class at offset 4 in /home/users/stefanwarnat/www/wp-content/plugins/lightbox-plus/classes/shd.class.php on line 700

Warning: foreach() argument must be of type array|object, null given in /home/users/stefanwarnat/www/wp-content/plugins/lightbox-plus/classes/shd.class.php on line 707

Warning: preg_match_all(): Compilation failed: invalid range in character class at offset 4 in /home/users/stefanwarnat/www/wp-content/plugins/lightbox-plus/classes/shd.class.php on line 700

Warning: foreach() argument must be of type array|object, null given in /home/users/stefanwarnat/www/wp-content/plugins/lightbox-plus/classes/shd.class.php on line 707

Hallo Zusammen,

Heute soll es wiedereinmal um eine Modifikation des CRM vTiger 5.3 gehen, welche ich aktuallisiert habe.
Diese sortiert alle Auswahllisten im System, welche in bei deutscher Spracheinstellung unsortiert erscheinen, alphabetisch. Ausgenommen von dieser Regelung sind alle Auswahllisten, welche einen Status zeigen, sprich Angebotsstatus, Rechnungsstatus etc. Diese erscheinen auch weiterhin in ihrer „thematischen“ Sortierung.

Damit diese Listen in Zukunft nach Ihrem deutschem Wortlaut sortiert werden, sind folgende zwei kleine Anpassungen notwendig:

/include/utils/EditViewUtils.php [~Line 225]

Suchen (Für uitype 15 und 33):

$fieldvalue [] = $options;

Zuvor einfügen:

/** 2012-02-08 PICKLIST SORTER - MODIFIED BY SWARNAT START **/
if(strpos($fieldname, "status") === false && strpos($fieldname, "stage") === false) {    
usort($options, "sw_sortOptions"); 
/** MODIFIED BY SWARNAT ENDE **/

Ganz am Ende der Datei einfügen:

/** 2012-02-08 PICKLIST SORTER - MODIFIED BY SWARNAT START **/
/**
 * Diese Funktion sortiert die von vTiger erstellten Options-Einträge nach der deutschen Einträge
 * @author Stefan Warnat <ich@stefanwarnat.de>
 */
function sw_sortOptions($a, $b) {
    if(strtolower($a[0]) == strtolower($b[0])) return 0;
    return (strtolower($a[0])<strtolower($b[0]))?-1:1;
}
/** MODIFIED BY SWARNAT ENDE **/

/include/utils/DetailViewUtils.php

Suchen: [~Line 219, innerhalb „if(uitype == 15) {„]

$label_fld ["options"] = $options;

Zuvor einfügen:

/** 2012-02-09 PICKLIST SORTER - MODIFIED BY SWARNAT START **/
if(strpos($fieldname, "status") === false && strpos($fieldname, "stage") === false) {
          usort($options, "sw_sortOptions_detail");
}
/** MODIFIED BY SWARNAT ENDE **/

Suchen: [~Line 329, innerhalb „if(uitype == 33) {„]

$label_fld ["options"] = $options;

Zuvor einfügen:

/** 2012-02-09 PICKLIST SORTER - MODIFIED BY SWARNAT START **/
if(strpos($fieldname, "status") === false && strpos($fieldname, "stage") === false) {
          usort($options, "sw_sortOptions_detail");
}
/** MODIFIED BY SWARNAT ENDE **/

Ganz am Ende der Datei einfügen:

/** 2012-02-09 PICKLIST SORTER - MODIFIED BY SWARNAT START **/
/**
 * Diese Funktion sortiert die von vTiger erstellten Options-Einträge nach der deutschen Einträge
 * @author Stefan Warnat <ich@stefanwarnat.de>
 */
function sw_sortOptions_detail($a, $b) {
 if(strtolower($a[0]) == strtolower($b[0])) return 0;
 return (strtolower($a[0])<strtolower($b[0]))?-1:1;
}
/** MODIFIED BY SWARNAT ENDE **/

Getestet habe ich diese Erweiterung inzwischen ziemlich intensiv und auch optimiert. Sie sollte also laufen.

Vielleicht ist diese kleine Erweiterung für den einen oder anderen ja doch nützlich und Sie wird eingesetzt.

Bis zum nächsten Post,

Stefan


Schreibe einen Kommentar