Hi Freunde, hab gerade nen Fehler in der aktuellen Version entdeckt der mir das Plugin unbrauchbar gemacht hat. Es geht um die Database Prefix, das bisherige funktioniert nur wenn man kein anderes als 'wp_' verwendet. Beim korrigierten erfolgt der Aufruf der Tabellen 'langs' und 'langs2translate' nun entsprechend mit den Variablen.
Insgesamt 3 mal wird in multilingual.php jede Tabelle aufgerufen, falls es noch weitere geben sollte bitte Bescheid geben.
Nachfolgend der alte Code (ziemlich unten ab ca 2250):
Code
# Managment
[...]
/*** category ***/
//$res = $GLOBALS['wpdb']->get_results("SELECT t.term_id, t.name FROM ".$GLOBALS['table_prefix']."term_taxonomy tt, ".$GLOBALS['table_prefix']."terms t WHERE tt.taxonomy = 'category' AND tt.term_id = t.term_id", ARRAY_A);
$res = $GLOBALS['wpdb']->get_results("SELECT t.term_id, t.name, (select GROUP_CONCAT(CONCAT(lang_shortcode,': ', translation_name) order by lang_shortcode separator ', ')
from wp_langs2translations lt, wp_langs l where lt.lang_id = l.lang_id and lt.item = t.term_id and tr_type = tt.taxonomy group by lt.item) as translation
[...]
/*** tags ***/
echo "<div id='jlink_category' class='editcat'>";
//$res = $GLOBALS['wpdb']->get_results("SELECT t.term_id, t.name FROM ".$GLOBALS['table_prefix']."term_taxonomy tt, ".$GLOBALS['table_prefix']."terms t WHERE tt.taxonomy = 'link_category' AND tt.term_id = t.term_id", ARRAY_A);
$res = $GLOBALS['wpdb']->get_results("SELECT t.term_id, t.name, (select GROUP_CONCAT(CONCAT(lang_shortcode,': ', translation_name) order by lang_shortcode separator ', ')
from wp_langs2translations lt, wp_langs l where lt.lang_id = l.lang_id and lt.item = t.term_id and tr_type = tt.taxonomy group by lt.item) as translation
[...]
echo "<div id='jtags' class='editcat'>";
//$res = $GLOBALS['wpdb']->get_results("SELECT t.term_id, t.name FROM ".$GLOBALS['table_prefix']."term_taxonomy tt, ".$GLOBALS['table_prefix']."terms t WHERE tt.taxonomy = 'post_tag' AND tt.term_id = t.term_id", ARRAY_A);
$res = $GLOBALS['wpdb']->get_results("SELECT t.term_id, t.name, (select GROUP_CONCAT(CONCAT(lang_shortcode,': ', translation_name) order by lang_shortcode separator ', ')
from wp_langs2translations lt, wp_langs l where lt.lang_id = l.lang_id and lt.item = t.term_id and tr_type = tt.taxonomy group by lt.item) as translation
Alles anzeigen
Und die korrigierte Version:
Code
# Managment
[...]
/*** category ***/
//$res = $GLOBALS['wpdb']->get_results("SELECT t.term_id, t.name FROM ".$GLOBALS['table_prefix']."term_taxonomy tt, ".$GLOBALS['table_prefix']."terms t WHERE tt.taxonomy = 'category' AND tt.term_id = t.term_id", ARRAY_A);
$res = $GLOBALS['wpdb']->get_results("SELECT t.term_id, t.name, (select GROUP_CONCAT(CONCAT(lang_shortcode,': ', translation_name) order by lang_shortcode separator ', ')
from [B]".$GLOBALS['table_prefix']."langs2translations[/B] lt, [B]".$GLOBALS['table_prefix']."langs[/B] l where lt.lang_id = l.lang_id and lt.item = t.term_id and tr_type = tt.taxonomy group by lt.item) as translation
[...]
/*** tags ***/
echo "<div id='jlink_category' class='editcat'>";
//$res = $GLOBALS['wpdb']->get_results("SELECT t.term_id, t.name FROM ".$GLOBALS['table_prefix']."term_taxonomy tt, ".$GLOBALS['table_prefix']."terms t WHERE tt.taxonomy = 'link_category' AND tt.term_id = t.term_id", ARRAY_A);
$res = $GLOBALS['wpdb']->get_results("SELECT t.term_id, t.name, (select GROUP_CONCAT(CONCAT(lang_shortcode,': ', translation_name) order by lang_shortcode separator ', ')
from [B]".$GLOBALS['table_prefix']."langs2translations[/B] lt, [B]".$GLOBALS['table_prefix']."langs[/B] l where lt.lang_id = l.lang_id and lt.item = t.term_id and tr_type = tt.taxonomy group by lt.item) as translation
[...]
echo "<div id='jtags' class='editcat'>";
//$res = $GLOBALS['wpdb']->get_results("SELECT t.term_id, t.name FROM ".$GLOBALS['table_prefix']."term_taxonomy tt, ".$GLOBALS['table_prefix']."terms t WHERE tt.taxonomy = 'post_tag' AND tt.term_id = t.term_id", ARRAY_A);
$res = $GLOBALS['wpdb']->get_results("SELECT t.term_id, t.name, (select GROUP_CONCAT(CONCAT(lang_shortcode,': ', translation_name) order by lang_shortcode separator ', ')
from [B]".$GLOBALS['table_prefix']."langs2translations[/B] lt, [B]".$GLOBALS['table_prefix']."langs[/B] l where lt.lang_id = l.lang_id and lt.item = t.term_id and tr_type = tt.taxonomy group by lt.item) as translation
Alles anzeigen