Hi,
habe das folgende Plug-In runtergeladen, habe aber Probleme es einzubinden (siehe hier)
Hier sind die Codes:
widget_wpoc.php (befindet sich im widgets-ordner)
PHP
<?php
/*
Plugin Name: WP-OnlineCounter widget
Version: 0.1
Plugin URI: http://faked.org/blog/wp-onlinecounter/
Description: Allows WP-OnlineCounter to be used as a widget.
Author: Jan Grewe
Author URI: http://faked.org/
*/
function widget_wpoc_init() {
if ( !function_exists('register_sidebar_widget') )
return;
function widget_wpoc() {
wp_onlinecounter();
}
register_sidebar_widget('WP-OnlineCounter', 'widget_wpoc');
}
add_action('plugins_loaded', 'widget_wpoc_init');
?>
Alles anzeigen
Hier noch die Sidebar
PHP
<!-- SIDEBAR LINKS -->
<div id="menu">
<div id="nav">
<?php if ( !function_exists('dynamic_sidebar')
|| !dynamic_sidebar() ) : ?>
<div class="sideitem">
<div class="boxhead"><div class="headfill"> </div></div>
<div class="boxbody">
<!-- SEARCH THE SITE -->
<h2>Searching</h2>
<form id="searchform" method="get" action="<?php echo $_SERVER['PHP_SELF']; ?>">
<input type="text" name="s" id="s" size="15" />
<input type="submit" value="<?php _e('Search'); ?>" />
</form>
</div>
</div><!-- end sideitem -->
<div class="sideitem">
<div class="boxhead"><div class="headfill"> </div></div>
<div class="boxbody">
<!-- POSTS BY CATEGORY -->
<h2><?php _e('Categories'); ?></h2>
<ul>
<?php wp_list_cats(); ?>
</ul>
</div>
</div><!-- end sideitem -->
<div class="sideitem">
<div class="boxhead"><div class="headfill"> </div></div>
<div class="boxbody">
<!-- POSTS BY DATE -->
<h2><?php _e('Archives'); ?></h2>
<ul>
<?php wp_get_archives('type=monthly'); ?>
</ul>
</div>
</div><!-- end sideitem -->
<!-- YOUR LINKS -->
<div class="sideitem">
<div class="boxhead"><div class="headfill"> </div></div>
<div class="boxbody">
<?php get_links_list(); ?>
</div>
</div><!-- end sideitem -->
<?php endif; ?>
<div class="reset"> </div>
</div><!-- end NAV -->
</div><!-- end MENU -->
Alles anzeigen