Datum bei Artikelliste 4.6.2

Simone
Beiträge: 193
Registriert: Fr 9. Sep 2005, 06:39
Kontaktdaten:

Beitrag von Simone » Mo 21. Nov 2005, 20:00

visionary
hallo,
habe den code abgeändert so das auch der namen des autors mit
dabei ist
Wie hast Du das gemacht, daß die Anmerkung schon in der Newsliste ist? Ich kenne es nur in dem Artikel selbst? Klar, Du hast bei der Voransicht die benötigten Daten eingefügt. Hast Du die letzte Modifikation oder wirklich den Autor, wie Du schreibst? Weil das bisherige Modul nämlich die letzte Modifikation ausgibt. Ich wollte die alte Liste aus 4.4.5 mit der neuen mal vergleichen und versuchen, zu ergänzen. Würde es Dir was ausmachen, den Code hier zu posten? dann könnte ich ihn mit meinem Versuch vergleichen.

Simone

visionary
Beiträge: 43
Registriert: Di 4. Okt 2005, 22:57
Kontaktdaten:

Beitrag von visionary » Mo 21. Nov 2005, 21:17

ich lass den namen desjenigen anzeigen welcher zuletzt den artikel bearbeitet hat und somit auch verantwortlich ist

das kannst du im mudul leicht umschreiben

bei mir siehts so aus

// verfasser des Artikels
$sql = "SELECT * FROM con_art_lang WHERE idart = " .$article_id;

$db->query($sql);

if ($db->next_record())
{
$autor = $db->f('modifiedby');
}
// ende verfasser des artikels
$tpl->set('d', 'AUTOR', $autor);

möglichkeiten: modifiedby, author usw..

du kannst selbst wählen was angezeigt werden soll,
einfach ind er struktur der con_art_lang nachsehen.

visionary
Beiträge: 43
Registriert: Di 4. Okt 2005, 22:57
Kontaktdaten:

Beitrag von visionary » Mo 21. Nov 2005, 21:28

hier der ganze code

Code: Alles auswählen

<?php 
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 = "informationen.html"; 
//echo "tpl $template<br>"; 
// anzahl der zeichen text 
$mxtext = 130; 

$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             

         $sql = "SELECT DATE_FORMAT(lastmodified, '%d.%m.%Y') AS Changedatum FROM con_art_lang WHERE idart = " .$article_id; 
          
         $db->query($sql); 

         if ($db->next_record()) 
         { 
            $time = $db->f('Changedatum'); 
         } 

         // verfasser des Artikels
         $sql = "SELECT * FROM con_art_lang WHERE idart = " .$article_id; 
          
         $db->query($sql); 

         if ($db->next_record()) 
         { 
            $autor = $db->f('modifiedby'); 
         } 
         // ende verfasser ses artikels
         
		 $teasertext = $teasertext."&nbsp;".$next; 

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

         $tpl->next(); 

      } // end for 

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

   } 
} 

?> 
noch {AUTOR} u. {TIME} im template platzieren das wärs

Simone
Beiträge: 193
Registriert: Fr 9. Sep 2005, 06:39
Kontaktdaten:

Beitrag von Simone » Di 22. Nov 2005, 06:45

ICH DANKE DIR !!!!!!!!!!!!!!

Ich habs verstanden !!!!!!!!! Ah, zum ersten Mal ist mir klar, wie die Daten hineinkommen. Habe die informationen.html auch geschaffen und weiter experimentiert. Jetzt habe ich den Autor, den letzten Bearbeiter und das Datum.

Artikelliste mit Autoren und Datum (Weiterentwicklung der "News")

OUTPUT

Code: Alles auswählen

<?php
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 = "informationen.html";
//echo "tpl $template<br>";
// anzahl der zeichen text
$mxtext = 130;

$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             

         $sql = "SELECT DATE_FORMAT(lastmodified, '%d.%m.%Y') AS Changedatum FROM con_art_lang WHERE idart = " .$article_id;
         
         $db->query($sql);

         if ($db->next_record())
         {
            $time = $db->f('Changedatum');
         }

         // letzte aenderung des Artikels
         $sql = "SELECT * FROM con_art_lang WHERE idart = " .$article_id;
         
         $db->query($sql);

         if ($db->next_record())
         {
            $modifiedby = $db->f('modifiedby');
         }
         // ende letzte aenderung des artikels

         // autor des Artikels
         $sql = "SELECT * FROM con_art_lang WHERE idart = " .$article_id;
         
         $db->query($sql);

         if ($db->next_record())
         {
            $autor = $db->f('author');
         }
         // ende autor des artikels
         
       $teasertext = $teasertext."&nbsp;".$next;

         $tpl->set('d', 'HEADLINE', $teaserheadline);
         $tpl->set('d', 'TEXT', $teasertext);
         $tpl->set('d', 'HREF', $href);
         $tpl->set('d', 'TIME', $time);
         $tpl->set('d', 'AUTOR', $autor);
         $tpl->set('d', 'MODIFIEDBY', $modifiedby);
         $tpl->set('d', 'IMG', $teaser_img);
         $tpl->set('d', 'MORE', mi18n("mehr"));
     

         $tpl->next();

      } // end for

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

   }
}

