Skip to content
This repository has been archived by the owner on Nov 19, 2023. It is now read-only.

Commit

Permalink
Merge pull request #103 from xwolfde/Piratenkleider3
Browse files Browse the repository at this point in the history
Piratenkleider3
  • Loading branch information
xwolfde committed Mar 8, 2014
2 parents 0072180 + 41960d0 commit c38aaf7
Show file tree
Hide file tree
Showing 154 changed files with 15,178 additions and 13,742 deletions.
2 changes: 1 addition & 1 deletion 404.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
<?php } ?>

<p>
<?php _e("Es konnten keine Seiten oder Artikel gefunden werden, die zu der eingegebenen Adresse passte. Bitte versuchen Sie es nochmal mit einer Suche.", 'piratenkleider'); ?>
<?php _e("Es konnten keine Seiten oder Artikel gefunden werden, die zu der eingegebenen Adresse passten. Bitte versuchen Sie es nochmal mit einer Suche.", 'piratenkleider'); ?>
</p>

<?php get_search_form(); ?>
Expand Down
Binary file modified apple-touch-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 3 additions & 3 deletions archive.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
<?php elseif ( is_year() ) : ?>
<?php printf( __( 'Jahresarchiv: %s', 'piratenkleider' ), get_the_date('Y') ); ?>
<?php else : ?>
<?php _e( 'Blogarchiv', 'piratenkleider' ); ?>
<?php _e( 'Archiv', 'piratenkleider' ); ?>
<?php endif; ?></span></h1>
<div class="symbolbild"><img src="<?php echo $image_url ?>" alt="">
</div>
Expand All @@ -44,11 +44,11 @@
<?php elseif ( is_year() ) : ?>
<?php printf( __( 'Jahresarchiv: %s', 'piratenkleider' ), get_the_date('Y') ); ?>
<?php else : ?>
<?php _e( 'Blogarchiv', 'piratenkleider' ); ?>
<?php _e( 'Archiv', 'piratenkleider' ); ?>
<?php endif; ?></span></h1>
<?php }
rewind_posts();
get_template_part( 'loop', 'archive' );
get_template_part( 'loop', 'archive' );
?>
</div>
</div>
Expand Down
16 changes: 8 additions & 8 deletions author.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,27 +41,27 @@

<?php rewind_posts();

$i = 0;
$i = 0;
$col = 0;

$numentries = $options['category-num-article-fullwidth'] + $options['category-num-article-halfwidth'];
$col_count = 3;
$cols = array();

global $query_string;
query_posts( $query_string . '&cat=$thisCat' );
$args = $query_string;
$args .= '&cat='.$thisCat;
$args .= '&posts_per_page='.$numentries;
query_posts( $args );

