Forum Replies Created

Viewing 3 replies - 1 through 3 (of 3 total)
  • <?php
    if ( function_exists('register_sidebar') )
        register_sidebar(array(
            'before_widget' => '<li id="%1$s" class="widget %2$s">',
            'after_widget' => '</li>',
            'before_title' => '<h5 class="widgettitle">',
            'after_title' => '</h5>',
        ));
    
    /* 00 - SIDEBAR WIDGETS
    /* ----------------------------------------------*/
    
    function get_popular($limit = 7) {
    	global $wpdb;
    
    	$getposts = $wpdb->get_results("SELECT * FROM $wpdb->posts WHERE post_type = 'post' ORDER BY comment_count DESC LIMIT 0,".$limit);
    	foreach($getposts as $thepost) {
    		echo '<li><a href="'.get_permalink($thepost->ID).'">'.$thepost->post_title.'</a></li>';
    	}
    }
    
    function get_comments($limit = 7, $stops = 65) {
    	global $wpdb;
    
    	$getcomments = $wpdb->get_results("SELECT * FROM $wpdb->comments WHERE comment_approved = '1' ORDER BY comment_date DESC LIMIT 0,".$limit);
    
    	foreach($getcomments as $thecomments) {
    		if ( strlen ( $thecomments->comment_content ) <= $stops ) {
    			$comment = $thecomments->comment_content;
    		} else {
    			$comment = substr($thecomments->comment_content, 0, strrpos(substr($thecomments->comment_content, 0, $stops), ' ')) . '...';
    		}
    
    		echo '<li><a href="'.get_permalink($thecomments->comment_post_ID).'"><span class="light"><strong>'.$thecomments->comment_author.'</strong> said </span> '.$comment.'</a></li>';
    	}
    }
    
    function get_featured ($category) {
    	query_posts('category_name='.$category); if (have_posts()) : while (have_posts()) : the_post();
    		echo'<li><a href="'.get_permalink().'">'.get_the_title().'</a></li>';
    	endwhile; endif;
    }
    
    function get_recent($limit) {
    	query_posts('showposts='.$limit); if (have_posts()) : while (have_posts()) : the_post();
    		echo'<li><a href="'.get_permalink().'">'.get_the_title().'</a></li>';
    	endwhile; endif;
    }

    You have to name it like this:
    subscribe-to-comments-pl_PL.mo

    where pl_PL is your language letters set in wordpress. Put it in lugins directory. Not in this plugin directory BUT all plugins directory.

    I think this is a problem of Description. If it is too long, the thumbnail beneath is moved to the right. I think it is possible to turn off this in code, but then the thumbnail will be covered with text.

Viewing 3 replies - 1 through 3 (of 3 total)