I'm using this plugin for top commentators: http://www.pfadvice.com/wordpress-plugins/show-top-commentators/ And I uploaded the file, CHMOD'ed it to 777, activated the plugin and created a text widget to display on the sidebar where I put the following code into it: <?php if(function_exists('ns_show_top_commentators')) { ?> <li> <h2>Top Commentators</h2> <ul><?php ns_show_top_commentators(); ?></ul> </li> <?php } ?> Code (markup): I left the default options and went to my blog's homepage but it's not displaying the top commentators. Any ideas? (I've since hidden the widget because it says top commentators but doesn't display any). Oh, and I'm on the latest non beta version of wordpress Any help would be greatly appreciated. Thanks, Chris
u should put php code above in sidebar.php of your theme...but u say u put in widgets (not sure if php code works in widgets or u use php exec widget) edit show_top_commentators.php according to http://www.pfadvice.com/wordpress-plugins/show-top-commentators/ i think correct params in reset() filter_user_ids (comma seperated list of user id’s) in this function put '1' in () I'm using it in Blogging Tips but it's working. Bellow is the part of the code i edited. check following part of show_top_commentators.php $ns_options = array( "reset" => "180", //reset hourly, daily, weekly, monthly, yearly, all OR # (eg 30 days) "limit" => 6, //maximum number of commentator's to show "filter_users" => "Administrator,admin", //commma seperated list of users ("nate,jeff,etc"). "filter_user_ids" => "1", //comma sperated list of user_ids ("1,2") "filter_urls" => "", //commma seperated list of full or partial URL's (www.badsite.com,etc) "none_text" => "None yet!", //if there are no commentators, what should we display? "make_links" => 1, //link the commentator's name to thier website? "number_of_comments" => "y", //show number of comments next to their name? y=yes n=no "name_limit" => 28, //maximum number of characters a commentator's name can be, before we cut it off with an ellipse "start_html" => "<li>", "end_html" => "</li>", ); PHP: I have set to refresh d list after 6 months (180 days)
I think you may be write about the php not displaying in the text widgets. I should get php exec you say? Do you have a link to the one you use so I know I'll just be able to use the same setup you have? Thanks in advance.
i justa dd to sidebar.php (themes->theme editor->from right side click sidebar to dit it) as the php exec has issues with latest wordpress versions.....also i disabled widgets.....in ma blog
Php code doesn't work in text widgets by default. A few plugins to change that setting: Exec PHP PHP Exec Run PHP However, these plugins tend to work randomly on my blogs - sometimes none of these work at all, sometimes only one or two. You have to try all of them to see if they are working. If none are working, the solution will be to disable widgets and edit the sidebar file as sat123 said.
Hmmm, how do you disable the widgets? Is that just the sidebar widgets plugin? Because as it currently stands, I can't even enable that plugin because it says there were errors. Yet when I go to my presenation section for my theme I am able to move widgets around.
there is some plugin named disable widgets.. http://schulte.mn/2007/05/04/disable-wordpress-widgets/ But without disabling the widgets also u may add the code to sidebar.php
This was the same for me. Go into the sidebar template file and place it at the very bottom. Just above </ul> </div> <!--/sidebar --> Code (markup):
To disable widgets, just remove all widgets from the sidebar (so that "default sidebar" is displayed), then edit your sidebar.php file.
Hmmm, I don't have that code. I think I'm going to try one of those php widgets as I'd hate to have to manually add widgets to the sidebar all the time. I'll post back if those don't work. Thanks for the help thus far though.
Here's the code: <div id="sidebar"> <?php if ( function_exists('dynamic_sidebar') && dynamic_sidebar() ) : else : ?> <?php if(is_home()) {?> <h2><?php _e('About'); ?></h2> <ul><li id="about"><?php bloginfo('description'); ?><p>There are <?php global $numposts; echo $numposts ;?> posts and <?php global $numcmnts; echo $numcmnts ;?> comments so far.</p></li></ul> <?php }?> <?php if (!is_home()) {?> <h2><?php _e('Recent Posts'); ?></h2> <ul><?php sg_get_recent_posts(6);?></ul> <?php }?> <h2><?php _e('Pages'); ?></h2> <ul><?php wp_list_pages('title_li='); ?></ul> <h2><?php _e('Categories'); ?></h2> <ul> <?php wp_list_cats('optioncount=1'); ?> </ul> <h2><label for="s"><?php _e('Search'); ?></label></h2> <form id="searchform" method="get" action="<?php bloginfo('siteurl') ?>/index.php"> <input type="text" name="s" id="s" value="<?php echo wp_specialchars($s, 1); ?>" size="15" /><br /> <input type="submit" name="submit" value="<?php _e('Search'); ?>" /> </form> <h2><?php _e('Archives'); ?></h2> <ul> <?php wp_get_archives('type=monthly&show_post_count=true'); ?> </ul> <?php if(is_home()) {?> <h2>Recent Comments</h2> <ul> <?php sg_get_recent_comments(6,5); //shows 6 recent comments, each with first 5 words ?> </ul> <br /> <h2>Links</h2> <ul><?php get_links_list('name'); ?> </ul> <h2><?php _e('Meta'); ?></h2> <ul> <li><?php wp_register(); ?></li> <li><?php wp_loginout(); ?></li> <li><a href="<?php bloginfo('rss2_url'); ?>" title="<?php _e('Syndicate this site using RSS'); ?>"><?php _e('<abbr title="Really Simple Syndication">RSS</abbr>'); ?></a></li> <li><a href="<?php bloginfo('comments_rss2_url'); ?>" title="<?php _e('The latest comments to all posts in RSS'); ?>"><?php _e('Comments <abbr title="Really Simple Syndication">RSS</abbr>'); ?></a></li> <li><a href="http://validator.w3.org/check/referer" title="<?php _e('This page validates as XHTML 1.0 Transitional'); ?>"><?php _e('Valid <abbr title="eXtensible HyperText Markup Language">XHTML</abbr>'); ?></a></li> <?php wp_meta(); ?> </ul> <?php }?> <?php endif; ?> </div> PHP: But I'm going to try one of those plugins for sure.
I added //=========================================== <?php if(function_exists('ns_show_top_commentators')) { ?> <h2>Top Commentators</h2> <ul><?php ns_show_top_commentators(); ?></ul> <?php } ?> //=========================================== to your code and pls delete the ====== here's d modified code to show top commentators..just check n see..before using this take a backup of previous contents of same file <div id="sidebar"> <?php if ( function_exists('dynamic_sidebar') && dynamic_sidebar() ) : else : ?> <?php if(is_home()) {?> <h2><?php _e('About'); ?></h2> <ul><li id="about"><?php bloginfo('description'); ?><p>There are <?php global $numposts; echo $numposts ;?> posts and <?php global $numcmnts; echo $numcmnts ;?> comments so far.</p></li></ul> <?php }?> <?php if (!is_home()) {?> <h2><?php _e('Recent Posts'); ?></h2> <ul><?php sg_get_recent_posts(6);?></ul> <?php }?> <h2><?php _e('Pages'); ?></h2> <ul><?php wp_list_pages('title_li='); ?></ul> <h2><?php _e('Categories'); ?></h2> <ul> <?php wp_list_cats('optioncount=1'); ?> </ul> <h2><label for="s"><?php _e('Search'); ?></label></h2> <form id="searchform" method="get" action="<?php bloginfo('siteurl') ?>/index.php"> <input type="text" name="s" id="s" value="<?php echo wp_specialchars($s, 1); ?>" size="15" /><br /> <input type="submit" name="submit" value="<?php _e('Search'); ?>" /> </form> <h2><?php _e('Archives'); ?></h2> <ul> <?php wp_get_archives('type=monthly&show_post_count=true'); ?> </ul> <?php if(is_home()) {?> <h2>Recent Comments</h2> <ul> <?php sg_get_recent_comments(6,5); //shows 6 recent comments, each with first 5 words ?> </ul> <br /> <h2>Links</h2> <ul><?php get_links_list('name'); ?> </ul> //=========================================== <?php if(function_exists('ns_show_top_commentators')) { ?> <h2>Top Commentators</h2> <ul><?php ns_show_top_commentators(); ?></ul> <?php } ?> //=========================================== <h2><?php _e('Meta'); ?></h2> <ul> <li><?php wp_register(); ?></li> <li><?php wp_loginout(); ?></li> <li><a href="<?php bloginfo('rss2_url'); ?>" title="<?php _e('Syndicate this site using RSS'); ?>"><?php _e('<abbr title="Really Simple Syndication">RSS</abbr>'); ?></a></li> <li><a href="<?php bloginfo('comments_rss2_url'); ?>" title="<?php _e('The latest comments to all posts in RSS'); ?>"><?php _e('Comments <abbr title="Really Simple Syndication">RSS</abbr>'); ?></a></li> <li><a href="http://validator.w3.org/check/referer" title="<?php _e('This page validates as XHTML 1.0 Transitional'); ?>"><?php _e('Valid <abbr title="eXtensible HyperText Markup Language">XHTML</abbr>'); ?></a></li> <?php wp_meta(); ?> </ul> <?php }?> <?php endif; ?> </div> PHP:
Unfortunately, that didn't work. I had show topcommentators installed and put the code into the sidebar but it did not display. Last night, I also tried Exec PHP and then made a widget that I put the show top commentator php code into, but that didn't work either. I then tried leaving the plugin activated and put the code into the sidebar.php file as well which didn't work. So am I pretty much at the point where I need to disable widgets now or something? I'm just confused as to why show top commentators won't work without doing all this extra stuff heh heh. (I'm on WP 2.23 by the way)
you need to edit the above thing in that file....and comment as another user of your blog and see if it appears or not...
Hmmmm, it's still not working. What's going on? Since I've been switching back and forth between a lot of things, perhaps someone can help me out by starting over from scratch lol. I've tried Exec PHP while my code was put directly into sidebar.php I've tried putting the code just into a widget What could I be missing? I can get the "Top commentators" title to show up, but no commentators.
Any help? I just upgraded a few days ago to a newer version of WordPress but I still can't figure out how to get the top commentators plugin to display properly.
if u have inserted code in template then no prob. with it problem is with show_top_commentators.php so double check it..change somethjing and see...else email it's commentator...
Hmmm, I'm not having any luck really. I'm going to start over from scratch and will ask some questions again based on the assumption that I'm starting completely over.