Artikelliste mit Bild
Artikelliste mit Bild
Hi Freunde!
gibt es eine Variante der Artikelliste die auf der "Listen"-Seite den Fliesstext und ein Bild anzeigen kann?
Das is ja fast auf jedem zweiten Portal so und ich kann mir nicht vorstellen, dass es sowas nicht auch für contenido gibt.
Dankeschön!
P.S. Wenn's sowas schon in 4.2 gibt, wie portiert man das dann? gibt's da nen paar offizielle infos?
gibt es eine Variante der Artikelliste die auf der "Listen"-Seite den Fliesstext und ein Bild anzeigen kann?
Das is ja fast auf jedem zweiten Portal so und ich kann mir nicht vorstellen, dass es sowas nicht auch für contenido gibt.
Dankeschön!
P.S. Wenn's sowas schon in 4.2 gibt, wie portiert man das dann? gibt's da nen paar offizielle infos?
Hi Alex,
das ist die standard Artikelliste von Contenido und die ist auch super.
Die holt mit aus den Artikeln allerdings nur die Texte raus.
Ich möchte eine Liste die mit neben den Texten (Überschrift, etc.) auch ein Bild aus dem Artikeln rausholt.
Beispiel Liste:
- Text_Artikel1 [Bild1]
- Text_Artikel2 [Bild2]
- Text_Artikel3 [Bild3]
Beispiel Artikel (3):
Text_Artikel
[Bild]
usw...
das ist die standard Artikelliste von Contenido und die ist auch super.
Die holt mit aus den Artikeln allerdings nur die Texte raus.
Ich möchte eine Liste die mit neben den Texten (Überschrift, etc.) auch ein Bild aus dem Artikeln rausholt.
Beispiel Liste:
- Text_Artikel1 [Bild1]
- Text_Artikel2 [Bild2]
- Text_Artikel3 [Bild3]
Beispiel Artikel (3):
Text_Artikel
[Bild]
usw...
feind gesichtet
Die Referenzseite von Contenido selbst:
http://www.contenido.de/front_final/fro ... =198&s=&t=
so hab ich mir das vorgestellt! traumhaft! aber warum steht der öffentlichkeit das modul nicht zur verfügung?
http://www.contenido.de/front_final/fro ... =198&s=&t=
so hab ich mir das vorgestellt! traumhaft! aber warum steht der öffentlichkeit das modul nicht zur verfügung?
Artikelliste Referenzen contenido.de
Es handelt sich hierbei um ein Modul, das auch im Download-Bereich zur Verfügung steht. Das Portal basiert aber noch auf der alten Version 4.1, daher gibt es dieses Modul noch nicht für 4.3.
Gruß
Christian
4fb
Gruß
Christian
4fb
sooooo....
wer suchet der findet...
das is jetzt ein angepasster output der für die artikelliste!
hab ich hier im forum gefunden! Probleme dabei:
man muss den ordner thumbails oder so anlegen
und muss seinen genauen document_root kennen.
den sagt einem aber phpinfo();
wie bekommen wir jetzt diese schrecklichen sonderzeichen im titel weg ??
das is jetzt ein angepasster output der für die artikelliste!
hab ich hier im forum gefunden! Probleme dabei:
man muss den ordner thumbails oder so anlegen
und muss seinen genauen document_root kennen.
den sagt einem aber phpinfo();
wie bekommen wir jetzt diese schrecklichen sonderzeichen im titel weg ??
<?
/***********************************************
* CONTENIDO MODUL - OUTPUT
*
* Erweiterte Artikel liste
*
* Liste von Artikeln mit mehreren Daten basierend
* auf 4fb referenz modul
*
* Author : Evert Smit
* Copyright : 4fB
* Created : 13-07-2003
* Modified : 16-08-2002
************************************************/
// second db class instance
$db2 = new DB_Contenido;
// selected category
$selcat = "CMS_VALUE[0]";
if($selcat!="0" && $selcat!=""){
// select all articles in category widthout start article
$query = "SELECT ARTLANG.idart, ARTLANG.idartlang FROM ".$cfg["tab"]["cat_art"]." AS CATART, ".
$cfg["tab"]["art_lang"]." AS ARTLANG ".
"WHERE CATART.idcat = '$selcat' AND ARTLANG.idart = CATART.idart AND ARTLANG.idlang = '$lang' AND ".
"ARTLANG.online = '1' ORDER BY CATART.idart DESC";
// execute query
$db->query($query);
unset($articleID);
unset($linkID);
// get id's of sub articles
while ($db->next_record()) {
$articleID[] = $db->f("idartlang");
$linkID[] = $db->f("idart");
} // end while
// loop through subarticles
echo '
<table width="70%" border="0" cellspacing="0" cellpadding="0">
<tr><td class=titel>CMS_VALUE[2]</td></tr><TR><TD><UL>
';
if (is_array($articleID)) {
foreach ($articleID as $key => $value) {
// select all CMS variables of the article
$sql = "SELECT ".$cfg["tab"]["content"].".*,".$cfg["tab"]["art_lang"].".summary
FROM ".$cfg["tab"]["content"]."
left join ".$cfg["tab"]["art_lang"]."
on ".$cfg["tab"]["content"].".idartlang=".$cfg["tab"]["art_lang"].".idartlang
WHERE ".$cfg["tab"]["content"].".idartlang = '$value'
AND ".$cfg["tab"]["content"].".idtype = '1'
AND ".$cfg["tab"]["content"].".typeid = '1'";
$db->query($sql);
$db->next_record();
// select and resolve image path
$imagesql="select value from ".$cfg["tab"]["content"]." where idartlang='$value' and idtype='4' and typeid='1'";
$db2->query($imagesql);
$db2->next_record();
$image_id= $db2->f("value");
// get image name and path
$imagesql="select * from ".$cfg["tab"]["upl"]." where idupl='$image_id'";
$db2->query($imagesql);
$db2->next_record();
$webdir='upload/';
$thumbdir='thumbnails/';
$filedir='/home/www/contenido/motosommer/';
$imagelocation=$filedir.$webdir.$db2->f('dirname').$db2->f('filename');
$thumblocation=$filedir.$webdir.$thumbdir.$db2->f('filename');
if (!file_exists($thumblocation)){
// create thunbnail
$fileinformation=getimagesize($imagelocation);
$imagewidth = $fileinformation[0];
$imageheight = $fileinformation[1];
$imagetype=$db2->f('filetype');
$imageattributes = $fileinformation[3];
//$newfile= $last_id."-image.".$imagetype;
$target=$thumblocation;
if ( !(copy($imagelocation,$target)))
{
echo "Could not copy file to destintaion., Command returned Error Message. Please check your log files. ".$imagelocation." ".$target;
die;
}
//create thumbnails 80xrelational height
// Determine what filetype and set pointer to source image
switch ($imagetype)
{
case "gif":
$original_image=imagecreatefromgif($target);
break;
case "png":
$original_image=imagecreatefrompng($target);
break;
case "jpg":
$original_image=imagecreatefromjpeg($target);
break;
}
if (!$original_image){
echo 'Error getting image from '.$target.'.';
}
//echo $target;
// set image width and height of thunbnail and put pointer for filesytsem
$thumbfile= $db2->f('filename');
$target_thumb=$thumblocation;
$t_width=80;
// calculating height to maintain ratio
$t_height=(80/$imagewidth)*$imageheight;
// remove digits to get solid number
list ($t_height,$notimportand)=explode('.',$t_height);
// create blank image
$thumb_image=imagecreate($t_width,$t_height);
// resize image based on height and width
imagecopyresized($thumb_image,$original_image,0,0,0,0,$t_width,$t_height,$imagewidth,$imageheight);
// store image on file system
// requires different functionf for either gif or jpeg
switch ($imagetype)
{
case "gif":
imagegif($thumb_image,$target_thumb);
break;
case "png":
imagepng($thumb_image,$target_thumb);
break;
default:
imagejpeg($thumb_image,$target_thumb,75);
break;
}
imagedestroy($thumb_image);
imagedestroy($original_image);
}
$image=$webdir.$thumbdir.$db2->f('filename');
$head = $db->f("value");
$summary= $db->f("summary");
if ( strlen($head) > CMS_VALUE[3]) {
$head = substr($head, 0, CMS_VALUE[3]);
$head .= '..';
}
// link
$link = $sess->url("front_content.php?client=$client&lang=$lang&idcat=$selcat&idart=$linkID[$key]&m=$m&s=$s");
//echo '<tr><td><A HREF="'.$link.'">'.$db->f("value").'</a></td></tr>';
echo '<LI><A HREF="'.$link.'">'.$head.'</a><BR>'.$summary.'<img src="'.$image.'">';
} // end while
echo '</TD></TR>';
unset($head);
unset($summary);
} // end foreach
} // end if (is_array)
echo '</table><br>';
?>
Es gibt da seit ein paar Tagen unter http://www.contenido.de/front_dev/
ein Patch "Ein kleines Mittel gegen Pluszeichen. ..."
Was das genau macht , weiß ich nicht. Aber es finktionierte bei mir.
Vielleicht hilft Dir das weiter.
Marten
ein Patch "Ein kleines Mittel gegen Pluszeichen. ..."
Was das genau macht , weiß ich nicht. Aber es finktionierte bei mir.
Vielleicht hilft Dir das weiter.
Marten
Das Mittelchen wirkt nur für die CMS_-Felder. Bei Modulen (= eigener Code) muss man selbst Hand anlegen.
Zumindest muss die Zuweisung
durch
ersetzt werden. Wenn man das auch für die anderen Textfelder macht ("Summary"), sollte es funktionieren.
Gruß
HerrB
Zumindest muss die Zuweisung
Code: Alles auswählen
$head = $db->f("value");
Code: Alles auswählen
$head = urldecode($db->f("value"));
Gruß
HerrB