Artikeldatum in Newsmodul
Artikeldatum in Newsmodul
Hallo zusammen,
für Euch ist das folgende doch sicherlich sehr einfach:
Ich möchte im News-Modul nebem der aufgeführten Artikel-Headline das erstelldatum angeben. Allerdings weiß ich nicht welche Variable ist dort ausgeben muss.
Aktuell sieht die Zeile im Newsmodul wie folgt aus:
echo '<tr><td width="100%" class="text" height="22" style="border: 1px; border-top:0px; border-color: #CEC0A3; border-style: solid; background-color: #E1D8C6; padding-left:10px"><a href="'.$link.'">'.$headline.'</a></td></tr>';
Nach "'.$headline.'</a>" müsste nun ja die Variable der Artikelerstellung kommen, nur wie heißt diese. Wäre nett wenn ihr mir helfen könntet.
für Euch ist das folgende doch sicherlich sehr einfach:
Ich möchte im News-Modul nebem der aufgeführten Artikel-Headline das erstelldatum angeben. Allerdings weiß ich nicht welche Variable ist dort ausgeben muss.
Aktuell sieht die Zeile im Newsmodul wie folgt aus:
echo '<tr><td width="100%" class="text" height="22" style="border: 1px; border-top:0px; border-color: #CEC0A3; border-style: solid; background-color: #E1D8C6; padding-left:10px"><a href="'.$link.'">'.$headline.'</a></td></tr>';
Nach "'.$headline.'</a>" müsste nun ja die Variable der Artikelerstellung kommen, nur wie heißt diese. Wäre nett wenn ihr mir helfen könntet.
-
- Beiträge: 3626
- Registriert: Di 12. Okt 2004, 20:00
- Wohnort: Voerde (Niederrhein)
- Kontaktdaten:
Hast du schonmal überlegt, die Suche zu benutzen? Dabei findet man manchmal auch so Sachen wie z.B.:
http://www.contenido.org/forum/viewtopi ... 6060#76060
http://www.contenido.org/forum/viewtopi ... 6060#76060
Also.. ich bekomme es leider immer noch nicht hin!
Ich habe folgende Modulausgabe:
<?php
$selCat = "CMS_VALUE[0]"; // selected category
$maxChar = "CMS_VALUE[3]"; // Max. shown topic length
$lastmod_date = strtotime($aValue["LastModified"]);
$lastmod_date = date('d.m.Y ', $lastmod_date );
if (!is_numeric($maxChar) || $maxChar < 1) {
$maxChar = "50";
}
if(is_numeric($selCat) && $selCat != "0") {
// select all articles in category without start article
$query = "SELECT CONTENT.value AS headline, ARTLANG.idart AS id, " ;
$query .= "CATLANG.startidartlang, ARTLANG.idartlang FROM ";
$query .= $cfg["tab"]["cat_art"]." AS CATART, ";
$query .= $cfg["tab"]["art_lang"]." AS ARTLANG, ";
$query .= $cfg["tab"]["cat_lang"]." AS CATLANG, ";
$query .= $cfg["tab"]["content"]." AS CONTENT ";
$query .= "WHERE CATART.idcat = '$selCat' AND ARTLANG.idlang = '$lang' ";
$query .= "AND CONTENT.idartlang = ARTLANG.idartlang ";
$query .= "AND CATLANG.idlang = ARTLANG.idlang ";
$query .= "AND CATLANG.idcat = CATART.idcat ";
$query .= "AND ARTLANG.idart = CATART.idart ";
$query .= "AND ARTLANG.online = '1' ";
if ("CMS_VALUE[6]" != "enabled") {
$query .= "AND CATLANG.startidartlang != ARTLANG.idartlang ";
}
// Content-Type-Number
if (!is_numeric("CMS_VALUE[8]")) {
$query .= "AND CONTENT.typeid = '1' ";
} else {
$query .= "AND CONTENT.typeid = 'CMS_VALUE[8]' ";
}
// Content-Type
if (!is_numeric("CMS_VALUE[9]")) {
$query .= "AND CONTENT.idtype = '1' ";
} else {
$query .= "AND CONTENT.idtype = 'CMS_VALUE[9]' ";
}
$query .= "ORDER BY ";
/* Does not work in Contenido >= V4.5.x
if ("CMS_VALUE[6]" == "enabled" && "CMS_VALUE[7]" == "enabled") { // Startartikel an erster Stelle
$query .= "CATART.is_start DESC, ";
} */
// Sort by
if ("CMS_VALUE[4]" == "") {
$query .= "CATART.idart ";
} else {
$query .= "CMS_VALUE[4] ";
}
// ASC/DESC
if ("CMS_VALUE[5]" == "") {
$query .= "DESC ";
} else {
$query .= "CMS_VALUE[5] ";
}
// LIMIT
if (is_numeric("CMS_VALUE[10]") && "CMS_VALUE[10]" > 0) {
$query .= "LIMIT 0, CMS_VALUE[10]";
}
// execute query
$db->query($query);
if ($db->num_rows() > 0) {
// Table header
echo '<table width="100%" border="0" cellspacing="0" cellpadding="0">';
echo '<tr><td width="100%" style="border: 2px; border-color: #502b19; background-color: #ADA387; padding-left:10px" class="punkte"><!---CMS_VALUE[2]--->Brandheiße Schlagzeilen:</td><td style="border: 1px; border-top:0px; border-color: #CEC0A3; border-style: solid; background-color: #ADA387; padding-left:10px; padding-right:10px">Datum</td></tr>';
while ($db->next_record()) {
$headline = urldecode($db->f("headline"));
if (strlen($headline) > $maxChar) {
$headline = substr($headline, 0, $maxChar);
$headline .= '..';
}
$link = $sess->url("front_content.php?client=$client&lang=$lang&idcat=$selCat&idart=".$db->f("id"));
echo '<tr><td width="100%" class="text" height="22" style="border: 1px; border-top:0px; border-right:0px; border-color: #CEC0A3; border-style: solid; background-color: #E1D8C6; padding-left:10px"><a href="'.$link.'">'.$headline.'</a></td><td bgcolor="#E1D8C6" align="right" class="text" height="22" style="border: 1px; border-top:0px; border-color: #CEC0A3; border-style: solid; background-color: #E1D8C6; padding-left:10px; padding-right:10px">'.$lastmod_date.'</td></tr>';
}
unset($headline);
echo '</table><br>';
} // end while
} // end if
?>
Unten bei "'.$lastmod_date.'" soll das Datum des jeweiligen Artikels angezeigt werden - allerdings wird leider das Datum des aktuellen Tages gezeigt! Wenn ihr eine Lösung dafür habt, helft mir bitte.
Alle anderen Suchergebnisse zu diesem Thema beziehen sich auf andere Module.
Viele Grüße
Marvel
Ich habe folgende Modulausgabe:
<?php
$selCat = "CMS_VALUE[0]"; // selected category
$maxChar = "CMS_VALUE[3]"; // Max. shown topic length
$lastmod_date = strtotime($aValue["LastModified"]);
$lastmod_date = date('d.m.Y ', $lastmod_date );
if (!is_numeric($maxChar) || $maxChar < 1) {
$maxChar = "50";
}
if(is_numeric($selCat) && $selCat != "0") {
// select all articles in category without start article
$query = "SELECT CONTENT.value AS headline, ARTLANG.idart AS id, " ;
$query .= "CATLANG.startidartlang, ARTLANG.idartlang FROM ";
$query .= $cfg["tab"]["cat_art"]." AS CATART, ";
$query .= $cfg["tab"]["art_lang"]." AS ARTLANG, ";
$query .= $cfg["tab"]["cat_lang"]." AS CATLANG, ";
$query .= $cfg["tab"]["content"]." AS CONTENT ";
$query .= "WHERE CATART.idcat = '$selCat' AND ARTLANG.idlang = '$lang' ";
$query .= "AND CONTENT.idartlang = ARTLANG.idartlang ";
$query .= "AND CATLANG.idlang = ARTLANG.idlang ";
$query .= "AND CATLANG.idcat = CATART.idcat ";
$query .= "AND ARTLANG.idart = CATART.idart ";
$query .= "AND ARTLANG.online = '1' ";
if ("CMS_VALUE[6]" != "enabled") {
$query .= "AND CATLANG.startidartlang != ARTLANG.idartlang ";
}
// Content-Type-Number
if (!is_numeric("CMS_VALUE[8]")) {
$query .= "AND CONTENT.typeid = '1' ";
} else {
$query .= "AND CONTENT.typeid = 'CMS_VALUE[8]' ";
}
// Content-Type
if (!is_numeric("CMS_VALUE[9]")) {
$query .= "AND CONTENT.idtype = '1' ";
} else {
$query .= "AND CONTENT.idtype = 'CMS_VALUE[9]' ";
}
$query .= "ORDER BY ";
/* Does not work in Contenido >= V4.5.x
if ("CMS_VALUE[6]" == "enabled" && "CMS_VALUE[7]" == "enabled") { // Startartikel an erster Stelle
$query .= "CATART.is_start DESC, ";
} */
// Sort by
if ("CMS_VALUE[4]" == "") {
$query .= "CATART.idart ";
} else {
$query .= "CMS_VALUE[4] ";
}
// ASC/DESC
if ("CMS_VALUE[5]" == "") {
$query .= "DESC ";
} else {
$query .= "CMS_VALUE[5] ";
}
// LIMIT
if (is_numeric("CMS_VALUE[10]") && "CMS_VALUE[10]" > 0) {
$query .= "LIMIT 0, CMS_VALUE[10]";
}
// execute query
$db->query($query);
if ($db->num_rows() > 0) {
// Table header
echo '<table width="100%" border="0" cellspacing="0" cellpadding="0">';
echo '<tr><td width="100%" style="border: 2px; border-color: #502b19; background-color: #ADA387; padding-left:10px" class="punkte"><!---CMS_VALUE[2]--->Brandheiße Schlagzeilen:</td><td style="border: 1px; border-top:0px; border-color: #CEC0A3; border-style: solid; background-color: #ADA387; padding-left:10px; padding-right:10px">Datum</td></tr>';
while ($db->next_record()) {
$headline = urldecode($db->f("headline"));
if (strlen($headline) > $maxChar) {
$headline = substr($headline, 0, $maxChar);
$headline .= '..';
}
$link = $sess->url("front_content.php?client=$client&lang=$lang&idcat=$selCat&idart=".$db->f("id"));
echo '<tr><td width="100%" class="text" height="22" style="border: 1px; border-top:0px; border-right:0px; border-color: #CEC0A3; border-style: solid; background-color: #E1D8C6; padding-left:10px"><a href="'.$link.'">'.$headline.'</a></td><td bgcolor="#E1D8C6" align="right" class="text" height="22" style="border: 1px; border-top:0px; border-color: #CEC0A3; border-style: solid; background-color: #E1D8C6; padding-left:10px; padding-right:10px">'.$lastmod_date.'</td></tr>';
}
unset($headline);
echo '</table><br>';
} // end while
} // end if
?>
Unten bei "'.$lastmod_date.'" soll das Datum des jeweiligen Artikels angezeigt werden - allerdings wird leider das Datum des aktuellen Tages gezeigt! Wenn ihr eine Lösung dafür habt, helft mir bitte.
Alle anderen Suchergebnisse zu diesem Thema beziehen sich auf andere Module.
Viele Grüße
Marvel
Marvel,
such mal im Modul Outout nach folgenden Zeilen:
und ergänze dann mit:
Ich habe nicht im Kopf wie die genaue Bezeichnung des Feldes in der Tabelle ist - Erstellungsdatum=created_date ???
Für xxxxxx setzt du die Feldbezeichnung ein die du in myphpAdmin sehen kannst.
$teaser_create ist dann der String den du, analog zu:
in der Template Zuweisung ausgeben kannst.
Und nicht vergessen im Template {ERSTELLDATUM} einzusetzen.
Ich kann im Moment leider nicht auf ein Backend zugreifen um es genauer zu beschreiben, aber eigentlich solltest du so zurecht kommen.
Ansonsten warten und nochmals nachfragen.
Ungetestet, aus dem Kopf beschreiben, so wie beim Lotto - ohne Gewähr
such mal im Modul Outout nach folgenden Zeilen:
Code: Alles auswählen
...
$href = $sess->url("front_content.php?idcat=$selcat&idart=$article_id");
$teasertext = $article->getField('summary');
...
Code: Alles auswählen
...
$href = $sess->url("front_content.php?idcat=$selcat&idart=$article_id");
$teasertext = $article->getField('summary');
$teaser_create = $article->getField('xxxxxx');
...
Für xxxxxx setzt du die Feldbezeichnung ein die du in myphpAdmin sehen kannst.
$teaser_create ist dann der String den du, analog zu:
Code: Alles auswählen
...
$tpl->set('d', 'TEXT', $teasertext);
$tpl->set('d', 'ERSTELLDATUM', $teaser_create);
...
Und nicht vergessen im Template {ERSTELLDATUM} einzusetzen.
Ich kann im Moment leider nicht auf ein Backend zugreifen um es genauer zu beschreiben, aber eigentlich solltest du so zurecht kommen.
Ansonsten warten und nochmals nachfragen.
Ungetestet, aus dem Kopf beschreiben, so wie beim Lotto - ohne Gewähr
Ja, war mein Fehler.Marvel hat geschrieben:Tut mir leid, das haut nicht hin. Alleine schon die Zeile "$teasertext = $article->getField('summary');" habe ich im Output meines News-Moduls nicht!
Aber du sprachst immer vom News-Modul ...
das Modul das du verwendest ist die Artikelliste von HerrB
http://www.contenido.org/forum/viewtopic.php?t=8887
Du könntest mal gucken, hier hat jemand das Datum in der Liste von HerrB bereits eingebaut, vielleicht ist es ja das was du suchst:
http://www.contenido.de/forum/viewtopic.php?t=10399
oder aber wenn du den Link von Dodger77 nehmen, da ist auch bereist ein Datum drin.
Und da findest du auch meine Codezeilen wieder.
Gerade nochmal getestet, funktioniert. Feldname ist übrigens created
@Dodger:
Das Modul was Du verlinkt hast geht bei mir nicht bzw. es leistet nicht das was ich will... da ich ja nicht das Newsmodul meine, dondern die Artikelliste von Herrn B.
Was ich brauche ist einfach eine Anpassung des oben geposteten Quellcodes, so dass nicht das aktuelle Datum sondern das Datum des Artikels angezeigt wird.
@wosch:
Vielen Dank für Deinen Einsatz. Aber auch die verlinkte Anpassungs von HerrnB's Modul funktioniert nicht. Da bekomme ich im Modul eine rote Lampe!
Sonst noch irgendwelche Tipps oder Vorschläge?
Das Modul was Du verlinkt hast geht bei mir nicht bzw. es leistet nicht das was ich will... da ich ja nicht das Newsmodul meine, dondern die Artikelliste von Herrn B.
Was ich brauche ist einfach eine Anpassung des oben geposteten Quellcodes, so dass nicht das aktuelle Datum sondern das Datum des Artikels angezeigt wird.
@wosch:
Vielen Dank für Deinen Einsatz. Aber auch die verlinkte Anpassungs von HerrnB's Modul funktioniert nicht. Da bekomme ich im Modul eine rote Lampe!
Sonst noch irgendwelche Tipps oder Vorschläge?
Ja, installier dir den Beispielmandanten das du das komplette Modul NewsMarvel hat geschrieben:Sonst noch irgendwelche Tipps oder Vorschläge?
mit Input und Output hast.
Den Output modifizierst du wie wie von mir beschrieben.
Dann legst du im Verzeichnis cms/templates ein Datei mit Namen teaser-standard.html an die folgenden Inhalt hat:
Code: Alles auswählen
<h1 class="content">{TITLE}</h1>
<!-- BEGIN:BLOCK -->
<div style="padding-bottom:10px;">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td style="background-color:rgb(210,210,210);"><img src="images/grey.gif" width="1" height="1" border="0" alt="" title=""/></td>
</tr>
<tr>
<td><img src="images/blank.gif" width="1" height="10" border="0" alt="" title=""/></td>
</tr>
</table>
<a href="{HREF}" style="color:rgb(255,102,4);">{HEADLINE}</a><br>{IMG}<br>
{TEXT}
<br><br>Artikel erstellt: {CREATE}<br>
<a href="{HREF}" style="color:rgb(190,190,190);">{MORE}</a> <a href="{HREF}"><img src="images/navi_pfeil_rechts.gif" border="0" alt="{MORE}" title="{MORE}"/></a>
</div>
<!-- END:BLOCK -->
Und was passiert wenn du die Kategorie für ein paar Sekunden, länger sollte der Versuch nicht dauern, mal Online schaltest???Marvel hat geschrieben:Das geht leider auch nicht! ^^ Es wird nichts angezeigt. Womöglich weil ich aktuell die Artikel einer anderen (offline geschalteten) Kategorie ausgebe, was mit dem aktuellen Modul auch problemlis funktioniert.
Dann hast du was falsch gemacht.Marvel hat geschrieben:Die Kategorie war aktiviert - das ganze Web ist schon scharf, liegt aber auch einem derzeit für User noch nicht sichtbaren Serverbereich!
Hier das Modul wie es im Beispielmandaten der Version 4.6.8.5 enthalten ist, mit den von mir oben gemachten Änderungen im Output.
Bei mir funktioniert es, sowohl Online als auch loacal.
Modul-Beschreibung (Mit Modifikationen wie hier im Thema beschrieben):
Code: Alles auswählen
Artikel einer Kategorie teasern
Author: Andreas Lindner
Version:1.0
Code: Alles auswählen
?><?php
/***********************************************
* CONTENIDO MODUL - INPUT
*
* Modulname : News
* Author(s) : Andreas Lindner, 4fb
* Copyright : Contenido - four for business, Andreas Lindner
* Created : 12.08.2005
************************************************/
#Select category
$cms_idcat = "CMS_VALUE[1]";
echo '<table cellpadding="0" cellspacing="0" border="0">';
echo '
<tr><td class="text_medium" style="padding:5px">Kategorie wählen: </td></tr>
<tr><td class="text_medium" style="padding:5px">';
echo buildCategorySelect("CMS_VAR[1]", "CMS_VALUE[1]");
echo ' <input type="image" src="images/submit.gif">';
echo '</td></tr>';
#Select sort field and sort order
$sortdate = 'checked';
$cms_imgsize = "CMS_VALUE[14]";
$cms_limit_articles = "CMS_VALUE[15]";
$cms_sort_direction = "CMS_VALUE[16]";
if ("CMS_VALUE[17]" != '') {
$cms_include_start_article = ' checked';
} else {
$cms_include_start_article = '';
}
if ("CMS_VALUE[3]" == 'sortdate') {
$sortdate = 'checked';
$sortnum = '';
}
elseif ("CMS_VALUE[3]" == 'sortnum') {
$sortdate = '';
$sortnum = 'checked';
}
echo '
<tr>
<td class="text_medium" style="padding:5px;">'.mi18n("Sortierung nach Datum").':</td>
<td style="padding:5px;"><input type="radio" name="CMS_VAR[3]" value="sortdate" '.$sortdate.'></td>
</tr>
<tr>
<td class="text_medium" style="padding:5px;">'.mi18n("Sortierung nach Nummer").':</td>
<td style="padding:5px;"><input type="radio" name="CMS_VAR[3]" value="sortnum" '.$sortnum.'></td>
</tr>
<tr>
<td class="text_medium" style="padding:5px;">'.mi18n("Sortierung aufsteigend").':</td>
<td style="padding:5px;">';
if (strtolower($cms_sort_direction) == 'desc') {
echo '<input type="radio" name="CMS_VAR[16]" value="asc"/>';
} else {
echo '<input type="radio" name="CMS_VAR[16]" value="asc" checked/>';
}
echo '</td>
</tr>
<tr>
<td class="text_medium" style="padding:5px;">'.mi18n("Sortierung absteigend").':</td>
<td style="padding:5px;">';
if (strtolower($cms_sort_direction) == 'desc') {
echo '<input type="radio" name="CMS_VAR[16]" value="desc" checked/>';
} else {
echo '<input type="radio" name="CMS_VAR[16]" value="desc"/>';
}
echo '</td>
</tr>';
$noimg = '';
if ("CMS_VALUE[13]" == 'true') {
$noimg = 'checked';
}
#Headline
echo '
<tr><td class="text_medium" style="padding:5px;">'.mi18n("Überschrift").': </td></tr>
<tr><td style="padding:5px;"><input type="text" name="CMS_VAR[4]" value="CMS_VALUE[4]"></td></tr>
<tr>
<td colspan="2" class="text_medium" style="padding:5px;"><b><u>'.mi18n("Bild für Teaser").':</u></b></td>
</tr>
<tr>
<td colspan="2" class="text_medium" style="padding:5px;">'.mi18n("Es wird das erste Bild des Artikels angezeigt.").'</td>
</tr>';
#Image width
echo '
<tr><td class="text_medium" style="padding:5px;">'.mi18n("Bildbreite").': </td></tr>
<tr><td style="padding:5px;"><input type="text" name="CMS_VAR[14]" value="'.$cms_imgsize.'" maxlength="3"></td></tr>';
#Disable images
echo '
<tr>
<td class="text_medium" style="padding:5px;">'.mi18n("Kein Bild anzeigen").':</td>
<td style="padding:5px;"><input type="checkbox" name="CMS_VAR[13]" value="true" '.$noimg.'></td>
</tr>';
#Number of articles
echo '
<tr>
<td class="text_medium" style="padding:5px;">'.mi18n("Anzahl Artikel begrenzen").':</td>
<td style="padding:5px;"><input type="text" name="CMS_VAR[15]" value="'.$cms_limit_articles.'"></td>
</tr>';
#Include start article
echo '
<tr>
<td class="text_medium" style="padding:5px;">'.mi18n("Startartikel in Liste einbeziehen").':</td>
<td style="padding:5px;"><input type="checkbox" name="CMS_VAR[17]" value="yes"'.$cms_include_start_article.'></td>
</tr>';
echo '</table>';
?><?php
Code: Alles auswählen
<?php
/***********************************************
* CONTENIDO MODUL - OUTPUT
*
* Modulname : News
* Author(s) : Andreas Lindner, 4fb
* Copyright : Contenido - four for business, Andreas Lindner
* Created : 12.08.2005
************************************************/
cInclude('classes', 'class.article.php');
cInclude('includes', 'functions.api.string.php');
cInclude('includes', 'functions.api.images.php');
if (!is_object($tpl)) {
$tpl = new Template;
}
$tpl->reset();
$sql = "SELECT
htmlpath, frontendpath
FROM
".$cfg["tab"]["clients"]."
WHERE
idclient = ".$client." ";
$db->query($sql);
if ($db->next_record()) {
$htmlpath = $db->f('htmlpath');
$frontendpath = $db->f('frontendpath');
}
// selected category
$selcat = "CMS_VALUE[1]";
//echo "sel $selcat<br>";
$template = "teaser-standard.html";
//echo "tpl $template<br>";
// anzahl der zeichen text
$mxtext = 200;
$limit = "CMS_VALUE[15]";
$cms_sort_direction = "CMS_VALUE[16]";
if ($cms_sort_direction == '') {
$cms_sort_direction = 'desc';
}
if ("CMS_VALUE[3]" == "sortdate") {
$order = 'lastmodified';
} else {
$order = 'artsort';
}
$newsheadline = "CMS_VALUE[4]";
$tpl->set('s', 'TITLE', $newsheadline);
if (strlen($selcat) > 0 AND $selcat != '0') {
$options = array ('idcat' => $selcat, "start" => false, "order" => $order, "direction" => $cms_sort_direction);
$list = new ArticleCollection($options);
$count = $list->count;
if ($count > 0) {
if (is_numeric($limit) AND strlen($limit) > 0) {
if ($limit < $list->count) {
$limit_art = $limit;
} else {
$limit_art = $list->count;
}
} else {
$limit_art = $list->count;
}
for ($i = 0; $i < $limit_art; $i ++) {
$article = $list->nextArticle();
$article_id = $article->getField('idart');
$teaser_img = '';
if ($noimg != 'true') {
$text_html = $article->getContent('CMS_HTML', 1);
$regEx = "/<img[^>]*?>.*?/i";
$match = array ();
preg_match($regEx, $text_html, $match);
$regEx = "/(src)(=)(['"]?)([^"']*)(['"]?)/i";
$img = array ();
preg_match($regEx, $match[0], $img);
$img_src = preg_split("/\//", $img[0]);
$img_name = $img_src[count($img_src) - 1];
$img_name = preg_replace("/"/", "", $img_name);
$img_split = preg_split("/\./", $img_name);
$img_type = $img_split[count($img_split) - 1];
$img_split2 = preg_split("/_/", $img_split[0]);
$name = $img_name;
if (count($img_split2) > 1) {
$img_x = $img_split2[count($img_split2) - 1];
$img_y = $img_split2[count($img_split2) - 2];
if (is_numeric($img_x) AND is_numeric($img_y)) {
$suffix = "_".$img_x."_".$img_y.".".$img_type;
$name = preg_replace("/$suffix/", "", $img_name);
$name = $name.".[a-zA-Z]{3}";
}
}
$img_teaser = '';
if (strlen($name) > 0) {
$sql = "SELECT
*
FROM
".$cfg["tab"]["upl"]."
WHERE
filename REGEXP '$name' ";
//echo "<pre>"; print_r($sql); echo "</pre>";
$db->query($sql);
if ($db->next_record()) {
$filename = $db->f('filename');
$dirname = $db->f('dirname');
}
$img_path = $cfgClient[$client]["upl"]["path"].$dirname.$filename;
$img_size = "CMS_VALUE[14]";
$img_teaser = capiImgScale($img_path, $img_size, $img_size, $crop = false, $expand = false, $cacheTime = 1000, $wantHQ = false);
} // end if strlen
if (strlen($img_teaser) > 0) {
$teaser_img = '<img src="'.$img_teaser.'" class="teaser_img">';
} else {
$teaser_img = '';
}
} // end if noimg
$headline = strip_tags($article->getContent('CMS_HTMLHEAD', 1));
$headline = str_replace($replace, " ", $headline);
/* $subheadline = strip_tags($article->getContent('CMS_HTMLHEAD', 2));
$subheadline = str_replace($replace, " ", $subheadline);*/
$teaserheadline = /*$subheadline." - ".*/
$headline;
$href = $sess->url("front_content.php?idcat=$selcat&idart=$article_id");
$teasertext = $article->getField('summary');
$teaser_erstellt = $article->getField('created');
if (strlen(trim($teasertext)) == 0) {
$teasertext = strip_tags($article->getContent('CMS_HTML', 1));
$teasertext2 = $teasertext;
$teasertext = capiStrTrimAfterWord($teasertext, $mxtext);
if ($teasertext!=$teasertext2) {
$teasertext.= '...';
}
} // end if
$teasertext = $teasertext." ";
$tpl->set('d', 'HEADLINE', $teaserheadline);
$tpl->set('d', 'TEXT', $teasertext);
$tpl->set('d', 'HREF', $href);
$tpl->set('d', 'IMG', $teaser_img);
$tpl->set('d', 'CREATE', $teaser_erstellt);
$tpl->set('d', 'MORE', mi18n("mehr"));
$tpl->next();
} // end for
$tpl->generate('templates/'.$template);
}
}
?>
Und wenn es dann immer noch nicht geht bei dir ->
Hallo wosch... sorry, ich war einige Tage nicht verfügbar.
Ich habe alles genauso gemacht wie Du es beschreibst (man kann ja auch nicht viel falsch machen)... aber es geht einfach nicht. Bei mir wird die Artikelliste einfach nicht ausgegeben! Mit HerrB's Liste funzt es absolut problemlos.
Kann es daran liegen das das web unter http://www.xyz.de/xyz/cms (also in einem Unterordner) liegt?
Ich habe alles genauso gemacht wie Du es beschreibst (man kann ja auch nicht viel falsch machen)... aber es geht einfach nicht. Bei mir wird die Artikelliste einfach nicht ausgegeben! Mit HerrB's Liste funzt es absolut problemlos.
Kann es daran liegen das das web unter http://www.xyz.de/xyz/cms (also in einem Unterordner) liegt?