WordPress.org

Ready to get started?Download WordPress

Forums

Theme Review: PersonalMag (1 post)

  1. mythusmage
    Member
    Posted 6 years ago #

    The Personal Mag Theme from Wp Theme Designer has a problem. A big problem. That problem can be seen in the Sidebar PHP code reproduced below.

    <?php 
    
    function u_get_recent_comments($no_comments = 5, $before = '<li>', $after = '</li>', $show_pass_post = false) {
    
    	global $wpdb, $tablecomments, $tableposts;
    	$request = "SELECT ID, comment_ID, comment_content, comment_author FROM $tableposts, $tablecomments WHERE $tableposts.ID=$tablecomments.comment_post_ID AND (post_status = 'publish' OR post_status = 'static')";
    
    if(!$show_pass_post) { $request .= "AND post_password ='' "; }
    
        $request .= "AND comment_approved = '1' ORDER BY $tablecomments.comment_date DESC LIMIT 
    
    $no_comments";
        $comments = $wpdb->get_results($request);
        $output = '';
        foreach ($comments as $comment) {
           $comment_author = stripslashes($comment->comment_author);
           $comment_content = strip_tags($comment->comment_content);
           $comment_content = stripslashes($comment_content);
           $comment_excerpt =substr($comment_content,0,50);
           $comment_excerpt = u_utf8_trim($comment_excerpt);
           $permalink = get_permalink($comment->ID)."#comment-".$comment->comment_ID;
           $output .= $before . '<a href="' . $permalink . '" title="View the entire comment by ' . $comment_author . '"><strong>' . $comment_author . '</strong>: ' . $comment_excerpt . '...</a>' . $after;
           }
           echo $output;
    } 
    
    function u_utf8_trim($str) {
    
    	$len = strlen($str);
    
    	for ($i=strlen($str)-1; $i>=0; $i-=1){
    		$hex .= ' '.ord($str[$i]);
    		$ch = ord($str[$i]);
            if (($ch & 128)==0) return(substr($str,0,$i));
    		if (($ch & 192)==192) return(substr($str,0,$i));
    	}
    	return($str.$hex);
    }
    
    ?>
      <div class="left">
    
       <div class="widget">
        <h4>About me</h4>
    	<p><img style=" margin:5px 10px 0 0;" src="<?php bloginfo('template_directory');?>/images/about_me.gif" alt="" align="left" />Hello! I am ChiQ Montes! I will be  offering simple tips and tricks in Blogging and Internet Marketing. </p>
    	<p>Not only that, the major part of this site will be the Quality WordPress Themes that I will be offering for free. So stick around and do not forget to subscribe to my feeds.  Cheers! </p>
       </div>
       <div class="widget pages">
        <h4>Pages</h4>
    	<ul>
    	 <li><a href="<?php bloginfo('url'); ?>">Home</a></li>
       <?php wp_list_pages('title_li=&depth=1'); ?>
    	</ul>
       </div>
       <div class="widget categories">
        <h4>Categories</h4>
    	<ul>
    	<?php wp_list_cats(); ?>
    	</ul>
       </div>
       <div class="widget blogroll">
        <h4>Blogroll</h4>
    	<ul>
    	  <? get_links(-1,'<li>', '</li>','', false, 'name',false,false,-1, false, true); ?>
    	</ul>
       </div>
    
      </div>
    
      <div class="right">
      <div class="widget search">
      <h4>Search</h4>
       <form action="#" method="get">
        <table border="0" cellpadding="0" cellspacing="0">
    	 <tr>
    	  <td width="184"><input type="text" class="s_input" name="s" /></td>
    	  <td width="42"><input type="image" src="<?php bloginfo('template_directory');?>/images/search_btn.gif" class="s_submit" /></td>
    	 </tr>
    	</table>
       </form>
      </div>
      <div class="widget posts">
        <h4>Posts</h4>
    	<ul>
    	  <?php
    
      $lastposts = get_posts('numberposts=6&orderby=post_date&order=DESC');
      foreach($lastposts as $post) :
        setup_postdata($post);
        ?>
    	 <li><a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></li>
    <?php endforeach; ?>
    	</ul>
       </div>
      <div class="widget comments">
        <h4>Comments</h4>
    	<ul>
    	  <?php  u_get_recent_comments(6);      ?>
    	</ul>
       </div>
       <div class="widget tags">
        <h4>Tags</h4>
    	<?php wp_tag_cloud(''); ?>
       </div>
       <div class="widget archives">
        <h4>Archives</h4>
    	<ul>
        <?php get_archives('monthly','10','','<li>','</li>'); ?>
    	</ul>
       </div>
       <div class="widget meta">
        <h4>Meta</h4>
    	<ul>
    	<?php wp_register(); ?>
    				<li><?php wp_loginout(); ?></li>
    				<li><a href="http://www.wordpress.org/">WordPress</a></li>
    				<?php wp_meta(); ?>
    				<li><a href="http://validator.w3.org/check?uri=referer">XHTML</a></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>
    	<?php wp_meta(); ?>
    	</ul>
       </div>
     </div>
    
      <div class="c"></div>

    You'll probably see a number of problems there, but the one that concerns me most is the fact this theme --- a new theme at that --- is not widgetized. Yet it uses widgets. In addition, I don't see anyplace where one can put the widgetizing PHP. It's as if Ms. Montes doesn't want you adding more widgets to her precious design.

    I want to use widgets on my blog, you don't tell me I can't. You're going to release a theme for the general public in this day and age, you let people use widgets. You want to keep your theme pure, don't release it.

    The Personal Mag theme is plain rude, I can not recommend it.

Topic Closed

This topic has been closed to new replies.

About this Topic