?>
Zum Ende des Codes habe ich noch um
$tpl->set('d', 'MODIFIEDBY', $modifiedby);
ergänzt.
In die informationen.html (die Kopie der teaser-standard.html) kommen die Ergänzungen

{AUTOR} {MODIFIEDBY] und {TIME}

Wichtig ist es für mich, weil sonst nur der letzte, der den Artikel geöffnet hat, zu sehen ist. Derjenige kann aber hinterher auch den Eindruck erwecken, daß er 100% aller Artikel geschrieben hat :lol: . Nee, nee, nee, soweit kommts noch. Ich wollte ja noch das Datum der letzten Änderung einfügen, aber da happerts schon wieder bei mir. Na ja, mal guggen, vielleicht kriege ich das ja auch noch geändert.
Simone
Zuletzt geändert von Simone am Mi 23. Nov 2005, 06:29, insgesamt 1-mal geändert.

visionary
Beiträge: 43
Registriert: Di 4. Okt 2005, 22:57
Kontaktdaten:

Beitrag von visionary » Di 22. Nov 2005, 12:43

@ simone

hast du es dir in etwa so vorgestellt

http://www.mk-anras.net/ta/cms/front_co ... ?idcat=178

Simone
Beiträge: 193
Registriert: Fr 9. Sep 2005, 06:39
Kontaktdaten:

Beitrag von Simone » Di 22. Nov 2005, 14:48

@visionary

Ja, genau so!

Ich hatte ja versucht, den Zeitcode zu ändern, aber ich glaube, das geht nicht so einfach, weil es das Changedatum angibt. Und ich kann bei meinem Artikel nicht sehen, welchen "Tag" er ausgibt, weil der Artikel am selben Tag geändert wurde.

Ich hatte ganz simpel!

Code: Alles auswählen

$sql = "SELECT DATE_FORMAT(created, '%d.%m.%Y') AS Changedatum FROM con_art_lang WHERE idart = " .$article_id;
         
         $db->query($sql);

         if ($db->next_record())
         {
            $time = $db->f('Changedatum');
         } 
und unten CREATED eingefügt, aber ist halt doch schwieriger (ich bin doch Anfänger und typischer LEarning by doing-Typ). Weil TIME kann ja alles besagen und ich sah lastmodified - ergo, ist es das letzte Änderungsdatum. Wie gesagt, ich konnte nichts überprüfen, weil die Änderungen am selben tag stattfanden.

Also wenns Dir recht ist, würde ich mich sehr freuen, wenn Du den Code nochmal posten kannst, damit ich sehen kann, was man ändern muß, um an Tag und Zeit zu kommen.

Simone

visionary
Beiträge: 43
Registriert: Di 4. Okt 2005, 22:57
Kontaktdaten:

Beitrag von visionary » Di 22. Nov 2005, 15:55

@simone

hier der modifizierte code:

Code: Alles auswählen

<?php 
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 = "informationen.html"; 
//echo "tpl $template<br>"; 
// anzahl der zeichen text 
$mxtext = 130; 

