Zurück   WordPress Deutschland Forum > Support > Konfiguration

Antwort
 
Themen-Optionen Ansicht
Alt 06.09.2008, 10:56   #1 (permalink)
PostRank: 3
 
Benutzerbild von toolazytothink
 
Registriert seit: 28.08.2007
Ort: Lucerne, Switzerland
Beiträge: 148
Navi anpassen mit Titel der Beiträge (Rollingarchive)

Hello everybody!!

Ich benutze WP 2.5.1 und das Theme unwakeable 1.5.1 (K2)

Ich benutze dabei auch das "Rollingarchive". Ich möchte dies nun anpassen, das an der Stelle wo "neuer" oder "älter" steht, der Titel des vorherigen, bzw. nachherigen Beitrages steht. In der Navigation funktioniert dies auch, im Rolling archive aber nicht.

Rolllingarchives.php:
PHP-Code:
<?php
    
// Get core WP functions if needed
    
if ( isset($_GET['k2dynamic']) ):

        
// Check for CGI Mode
        
if ( 'cgi' == substrphp_sapi_name(), 0) ):
            require_once( 
preg_replace'/wp-content.*/'''__FILE__ ) . 'wp-config.php' );
        else:
            require_once( 
preg_replace'/wp-content.*/'''$_SERVER['SCRIPT_FILENAME'] ) . 'wp-config.php' );
        endif;

        
// Send the header
        
header('Content-Type: ' get_bloginfo('html_type') . '; charset=' get_bloginfo('charset'));

        
// K2 Hook
        
do_action('k2_dynamic_content');

        
// Initialize the Loop
        
query_postsk2_parse_query($_GET) );

        
$_GET['k2dynamic'] = 'init';
    endif;

    
// Load Rolling Archives?
    
if ( '1' == get_option('k2rollingarchives') ): 

        
// Get the query
        
if ( is_array($wp_query->query) ):
            
$rolling_query $wp_query->query;
        elseif ( 
is_string($wp_query->query) ):
            
parse_str($wp_query->query$rolling_query);
        endif;

        
// Debugging
        
if ( isset($_GET['k2debug']) ):
            
$rolling_query['k2debug'] = '1';
        endif;

        
// Get list of page dates
        
if ( !is_page() and !is_single() ):
            
$page_dates get_rolling_page_dates($wp_query);
        endif;

        
// Get the current page
        
$rolling_page intvalget_query_var('paged') );
        if ( 
$rolling_page ):
            
$rolling_page 1;
        endif;
?>

<div id="rollingarchives" style="display:none;">
    <div id="texttrimmer">
        <div id="trimmertrackwrap"><div id="trimmertrack"><div id="trimmerhandle"></div></div></div>
        

    </div>

    <div id="rollnavigation">
        <div id="pagetrackwrap"><div id="pagetrack"><div id="pagehandle"><div id="rollhover"><div id="rolldates"></div></div></div></div></div>

        <div id="rollpages"></div>
        
        <a id="rollprevious" title="<?php _e('&Auml;lter','k2_domain'); ?>" href="#">
            <span>&laquo;</span> <?php _e('&Auml;lter','k2_domain'); ?>
        </a>
        <div id="rollhome" title="<?php _e('Home','k2_domain'); ?>">
            <span><?php _e('Home','k2_domain'); ?></span>
        </div>
        <div id="rollload" title="<?php _e('Loading','k2_domain'); ?>">
            <span><?php _e('Loading','k2_domain'); ?></span>
        </div>
        <a id="rollnext" title="<?php _e('Neuer','k2_domain'); ?>" href="#">
            <?php _e('Neuer','k2_domain'); ?> <span>&raquo;</span>
        </a>

    </div> <!-- #rollnavigation -->
</div> <!-- #rollingarchives -->

<?php if ( !isset($_GET['k2dynamic']) ): ?>
<noscript>
    <?php k2_navigation('nav-above'); ?> 
</noscript>
<?php endif; ?>

<?php if ( !isset($_GET['k2dynamic']) or ('init' == $_GET['k2dynamic']) ): ?>
<script type="text/javascript">
// <![CDATA[
    jQuery(document).ready(function() {
        K2.RollingArchives.setState(
            <?php echo $rolling_page?>,
            <?php echo $wp_query->max_num_pages?>,
            <?php output_javascript_hash($rolling_query); ?>,
            <?php output_javascript_array($page_dates); ?>
        );

        smartPosition('#dynamic-content');
    });
// ]]>
</script>
<?php endif; endif; ?>
<div id="rollingcontent" class="hfeed">
    <?php include(TEMPLATEPATH '/theloop.php'); ?>
</div><!-- #rollingcontent .hfeed -->
Navigation.php:
PHP-Code:
    <?php /*
        This navigation is used on most pages to move back and forth in your archives.
        It has been placed in its own file so it's easier to change across all of K2
    */ 
?>

    <hr />

    <?php if (is_single()) { ?>

    <div class="navigation">
        <?php previous_post_link('<div class="left"><span>&laquo;</span> %link</div>'?>
        <?php next_post_link('<div class="right">%link <span>&raquo;</span></div>'?>
        <div class="clear"></div>
    </div>

    <?php } else { ?>
        
    <div class="navigation">
    <?php $_SERVER['REQUEST_URI']  = preg_replace("/(.*?).php(.*?)&(.*?)&(.*?)&_=/","$2$3",$_SERVER['REQUEST_URI']); ?>
        <div class="left"><?php next_posts_link('<span>&laquo;</span> '.__('Older Entries','k2_domain').''); ?></div>
        <div class="right"><?php previous_posts_link(''.__('Newer Entries','k2_domain').' <span>&raquo;</span>'); ?></div>
        <div class="clear"></div>
    </div>

    <?php ?>

    <hr />

Ich habe versucht in der rollingarchive.php folgendes:
PHP-Code:
<?php _e('&Auml;lter','k2_domain'); ?>
und nochmals
PHP-Code:
<?php _e('&Auml;lter','k2_domain'); ?>
mit diesem zu ersetzten:
PHP-Code:
<?php next_posts_link('<span>&laquo;</span> '.__('Older Entries','k2_domain').''); ?>
und
PHP-Code:
 <?php next_posts_link('<span>&laquo;</span> '.__('Older Entries','k2_domain').''); ?>
funktioniert aber leider nicht... es wird nichts mehr angezeigt.
__________________
http://www.toolazytothink.ch
toolazytothink ist offline   Mit Zitat antworten
Antwort

Lesezeichen

Themen-Optionen
Ansicht

Forumregeln
Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist aus.
HTML-Code ist aus.
Trackbacks are aus
Pingbacks are aus
Refbacks are aus


Alle Zeitangaben in WEZ +1. Es ist jetzt 08:47 Uhr.


Powered by vBulletin® Version 3.7.4 (Deutsch)
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 | Impressum | Ein Inpsyde.com Projekt