Seite 1 von 1

Artikelliste zeigt nicht mehr neu angelegte Artikeln an

Verfasst: Mi 11. Mai 2005, 15:00
von Freddy
Hallo,
meine Artikelliste zeigt meine jetzt neu gemachte und aktivierte Artikel nicht an. Die alten Artikeln werden aber noch angezeigt. Woran kann es liegen?

Verfasst: Mi 11. Mai 2005, 15:10
von timo
welche Artikelliste benutzt du?
wie ist diese Konfiguriert?

Habe es mit verschiedenen Artikellisten ausprobiert.

Verfasst: Mi 11. Mai 2005, 15:14
von Freddy
Habe es mit verschiedenen Artikellisten ausprobiert. Es muß eher daran liegen das beim Abspeichern des Artikels írgendwas fehlt oder so.
Ich benutze folgende Artikelliste:

Code: Alles auswählen

<?php

/********************************************************
* Newsmodul - OUTPUT
*
* Es wurde Code vom Modul "Artikelliste" von "(c) Author Jan Lengowski" verwendet!
*
* Author    :     Lars D. Forseth <lars@forseth.de>
* Created   :     Feb. 4th 2004
*********************************************************/


  /* number of latest articles to get */
  $anzahl = "CMS_VALUE[8]";
  if((!$anzahl) or ($anzahl < 1)) {$anzahl = 10;}
  /* length of extract */
  $laenge = "CMS_VALUE[9]";
  if((!$lange) or ($laenge <= 0)) {$laenge = 250;}
  //echo $laenge;


  // get $anzahl articles from DB
  $sql = "SELECT ARTLANG.idart, ARTLANG.title, CATART.idcat, ARTLANG.created, CONTENT.value, ".
         "CONTENT.idtype, CONTENT.typeid FROM ".$cfg["tab"]["cat_art"]." AS CATART, ".$cfg["tab"]["art_lang"].
         " AS ARTLANG, ".$cfg["tab"]["cat"]." AS CAT, ".$cfg["tab"]["content"]." AS CONTENT WHERE ".
         "ARTLANG.idart = CATART.idart AND CATART.idcat = CAT.idcat AND ARTLANG.idartlang=CONTENT.idartlang ".
         "AND CONTENT.idtype<=2 AND CONTENT.typeid<=2 AND CAT.idcat='$idcat' AND ARTLANG.idlang = '$lang' ".
         "AND ARTLANG.online = '1' AND CATART.is_start='0' ORDER BY ARTLANG.artsort ASC,ARTLANG.created ".
         "DESC";
  $db->query($sql);




  if ($db->num_rows() != 0) {

    echo "
    <br><br><br><br>
    <table width=\"350\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" class=\"text\">";

    $artikel = array(array());
    $j=0;
    $db->next_record();
    $idart_last=$db->f("idart");



    for ($i=0; $i < ($db->num_rows()); $i++) {
      $artikel[$j][0] = $db->f("idart");
      $artikel[$j][1] = $db->f("idcat");
      $artikel[$j][2] = substr($db->f("created"),8,2).".".substr($db->f("created"),5,2).".".substr($db->f("created"),0,4);


      while ($idart_last == $db->f("idart")) {

        if (($db->f("idtype") == 2) && ($db->f("typeid") == 1)) {

          /* filter article text */
          $html_text = strip_tags(urldecode($db->f("value")));
          $array = array ("&auml;" => "ä", "&ouml;" => "ö", "&uuml;" => "ü", "&szlig;" => "ß", "&Auml;" => "Ä", "&Ouml;" => "Ö", "&Uuml;" => "ü", "&nbsp;" => " ", """ => "\"", "<" => "<", ">" => ">", "&" => "&");
          $html_text = strtr($html_text, $array);

          for ($d=$laenge; $d < $laenge+20; $d++) {
            $cut = substr($html_text, $d);
            if ((ord ($cut) == 32)||(ord ($cut) == 44)||(ord ($cut) == 45)) {
              $html_text = substr($html_text , 0, $d);
            } // end if
          } // end for

          $html_text = htmlentities(substr($html_text,0,$laenge))." ....";
          /* search for words longer than 50 chars and shorten them + \n */
          $c = 0;
          for ($n=0; $n < strlen($html_text); $n++) {
            $c++;
            if (($html_text[$n] == " ") or ($html_text[$n] == "\n") or ($html_text[$n] == "\r")) {$c = 0;}
            if ($c > 48) {
             $html_text = substr_replace($html_text, "-\n", $n, 0);
             $n = $n+4;
             $c = 0;
            } // end if($c>45)
          } // end for
          $html_text = nl2br($html_text);
          $artikel[$j][5] = str_replace("<br />", "<br>", $html_text);

        } elseif (($db->f("idtype") == 1) && ($db->f("typeid") == 1)) {
          $artikel[$j][3] = strip_tags(urldecode($db->f("value")));
        } elseif (($db->f("idtype") == 1) && ($db->f("typeid") == 2)) {
          $artikel[$j][4] = strip_tags(urldecode($db->f("value")));
        } // end elseif

        $idart_last = $db->f("idart");
        $db->next_record();
        $i++;

      } // end while


      $idart_last = $db->f("idart");
      $j++;
      $i--;


    } // end for



    if((!$blatt) or ($blatt == "") or ($blatt < 0)) $blatt = 0;
    $blattmax = ((ceil($j/$anzahl)));
    $blatt1 = $blatt+1;


    // print articles
    for ($i=$anzahl*$blatt; $i < min($j,$anzahl*$blatt+$anzahl); $i++) {
      $k = $i-1;
      $navmod_link ="front_content.php?client=$client&lang=$lang&idcat=".$artikel[$i][1]."&idart=".$artikel[$i][0]."";
      echo "
      <tr>";
      echo "
       <td  style=\"border-bottom: Black 1px solid;\" valign=\"top\">".
       "<a href=\"".$sess->url("$navmod_link")."\"><b>".$artikel[$i][3]."</b></a>". // title of article
      "</td>".
      "<td  style=\"border-bottom: Black 1px solid;\" valign=\"top\" class=\"footer\" align=\"right\"><b>[".$artikel[$i][2]."]</b></td>". // date of article
     "</tr>
      <tr>".
      "<td valign=\"top\" colspan=\"2\"><a href=\"".$sess->url("$navmod_link")."\">". // "more" link
        "<i>&raquo;&raquo; mehr</i></a>".
        "</div><br><br><br><br>".
      "</td>
      </tr>
      ";
    } // end for



    // print page-prev- and page-next-link, if necessary
    if ($j > $anzahl) {
      echo "
      <tr>
       <td colspan=\"3\">
        <table align=\"center\" width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" class=\"text\">
         <tr valign=\"top\">".
         "<td width=\"40\" align=\"left\">";
      if ($blatt1 > 1) {
      $navmod_link ="front_content.php?client=$client&lang=$lang&idcat=$idcat&blatt=".($blatt-1)."";
      echo "
           <a href=\"".$sess->url("$navmod_link")."\"><i>&laquo; prev</i></a>";
      } else {echo " ";}
      echo "
          </td>".
         "<td align=\"center\">&ndash;&nbsp;&nbsp;Seite ".$blatt1." / ".$blattmax."&nbsp;&nbsp;&ndash;</td>".
         "<td width=\"40\" align=\"right\">";
      if ($blatt1 < $blattmax) {
      $navmod_link ="front_content.php?client=$client&lang=$lang&idcat=$idcat&blatt=".($blatt+1)."";
      echo "
           <a href=\"".$sess->url("$navmod_link")."\"><i>next &raquo;</i></a>";
      } else {echo " ";}
      echo "
          </td>".
        "</tr>
         <tr><td colspan=\"3\" height=\"15\">&nbsp;</td></tr>
        </table>
       </td>
      </tr>
      ";
    } // end if($j>$anzahl)



    echo '</table>';
  } // end if($db->num_rows() != 0)



  /* no news articles in DB */
  else {echo "<br><br><br>Bitte im Menü das Jahr auswählen.<br><br>";}


?>

Verfasst: Mi 11. Mai 2005, 15:29
von timo
nach was sortieren denn deine Artikellisten?

Wäre trotzdem nett, wenn du alle Fragen beantwortest, die dir gestellt werden. Das ist kein Verhör, aber du möchtest, daß dir geholfen wird.

Eine bessere Antwort wäre gewesen: "Ich habe z.b. die Artikelliste XYZ verwendet, aber andere (z.b. ABC, DEF) funktionieren auch nicht".

Oben ist der Artikel

Verfasst: Mi 11. Mai 2005, 20:58
von Freddy
Habe den Quelltext vom ArtikelModul noch eingefügt.

Bitte um hilfe

Verfasst: So 15. Mai 2005, 14:45
von Freddy
Kann mir denn keiner weiterhelfen??
Ich glaube ich habe vor meinem Problem, denn Mandanten-Pfad einmal verstellt aber dann wieder auf die ursprünglichen Pfad zurückgestellt. Kann es damit vielleicht zu tun haben??

Habe im Contenido Error Log folgende Fehlermeldung drin. Kann es vielleicht einen Zusammenhang haben?? Kann damit nichts anfangen. Über eine Problemlösung würde ich mich sehr freuen.

Code: Alles auswählen

[17-Mai-2005 00:15:59] MySQL error 1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'AS TREE,  AS CATSIDE,  AS CAT,  AS CATLANG,  AS SIDELANG WHERE TREE.idcat=CATSID' at line 1
SELECT * FROM  AS TREE,  AS CATSIDE,  AS CAT,  AS CATLANG,  AS SIDELANG WHERE TREE.idcat=CATSIDE.idcat AND CATSIDE.idcat=CATLANG.idcat AND CATLANG.idlang='1' AND CATSIDE.idside=SIDELANG.idside AND SIDELANG.idlang='1' AND CAT.idcat=TREE.idcat AND CAT.idclient='1' ORDER BY TREE.idtree
[17-Mai-2005 00:15:59] next_record called with no query pending.