online / offline Abfrage für Unterkategorie hinzufügen

Wie verwendet man Module oder Aktion und passt diese an.

online / offline Abfrage für Unterkategorie hinzufügen

Beitragvon maik@nordbahn » 19. Jun 2008, 10:16

Hallo Ihr!

ich hab ein Teaser Modul für Bilder an meine bedürfnisse angepasst (vielmehr zusammengestückelt). Nun möchte ich aber noch eine simple Onlin/Ofline Abfrage einsetzen.

Ich hab schon einige Sachen probiert aber ich bekomm es einfach nicht hin.

Kann mir jemand dabei helfen?
So sieht mein AusgabeCode aus:
Code: Alles auswählen
<?
$cat = OOCategory::getCategoryById($this->getValue(category_id));
$cats = $cat->getChildren();

$i = 0;
$j = 0; 
$c = 0;

$table = array();
$table[0] = array(); // Head
$table[1] = array(); // Content

$content = "";

if (is_array($cats)) {
   foreach ($cats as $cat) {

   $catId = $cat->getId();
   $catName = $cat->getName();
   
   $article = $cat->getArticles();
      if (is_array($article)) {
         foreach ($article as $var) {

         $articleId = $var->getId();
         $articleName = $var->getName();
         $articleDescription = $var->getDescription();

   if($var->getValue("file") == ''){ $articlePicture = 'test.gif '; } else { $articlePicture = $var->getValue("file"); }
         
   $articlePPath = "index.php?rex_resize=130c__100h__".$articlePicture;

            $content .= '<p><span>'.$articleName.'</span><a href="index.php?article_id='.$articleId.'"><img src="'.$articlePPath.'" alt="zur Galerie" /></a></p>';
           
           }
}
}
}
/*
if($j != 0)
{
  echo '<table>';
  while($i <= $j)
  {
    if($c == 0) { echo '<tr>'; }
    echo '<td><div class="galerie-teaser">'.$table[0][$i].'</div><div>'.$table[1][$i].'</div></td>';
    $i++;
    $c++;
    if($c >= 4) { echo '</tr>'; $c = 0; }
  }
}
if($c != 0)
{
  while($c < 4)
  {
    echo '<td></td>';
    $c++;
  }
}*/


echo '<div id="galerie-teaser">'.$content.'</div>';

?>
Liebe Grüße
Maik
Benutzeravatar
maik@nordbahn
 
Beiträge: 166
Registriert: 29. Jan 2007, 15:10

Zurück zu Module/Aktionen [R4]

Wer ist online?

Mitglieder in diesem Forum: Google [Bot] und 3 Gäste