Exemplo n.º 1
0
 function end_lvl(&$output, $depth = 0, $args = array())
 {
     global $options;
     $indent = str_repeat("\t", $depth);
     $output .= $indent . '</ul>';
     $output .= '<a href="' . get_permalink($this->currentID) . '" class="button-portal">';
     if (isset($options['menu_pretitle_portal']) && $options['menu_pretitle_portal']) {
         $output .= $options['menu_pretitle_portal'] . ' ';
     }
     $output .= get_the_title($this->currentID);
     if (isset($options['menu_aftertitle_portal']) && $options['menu_aftertitle_portal']) {
         $output .= ' ' . $options['menu_aftertitle_portal'];
     }
     $output .= '</a>';
     $output .= '</div>';
     $output .= '<div class="span4 hide-mobile">';
     $quote = get_post_meta($this->currentID, 'zitat_text', true);
     $author = get_post_meta($this->currentID, 'zitat_autor', true);
     if ($quote) {
         $output .= '<blockquote>';
         $output .= '<p class="quote">' . $quote . '</p>';
         if ($author) {
             $output .= '<p class="author"> &mdash; ' . $author . '</p>';
         }
         $output .= '</blockquote>';
     } else {
         if ($options['menu_fallbackquote_show_excerpt']) {
             $excerpt = dl_custom_excerpt($this->currentID, $options['menu_fallbackquote_excerpt_length'], true, 'nav-excerpt');
             if (isset($excerpt)) {
                 $output .= $excerpt;
             }
         }
     }
     $output .= '</div>';
     $output .= '<div class="span4 hide-mobile">';
     //	$output .= get_the_post_thumbnail($this->currentID, array($options['default_mainmenuthumb_width'],$options['default_mainmenuthumb_height']));
     //	$output .= get_the_post_thumbnail($this->currentID);
     $output .= get_the_post_thumbnail($this->currentID, 'portalmenu-thumb');
     //default?
     $output .= '</div>';
     $output .= '</div></div></div>';
 }
Exemplo n.º 2
0
function dl_display_search_resultitem()
{
    global $post;
    global $options;
    $output = '';
    $withthumb = $options['search_display_post_thumbnails'];
    $withcats = $options['search_display_post_cats'];
    if (isset($post) && isset($post->ID)) {
        $link = get_post_meta($post->ID, 'external_link', true);
        $external = 0;
        if (isset($link) && filter_var($link, FILTER_VALIDATE_URL)) {
            $external = 1;
        } else {
            $link = dl_make_link_relative(get_permalink($post->ID));
        }
        $output .= '<article class="search-result">' . "\n";
        $output .= "\t<h3><a ";
        if ($external == 1) {
            $output .= 'class="ext-link" ';
        }
        $output .= "href=\"" . $link . "\">" . get_the_title() . "</a></h3>\n";
        $type = get_post_type();
        if ($type == 'post') {
            $typestr = '<div class="search-meta">';
            $categories = get_the_category();
            $separator = ', ';
            $thiscatstr = '';
            if ($withcats == true && $categories) {
                $typestr .= '<span class="post-meta-category"> ';
                $typestr .= __('Kategorie', 'dltextdom');
                $typestr .= ': ';
                foreach ($categories as $category) {
                    $thiscatstr .= '<a href="' . get_category_link($category->term_id) . '">' . $category->cat_name . '</a>' . $separator;
                }
                $typestr .= trim($thiscatstr, $separator);
                $typestr .= '</span> ';
            }
            $topevent_date = get_post_meta($post->ID, 'topevent_date', true);
            if ($topevent_date) {
                $typestr .= '<span class="post-meta-date"> ';
                $typestr .= date_i18n(get_option('date_format'), strtotime($topevent_date));
                $typestr .= ' (';
                $typestr .= __('Veranstaltungshinweis', 'dltextdom');
                $typestr .= ')';
                $typestr .= '</span>';
            } else {
                $typestr .= '<span class="post-meta-date"> ';
                $typestr .= get_the_date();
                $typestr .= '</span>';
            }
            $typestr .= '</div>' . "\n";
        } elseif ($type == 'event') {
            $typestr = '<div class="search-meta">';
            $typestr .= '<span class="post-meta-event"> ';
            $typestr .= __('Veranstaltungshinweis', 'dltextdom');
            $typestr .= '</span>';
            $typestr .= '</div>' . "\n";
        } else {
            $typestr = '';
        }
        if (!empty($typestr)) {
            $output .= "\t" . $typestr . "\n";
        }
        $output .= "\t" . '<div class="row">' . "\n";
        if ($withthumb == true && has_post_thumbnail($post->ID)) {
            $output .= "\t\t" . '<div class="span3">' . "\n";
            $output .= '<a href="' . $link . '" class="news-image';
            if ($external == 1) {
                $output .= ' ext-link';
            }
            $output .= '">';
            $post_thumbnail_id = get_post_thumbnail_id($post->ID, 'post-thumb');
            $imagehtml = '';
            if ($post_thumbnail_id) {
                $sliderimage = wp_get_attachment_image_src($post_thumbnail_id, 'post-thumb');
                $imageurl = $sliderimage[0];
            }
            if (!isset($imageurl) || strlen(trim($imageurl)) < 4) {
                $imageurl = $options['default_postthumb_src'];
            }
            $output .= '<img src="' . dl_esc_url($imageurl) . '" width="' . $options['default_postthumb_width'] . '" height="' . $options['default_postthumb_height'] . '" alt="">';
            $output .= '</a>';
            $output .= "\t\t" . '</div>' . "\n";
            $output .= "\t\t" . '<div class="span5">' . "\n";
        } else {
            $output .= "\t\t" . '<div class="span8">' . "\n";
        }
        $output .= "\t\t" . '<p>' . "\n";
        $output .= dl_custom_excerpt($post->ID, $options['default_search_excerpt_length'], false, '', true, $options['search_display_excerpt_morestring']);
        if ($options['search_display_continue_arrow']) {
            $output .= '<a class="read-more-arrow';
            if ($external == 1) {
                $output .= ' ext-link';
            }
            $output .= '" href="' . $link . '">›</a>';
        }
        $output .= "\t\t\t" . '</p>' . "\n";
        $output .= "\t</div> <!-- /row -->\n";
        $output .= "</article>\n";
    } else {
        $output .= "<!-- empty result -->\n";
    }
    return $output;
}
Exemplo n.º 3
0
        ?>
								<div class="span2">
									<?php 
        echo '<a href="' . $link . '">' . $imagehtml . '</a>';
        ?>
								</div>
								<div class="span2">
							    <?php 
    } else {
        ?>
								<div class="span4">
							    <?php 
    }
    $desc = get_post_meta($topevent->ID, 'topevent_description', true);
    if (strlen(trim($desc)) < 3) {
        $desc = dl_custom_excerpt($topevent->ID, $options['default_topevent_excerpt_length']);
    }
    ?>
   
								    <div class="topevent-description"><?php 
    echo $desc;
    ?>
</div>
								   
								</div>			
							</div>
						</div>
					<?php 
}
?>