Beiträge von selm

    <?php /*
    Template Name: Archives (Do Not Use Manually)
    */ ?>

    <?php /* Counts the posts, comments and categories on your blog */
    $numposts = $wpdb->get_var("SELECT COUNT(1) FROM $wpdb->posts WHERE post_status = 'publish' AND post_type != 'page'");
    if (0 < $numposts) $numposts = number_format($numposts);

    $numcomms = $wpdb->get_var("SELECT COUNT(1) FROM $wpdb->comments WHERE comment_approved = '1'");
    if (0 < $numcomms) $numcomms = number_format($numcomms);

    $numcats = $wpdb->get_var("SELECT COUNT(1) FROM $wpdb->categories");
    if (0 < $numcats) $numcats = number_format($numcats);
    ?>

    <?php get_header(); ?>

    <div class="content">
    <div id="primary">
    <div id="current-content" class="hfeed">

    <?php the_post(); ?>

    <div id="post-<?php the_ID(); ?>" class="<?php k2_post_class(); ?>">

    <div class="page-head">
    <h2><a href="<?php the_permalink(); ?>" rel="bookmark" title='<?php printf( __('Permanent Link to "%s"','k2_domain'), wp_specialchars(strip_tags(the_title('', '', false)),1) ); ?>'><?php the_title(); ?></a></h2>
    <?php edit_post_link(__('Edit','k2_domain'), '<span class="entry-edit">','</span>'); ?>
    </div>

    <div class="entry-content">

    <p><?php printf(__('This is the frontpage of the %1$s archives. Currently the archives are spanning %2$s posts and %3$s comments, contained within the meager confines of %4$s categories. Through here, you will be able to move down into the archives by way of time or category. If you are looking for something specific, perhaps you should try the search on the sidebar.','k2_domain'), get_bloginfo('name'), $numposts, $numcomms, $numcats); ?></p>

    <?php if (function_exists('af_ela_super_archive')) { ?>

    <h3><?php _e('Live Archives','k2_domain'); ?></h3>
    <p><?php printf(__('This is a \'live archive\', which allows you to \'dig\' into the %s repository in a fast and efficient way without having to reload this page as you explore.','k2_domain'), get_bloginfo('name')); ?> </p>

    <div id="livearchives">
    <?php af_ela_super_archive('num_posts_by_cat=50&truncate_title_length=40&hide_pingbacks_and_trackbacks=1&num_entries=1&num_comments=1&number_text=<span>%</span>&comment_text=<span>%</span>&selected_text='.urlencode('')); ?>
    <div class="clear"></div>
    </div>

    <?php } else { ?>

    <h3><?php _e('Browse by Month','k2_domain'); ?></h3>
    <ul class="archive-list">
    <?php wp_get_archives('show_post_count=1'); ?>
    </ul>

    <br class="clear" />

    <h3><?php _e('Browse by Category','k2_domain'); ?></h3>
    <ul class="archive-list">
    <?php wp_list_cats('hierarchical=0&optioncount=1'); ?>
    </ul>

    <br class="clear" />

    <?php } // End ELA Check ?>

    <?php if (function_exists('UTW_ShowWeightedTagSetAlphabetical')) { ?>

    <h3><?php _e('Tag Cloud','k2_domain'); ?></h3>
    <p><?php printf(__('The following is a list of the tags used at %s, colored and \'weighed\' in relation to their relative usage.','k2_domain'), get_bloginfo('name')); ?></p>

    <?php UTW_ShowWeightedTagSetAlphabetical("coloredsizedtagcloud"); ?>

    <?php } ?>

    </div> <!-- .entry-content -->
    </div> <!-- #post-ID -->

    </div> <!-- #current-content .hfeed -->

    <div id="dynamic-content"></div>
    </div> <!-- #primary -->

    <?php get_sidebar(); ?>

    </div> <!-- .content -->

    <?php get_footer(); ?>

    Ich habe gerade bemerkt, dass auf meiner Archiv-Seite nur noch steht: "Willkommen im Archiv von ." und Wordpress nicht automatisch meinen Seitenname einfügt. Das liegt wohl daran, dass ich dem blog keinen Namen gegeben habe, um das automatische Erscheinen des Namens im Header zu verhindern.

    Irgendjemand ne ahnung, wie ich das manuell ändern kann?

    EDIT: ok, clear:both verhindert das hineinfliessen.

    aber wieso muss ich margin werte ändern, wenn ich einfach den normalen abstand zwischen den posts haben möchte, die bei allen anderen posts ja auch einfach automatisch da sind?

    hat leider gar nichts bewirkt :(

    ich möchte ja einfach, dass der ältere post nicht in den aktuellen hineinfliesst. passiert nur, wenn ich den align befehl mit dem bild verwende..ansonsten nicht.

    das hab ich bereits versucht, allerdings passieren dann komische sachen im IE und auch in Firefox.

    Der Text fliesst zwar um das Bild herum aber der Abstand zum darunterliegenden Post wird entweder kleiner als normal bzw. fliesst sogar manchmal in den bearbeiteten post hinein. was muss ich tun? :(

    Ich habe folgende Frage zu meinem Design:

    Ich möchte in meinen Posts gern ab und zu Bilder einfügen (zum Beispiel links oben) und möchte, dass der Text das Bild in einem gewissen Abstand umfliesst.

    Mein blog ist hier: blinked.

    Zum Beispiel beim momentan obersten Post (Quietschentchenbild) fänd ich es schön, wenn die paar Zeilen das Bild umfliessen würden und ich es nicht in die nächste Zeit setzen müsste.

    Jemand ne Idee? :)

    Hallo. Schonmal sorry im vorraus, denn die Suche hat nix passendes ausgespuckt.

    Ich benutze Wordpress 2.2.2 und suche ein Video-Plugin mit dem ich selbstgehostete Videos ebenso schön in Posts einbinden kann, wie die sämtlicher anderen Hoster wie Youtube & Co. Habe eine Version vom Viper Video blah versucht, die ist aber offensichtlich inkompatibel mit 2.2.2

    Jemand einen Vorschlag? Danke!

    <?php
    // This is the loop, which fetches entries from your database.
    // It is a very delicate piece of machinery. Be gentle!

    // Get core WP functions when loaded dynamically
    if (isset($_GET['k2dynamic'])) {
    require (dirname(__FILE__).'/../../../wp-blog-header.php');

    if ($_GET['k2dynamic'] != 'init') {
    $query = k2_parse_query($_GET);
    query_posts($query);
    }

    // Debugging
    if ( isset($_GET['k2debug']) ) {
    echo '<div class="alert">';
    echo '<b>Query:</b><br />'; var_dump($wp_query->query); echo '<br />';
    echo '<b>Request:</b><br />'; var_dump($wp_query->request); echo '<br />';
    echo '</div>';
    }
    ?>

    <div id="dynamictype" class="<?php k2_body_class(); ?>">

    <?php }

    // Get the asides category
    $k2asidescategory = get_option('k2asidescategory');

    // Get date & time formats
    $dateformat = get_option('date_format');
    $timeformat = get_option('time_format');
    ?>

    <?php /* Headlines for archives */ if ((!is_single() and !is_home()) or is_paged()) { ?>
    <div class="page-head"><h2>
    <?php // Figure out what kind of page is being shown
    if (is_category()) {
    if (get_query_var('cat') != $k2asidescategory) {
    printf(__('Archive for the \'%s\' Category','k2_domain'), single_cat_title('', false));
    } else {
    echo single_cat_title();
    }

    } elseif (is_day()) {
    printf(__('Archive for %s','k2_domain'), get_the_time(__('F jS, Y','k2_domain')));

    } elseif (is_month()) {
    printf(__('Archive for %s','k2_domain'), get_the_time(__('F, Y','k2_domain')));

    } elseif (is_year()) {
    printf(__('Archive for %s','k2_domain'), get_the_time(__('Y','k2_domain')));

    } elseif (is_search()) {
    printf(__('Search Results for \'%s\'','k2_domain'), attribute_escape(stripslashes(get_query_var('s'))));

    } elseif (function_exists('is_tag') and is_tag()) {
    printf(__('Tag Archive for \'%s\'','k2_domain'), get_query_var('tag') );

    } elseif (is_author()) {
    printf(__('Author Archive for %s','k2_domain'), get_author_name(get_query_var('author')));

    } elseif (is_paged() and (get_query_var('paged') > 1)) {
    _e('Archive','k2_domain');
    }
    if ( get_query_var('paged') > 1 ) {
    printf(__(' <span class="archivepages">Page %1$s of %2$s</span>','k2_domain'), get_query_var('paged'), $wp_query->max_num_pages);
    }
    ?>

    </h2></div>
    <?php } ?>

    <?php if ((get_option('k2rollingarchives') == 0) and !is_single() and is_paged()) include (TEMPLATEPATH . '/navigation.php'); ?>

    <?php
    /* Check if there are posts */
    if ( have_posts() ) {
    /* It saves time to only perform the following if there are posts to show */

    /* Count if there are 2+ users */
    $count_users = $wpdb->get_var("SELECT COUNT(1) FROM $wpdb->usermeta WHERE meta_key = '" . $table_prefix . "user_level' AND meta_value > 1 LIMIT 2");

    /* If there are 2+ users, this is a multiple-user blog */
    $multiple_users = ($count_users > 1);

    /* Post index for semantic classes */
    $post_index = 1;
    ?>

    <?php /* Start the loop */ while ( have_posts() ) { the_post(); ?>

    <?php /* Permalink nav has to be inside loop */ if (is_single()) include (TEMPLATEPATH . '/navigation.php'); ?>

    <div id="post-<?php the_ID(); ?>" class="<?php k2_post_class($post_index++, in_category($k2asidescategory)); ?>">
    <div class="entry-head">
    <h3 class="entry-title"><a href="<?php the_permalink(); ?>" rel="bookmark" title='<?php printf( __('Permanent Link to "%s"','k2_domain'), wp_specialchars(strip_tags(the_title('', '', false)),1) ); ?>'><?php the_title(); ?></a></h3>
    <?php /* Support for Noteworthy plugin */ if (function_exists('nw_noteworthyLink')) { nw_noteworthyLink(get_the_ID()); } ?>

    <div class="entry-meta">
    <span class="chronodata">
    <?php /* Date & Author */
    printf( __('Published %1$s %2$s','k2_domain'),
    ( $multiple_users ? sprintf(__('by %s','k2_domain'), '<address class="vcard author"><a href="' . get_author_posts_url(get_the_author_ID()) .'" class="url fn" title="'. sprintf(__('View all posts by %s','k2_domain'), attribute_escape(get_the_author())) .'">' . get_the_author() . '</a></address>') : ('') ),
    '<abbr class="published" title="'. get_the_time('Y-m-d\TH:i:sO') . '">' .
    ( function_exists('time_since') ? sprintf(__('%s ago','k2_domain'), time_since(abs(strtotime($post->post_date_gmt . " GMT")), time())) : sprintf(__('at %s','k2-domain'), get_the_time($dateformat)) )
    . '</abbr>'
    );
    ?>
    </span>

    <span class="entry-category">
    <?php /* Categories */ printf(__('in %s.','k2_domain'), k2_nice_category(', ', __(' and ','k2_domain')) ); ?>
    </span>

    <?php /* Comments */ comments_popup_link('0&nbsp;<span>'.__('Comments','k2_domain').'</span>', '1&nbsp;<span>'.__('Comment','k2_domain').'</span>', '%&nbsp;<span>'.__('Comments','k2_domain').'</span>', 'commentslink', '<span class="commentslink">'.__('Closed','k2_domain').'</span>'); ?>

    <?php /* Edit Link */ edit_post_link(__('Edit','k2_domain'), '<span class="entry-edit">','</span>'); ?>

    <?php /* Tags */ if (is_single() and function_exists('UTW_ShowTagsForCurrentPost')) { ?>
    <span class="entry-tags"><?php _e('Tags:','k2_domain'); ?> <?php UTW_ShowTagsForCurrentPost("commalist") ?>.</span>
    <?php } ?>
    </div> <!-- .entry-meta -->
    </div> <!-- .entry-head -->

    <div class="entry-content">
    <?php the_content(sprintf(__('Continue reading \'%s\'', 'k2_domain'), the_title('', '', false))); ?>

    <?php wp_link_pages('before=<p class="page-links"><strong>' . __('Pages:','k2_domain') . '</strong>&after=</p>'); ?>
    </div> <!-- .entry-content -->

    </div> <!-- #post-ID -->

    <?php } /* End The Loop */ ?>

    <?php /* Insert Paged Navigation */ if (!is_single() and get_option('k2rollingarchives') != 1) { include (TEMPLATEPATH.'/navigation.php'); } ?>

    <?php /* If there is nothing to loop */ } else { define('K2_NOT_FOUND', true); ?>

    <div class="hentry four04">

    <div class="entry-head">
    <h3 class="center"><?php _e('Not Found','k2_domain'); ?></h3>
    </div>

    <div class="entry-content">
    <p><?php _e('Oh no! You\'re looking for something which just isn\'t here! Fear not however, errors are to be expected, and luckily there are tools on the sidebar for you to use in your search for what you need.','k2_domain'); ?></p>
    </div>

    </div> <!-- .hentry .four04 -->

    <?php } /* End Loop Init */

    if (isset($_GET['k2dynamic'])) { ?> </div> <?php }

    ?>

    <?php get_header(); ?>

    <div class="content">

    <div id="primary">
    <?php if (get_option('k2rollingarchives') == 1) { ?>
    <div id="dynamic-content">

    <?php include (TEMPLATEPATH . '/rollingarchive.php'); ?>

    </div> <!-- #dynamic-content -->
    <?php } else { ?>
    <div id="current-content" class="hfeed">

    <?php include (TEMPLATEPATH . '/theloop.php'); ?>

    </div> <!-- #current-content -->

    <div id="dynamic-content"></div>
    <?php } ?>
    </div> <!-- #primary -->

    <?php get_sidebar(); ?>

    </div> <!-- .content -->

    <?php get_footer(); ?>