Newslist wird nicht mehr angezeigt

Wie verwendet man Module oder Aktion und passt diese an.

Newslist wird nicht mehr angezeigt

Beitragvon ysylla » 8. Okt 2008, 10:54

Hallo

ich habe vor kürzem den server gewegzelt und paar Rubriken werden nicht mehr angezeigt.

Die seite ist http://www.lediplomateguinee.info/politique.21.0.html wir nicht angezeigt
Ob wohl http://www.lediplomateguinee.info/culture.24.0.html wir angezeigt

Code für Newslist Eingabe

<strong>Number of articles per page</strong><br />
<input name="VALUE[1]" value="REX_VALUE[1]" class="inp100" /><br />
<br />
<strong>Number of words per article (english)</strong><br />
<input name="VALUE[2]" value="REX_VALUE[2]" class="inp100" /><br />
<br />
<strong>Optional: Container-ID, where articles are saved</strong><br />
<input name="VALUE[3]" value="REX_VALUE[3]" class="inp100" /><br />
<br />
<strong>Browse-function</strong><br />
<select name="VALUE[10]" class="inp100">
<option value='an' <? if ("REX_VALUE[4]" == 'an') echo 'selected'; ?>>on</option>
<option value='aus' <? if ("REX_VALUE[4]" == 'aus') echo 'selected'; ?>>off</option>
</select><br />

Code Ausgabe

<?php

$itemsPerSide = "REX_VALUE[1]";
$wordsPerArticle = "REX_VALUE[2]";
$myartid = "REX_VALUE[3]";

// Nur im Frontend
//if (!$REX['REDAXO']):

// Sortierfunktion
if (!function_exists(sortArticlesByUpdateDate)) {
function sortArticlesByUpdateDate( $artA, $artB) {
$createA = $artA->_online_from;
$createB = $artB->_online_from;

if ( $createA == $createB) {
return 0;
}

return $createA > $createB ? -1 : 1;
}
}

$start = !empty($_GET['start']) ? (int) $_GET['start'] : 0; // Startitem
$offset = $itemsPerSide; // 10 Items pro Seite
if ($myartid != "") {
$cats = array( $myartid);
}
else
$cats = array( REX_CATEGORY_ID); // alle Kategorien die Du "indizieren" willst

$articles = array();

foreach ( $cats as $catId) {
$cat = OOCategory::getCategoryById( $catId);

// CatIds die nicht funktionieren aussortieren
if( $cat === null) {
continue;
}

$cat_articles = $cat->getArticles( true);

foreach ( $cat_articles as $ooarticle) {
// keine Startartikel anzeigen
if ( $ooarticle->isStartPage()) {
continue;
}

// Damit keine Endlosschleife passiert, den Artikel der die Pagination setzt ?berspringen
if ( $ooarticle->getId() == REX_ARTICLE_ID) {
continue;
}
$articles[] = $ooarticle;
}
}

$articles_length = count( $articles);

// Sortieren nach Erstellungsdatum
if ( $articles_length > 0) {

usort( $articles, "sortArticlesByUpdateDate");
}

$article_list = array_slice( $articles, $start, $offset);

foreach ( $article_list as $ooarticle) {

if ($ooarticle->isOnline(true)) {
$articleId = $ooarticle->getId();

$article = new article();
$article->setArticleId( $articleId);

// Datum einfuegen
$mydate = "";
$art = OOArticle::getArticleById($articleId);
$mydate = date("d M, Y", $art->getValue(_online_from));


$slice = OOArticleSlice::getFirstSliceForArticle($articleId);
$articleContent = "<h1>".$slice->getValue(4)." <span class=\"datum\">(Post&eacute; le ".$mydate.")</span></h1>\n";

if ($slice->getValue(5) != "")
$articleContent .= $slice->getValue(5);
else
$articleContent .= $slice->getValue(1);


# $articleContent = $article->getValue("value1");

# $articleContent = $article->getArticle();

// Leerzeichen entfernen am Anfang und Ende des Strings
$articleContent = trim($articleContent);

// Leerzeichen vor </p> einfuegen.
// Sonst wird das letzte Wort eines Absatzes und das erste Wort
// des nachfolgenden Absatzes als ein Wort erkannt
$articleContent = str_replace("</p>", " </p>", $articleContent);

// Leerzeichen vor <br /> einfuegen.
// Sonst wird das letzte Wort einer Zeile und das erste Wort
// des nachfolgenden Zeile als ein Wort erkannt
$articleContent = str_replace("<br />", " <br />", $articleContent);

$output = "";
$words = explode(" ",$articleContent);
$wordsCount = count($words);
if ($wordsCount < $wordsPerArticle) $wEnd = $wordsCount;
else $wEnd = $wordsPerArticle;

for ($w=0;$w<$wEnd;$w++) {
$output .= $words[$w]." ";
}

// Leerzeichen entfernen am Anfang und Ende des Strings
$output = trim($output);

$isCloseParagraph = substr($output,-4);
$link = '<a href="'.rex_getUrl($articleId).'"> ...Suite</a>';

$newString = $link;
# $newString = $link.'</p>';


if ($isCloseParagraph == '</p>') {
$output = substr_replace($output,$newString,-4);
}
else {
$output .= $newString;
}

$myfile = "";
if ($slice->getFile(1) != "") {
$myfile .= '<div class="teaser smallimage">';
$myfile .= '<img src="index.php?rex_resize=100w__'.$slice->getFile(1).'" alt="" />';
$myfile .= "</div>\n";
}

print '<div class="teaser">'.$myfile.$output."</div>\n";
}
}

$prevStart = $start - $offset;
if ( $prevStart < 0)
{
$prevStart = '';
}

$nextStart = $start + $offset;
if ( $nextStart >= $articles_length)
{
$nextStart = '';
}

$link_format = '<a href="'.rex_getUrl($this->getValue("article_id"),$clang).'?start=%s">%s</a>';


// Vorherige Seite Link
if ( $prevStart !== '') {
$backLink = sprintf( $link_format, $prevStart, '<< Page precedente');
}

// N?chste Seite
if ( $nextStart !== '') {
$nextLink = sprintf( $link_format, $nextStart, 'Page suivante >>');
}

if ("REX_VALUE[10]" == "an") :
print '<br class="clear" />';
if ($backLink != "" AND $nextLink != "") {
print '<div class="teaser"><p>'.$backLink.'&nbsp;|&nbsp;'.$nextLink.'</p></div>';
}
elseif ($nextLink != "") {
print '<div class="teaser"><p>'.$nextLink.'</p></div>';
}
elseif ($backLink != "") {
print '<div class="teaser"><p>'.$backLink.'</p></div>';
}
endif;

//endif;

?>

Hilfe

Vielen Dank im voraus
ysylla
 
Beiträge: 14
Registriert: 14. Nov 2006, 15:15

Beitragvon therancher » 9. Okt 2008, 15:09


also ich seh ihn...
spontanität will wohl überlegt sein!
therancher
 
Beiträge: 489
Registriert: 29. Jan 2007, 17:32
Wohnort: Sachsen


Zurück zu Module/Aktionen [R4]

Wer ist online?

Mitglieder in diesem Forum: jackomono und 3 Gäste