$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              

     // Autor des Artikels 
         $sql = "SELECT * FROM con_art_lang WHERE idart = " .$article_id; 
         $db->query($sql); 
         if ($db->next_record()) 
         { 
            $autor = $db->f('author');          		 
		 } 
         // Datum der Erstellung         
         $sql = "SELECT DATE_FORMAT(created, '%d.%m.%Y - %h:%m') AS autor_date FROM con_art_lang WHERE idart = " .$article_id; 
         $db->query($sql); 
         if ($db->next_record()) 
         { 
            $autor_date = $db->f('autor_date'); 
         } 

    // Letzte Aenderung des Artikels 
         $sql = "SELECT * FROM con_art_lang WHERE idart = " .$article_id; 
         $db->query($sql); 
         if ($db->next_record()) 
         { 
            $modified_by = $db->f('modifiedby'); 
         } 
         // Datum der letzen Aenderung          
         $sql = "SELECT DATE_FORMAT(lastmodified, '%d.%m.%Y - %h:%m') AS modified_by_date FROM con_art_lang WHERE idart = " .$article_id; 
         $db->query($sql); 
         if ($db->next_record()) 
         { 
            $modified_by_date = $db->f('modified_by_date'); 
         } 

          
         $teasertext = $teasertext."&nbsp;".$next; 
         $tpl->set('d', 'HEADLINE', $teaserheadline); 
         $tpl->set('d', 'TEXT', $teasertext); 
         $tpl->set('d', 'HREF', $href); 
         $tpl->set('d', 'AUTOR', $autor);
		 $tpl->set('d', 'AUTOR_DATE', $autor_date); 
         $tpl->set('d', 'MODIFIED_BY', $modified_by);
		 $tpl->set('d', 'MODIFIED_BY_DATE', $modified_by_date);
         $tpl->set('d', 'IMG', $teaser_img); 
         $tpl->set('d', 'MORE', mi18n("mehr")); 
      
         $tpl->next(); 
        } // end for 
        $tpl->generate('templates/'.$template); 
        } 
        } 
?>
fürs template {AUTOR} {AUTOR_DATE} {MODIFIED_BY} {MODIFIED_BY_DATE}

lg

Simone
Beiträge: 193
Registriert: Fr 9. Sep 2005, 06:39
Kontaktdaten:

Beitrag von Simone » Di 22. Nov 2005, 16:11

Danke, danke, danke.

Ich dachte, man muß sich an die DB-Tabellennamen halten. Okay, ich denke mal weiter. Jedenfalls vielen Dank!!!!!!

Simone

mvf
Beiträge: 1758
Registriert: Mo 1. Aug 2005, 00:35
Wohnort: in der schönen Hallertau, mitten im Hopfen
Kontaktdaten:

Beitrag von mvf » Di 22. Nov 2005, 21:02

hallo visionary

wärst du so nettund würdest deinen code auch zurverfügung stellen?
und für die dummies incl html template dafür?

merci
Grüsse, Guido

"A common mistake that people make when trying to design something completely foolproof is to underestimate the ingenuity of complete fools."
Mostly Harmless - Douglas Adams

Simone
Beiträge: 193
Registriert: Fr 9. Sep 2005, 06:39
Kontaktdaten:

Beitrag von Simone » Mi 23. Nov 2005, 05:00

Hallo mvf,

der letzte Code ist das OUTPUT von visionary. Wir haben hier nur das OUTPUT der in der Fassung 4.6.2 angebotenen "News" diskutiert und dank visionary verändert, um Erstellungsdatun, Erstautor, letztes Änderungsdatum und letzter Änderungsname zu erhalten. Man erstellt sich ein neues Modul, gibt ihm den Namen seiner Wahl, kopiert das INPUT des "NEWS"-Moduls und nimmt das letzte OUTPUT, was visionary hier bereitgestellt hat,

Und was die informationen.html betrifft, geht man in /cm/template: man kopiert sich die teaser-standard.html, speichert sie als informationen.html ab und fügt je nach Bedarf

- {AUTOR} {AUTOR_DATE} {MODIFIED_BY} {MODIFIED_BY_DATE}"

hinzu. Wo man das macht, ist jedem überlassen. Für die Fontanweisungen habe ich <span class="small"> genommen.

Will man keine informationen.html, sondern eine artikellistemitdatumundautor.html, so muß man dieses

// selected category
$selcat = "CMS_VALUE[1]";
//echo "sel $selcat<br>";
$template = "artikellistemitdatumundautor.html";
//echo "tpl $template<br>";
// anzahl der zeichen text
$mxtext = 130;

eintragen.

Simone

mvf
Beiträge: 1758
Registriert: Mo 1. Aug 2005, 00:35
Wohnort: in der schönen Hallertau, mitten im Hopfen
Kontaktdaten:

Beitrag von mvf » Mi 23. Nov 2005, 06:56

perfect, merci vielmal

nun hab auch ich es kapiert und gleich mal meine news um weitere CMS_HMTL felder aus dem artikel in der news oder teaserseite erwietert. hintegrund: ich will eine art katalogseite mit kurzfassung aber eben nicht aus der kategorie/zusammenfassung, und weiteren feldern wie 'dauer' und 'preis' als intro und dann blätterbare artikel.

funzt alles prima
Grüsse, Guido

"A common mistake that people make when trying to design something completely foolproof is to underestimate the ingenuity of complete fools."
Mostly Harmless - Douglas Adams

Gesperrt