Would this mean having to find and change every instance of "rightbar" in the code? Or do I just have to change the name of the rightbar.php file, and where it's being called from?
Here's the code from my theme functions (functions.php) page:
<?php
if ( function_exists('register_sidebar') )
register_sidebar(array(
'before_widget' => '<li><div id="%1$s" class="widget %2$s">',
'after_widget' => '</div></li>',
'before_title' => '<div class="title">',
'after_title' => '</div>',
));
// have a look for additional widgets and activate them
$widgets_dir = @ dir(ABSPATH . '/wp-content/themes/' . get_template() . '/widgets');
if ($widgets_dir)
{
while(($widgetFile = $widgets_dir->read()) !== false)
{
if (!preg_match('|^\.+$|', $widgetFile) && preg_match('|\.php$|', $widgetFile))
include(ABSPATH . '/wp-content/themes/' . get_template() . '/widgets/' . $widgetFile);
}
}
function get_rightbar(){
include (TEMPLATEPATH . "/rightbar.php");
}
if ( function_exists('register_sidebars') ) {
register_sidebars(2, array(
'before_widget' => '<li><div id="%1$s" class="widget %2$s">',
'after_widget' => '</div></li>',
'before_title' => '<div class="title">',
'after_title' => '</div>',
));
function unregister_problem_widgets() {
unregister_sidebar_widget('Search');
unregister_sidebar_widget('Recent Comments');
unregister_sidebar_widget('Recent Posts');
unregister_sidebar_widget('tag_cloud');
unregister_sidebar_widget('meta');
unregister_sidebar_widget('links');
unregister_sidebar_widget('calendar');
unregister_sidebar_widget('pages');
unregister_sidebar_widget('archives');
}
add_action('widgets_init','unregister_problem_widgets');
}
/* Function Change Header */
define('HEADER_TEXTCOLOR', 'cedbde');
define('HEADER_IMAGE', '%s/images/header.png'); // %s is theme dir url
define('HEADER_IMAGE_WIDTH', 912);
define('HEADER_IMAGE_HEIGHT', 120);
function theme_admin_header_style() { ?>
<style type="text/css">
#headimg {
margin: 0px 0px 20px 0px;
height: <?php echo HEADER_IMAGE_HEIGHT; ?>px;
width: <?php echo HEADER_IMAGE_WIDTH; ?>px;
background: url(<?php header_image(); ?>) no-repeat top center transparent;}
#headimg * {color: #<?php header_textcolor();?>;}
#headimg #desc {
border: none;
font-size: 12px;
text-align: center;
font-variant: small-caps;
letter-spacing: 1px;
margin: 0px 0px 0px 0px;
padding: 0px 0px 0px 0px;
font-family: Verdana, Arial, Helvetica, sans-serif;}
#headimg h1 {
text-align: center;
border: none;
font-size: 24px;
font-weight: normal;
letter-spacing: 1px;
font-variant: small-caps;
margin: 0px 0px 0px 0px;
padding: 40px 0px 0px 0px;
font-family: Verdana, Arial, Helvetica, sans-serif;}
#headimg h1 a {border: none;}
</style>
<?php } function theme_header_style() { ?>
<style type="text/css">
#header {
margin: 4px 0px 0px 14px;
text-align: right;
height: <?php echo HEADER_IMAGE_HEIGHT; ?>px;
width: <?php echo HEADER_IMAGE_WIDTH; ?>px;
background: url(<?php header_image(); ?>) no-repeat top center transparent;}
#header * {color: #<?php header_textcolor();?>;}
</style>
<?php } if ( function_exists('add_custom_image_header') ) {
add_custom_image_header('theme_header_style', 'theme_admin_header_style');}
/*
Plugin Name: Recent Comments Edit
Plugin URI: http://mtdewvirus.com/code/wordpress-plugins/
Description: Retrieves a list of the most recent comments.
Version: 1.18
Author: Nick Momrik
Author URI: http://mtdewvirus.com/
*/
function mdv_recent_comments_edit($no_comments = 5, $comment_lenth = 5, $before = '<li>', $after = '</li>', $show_pass_post = false, $comment_style = 0) {
global $wpdb;
$request = "SELECT ID, comment_ID, comment_content, comment_author, comment_author_url, post_title FROM $wpdb->comments LEFT JOIN $wpdb->posts ON $wpdb->posts.ID=$wpdb->comments.comment_post_ID WHERE post_status IN ('publish','static') ";
if(!$show_pass_post) $request .= "AND post_password ='' ";
$request .= "AND comment_approved = '1' ORDER BY comment_ID DESC LIMIT $no_comments";
$comments = $wpdb->get_results($request);
$output = '';
if ($comments) {
foreach ($comments as $comment) {
$comment_author = stripslashes($comment->comment_author);
if ($comment_author == "")
$comment_author = "anonymous";
$comment_content = strip_tags($comment->comment_content);
$comment_content = stripslashes($comment_content);
$words=split(" ",$comment_content);
$comment_excerpt = join(" ",array_slice($words,0,$comment_lenth));
$permalink = get_permalink($comment->ID)."#comment-".$comment->comment_ID;
if ($comment_style == 1) {
$post_title = stripslashes($comment->post_title);
$url = $comment->comment_author_url;
if (empty($url))
$output .= $before . $comment_author . ' on ' . $post_title . '.' . $after;
else
$output .= $before . "<a href='$url' rel='external'>$comment_author</a>" . ' on ' . $post_title . '.' . $after;
}
else {
$output .= $before . '<span class="last">' . $comment_author . ':</span> <a href="' . $permalink;
$output .= '" title="View the entire comment by ' . $comment_author.'">' . $comment_excerpt.' ...</a>' . $after;
}
}
$output = convert_smilies($output);
} else {
$output .= $before . "None found" . $after;
}
echo $output;
}
/*
Plugin Name: Most Commented Edit
Plugin URI: http://mtdewvirus.com/code/wordpress-plugins/
Description: Retrieves a list of the posts with the most comments. Modified for Last X days -- by DJ Chuang www.djchuang.com
Version: 1.4
Author: Nick Momrik
Author URI: http://mtdewvirus.com/
*/
function mdv_most_commented_edit($no_posts = 5, $before = '<li>', $after = '</li>', $show_pass_post = false, $duration='') {
global $wpdb;
$request = "SELECT ID, post_title, COUNT($wpdb->comments.comment_post_ID) AS 'comment_count' FROM $wpdb->posts, $wpdb->comments";
$request .= " WHERE comment_approved = '1' AND $wpdb->posts.ID=$wpdb->comments.comment_post_ID AND post_status = 'publish'";
if(!$show_pass_post) $request .= " AND post_password =''";
if($duration !="") { $request .= " AND DATE_SUB(CURDATE(),INTERVAL ".$duration." DAY) < post_date ";
}
$request .= " GROUP BY $wpdb->comments.comment_post_ID ORDER BY comment_count DESC LIMIT $no_posts";
$posts = $wpdb->get_results($request);
$output = '';
if ($posts) {
foreach ($posts as $post) {
$post_title = stripslashes($post->post_title);
$comment_count = $post->comment_count;
$permalink = get_permalink($post->ID);
$output .= $before . '<a href="' . $permalink . '" title="' . $post_title.'">' . $post_title . '</a> (' . $comment_count.'x)' . $after;
}
} else {
$output .= $before . "None found" . $after;
}
echo $output;
}
// helper functions
$numposts = $wpdb->get_var("SELECT COUNT(*) FROM $wpdb->posts WHERE post_type='post' and post_status = 'publish'");
if (0 < $numposts) $numposts = number_format($numposts);
$numcmnts = $wpdb->get_var("SELECT COUNT(*) FROM $wpdb->comments WHERE comment_approved = '1'");
if (0 < $numcmnts) $numcmnts = number_format($numcmnts);
// ----------------
/*
Plugin Name: Post Word Count Edit
Plugin URI: http://mtdewvirus.com/code/wordpress-plugins/
Description: Outputs the total number of words in all posts.
Version: 1.02
Author: Nick Momrik
Author URI: http://mtdewvirus.com/
*/
function mdv_post_word_count_edit() {
global $wpdb;
$now = gmdate("Y-m-d H:i:s",time());
$words = $wpdb->get_results("SELECT post_content FROM $wpdb->posts WHERE post_status = 'publish' AND post_date < '$now'");
if ($words) {
foreach ($words as $word) {
$post = strip_tags($word->post_content);
$post = explode(' ', $post);
$count = count($post);
$totalcount = $count + $oldcount;
$oldcount = $totalcount;
}
} else {
$totalcount=0;
}
echo number_format($totalcount);
}
/*
Plugin Name: Gravatar Edit
Plugin URI: http://www.gravatar.com/implement.php#section_2_2
Description: This plugin allows you to generate a gravatar URL complete with rating, size, default, and border options. See the <a href="http://www.gravatar.com/implement.php#section_2_2">documentation</a> for syntax and usage.
Version: 1.1
Author: Tom Werner
Author URI: http://www.mojombo.com/
CHANGES
2004-11-14 Fixed URL ampersand XHTML encoding issue by updating to use proper entity
*/
function gravatar_edit($rating = false, $size = false, $default = false, $border = false) {
global $comment;
$out = "http://www.gravatar.com/avatar.php?gravatar_id=".md5($comment->comment_author_email);
if($rating && $rating != '')
$out .= "&rating=".$rating;
if($size && $size != '')
$out .="&size=".$size;
if($default && $default != '')
$out .= "&default=".urlencode($default);
if($border && $border != '')
$out .= "&border=".$border;
echo $out;
}
?>
Sorry...I'm confused :(