• 13-12-2012, 00:57:33
    #1
    Merhabalar

    Wordpress sitemde arama yaparken Türkçe kelime aranınca sonuçlar çıkmıyor.Mesela örnek aranan kelime "karışık" kelimesi arama sonucu "kar%C4%B1%C5%9F%C4%B1k" gibi çıkıyor ve sonuç bulunamıyor.Konu hakkında yardımlarınızı bekliyorm.Sayfanın tam olarak kodlaması şu şekil;
    <?php
    
    $options = get_option('wptube2');
    get_header();
    
    if(isset($_GET['order']) && !empty($_GET['order']))
    {
    	$order = $_GET['order'];
    	switch($order)
    	{ 
    		case 'date_old' :	$orderby = '&orderby=date&order=ASC';
    			break;
    		case 'liked' :	$orderby = '&l_sortby=post_likes&l_orderby=desc';
    			break;
    		case 'viewed' :	$orderby = '&v_sortby=views&v_orderby=desc';
    			break;
    		case 'commented' :	$orderby = '&orderby=comment_count';
    				function comment_count_orderby( $orderby ) {
    					return "comment_count DESC";
    				}
    				add_filter('posts_orderby', 'comment_count_orderby');
    			break;
    		default :	 $orderby = '&orderby=date';
    			break;
    	}
    }
    if ( get_option('permalink_structure') != '' ) {
    	if(is_search()){
    	$order_url = get_search_link().'?order=';
    	}
    } else { 
    	if(is_search()){
    	$order_url = get_search_link().'&order=';
    	}
    }
    
    ?>
    
    <div id="wrapper">
      <div id="mainbody">
        <?php if ( ($options['hide_sidebar']['3'] == 1) && ($options['post_layout_view'] == 'thumbnail') ) { ?>
        <?php } else { get_sidebar(); } ?>
        <div id="content">
          <div class="sortby_container box-shadow-inset">
            <?php if ($options['post_layout_view'] == 'both') { ?>
            <a href="#_" class="switch_thumb swap">
            <?php _e('Switch View','wpt');?>
            </a>
            <?php  }  ?>
            <div id="sortbybox">
              <ul class="menu">
                <li><a href="#_" id="sort_link" onclick="javascript:showlayer('sm_1')">
                  <?php _e('Sort by  ', 'wpt') ?>
                  </a>
                  <ul class="submenu" id="sm_1">
                    <li><a href="<?php echo $order_url; ?>commented">
                      <?php _e('Most Commented', 'wpt') ?>
                      </a></li>
                    <li><a href="<?php echo $order_url; ?>liked">
                      <?php _e('Most Liked', 'wpt') ?>
                      </a></li>
                    <li><a href="<?php echo $order_url; ?>viewed">
                      <?php _e('Most Viewed', 'wpt') ?>
                      </a></li>
                    <li><a href="<?php echo $order_url; ?>date_new">
                      <?php _e('Newest First', 'wpt') ?>
                      </a></li>
                    <li><a href="<?php echo $order_url; ?>date_old">
                      <?php _e('Oldest First', 'wpt') ?>
                      </a></li>
                  </ul>
                </li>
              </ul>
            </div>
            <div class="sort_info_text">
              <?php $count = 'No'; if (have_posts()) : $count = $wp_query->found_posts; ?>
              <?php printf(_n("%d result", "%d results", $count,'wpt'),$count); ?>
              <?php _e('in search for &lsquo;','wpt'); the_search_query(); _e('&rsquo;','wpt'); ?>
              <?php endif ?>
              <?php if($order=='commented') : ?>
              <?php _e('- Most Commented', 'wpt') ?>
              <?php endif; ?>
              <?php if($order=='liked') : ?>
              <?php _e('- Most Liked', 'wpt') ?>
              <?php endif; ?>
              <?php if($order=='viewed') : ?>
              <?php _e('- Most Viewed', 'wpt') ?>
              <?php endif; ?>
              <?php if($order=='date_new') : ?>
              <?php _e('- Newest First', 'wpt') ?>
              <?php endif; ?>
              <?php if($order=='date_old') : ?>
              <?php _e('- Oldest First', 'wpt') ?>
              <?php endif; ?>
            </div>
          </div>
          <div class="clearboth"></div>
          <?php query_posts($query_string.$orderby); if (have_posts()) : ?>
          <?php while (have_posts()) : the_post(); ?>
          <?php
    		if ($options['post_layout_view'] == 'thumbnail'):
       			echo '<ul class="thumb_view">';
    		elseif ($options['post_layout_view'] == 'detail'):
    			echo '<ul class="display">';
    		elseif ($options['post_layout_view'] == 'both'):
        		echo '<ul class="display thumb_view">';
    		endif;
    	  	?>
          <?php if ( in_category($options['non_video_category'])) : ?>
          <?php get_template_part( 'post', 'other' ); ?>
          <?php else : ?>
          <?php get_template_part( 'post', 'video' ); ?>
          <?php endif; ?>
          </ul>
          <?php endwhile; ?>
          <?php wptube2_pagination($pages = '', $range = 2); ?>
        </div>
        <?php else : ?>
        <h3>
          <?php _e('Your search', 'wpt'); ?>
          <strong>&quot;<?php echo get_search_query(); ?>&quot;</strong>
          <?php _e('did not match any documents.', 'wpt'); ?>
        </h3>
        <div class="search_results_none">
          <h4>
            <?php _e('Suggestions:', 'wpt'); ?>
          </h4>
          <ul>
            <li>
              <?php _e('Make sure all words are spelled correctly.', 'wpt'); ?>
            </li>
            <li>
              <?php _e('Try different keywords.', 'wpt'); ?>
            </li>
            <li>
              <?php _e('Try more general keywords.', 'wpt'); ?>
            </li>
          </ul>
        </div>
        <?php get_search_form() ?>
      </div>
      <?php endif; ?>
    </div>
    <?php get_footer(); ?>
  • 13-12-2012, 01:00:13
    #2
    Kimlik doğrulama veya yönetimden onay bekliyor.
    Dosyayı indirip Notepad+ programı ile uft 8 bomsuz olarak kaydetmeyi deneyin. Olmazsa UFT 8 olarak deneyin. Yine olmazsa ANSI olarak kaydedip deneyin. Mutlak birisi tutacaktır.
  • 13-12-2012, 01:03:27
    #3
    $_GET['order'] = urldecode($_GET['order']);
  • 13-12-2012, 01:07:46
    #4
    miscel adlı üyeden alıntı: mesajı görüntüle
    $_GET['order'] = urldecode($_GET['order']);
    tam olarak anlayamadım ?
  • 13-12-2012, 01:08:40
    #5
    $order = $_GET['order'];

    8.satırdan yani üsttekinden önce benim yazdığımı ekler misin
  • 13-12-2012, 01:12:27
    #6
    miscel adlı üyeden alıntı: mesajı görüntüle
    $order = $_GET['order'];

    8.satırdan yani üsttekinden önce benim yazdığımı ekler misin
    ekledim malesef sonuç aynı
  • 13-12-2012, 01:24:56
    #7
    o satırı verirken o değişkende hata olduğunu düşünmüştüm, arama işlemine giren değer o değilmiş gibi duruyor zaten.

    foreach($_POST as $key => $value)
    {
    $_POST[$key] = urldecode($value);
    }

    foreach($_GET as $key => $value)
    {
    $_GET[$key] = urldecode($value);
    }

    sadece bunu aynı yere yazıp dener misin.
  • 13-12-2012, 01:32:30
    #8
    Malesef gene değişmedi.Arama kutusunun kodlarınıda vereyim isterseniz;

    div class="widget box-shadow-inset"> <a href="<?php  echo get_bloginfo_rss('rss2_url'); ?>"><img src="<?php bloginfo('template_directory'); ?>/images/rss.png"  border="0" id="rss_img" alt="Subscribe to RSS" /></a>
      <div id="searchformcontainer">
        <form method="get" class="searchform" action="<?php echo $_SERVER['PHP_SELF']; ?>">
          <input type="text"  value=" <?php _e('Type here and hit enter ...', 'wpt') ?><?php /* echo wp_specialchars($s, 1); */ ?>" class="searchtext" name="s" id="s" onfocus="if (this.value == ' <?php _e('Type here and hit enter ...', 'wpt') ?>') {this.value = '';}" onblur="if (this.value == '') {this.value = ' <?php _e('Type here and hit enter ...', 'wpt') ?>';}" />
          <input type="submit" class="wp-tube-button wp-tube-button-sidebar" value="Search" />
        </form>
      </div>
      <div class="clearboth"></div>
    </div>
  • 13-12-2012, 01:47:36
    #9
    wpciler bilir bunu, urldecode fonksiyonunu uygun yere koymalısınız.

    echo urlencode('karışık');
    echo urldecode('kar%C4%B1%C5%9F%C4%B1k');