while (have_posts() && $i<$numentries) : the_post();
$i++;
ob_start();
$output = '';
if (( isset($options['category-num-article-fullwidth']))
&& ($options['category-num-article-fullwidth']>=$i )) {
piratenkleider_post_teaser($options['category-teaser-titleup'],$options['category-teaser-datebox'],$options['category-teaser-dateline'],$options['category-teaser-maxlength'],$options['teaser-thumbnail_fallback'],$options['category-teaser-floating']);
$output = piratenkleider_post_teaser($options['category-teaser-titleup'],$options['category-teaser-datebox'],$options['category-teaser-dateline'],$options['category-teaser-maxlength'],$options['teaser-thumbnail_fallback'],$options['category-teaser-floating']);
} else {
piratenkleider_post_teaser($options['category-teaser-titleup-halfwidth'],$options['category-teaser-datebox-halfwidth'],$options['category-teaser-dateline-halfwidth'],$options['category-teaser-maxlength-halfwidth'],$options['teaser-thumbnail_fallback'],$options['category-teaser-floating-halfwidth']);
$output = piratenkleider_post_teaser($options['category-teaser-titleup-halfwidth'],$options['category-teaser-datebox-halfwidth'],$options['category-teaser-dateline-halfwidth'],$options['category-teaser-maxlength-halfwidth'],$options['teaser-thumbnail_fallback'],$options['category-teaser-floating-halfwidth']);
}
$output = ob_get_contents();
ob_end_clean();
if (isset($output)) {
$cols[$col++] = $output;
}
Expand Down
30 changes: 16 additions & 14 deletions category.php
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
<?php get_header();
global $options;
global $wp_query;
$cat_obj = $wp_query->get_queried_object();
$thisCat = $cat_obj->term_id;
$thisCatName = get_cat_name($thisCat);
$image_url = '';
if (($options['category-teaser']) || (($options['category-startpageview']) && ( $options['slider-aktiv'] == "1" ))) {

$cat_obj = $wp_query->get_queried_object();
$thisCat = $cat_obj->term_id;
$thisCatName = get_cat_name($thisCat);
$image_url = '';
if ($options['category-teaser']) {
echo '<div class="section teaser"><div class="row">';
get_sidebar( 'teaser' );
echo '</div></div>';
Expand All @@ -31,7 +32,7 @@
<h1 class="post-title"><span><?php printf( __( 'Kategorie %s', 'piratenkleider' ), '' . single_cat_title( '', false ) . '' ); ?></span></h1>
<div class="symbolbild"><img src="<?php echo $image_url ?>" alt=""></div>
<?php
if (($options['category-teaser']) || (($options['category-startpageview']) && ( $options['slider-aktiv'] == "1" ))) {
if ($options['category-teaser']) {
echo '<h1 class="skip">'.__("Aktuelle Artikel", 'piratenkleider').' ';
printf( __( 'Kategorie %s', 'piratenkleider' ), '' . single_cat_title( '', false ) . '' );
echo '</h1>';
Expand All @@ -47,20 +48,21 @@
$numentries = $options['category-num-article-fullwidth'] + $options['category-num-article-halfwidth'];
$col_count = 3;
$cols = array();

global $query_string;
query_posts( $query_string . '&cat=$thisCat' );

$thisquery = '&cat='.$thisCat.'&posts_per_page='.$numentries;
query_posts( $thisquery );


while (have_posts() && $i<$numentries) : the_post();
$i++;
ob_start();
$output = '';
if (( isset($options['category-num-article-fullwidth']))
&& ($options['category-num-article-fullwidth']>=$i )) {
piratenkleider_post_teaser($options['category-teaser-titleup'],$options['category-teaser-datebox'],$options['category-teaser-dateline'],$options['category-teaser-maxlength'],$options['teaser-thumbnail_fallback'],$options['category-teaser-floating']);
$output = piratenkleider_post_teaser($options['category-teaser-titleup'],$options['category-teaser-datebox'],$options['category-teaser-dateline'],$options['category-teaser-maxlength'],$options['teaser-thumbnail_fallback'],$options['category-teaser-floating']);
} else {
piratenkleider_post_teaser($options['category-teaser-titleup-halfwidth'],$options['category-teaser-datebox-halfwidth'],$options['category-teaser-dateline-halfwidth'],$options['category-teaser-maxlength-halfwidth'],$options['teaser-thumbnail_fallback'],$options['category-teaser-floating-halfwidth']);
$output = piratenkleider_post_teaser($options['category-teaser-titleup-halfwidth'],$options['category-teaser-datebox-halfwidth'],$options['category-teaser-dateline-halfwidth'],$options['category-teaser-maxlength-halfwidth'],$options['teaser-thumbnail_fallback'],$options['category-teaser-floating-halfwidth']);
}
$output = ob_get_contents();
ob_end_clean();

if (isset($output)) {
$cols[$col++] = $output;
}
Expand Down
138 changes: 138 additions & 0 deletions catindex.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,138 @@
<?php
/*
Template Name: Kategorieindex
*/
?><?php get_header();
global $options;


if ( $options['slider-aktiv'] == "1" ){ ?>
<div class="section teaser">
<div class="row">
<?php get_sidebar( 'teaser' ); ?>
</div>
</div>
<?php } ?>
<div class="section content" id="main-content">
<div class="row">
<div class="content-primary">
<div class="skin">


<?php
if ( have_posts() ) while ( have_posts() ) : the_post();
$content = trim(get_the_content());
if (strlen($content)>0) {
echo $content;
edit_post_link( __( 'Bearbeiten', 'piratenkleider' ), '', '' );
echo '<hr class="clear">';
}
endwhile;


$foundarticles=0;
$i = 0;

global $wp_query;


$cat_array = array();
$categories=get_categories(array('orderby' => 'name','order' => 'ASC'));
foreach($categories as $category) {
if (!is_wp_error( $category )) {
$cat_array[$category->term_id] = $category->term_id;
}
}


$num = $options['categoryindex-numlinklist'] + 1;
wp_reset_query();
$subcatquery = array();
if ($cat_array) {
foreach($cat_array as $cat) {
$category = get_term_by('ID',$cat, 'category');
$title = '<h2>' . $category->name.'</h2>';

$subcatquery =array(
'post_type' => 'post',
'post_status' => 'publish',
'posts_per_page' => $num,
'cat' => $cat,
'ignore_sticky_posts'=> 1
);
$i=0;
$my_query = null;
$my_query = new WP_Query($subcatquery);
$liste = '';
$topentry = '';
$catfound = 0;
if( $my_query->have_posts() ) {
while ($my_query->have_posts()) : $my_query->the_post();
$foundarticles =1;
$catfound = 1;
if ($i==0) {
$topentry = piratenkleider_category_teaser($my_query);
$i=1;
} else {
$liste .= '<li><a href="'.get_permalink().'" rel="bookmark">';
$liste .= get_the_title();
$liste .= "</a></li>\n";
}
endwhile;

if ($catfound==1) {
echo '<div class="categorybox cat-'.$cat.'">';
echo $title;
echo $topentry;
if (strlen($liste)>0) {
echo '<h3 class="skip">Weitere Artikel aus dem Bereich '.$category->name.'</h3>';
echo "\n";
echo '<ul class="catliste">';
echo $liste;
echo "</ul>\n";
echo '<p><a href="' . esc_attr(get_term_link($category, 'category'))
. '" title="' . sprintf( __( "Nachrichten der Kategorie %s zeigen" , 'piratenkleider'), $category->name )
. '" ' . '>'.__('Weitere Meldungen...','piratenkleider').'</a>'.'</p>';

}
echo "</div>\n";
}


}
wp_reset_query();

}
}







if ($foundarticles==0) { ?>
<h2><?php _e("Nichts gefunden", 'piratenkleider'); ?></h2>
<p>
<?php _e("Es konnten keine Artikel gefunden werden. Bitte versuchen Sie es nochmal mit einer Suche.", 'piratenkleider'); ?>
</p>
<?php get_search_form();
echo "<hr>\n";

}
?>

</div>
</div>
<div class="content-aside">
<div class="skin">
<h1 class="skip"><?php _e( 'Weitere Informationen', 'piratenkleider' ); ?></h1>
<?php get_sidebar(); ?>
</div>
</div>
</div>
<?php get_piratenkleider_socialmediaicons(2); ?>

</div>

<?php get_footer(); ?>
2 changes: 1 addition & 1 deletion comments.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
global $options;

if ( post_password_required() ) : ?>
<p><?php _e("Dieser Artikel ist Passwortgesch&uuml;tzt. Bitte gib das Passwort ein um die Kommentare zu sehen.", 'piratenkleider'); ?></p>
<p><?php _e("Dieser Artikel ist passwortgesch&uuml;tzt. Bitte gib das Passwort ein, um die Kommentare zu sehen.", 'piratenkleider'); ?></p>
<?php return;
endif;
if ( have_comments() ) : ?>
Expand Down
Loading

0 comments on commit c38aaf7

Please sign in to comment.