query; } elseif ($options['artikelstream-type']==2) { /* 2: Alle Artikel aus Kategorien bis auf definierte Cats und ohne Linktipps */ if (isset($options['artikelstream-exclusive-catliste']) && (is_array($options['artikelstream-exclusive-catliste']))) { $catliste = ''; $poscatliste = ''; foreach ($options['artikelstream-exclusive-catliste'] as $cat) { if (strlen($catliste)>1) { $catliste .= ","; $poscatliste .= ","; } $catliste.= '-'.$cat; $poscatliste .= $cat; } $args = 'cat='.$catliste; } else { $args = $wp_query->query; } } else { $args = array_merge( $wp_query->query, array( 'post_type' => array('linktipps','post') ) ); } $numentries = $options['artikelstream-maxnum-main'] + $options['artikelstream-nextnum-main']; if (is_array($args)) { $args = array_merge( $args, array( 'posts_per_page' => $numentries ) ); } else { $args .= '&posts_per_page='.$numentries; } query_posts( $args ); $continuelinks = ''; while (have_posts() && $i<$numentries) : the_post(); $i++; $output = ''; if (($options['artikelstream-nextnum-main']>0) && ($i>$options['artikelstream-maxnum-main'])) { $continuelinks .= '
  • '.get_the_title().'
  • '; $continuelinks .= "\n"; } else { if (( isset($options['artikelstream-numfullwidth-main'])) && ($options['artikelstream-numfullwidth-main']>=$i )) { $output = piratenkleider_post_teaser($options['teaser-titleup'],$options['teaser-datebox'],$options['teaser-dateline'],$options['teaser_maxlength'],$options['teaser-thumbnail_fallback'],$options['teaser-floating']); } else { $output =piratenkleider_post_teaser($options['teaser-titleup-halfwidth'],$options['teaser-datebox-halfwidth'],$options['teaser-dateline-halfwidth'],$options['teaser-maxlength-halfwidth'],$options['teaser-thumbnail_fallback'],$options['teaser-floating-halfwidth']); } if (isset($output)) { $cols[$col++] = $output; } } endwhile; // Reset Query wp_reset_query(); if (isset($continuelinks) && strlen($continuelinks)>1) { $linkliste = "
    \n"; $linkliste .= '
    '; $linkliste .= "

    ".$options['artikelstream-title-maincontinuelist']."

    \n"; $linkliste .= '
    '; $linkliste .= '
    '; $linkliste .= "
      \n".$continuelinks."
    \n"; $linkliste .= '
    '; $linkliste .= "
    \n"; $cols[$col++] = $linkliste; } if (($options['artikelstream-type']==1) || (($options['artikelstream-type']==2) && ( ($options['artikelstream-show-linktipps']==1) || ($options['artikelstream-show-second']==1) || ($options['artikelstream-show-widget']==1) )) ) { echo '
    '; if (isset($options['artikelstream-title-main']) && (strlen($options['artikelstream-title-main'])>0)) { echo '

    '.$options['artikelstream-title-main'].'

    '; echo "\n"; } } else { if ($options['artikelstream-content-allow3column']==1) { echo '
    '; } else { echo '
    '; } } echo '
    '; $z=1; foreach($cols as $key => $col) { if (( isset($options['artikelstream-numfullwidth-main'])) && ($options['artikelstream-numfullwidth-main']>$key )) { echo $col; } else { if (( isset($options['artikelstream-numfullwidth-main'])) && ($options['artikelstream-numfullwidth-main']==$key ) && ($options['artikelstream-numfullwidth-main']>0 )) { echo '
    '; } echo '
    ' . $col . '
    '; $z++; if ($z>2) { $z=1; echo '
    '; } } $foundarticles =1; } if ($z==2) { echo '
    '; } echo "
    \n"; echo "
    \n"; if ($options['artikelstream-type']>0) { /* Zuerst Linktipps */ if ($options['artikelstream-show-linktipps']==1) { $linktippout = ''; $i=0; $continuelinks = ''; $numentries = $options['artikelstream-maxnum-linktipps']+ $options['artikelstream-nextnum-linktipps']; $z=1; query_posts( array( 'post_type' => array('linktipps'), 'posts_per_page' => $numentries ) ); global $post; $linktippout .= '
    '; while (have_posts() && $i<$numentries) : the_post(); $i++; if ($i<=$options['artikelstream-maxnum-linktipps']) { $out = linktipp_display($post); $linktippout .= '
    ' . $out . '
    '; $z++; if ($z>2) { $z=1; $linktippout .= '
    '; } } elseif ($options['artikelstream-nextnum-linktipps']>0) { $link = esc_attr( get_post_meta( $post->ID, 'linktipp_url', true ) ); $continuelinks .= '
  • '.get_the_title().'
  • '; $continuelinks .= "\n"; } endwhile; if (isset($continuelinks) && strlen($continuelinks)>0) { $linkliste = '
    '; if (isset($options['artikelstream-title-linktippcontinuelist']) && (strlen($options['artikelstream-title-linktippcontinuelist'])>1)) { $linkliste .= "

    ".$options['artikelstream-title-linktippcontinuelist']."

    \n"; } $linkliste .= '
    '; $linkliste .= "
      \n".$continuelinks."
    \n"; $linkliste .= '
    '; $linkliste .= "
    \n"; $z++; if ($z>2) { $z=1; $linkliste .= '
    '; } $linktippout .= $linkliste; } if ($z==2) { $linktippout .= '
    '; } $linktippout .= "
    \n"; wp_reset_query(); if (isset($linktippout) && strlen($linktippout)>1) { echo '
    '; if (isset($options['artikelstream-title-linktipps']) && (strlen($options['artikelstream-title-linktipps'])>1)) { echo '

    '.$options['artikelstream-title-linktipps'].'

    '; } echo "\n"; echo $linktippout; echo "
    \n"; $foundarticles =1; } } if (($options['artikelstream-type']==2) && ($options['artikelstream-show-second']==1)) { /* Ausnahme-Cats */ $numentries = $options['artikelstream-maxnum-second'] + $options['artikelstream-nextnum-second']; query_posts( 'cat='.$poscatliste.'&posts_per_page='.$numentries ); $i=0; $cols = array(); $col=0; $continuelinks = ''; while (have_posts() && $i<$numentries) : the_post(); $i++; if (($options['artikelstream-nextnum-second']>0) && ($i>$options['artikelstream-maxnum-second'])) { $continuelinks .= '
  • '.get_the_title().'
  • '; $continuelinks .= "\n"; } else { if (( isset($options['artikelstream-numfullwidth-second'])) && ($options['artikelstream-numfullwidth-second']>=$i )) { $output = piratenkleider_post_teaser($options['teaser-titleup'],$options['teaser-datebox'],$options['teaser-dateline'],$options['teaser_maxlength'],$options['teaser-thumbnail_fallback'],$options['teaser-floating']); } else { $output =piratenkleider_post_teaser($options['teaser-titleup-halfwidth'],$options['teaser-datebox-halfwidth'],$options['teaser-dateline-halfwidth'],$options['teaser-maxlength-halfwidth'],$options['teaser-thumbnail_fallback'],$options['teaser-floating-halfwidth']); } if (isset($output)) { $cols[$col++] = $output; } } endwhile; wp_reset_query(); if (isset($continuelinks) && strlen($continuelinks)>1) { $linkliste = "
    \n"; $linkliste .= '
    '; $linkliste .= "

    ".$options['artikelstream-title-secondcontinuelist']."

    \n"; $linkliste .= '
    '; $linkliste .= '
    '; $linkliste .= "
      \n".$continuelinks."
    \n"; $linkliste .= '
    '; $linkliste .= "
    \n"; $cols[$col++] = $linkliste; } if ($col>0) { echo '
    '; if (isset($options['artikelstream-title-second']) && (strlen($options['artikelstream-title-second'])>1)) { echo '

    '.$options['artikelstream-title-second'].'

    '; } echo "\n"; echo '
    '; $z=1; foreach($cols as $key => $col) { if (( isset($options['artikelstream-numfullwidth-second'])) && ($options['artikelstream-numfullwidth-second']>$key )) { echo $col; } else { if (( isset($options['artikelstream-numfullwidth-second'])) && ($options['artikelstream-numfullwidth-second']==$key ) && ($options['artikelstream-numfullwidth-second']>0 )) { echo '
    '; } echo '
    ' . $col . '
    '; $z++; if ($z>2) { $z=1; echo ''; } } $foundarticles =1; } if ($z==2) { echo ''; } echo "
    \n"; echo "
    \n"; $foundarticles =1; } } } if ($options['artikelstream-show-widget']==1) { if ( is_active_sidebar( 'artikelstream-widget' ) ) { dynamic_sidebar( 'artikelstream-widget' ); } } echo "
    \n"; if ($foundarticles==0) { ?>

    \n"; } get_sidebar( 'startpage-contentfooter' ); ?>