分析错误:语法错误,中有意外的T_ENDWHILE

时间:2011-06-20 作者:user6133

安装此videozoom主题后,我遇到以下错误:

解析错误:语法错误,在/home/moviesa1/public_html/test99 dot info/wp content/themes/videozoom/wpzoom_特色帖子中出现意外的T_ENDWHILE。php在线1

我的网站:http://test99.info/

<?php
   $args = array(\'showposts\' => $wpzoom_featured_posts_posts, \'orderby\' => \'date\', \'order\' => \'DESC\');
   $featType = $wpzoom_featured_type;
   if ($featType == \'Tag\') {
       $args[\'tag\'] = "$wpzoom_featured_slug";
       // Breaking tag slug          }          elseif ($featType == \'Category\')          {            $args[\'cat\'] = "$wpzoom_featured_slug";  // Breaking tag slug          }
?>  <div id="featPosts">      <div id="featPostsBig">        <div class="container">                      <?php
       query_posts($args);
       $i = 0;
       if (have_posts())
           :
?><?php
           $AE = new AutoEmbed();
       // loading the AutoEmbed PHP Class 
?>                            <ul class="slides">            <?php
       while (have_posts())
           : the_post();
       update_post_caches($posts);
       $i++;
       unset($videocode);
       $videocode = get_post_meta($post->ID, \'wpzoom_post_embed_code\', true);
?>            <li class="slide">            <?php
       if ($videocode && $AE->parseUrl($videocode)) {
           $AE->setParam(\'wmode\', \'transparent\');
           $AE->setParam(\'autoplay\', \'false\');
           $AE->setHeight(260);
           $AE->setWidth(450);
?><div class="cover"><?php
           echo $AE->getEmbedCode();
?></div><?php
           } else
           {
?>        <?php
               unset($img);
               if (current_theme_supports(\'post-thumbnails\') && has_post_thumbnail()) {
                   $thumbURL = wp_get_attachment_image_src(get_post_thumbnail_id($post->ID), \'\');
                   $img = $thumbURL[0];
               } else {
                   unset($img);
                   if ($wpzoom_cf_use == \'Yes\') {
                       $img = get_post_meta($post->ID, $wpzoom_cf_photo, true);
                   } else {
                       if (!$img) {
                           $img = catch_that_image($post->ID);
                       }
                   }
               }
               if ($img) {
?>        <div class="cover"><a href="<?php
                   the_permalink();
?>" rel="bookmark" title="<?php
                   the_title();
?>"><img src="<?php
                   bloginfo(\'template_directory\');
?>/scripts/timthumb.php?src=<?php
                   echo $img
 ?>&amp;h=275&amp;w=450&amp;zc=1" alt="<?php
                   the_title();
?>" width="450" height="275" /></a></div>        <?php
                   } // if an image exists        } // if a video does not exist 
?>        <div class="postcontent">          <p class="postmetadata"><?php
                   the_time("$dateformat");
?> / <?php
                   the_category(\', \');
?> / <?php
                   the_author_posts_link();
?></p>          <h2><a href="<?php
                   the_permalink()
?>" title="<?php
                   the_title();
?>"><?php
                   the_title();
?></a></h2>          <?php
                   the_excerpt();
?>          <p class="more"><a href="<?php
                   the_permalink()
?>" title="<?php
                   the_title();
?>" rel="nofollow">Continue reading &raquo;</a> <?php
                   edit_post_link(__(\'Edit this post\'), \' | \', \'\');
?></p>        </div>        </li>        <?php
                   endwhile;
?>        </ul>        <?php
                   endif;
?>        <div class="cleaner">&nbsp;</div>        </div><!-- end .container -->       </div><!-- end #featPostsBig -->                    <?php
                   query_posts($args);
                   $i = 0;
                   if (have_posts())
                       :
?>      <div id="featPostsSmall">                <ul class="pagination">          <?php
                       while (have_posts())
                           : the_post();
                   update_post_caches($posts);
                   $i++;
?>          <li<?php
                   if ($i == 6) {
                       $i = 0;
                       echo " class=\\"last\\"";
                   }
?>><a href="#" rel="nofollow"><span></span><?php
                   unset($img);
                   if (current_theme_supports(\'post-thumbnails\') && has_post_thumbnail()) {
                       $thumbURL = wp_get_attachment_image_src(get_post_thumbnail_id($post->ID), \'\');
                       $img = $thumbURL[0];
                   } else {
                       unset($img);
                       if ($wpzoom_cf_use == \'Yes\') {
                           $img = get_post_meta($post->ID, $wpzoom_cf_photo, true);
                       } else {
                           if (!$img) {
                               $img = catch_that_image($post->ID);
                           }
                       }
                   }
                   if ($img) {
?><img src="<?php
                       bloginfo(\'template_directory\');
?>/scripts/timthumb.php?src=<?php
                       echo $img
 ?>&amp;h=98&amp;w=135&amp;zc=1" alt="<?php
                       the_title();
?>" width="135" height="98" /></a></li><?php
                   }
?>          <?php
                   endwhile;
?>        </ul>         <div class="cleaner">&nbsp;</div>              </div><!-- end #featPostsSmall -->      <?php
                   endif;
?>      <a href="#" class="browse previous">Prev</a>    <a href="#" class="browse next">Next</a>      </div><!-- end #featPosts -->      <?php
                   wp_reset_query();
?><script type="text/javascript" charset="utf-8">jQuery(document).ready(function($){    $(\'#featPosts\').loopedSlider({      autoHeight: true,      containerClick: false,      slidespeed: 500,      pauseOnHover: <?php
                   if ($wpzoom_slideshow_pause == \'Yes\') {
?>true<?php
                   }
?> <?php
                   if ($wpzoom_slideshow_pause == \'No\') {
?>false<?php
                   }
?>,      addPagination: true,         autoStart: <?php
                   if ($wpzoom_slideshow_auto == \'Yes\') {
?><?php
                       echo "$wpzoom_slideshow_speed";
?><?php
                   }
?> <?php
                   if ($wpzoom_slideshow_auto == \'No\') {
?>0<?php
                   }
?>    });  });</script>
很抱歉这样在一行中发布代码,如何在块中发布?

1 个回复
SO网友:Chip Bennett

由于这是一个商业主题,很难解决问题,因为我们无法访问主题模板文件。例如,解析错误消息指示第1行中的endwhile问题,但在粘贴的代码中,第1行是一个变量定义。

您可能需要咨询WPZoom以获得支持。

结束

相关推荐

Displaying oEmbed errors?

有时,通过oEmbed嵌入项目是不可能的,例如,当YouTube视频已禁用嵌入时。The oEmbed service will return a 401 Unauthorized, 并且不会转换代码。有没有办法通知用户这一点?当前的工作流是非直观的(至少对我来说),我更喜欢在WordPress页面上,或者更好的是,在编辑器中显示一条消息,说明对象无法嵌入。