Die Bilder werden entsprechen ausgegeben, alledings führt die Description zu einem Fehler, meines Erachtens nach dadurch, dass die Spalte description früher in der con_upl war und jetzt in der con_upl_meta ist.
Im Moduloutput steht:
Code: Alles auswählen
...
$db->query($sql);
while ($db->nextRecord()) {
$sDescr = str_replace(array("\r\n", "\r", "\n"), '<br />', sitGetImageDescription($db->f('idupl')));
$oTpl->set('d', 'URL', $sDir . $db->f('filename'));
$oTpl->set('d', 'TITLE', $sDescr);
$oTpl->next();
...
Code: Alles auswählen
...
/**
* sitGetImageDescription()
*
* Liest die Bildbeschreibung aus der Datenbank
*
* Parameter:
* $idupl - ID des Bildeintrags in der Datenbank
*
* Liest die zum Bild gehörenden Beschreibung entweder aus der Tabelle ..._upl_meta
* oder (falls leer) aus der Tabelle ..._upl und liefert diese zurück.
*/
function sitGetImageDescription($idupl) {
global $cfg;
$db = new cDb();
$sDesc = '';
$sql = 'SELECT description
FROM ' . $cfg['tab']['upl_meta'] . '
WHERE (idupl=' . $idupl . ')';
$db->query($sql);
if ($db->nextRecord()) {
$sDesc = urldecode(str_replace(array('%0D%0A', '%0D', '%0A'), '<br />', $db->f('description')));
}
if (strlen(trim($sDesc)) == 0) {
$sql = 'SELECT description
FROM ' . $cfg['tab']['upl'] . '
WHERE (idupl=' . $idupl . ')';
$db->query($sql);
if ($db->nextRecord()) {
$sDesc = urldecode(str_replace(array('%0D%0A', '%0D', '%0A'), '<br />', $db->f('description')));
}
}
return $sDesc;
}
...
PS: Errorlog:
Code: Alles auswählen
[17-Jul-2017 10:12:39 Europe/Berlin] PHP Warning: Database failure: 1054 (Unknown column 'description' in 'field list') - /2017/contenido/external/backendedit/front_content.php?changeview=edit&client=1&lang=1&action=con_editart&idartlang=67&idart=66&idcat=54&tmpchangelang=&contenido=tgrqdetvrslmc2lgn5969klvkigml74u SELECT description
FROM con_upl
WHERE (idupl=114)
in /var/www/vhosts/web39.de/httpdocs/2017/contenido/includes/functions.general.php on line 1428
[2017-07-17 10:12:39] Warning: "Database failure: 1054 (Unknown column 'description' in 'field list') - /2017/contenido/external/backendedit/front_content.php?changeview=edit&client=1&lang=1&action=con_editart&idartlang=67&idart=66&idcat=54&tmpchangelang=&contenido=tgrqdetvrslmc2lgn5969klvkigml74u next_record called with no query pending in Module ID 77.
" at reportHalt() [class.db.driver.handler.php(1005)]
reportHalt() called in file class.db.driver.handler.php(977)
halt() called in file class.db.driver.handler.php(716)
nextRecord() called in file bilder.functions.inc.php(553)
sitGetImageDescription() called in file include.con_editcontent.php(523) : eval()'d code(487)
eval() called in file include.con_editcontent.php(523)
include() called in file include.front_content.php(508)
include() called in file front_content.php(41)