2

以下のエラーが表示されます。

 Parse error: syntax error,
 unexpected $end in /var/www/html/joomla/components/com_jtagmembersdirectory/views/memberdetails/tmpl/default.php 
on line 147

考えられる解決策は何でしょうか。いくつかの投稿を検索し<?php ?> ました。

この問題を引き起こす可能性のあるものは他にありますか?

私のコードは以下のようなものです、

  <?php

defined('_JEXEC') or die('Restricted access');

    $user =& JFactory::getUser();
    $this->user_id = $user->id;
?>

<div class="Jtag_Members_Directory_details">
    <h2 class="page-title"><?php echo JText:: _('JTAG_MEMBER_DETAIL');?></h2>
    <div id="jtag-member-list">

          <img width="225" src="components/com_jtagmembersdirectory/assets/profile_pictures/small/<?php echo $this->profile->profile_picture ? $this->profile->profile_picture : 'profile2.jpg' ?>" alt="" />
          <div class="info details">


            <?php if ($this->profile->user_id == $this->user_id && $this->profile->allow_edit):?>
                <a href="<?php echo JRoute::_('index.php?option=com_jtagmembersdirectory&task=editmemberdetails&mid='.$user->id) ?>" title ="Click to edit your Profile"><h2><?php echo $this->profile->name ?></h2></a>
            <?php else:?>
                <h2><?php echo $this->profile->name ?></h2>    
            <?php endif; ?>



            <h4><?php echo JText:: _('JTAG_MEMBER_DETAIL_ABOUT_ME');?></h4>
            <div><?php echo nl2br($this->profile->member_profile) ?></div>
            <ul class="member-details">

            <?php if($this->user_id !=0):?>
                <?php if($this->profile->hasGallery==1 && $this->profile->display_gallery == 1):?>      
                    <li><a href="<?php echo JRoute::_('index.php?option=com_jtagmembersdirectory&task=showgallery&mid='.$this->profile->user_id) ?>" title ="Click to checkout the gallery"><strong><?php echo JText:: _('JTAG_MEMBER_DETAIL_GALLERY');?></strong></a></li>                    
                <?php endif;?>
            <?php endif;?>  

            <?php if($this->user_id==0):?>
              <?php if($this->profile->display_nr_country==1 && $this->profile->country):?>
                <li><strong><?php echo JText:: _('JTAG_MEMBER_DETAIL_COUNTRY');?></strong> <?php echo $this->countries[$this->profile->country]; ?></li>
              <?php endif;?>
            <?php else:?>
              <?php if( $this->profile->country):?>
                <li><strong><?php echo JText:: _('JTAG_MEMBER_DETAIL_COUNTRY');?></strong> <?php echo $this->countries[$this->profile->country]; ?></li>
              <?php endif;?>
            <?php endif;?>  


            <?php if($this->user_id==0):?>
              <?php if($this->profile->display_nr_city==1 && $this->profile->city):?>
                <li><strong><?php echo JText:: _('JTAG_MEMBER_DETAIL_CITY');?></strong> <?php echo $this->profile->city; ?></li>
              <?php endif;?>
            <?php else:?>
              <?php if( $this->profile->city && $this->profile->display_city):?>
                <li><strong><?php echo JText:: _('JTAG_MEMBER_DETAIL_CITY');?></strong> <?php echo $this->profile->city; ?></li>
              <?php endif;?>
            <?php endif;?>  


            <?php if($this->user_id==0):?>
              <?php if($this->profile->display_nr_state==1 && $this->profile->state):?>
                          <li><strong><?php echo JText:: _('JTAG_MEMBER_DETAIL_STATE');?></strong> <?php echo $this->profile->state; ?></li>
              <?php endif;?>
            <?php else:?>
              <?php if( $this->profile->state ):?>
                          <li><strong><?php echo JText:: _('JTAG_MEMBER_DETAIL_STATE');?></strong> <?php echo $this->profile->state; ?></li>
              <?php endif;?>
            <?php endif;?>  




            <?php if($this->user_id==0):?>
              <?php if($this->profile->display_nr_phone_no==1 && $this->profile->phone_no):?>
                          <li><strong><?php echo JText:: _('JTAG_MEMBER_DETAIL_PHONE_NO');?></strong> <?php echo $this->profile->phone_no ?></li>
              <?php endif;?>
            <?php else:?>
              <?php if( $this->profile->phone_no  && $this->profile->display_phone_no):?>
                          <li><strong><?php echo JText:: _('JTAG_MEMBER_DETAIL_PHONE_NO');?></strong> <?php echo $this->profile->phone_no ?></li>
              <?php endif;?>
            <?php endif;?>  

            <?php if($this->user_id==0):?>
              <?php if($this->profile->display_nr_email==1 && $this->profile->Email):?>
               <li><strong><?php echo JText:: _('JTAG_MEMBER_DETAIL_EMAIL');?></strong> <?php echo $this->profile->Email; ?></li>
              <?php endif;?>
            <?php else:?>
              <?php if( $this->profile->Email):?>
               <li><strong><?php echo JText:: _('JTAG_MEMBER_DETAIL_EMAIL');?></strong> <?php echo $this->profile->Email; ?></li>
              <?php endif;?>
            <?php endif;?>  



          <?php if($this->user_id==0):?>
            <?php if($this->profile->display_nr_facebook==1 && $this->profile->facebook_page):?>
             <li><strong><?php echo JText:: _('JTAG_MEMBER_DETAIL_FACEBOOK_PAGE');?></strong> <a href="http://<?php echo $this->profile->facebook_page ?>" target="_blank"><?php echo $this->profile->facebook_page ?></a></li>

            <?php endif;?>
          <?php else:?>
            <?php if( $this->profile->facebook_page && $this->profile->display_facebook_page):?>
             <li><strong><?php echo JText:: _('JTAG_MEMBER_DETAIL_FACEBOOK_PAGE');?></strong> <a href="http://<?php echo $this->profile->facebook_page ?>" target="_blank"><?php echo $this->profile->facebook_page ?></a></li>

            <?php endif;?>
          <?php endif;?>  



          <?php if($this->user_id==0):?>
            <?php if($this->profile->display_nr_twitter==1 && $this->profile->twitter_page):?>
             <li><strong><?php echo JText:: _('JTAG_MEMBER_DETAIL_TWITTER_PAGE');?></strong> <a href="http://<?php echo $this->profile->twitter_page ?>" target="_blank"><?php echo $this->profile->twitter_page ?></a></li>

            <?php endif;?>
          <?php else:?>
            <?php if( $this->profile->twitter_page && $this->profile->display_twitter_page):?>
             <li><strong><?php echo JText:: _('JTAG_MEMBER_DETAIL_TWITTER_PAGE');?></strong> <a href="http://<?php echo $this->profile->twitter_page ?>" target="_blank"><?php echo $this->profile->twitter_page ?></a></li>

            <?php endif;?>
          <?php endif;?>  

          <?php if($this->user_id):?>   
              <?php foreach ($this->profile->custom_fields as $field):  ?>
                <?php if ($field->field_label && $field->field_value): ?>
                <li><strong><?php echo $field->field_label; ?>:</strong> <?php echo $field->field_value ?></li>
                <?php endif; ?>
              <?php endforeach; ?>
          <?php else: ?>
              <?php foreach ($this->profile->custom_fields as $field):  ?>
                <?php if ($field->field_label && $field->field_value && $field->display_nr_cf): ?>
                <li><strong><?php echo $field->field_label; ?>:</strong> <?php echo $field->field_value ?></li>
                <?php endif; ?>
              <?php endforeach; ?>

          <? endif;?>
            </ul>
            <a href="#" class="back-list" onclick="self.history.back(1)"><?php echo JText:: _('BACK_TO_THE_LIST');?></a>
          </div>

    </div>
</div>
4

1 に答える 1

1

短いタグを有効にしていない限り、この行 (#131) -

<? endif;?>

解析されず、終了しますif

しかし、あなたは 137 行のコードしか投稿しておらず、あなたのコードはそれが 147 行目にあると述べているため、別の問題がある可能性があります。

于 2012-12-25T08:17:36.993 に答える