Problem mit dem Newsmodul

Gesperrt
snake*sl
Beiträge: 12
Registriert: Mi 4. Jan 2006, 11:03
Kontaktdaten:

Problem mit dem Newsmodul

Beitrag von snake*sl » Fr 24. Feb 2006, 14:45

Hallo,

ich bekomme in der Newsübersicht meine Überschriften der einzelnen News nicht angezeigt. Wenn ich die News anklicke, dann erscheint dort meine Übersschrift. Jemand ne Idee?

Das ist meine teaser-standard.html

Code: Alles auswählen

<!-- BEGIN:BLOCK -->
             <div class="news">
               <div class="rechts">{IMG}</div><a href="{HREF}">{HEADLINE}</a><br />
               {TEXT}<br />
               <div style="width:90%;text-align:right">
                  ............ <a href="{HREF}">{MORE}</a></div>
               </div>
<!-- END:BLOCK -->
Gruß
snake*sl

rezeptionist
Beiträge: 1536
Registriert: Fr 20. Aug 2004, 10:07
Kontaktdaten:

Beitrag von rezeptionist » Fr 24. Feb 2006, 15:00

Ein bischen paar mehr Infos bitte !

Standardinstallation ??? Irgendwelche Module verändert ?? In welchem Modul steht deine Headline im Artikel ??? usw.. :wink: Version ??
greets

snake*sl
Beiträge: 12
Registriert: Mi 4. Jan 2006, 11:03
Kontaktdaten:

Beitrag von snake*sl » Fr 24. Feb 2006, 15:09

ok ... sorry :)

also, das ist die standardinstallation 4.6.4. ich hab lediglich das template geändert - soweit ich mich erinnere (hab mit dem project vor 2 monaten angefangen und lange nichts mehr dran gemacht) das ist auch mein erstes mal mit contenido

Modul News:

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."&nbsp;-&nbsp;".*/
			$headline;
			$href = $sess->url("front_content.php?idcat=$selcat&idart=$article_id");
			$teasertext = $article->getField('summary');

			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."&nbsp;";

			$tpl->set('d', 'HEADLINE', $teaserheadline);
			$tpl->set('d', 'TEXT', $teasertext);
			$tpl->set('d', 'HREF', $href);
			$tpl->set('d', 'IMG', $teaser_img);
			$tpl->set('d', 'MORE', mi18n("mehr"));

			$tpl->next();

		} // end for

		$tpl->generate('templates/'.$template);

	}
}
?>
Gruß
snake*sl

rezeptionist
Beiträge: 1536
Registriert: Fr 20. Aug 2004, 10:07
Kontaktdaten:

Beitrag von rezeptionist » Fr 24. Feb 2006, 15:23

Ist in deinem Template für den NewsArtikel ein HeadlineElement ?? ( Headline(Html) )
greets

snake*sl
Beiträge: 12
Registriert: Mi 4. Jan 2006, 11:03
Kontaktdaten:

Beitrag von snake*sl » Fr 24. Feb 2006, 15:29

nein, das ist so aufgebaut:
Bild
Gruß
snake*sl

snake*sl
Beiträge: 12
Registriert: Mi 4. Jan 2006, 11:03
Kontaktdaten:

Beitrag von snake*sl » Fr 24. Feb 2006, 15:34

die Überschrift ist vom Typ 10. Text / Standard

liegt das da dran?
Gruß
snake*sl

rezeptionist
Beiträge: 1536
Registriert: Fr 20. Aug 2004, 10:07
Kontaktdaten:

Beitrag von rezeptionist » Fr 24. Feb 2006, 15:38

Wenn du in deinem News Artikel die Überschrift bearbeitest steht
10. Text / Standard
oben dran ???
Wenn ja ist das Falsch denn da sollte
Überschrift / HTML:
stehen.

In welchen container 10 bzw 12 schreibst du deine Headline ???
greets

snake*sl
Beiträge: 12
Registriert: Mi 4. Jan 2006, 11:03
Kontaktdaten:

Beitrag von snake*sl » Fr 24. Feb 2006, 15:53

Alles klar, das war's!

Ich hab die anderen Überschriften (also im Standard-Template) auf TEXT /HTML gestellt, ich weiß auch nicht mehr warum, aber hatte einen Grund.

Dafür hab ich dann extra das Template "NEWS" neben "NEWSLISTE" eingerichtet, damit da die Headline auch angezeigt wird. Doof, wenn man da länger nix mehr dran gemacht hat ...

DANKE für Deine Hilfe
Gruß
snake*sl

rezeptionist
Beiträge: 1536
Registriert: Fr 20. Aug 2004, 10:07
Kontaktdaten:

Beitrag von rezeptionist » Fr 24. Feb 2006, 15:57

Gerne geschehen und ein Tipp auf den Weg:

Immer alles posten was wichtig sein kann oder könnte dann kommt die Hilfe um einiges schneller :wink:
greets

snake*sl
Beiträge: 12
Registriert: Mi 4. Jan 2006, 11:03
Kontaktdaten:

Beitrag von snake*sl » Fr 24. Feb 2006, 16:03

Alles klar, werd ich machen :)
Gruß
snake*sl

Gesperrt