• 30-03-2020, 23:22:18
    #1
    AlanAdiMarketi.com ❤️ 📢
    Merhaba arkadaşlar,

    Sitemde Parse error: syntax error, unexpected '}' in /home/siteismi.net/public_html/wp-content/themes/EsenKadin/icerik/bilesenler/manset.php on line 193 hatası alıyorum.
    PHP 5.6 kullanıyoruz ve ioncube aktif buna rağmen hata vermeye devam ediyor


    Var mı fikri olan?
  • 30-03-2020, 23:23:58
    #2
    193 teki } fazlalık olabilir. Silip denediniz mi?
  • 30-03-2020, 23:24:57
    #3
    193. Satırdaki kırlangıcı sil
  • 30-03-2020, 23:27:07
    #4
    AlanAdiMarketi.com ❤️ 📢
    ugurkorkmaztr adlı üyeden alıntı: mesajı görüntüle
    193. Satırdaki kırlangıcı sil
    TheKhan adlı üyeden alıntı: mesajı görüntüle
    193 teki } fazlalık olabilir. Silip denediniz mi?
    Denedim bu arada sitenin yedeği alınıp başka hosta kurulduktan sonra hata vermeye başladı
  • 30-03-2020, 23:28:44
    #5
    İlgili yere kadar olan kodu paylaşabilir misiniz?
  • 30-03-2020, 23:35:27
    #6
    AlanAdiMarketi.com ❤️ 📢
    <?php
    
    class manset extends WP_Widget {
        
        var $textdomain;
        
    function __construct() {
            
            $this->textdomain = 'esenkadin';
            
            $widget_options = array( 'description' => 'Anasayfa manşet slider.' );
            parent::WP_Widget(false,'EsenKadin - Manşet | A2', $widget_options );
            
            
        add_action( 'load-widgets.php', array(&$this, 'esenkadin_custom_load') );
    
    }
        
        function esenkadin_custom_load() {
    wp_enqueue_style( 'wp-color-picker' );
    wp_enqueue_script( 'wp-color-picker' );
         }
            
        function widget($args, $instance)
        {
            extract($args);
            
            $title                     = $instance['title'];
            $posts                     = $instance['posts']; // Yazı Sayısı
            $kategori_secimi         = $instance['kategori_secimi'];
            $kategori_ikonu         = $instance['kategori_ikonu'];
            $baslik_zemin_rengi     = $instance['baslik_zemin_rengi'];
             $baslik_yazi_rengi         = $instance['baslik_yazi_rengi'];
            $foto_efekt_rengi         = $instance['foto_efekt_rengi'];
            $listeleme_sekli         = $instance['listeleme_sekli'];
             $yazi_sayisi             = $instance['posts'];
             $kacincidan_baslasin     = $instance['kacincidan_baslasin'];
            $etikete_gore_listele     = $instance['etikete_gore_listele'];
            $post_type_gore_listele = $instance['post_type_gore_listele'];
            $reklam_post_id         = $instance['reklam_post_id'];
            $yazi_arasi_reklam         = $instance['yazi_arasi_reklam'];
            $yazi_arasi_kacinci        = $instance['yazi_arasi_kacinci'];
            
            $tarih_olsunmu             = $instance['tarih_olsunmu'];
            $yorum_olsunmu             = $instance['yorum_olsunmu'];
            $okumasayisi_olsunmu     = $instance['okumasayisi_olsunmu'];
             $efekt_olsunmu             = $instance['efekt_olsunmu'];
             $postformat_ikonu        = $instance['postformat_ikonu'];
             $manset_margin_bottom    = $instance['manset_margin_bottom'];
    
            echo $before_widget;
            
            global $EsenKadin;
            
            
    if($listeleme_sekli == 1):
    
    $esnkdn_posts = new WP_Query($orjinal = array(
    'showposts'     => $yazi_sayisi,
    'cat'             => $kategori_secimi,
    'tag'             => $etikete_gore_listele,
    'offset'         => $kacincidan_baslasin,
    'post_type'         => $post_type_gore_listele
    ));
    
    endif;
    
    // ÇOK OKUNANA GÖRE
    
    
    if($listeleme_sekli == 2):
    
    $esnkdn_posts = new WP_Query(array(
    'showposts'     => $yazi_sayisi,
    'cat'             => $kategori_secimi,
    'offset'         => $kacincidan_baslasin,
    'tag'             => $etikete_gore_listele,
    'post_type'     => $post_type_gore_listele,
    'orderby'         => 'comment_count',
    'order'         => 'DESC'
    ));
    
    endif;
    
    
    ?>
    
            
        
    <div class="slayt"<? if($manset_margin_bottom !=""):?> style="margin-bottom:<?=$manset_margin_bottom;?>px"<?endif;?>>
    <div class="sly effect2">
    <div id="sl">
    
    
    <?php $kacinci = 0; while($esnkdn_posts->have_posts()): $esnkdn_posts->the_post(); $kacinci++;
    
    if ($yazi_arasi_reklam == "on"):
    
    $reklam_aralik = $yazi_arasi_kacinci;
    $reklam_aral_array = explode(",",$reklam_aralik);
    if(in_array($kacinci,$reklam_aral_array)):
    $post_id = $reklam_post_id;
    $post_object = get_post( $post_id );
    $Reklam_Title = $post_object->post_title;
    $Reklam_Content = $post_object->post_content;
    
    $One_Cikarilan_Reklam = esn_gorsel("ek_manset", $post_id , "475", "300", "100");
    
    //print_r($post_object) ;
    ?>
    
    <div class="slty_rsm_dty">
    <a href="<? echo post_permalink( $post_id ); ?>">
    <? echo $One_Cikarilan_Reklam ; ?>
    </a>
    <div class="rsm_bslk">
    <a href="<? echo post_permalink( $post_id ); ?>" itemprop="url" class="manset_baslik_link"><?php echo $Reklam_Title; ?></a><span class="manset_kucuk_yazi"><?php kisayazi($Reklam_Content,22);?></span>
    
    <div class="manset_sosyal">
    <span class="format_kap f_nar daire">** REKLAM **</span>
    
    
    </div> <!-- Manset Sosyal -->
    
    
    </div>
    </div>
    
    <? endif; endif; ?>
    
    
    
    
    
    
    
    
    <?
    $One_Cikarilan = esn_gorsel("ek_manset", get_the_ID() , "510", "330", "100");
    ?>
    
    <div class="slty_rsm_dty">
    <a href="<? the_permalink(); ?>">
    <? echo $One_Cikarilan ; ?>
    </a>
    <div class="rsm_bslk">
    <a href="<? the_permalink(); ?>" itemprop="url" class="manset_baslik_link"><?php the_title(); ?></a><span class="manset_kucuk_yazi"><?php $manset_kisa = get_the_excerpt();kisayazi($manset_kisa,24);?></span>
    
    <div class="manset_sosyal">
    <? if($postformat_ikonu == "on"): ?>
    <span class="format_kap f_nar daire"><?=esn_format(get_the_ID()); ?></span>
    <? endif; ?>
    <? if($yorum_olsunmu == "on"): ?>
    <span class="format_kap f_yesil daire"><i class="fa fa-comment"></i> <?php comments_number( ' 0', ' 1', ' %' ); ?></span>
    <? endif; ?>
    
    <? if (function_exists('mts_get_post_reviews')) { $review_esn = inceleme("2",get_the_ID());
    
    if(isset($review_esn)):
    ?>
    <span class="format_kap daire"><i class="fa fa-star"></i> <? echo $review_esn; ?> / 5 </span> <? endif ;?>
    <? } ?>
    <a class="format_kap f_gri daire" href="<? the_permalink(); ?>" itemprop="url"><i class="fa fa-ellipsis-h"></i></a>
    <? if ($tarih_olsunmu == "on"): ?>
    <span class="manset_date">Bu yazı <i class="fa fa-calendar"></i> <? echo esnkadin_time();?> yayınlandı..</span>
    <? endif ; ?>
    
    
    
    </div> <!-- Manset Sosyal -->
    
    
    </div>
    </div>
    
    <? endwhile ; ?>
    
    
    
    
    </div>
    </div>
    
    <a id="go-prev" style="cursor:pointer;"></a>
    <a id="go-next" style="cursor:pointer;"></a>
    </div>
        
    
    <div class="tmz"></div>     
        
            <?php
            echo $after_widget;
        }
        
        function update($new_instance, $old_instance)
        {
            $instance = $old_instance;
            
            $instance['title']                     = $new_instance['title'];
            $instance['posts']                     = $new_instance['posts'];
            $instance['kategori_ikonu']         = $new_instance['kategori_ikonu'];
            $instance['baslik_zemin_rengi']     = $new_instance['baslik_zemin_rengi'];
            $instance['baslik_yazi_rengi']         = $new_instance['baslik_yazi_rengi'];
            $instance['foto_efekt_rengi']         = $new_instance['foto_efekt_rengi'];
            $instance['listeleme_sekli']         = $new_instance['listeleme_sekli'];
            $instance['efekt_olsunmu']             = $new_instance['efekt_olsunmu'];
            $instance['okumasayisi_olsunmu']     = $new_instance['okumasayisi_olsunmu'];
            $instance['tarih_olsunmu']             = $new_instance['tarih_olsunmu'];
            $instance['yorum_olsunmu']             = $new_instance['yorum_olsunmu'];
            $instance['postformat_ikonu']         = $new_instance['postformat_ikonu'];
            $instance['kacincidan_baslasin']     = $new_instance['kacincidan_baslasin'];
            $instance['etikete_gore_listele']     = $new_instance['etikete_gore_listele'];
            $instance['post_type_gore_listele'] = $new_instance['post_type_gore_listele'];
            $instance['yazi_arasi_reklam']         = $new_instance['yazi_arasi_reklam'];
            $instance['reklam_post_id']         = $new_instance['reklam_post_id'];
            $instance['yazi_arasi_kacinci']     = $new_instance['yazi_arasi_kacinci'];
            $instance['manset_margin_bottom']     = $new_instance['manset_margin_bottom'];
            
            $instance['kategori_secimi']         = implode( ',', $new_instance['kategori_secimi'] );
    
    
            return $instance;
        }
    
        function form($instance)
        {
            $defaults = array('title' => 'Yazılar', 'post_type' => 'all', 'posts' => 4, 'kategori_secimi' => 1, 'baslik_zemin_rengi' => '#F0F0F0', 'baslik_yazi_rengi' => '#000000','manset_yorum' => 'on', 'manset_okumasayi' => 'on', 'slayt_tagi' => '', 'efekt_olsunmu' => 'on', 'tarih_olsunmu' => 'on', 'postformat_ikonu' => 'on');
            $instance = wp_parse_args((array) $instance, $defaults);
            
    $ikon_array = esnkdn_ikonlar();
    
    ?>
    
    
    
    
    
    
    
    <div style="margin-top:10px; display:block; font-size:10px; color:#CC0033;">NOT: BİLEŞENİ İLK KEZ EKLEDİĞİNİZDE BİLGİLERİ AYARLAMADAN ÖNCE AŞAĞIDA BULUNAN <b>"KAYDET"</b> BUTONUNA BİR KEZ TIKLAYINIZ!</div>
    <p>
    
    <label for="<?php echo $this->get_field_id( 'kategori_secimi' ); ?>"></label>
            <span><?php _e( 'Kategorisini Seç:' ); ?></span>
    <select multiple class="kategori" id="<?php echo $this->get_field_id( 'kategori' ); ?>" name="<?php echo $this->get_field_name( 'kategori_secimi' ); ?>[]" style="width: 250px;">
    <?
    
    $boldum = explode("," , $instance['kategori_secimi']);
    $cats = get_categories( $args );
    if ( ! empty( $cats ) ) {
        foreach ( $cats as $cat ) {
            if(in_array($cat->term_id, $boldum)){ $selected = ' selected';}else{$selected="";};
         echo '<option value="'.$cat->term_id.'"'.$selected.'>'.$cat->name.'</option>';
         }}
        
    ?>
    </select>
    <span style="color:#CC0000; display:block;">Not: Boş bırakmanız halinde tüm kategoriler seçili olacaktır</span>
    
    </p>
            <p>
    <label for="<?php echo $this->get_field_id('listeleme_sekli'); ?>"><?php _e( 'Listeleme Şekli:' ); ?></label>
    <select id="<?php echo $this->get_field_id( 'listeleme_sekli' ); ?>" name="<?php echo $this->get_field_name( 'listeleme_sekli' ); ?>" style="width: 250px;">
    <option value="1" <? if($instance['listeleme_sekli'] == 1) :echo "selected"; endif; ?>>Son Eklenene Göre Listele</option>
    <option value="2" <? if($instance['listeleme_sekli'] == 2):echo "selected"; endif; ?>>Çok Okunana Göre Listele</option>
    </select>
    
            </p>    
            <p>
                <label for="<?php echo $this->get_field_id('etikete_gore_listele'); ?>">Etikete Göre Listele:</label>
                <input class="widefat" id="<?php echo $this->get_field_id('etikete_gore_listele'); ?>" name="<?php echo $this->get_field_name('etikete_gore_listele'); ?>" value="<?php echo $instance['etikete_gore_listele']; ?>" />
            </p>
            <p>
                <label for="<?php echo $this->get_field_id('post_type_gore_listele'); ?>">Özel Post Type Göre Listele:</label>
                <input class="widefat" id="<?php echo $this->get_field_id('post_type_gore_listele'); ?>" name="<?php echo $this->get_field_name('post_type_gore_listele'); ?>" value="<?php echo $instance['post_type_gore_listele']; ?>" />
            </p>     
    
                
            <p>
    
    </p>
            
            <p>
                <label for="<?php echo $this->get_field_id('posts'); ?>">Yazı Sayısı:</label>
                <input class="widefat" style="width: 30px;" id="<?php echo $this->get_field_id('posts'); ?>" name="<?php echo $this->get_field_name('posts'); ?>" value="<?php echo $instance['posts']; ?>" />
            </p>
            <p>
                <label for="<?php echo $this->get_field_id('kacincidan_baslasin'); ?>">Kaçıncı İçerikten Başlasın:</label>
                <input class="widefat" id="<?php echo $this->get_field_id('kacincidan_baslasin'); ?>" name="<?php echo $this->get_field_name('kacincidan_baslasin'); ?>" value="<?php echo $instance['kacincidan_baslasin']; ?>" />
            </p>
    
            <p>
                <input class="checkbox" type="checkbox" <?php checked($instance['yazi_arasi_reklam'], 'on'); ?> id="<?php echo $this->get_field_id('yazi_arasi_reklam'); ?>" name="<?php echo $this->get_field_name('yazi_arasi_reklam'); ?>" />
                <label for="<?php echo $this->get_field_id('yazi_arasi_reklam'); ?>">Manşet Arası Reklam Olsun mu?</label>
            </p>
            <p>
                <label for="<?php echo $this->get_field_id('reklam_post_id'); ?>">Yazı Arasında Reklam Olarak Gösterilecek POST ID:</label>
                <input class="widefat" style="width: 30px;" id="<?php echo $this->get_field_id('reklam_post_id'); ?>" name="<?php echo $this->get_field_name('reklam_post_id'); ?>" value="<?php echo $instance['reklam_post_id']; ?>" />
            </p>
            <p>
                <label for="<?php echo $this->get_field_id('reklam_post_id'); ?>">Yazı Arasında Reklam Kaçıncı Sırada Gösterilsin (Sadece Rakam, Ör: 3):</label>
                <input class="widefat" style="width: 30px;" id="<?php echo $this->get_field_id('yazi_arasi_kacinci'); ?>" name="<?php echo $this->get_field_name('yazi_arasi_kacinci'); ?>" value="<?php echo $instance['yazi_arasi_kacinci']; ?>" />
            </p>
                
    <p> <hr /></p>    
            <p>
                <input class="checkbox" type="checkbox" <?php checked($instance['okumasayisi_olsunmu'], 'on'); ?> id="<?php echo $this->get_field_id('okumasayisi_olsunmu'); ?>" name="<?php echo $this->get_field_name('okumasayisi_olsunmu'); ?>" />
                <label for="<?php echo $this->get_field_id('okumasayisi_olsunmu'); ?>">Okuma Sayısı Olsunmu</label>
            </p>
            <p>
                <input class="checkbox" type="checkbox" <?php checked($instance['yorum_olsunmu'], 'on'); ?> id="<?php echo $this->get_field_id('yorum_olsunmu'); ?>" name="<?php echo $this->get_field_name('yorum_olsunmu'); ?>" />
                <label for="<?php echo $this->get_field_id('yorum_olsunmu'); ?>">Yorum Sayısı Olsunmu</label>
            </p>
            <p>
                <input class="checkbox" type="checkbox" <?php checked($instance['tarih_olsunmu'], 'on'); ?> id="<?php echo $this->get_field_id('tarih_olsunmu'); ?>" name="<?php echo $this->get_field_name('tarih_olsunmu'); ?>" />
                <label for="<?php echo $this->get_field_id('tarih_olsunmu'); ?>">Tarih Bilgisi Olsunmu</label>
            </p>          
    
            <p>
                <input class="checkbox" type="checkbox" <?php checked($instance['postformat_ikonu'], 'on'); ?> id="<?php echo $this->get_field_id('postformat_ikonu'); ?>" name="<?php echo $this->get_field_name('postformat_ikonu'); ?>" />
                <label for="<?php echo $this->get_field_id('postformat_ikonu'); ?>">Post Format İkonu Olsunmu</label>
            </p>      
            <p>
                <label for="<?php echo $this->get_field_id('manset_margin_bottom'); ?>">Manşet Margin Bottom (Manşetin alt tarafına boşluk eklemeniz gerekirse. Ör: 20 değerini girebilirsiniz.):</label>
                <input class="widefat" style="width: 30px;" id="<?php echo $this->get_field_id('manset_margin_bottom'); ?>" name="<?php echo $this->get_field_name('manset_margin_bottom'); ?>" value="<?php echo $instance['manset_margin_bottom']; ?>" />
            </p>           
        <?php }
    }
    // Sisteme bileşeni kaydet
    function esenkadin_manset_widget() {
        register_widget( 'manset' );
    }
    add_action( 'widgets_init', 'esenkadin_manset_widget' );
    ?>
    TheKhan adlı üyeden alıntı: mesajı görüntüle
    İlgili yere kadar olan kodu paylaşabilir misiniz?
  • 30-03-2020, 23:42:06
    #7
    Bu durumda } öncesinde birşeyler eksik. Ancak If sonrasında ":" ve endif kullanılmış (57 ve 72 deki gibi) bunlar yerine { ve } kullanırsanız daha iyi olur. O şekilde güncelleyip deneyin isterseniz