• 31-07-2010, 17:30:50
    #1
    Selam Arkadaþlar Benim Konum Þu Google Sayfalarýmý hýzla index lerken Sef Olayýnda Sayfada Boþluk cýkýyor boþklugun yerine _ - Felan Koymuyor


    function sef($text) {																				                                                        //
    
    $text = trim($text);																				                                                        //
    
    $search = array(''','&',' /','/',' ?','?',' =D','=D',' !',' :D',':D',' :)',':)','Ç','ç','Ğ','ğ','ı','İ','Ö','ö','Ş','ş','Ü','ü',' ','---','--','(',')','&','.','=',',',':','!','_-_');//
    
    $replace = array('','','','','','','','','','','','','','C','c','G','g','i','i','O','o','S','s','U','u','_','-','-','','','ve','','','','','','_');							//
    
    $new_text = str_replace($search,$replace,$text);												                                                        	//
    
    return $new_text;																					                                                        //
    
    }

    Kod Bu Arkadaþlar Boþluk Olayýný Nasýl Çöze bilirizki Ornek


    xxx.jom/Ben%20Ben.html Ama Söyle Olsun istiyorum xxx.jom/Ben_Ben.html Yapamadým Denemedigim þey Klamadý ne Yapmam Gerek Yardýmcý Olurmusunuz
  • 31-07-2010, 17:36:39
    #2
    Kimlik doðrulama veya yönetimden onay bekliyor.
    $new_text = str_replace($search,$replace,$text);

    bunun attýna $new_text = str_replace(' ','_',$new_text); ekleyip dener misiniz ?
  • 31-07-2010, 17:59:04
    #3
    Ekledim Ama Hala Yaný Þuan Videol Linklerinde bir Pronlem Kalmadý Ama Katagoriler Hala Yaný Adres : Burdan Giris
  • 31-07-2010, 20:23:27
    #4
    Kategori linklerini sef fonksiyonundan geçirdiðinize emin misiniz ?
  • 31-07-2010, 20:40:34
    #5
    Çok Fazla Bilgim yok Sef Konusnda Ve php Konusunda Kopyala Yapýstýr yontemi ile Birþeyler Yapýyorum zaten toplam 4 dosya Var bir db Hepside Yaný yerden Okuyor Yani demek istedigim Þu

    Katagori.php Bunu Nasýl sefden Gecirmem gerikiyor Peki
    <?php
    include("ayar.php");
    $kid=$_GET['id'];
    $sql = mysql_query ("select * from kategoriler where id='$kid'");
    while($cek3 = mysql_fetch_array($sql)){
    $kategori=$cek3["kategori"];
    }
    ?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    	<title><?php echo $kategori;?> kategorisi videoları</title>
           	<link href="<?php echo $domain;?>/css/reset.css" rel="stylesheet" type="text/css" />
    		<link href="<?php echo $domain;?>/css/style.css" rel="stylesheet" type="text/css" />
            <script type="text/javascript" src="<?php echo $domain;?>/scripts/Moo.Core.js"></script>
        	<script type="text/javascript" src="<?php echo $domain;?>/scripts/Moo.More.js"></script>
        	<script type="text/javascript" src="<?php echo $domain;?>/scripts/menu.js"></script>
    		<script type="text/javascript" src="<?php echo $domain;?>/scripts/yorum.js"></script>
    </head>
    <body>
    <div class="header-bg">
    <div class="header">
    <div class="logo"><a href="<?php echo $domain;?>"><img src="<?php echo $domain;?>/images/logo.png" width="148" height="54" alt="<?php echo $title;?>"/></a></div>
    
    <div class="ust-menu">
    <div class="uye-giris"> </div>
    	<div class="menu">
              		
              			<div class="menuBG" style="width:116px;"><a href="<?php echo $domain;?>/">Anasayfa</a></div>
              			<div class="menuBG2" style="width:116px;"><a href="<?php echo $domain;?>/yeni-videolar">Yeni Videolar</a></div>
              			<div class="menuBG2" style="width:116px;"><a href="<?php echo $domain;?>/populer-videolar">Popüler Videolar</a></div>
              			<div class="menuBG2" style="width:116px;"><a href="<?php echo $domain;?>/rastgele-videolar">Rastgele Videolar</a></div>
           			
    	</div>
    </div>    
    <div class="arama-kutu">
    <form name="searchform" action="<?php echo $domain;?>/ara.php" method="get" onsubmit="this.submit();return false;">
    <input type="text" id="arama-input" title="Ara ki Bulasın :)" value="Ara ki Bulasın :)"onclick="this.value=''" name="ara" />
    <input type="image" src="<?php echo $domain;?>/images/ara.jpg" style="border:0px; margin-top:5px;" onclick="window.location = '<?php echo $domain;?>/ara/' + unescape(document.searchform.ara.value);return false;"/>
    </form>
    </div>
    </div>
    </div>
    <div class="orta">
    <div class="yan-menu">
    <div class="vertmenu">
    <h1>Kategoriler</h1>
    <ul>
    	<?
    	$data2 = mysql_query("select * from kategoriler order by id asc");
    	while($sonuc5 = mysql_fetch_array($data2))
    	{
    	$katid=$sonuc5["id"];
    	$kategorim=$sonuc5["kategori"];
    	?>
    	<li><a href="<?php echo $domain;?>/<?php echo $katid;?>/<?php echo $kategorim;?>" tabindex="1"><?php echo $kategorim; ?></a></li>
    	<?
    	}
    	?>  
    </ul>
    </div>
    <?php
    include("kod.php");
    ?>
    
    </div>
    <div class="i-ust"><ul class="cstabs">
    <li><a class="#" ><?php echo $kategori;?> Kategorisine Ait Videolar</a></li>
    </ul></div>
    <div class="orta-ic-izle">
    <div id="cs">
    <div class="tab-content">
    <div class="tab">
    <ul class="gallery">
    					<?
    					$page = $_GET['sayfa'];
    					$max=12;
    					if (!$page) $page=1;
    					$alt=($page - 1) * $max;
    					$sql2="SELECT COUNT(id) FROM videolar where kategori='$kategori'";
    					$result2=mysql_query($sql2);
    					$count=mysql_result($result2,0);    
    					$perpage=ceil($count/$max);
    					$sql = mysql_query ("select * from videolar where kategori='$kategori' order by hit DESC limit $alt,$max");
    					while($cek = mysql_fetch_array($sql)){
    					$adi=$cek["adi"];
    					$resim=$cek["resim"];
    					$sure=$cek["sure"];
    					$id=$cek["id"];
    					$adibol=mb_substr($adi,0,34,'UTF-8');
    					?>
    					    <li>
    						<div class="isim"><?php echo $adibol;?></div>
    						<div class="sure"><?php echo $sure;?> dk.</div>
    						<a href="<?php echo $domain;?>/<?php echo $id;?>/<?php echo sef($adi);?>.html" title="<?php echo $adi; ?>">
    						<img src="<?php echo $resim; ?>" alt="<?php echo $adi; ?> resmi" width="155" height="111" />
    						<span class="video"></span>
    						</a>
    						</li>
    					
    					<?
    					}
    					?>
    	
    
    </ul>
    </div>
    
    
    
    <div style="clear:both; height:0px; overflow:hidden;"></div>
    <div class="pagination">
    	<?php
    		if($count > $perpage) :
    		if($perpage<=5) {
    		$x = 0;
    		} else {
    		  $x = 6; // akrif sayfadan önceki/sonraki sayfa gösterim sayısı
    		}
    		  $lastP = $perpage;
    
    		  // sayfa 1'i yazdır
    		  if($page==1) echo "<span class=\"current\">1</span>";
    		  else echo "<a href=\"$domain/$kid-$kategori/1\">1</a>";
    		  // "..." veya direkt 2
    		  if($page-$x > 2) {
    			echo "...";
    			$i = $page-$x;
    		  } else {
    			$i = 2;
    		  }
    		  // +/- $x sayfaları yazdır
    		  for($i; $i<=$page+$x; $i++) {
    			if($i==$page) echo "<span class=\"current\">$i</span>";
    			else echo "<a href=\"$domain/$kid-$kategori/$i\">$i</a>";
    			if($i==$lastP) break;
    		  }
    		  // "..." veya son sayfa
    		  if($page+$x < $lastP-1) {
    			echo "...";
    			echo "<a href=\"$domain/$kid-$kategori/$lastP\">$lastP</a>";
    		  } elseif($page+$x == $lastP-1) {
    			echo "<a href=\"$domain/$kid-$kategori/$lastP\">$lastP</a>";
    		  }
    		endif; 
    	?>
    </div>
    
    </div>
    </div>
    </div>
    </div>
    <?php
    include("alt.php");
    ?>
    </body>
    </html>
    Db Bu Fonksiyon Kodlarý Yani Ayar.php nin içinde db dende Buradan Goruyor Sorun nerede Acba Videolarda SOrun yok Her Hangi Ama Katagorilerde Sorun Veriyor Sef Fonksiyonundan Gecirmek için ne Yapmam Gerek Aceba
  • 31-07-2010, 20:59:03
    #6
    DieM adlý üyeden alýntý: mesajý görüntüle
    Çok Fazla Bilgim yok Sef Konusnda Ve php Konusunda Kopyala Yapýstýr yontemi ile Birþeyler Yapýyorum zaten toplam 4 dosya Var bir db Hepside Yaný yerden Okuyor Yani demek istedigim Þu

    Katagori.php Bunu Nasýl sefden Gecirmem gerikiyor Peki
    <?php
    include("ayar.php");
    $kid=$_GET['id'];
    $sql = mysql_query ("select * from kategoriler where id='$kid'");
    while($cek3 = mysql_fetch_array($sql)){
    $kategori=$cek3["kategori"];
    }
    ?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    	<title><?php echo $kategori;?> kategorisi videoları</title>
           	<link href="<?php echo $domain;?>/css/reset.css" rel="stylesheet" type="text/css" />
    		<link href="<?php echo $domain;?>/css/style.css" rel="stylesheet" type="text/css" />
            <script type="text/javascript" src="<?php echo $domain;?>/scripts/Moo.Core.js"></script>
        	<script type="text/javascript" src="<?php echo $domain;?>/scripts/Moo.More.js"></script>
        	<script type="text/javascript" src="<?php echo $domain;?>/scripts/menu.js"></script>
    		<script type="text/javascript" src="<?php echo $domain;?>/scripts/yorum.js"></script>
    </head>
    <body>
    <div class="header-bg">
    <div class="header">
    <div class="logo"><a href="<?php echo $domain;?>"><img src="<?php echo $domain;?>/images/logo.png" width="148" height="54" alt="<?php echo $title;?>"/></a></div>
    
    <div class="ust-menu">
    <div class="uye-giris"> </div>
    	<div class="menu">
              		
              			<div class="menuBG" style="width:116px;"><a href="<?php echo $domain;?>/">Anasayfa</a></div>
              			<div class="menuBG2" style="width:116px;"><a href="<?php echo $domain;?>/yeni-videolar">Yeni Videolar</a></div>
              			<div class="menuBG2" style="width:116px;"><a href="<?php echo $domain;?>/populer-videolar">Popüler Videolar</a></div>
              			<div class="menuBG2" style="width:116px;"><a href="<?php echo $domain;?>/rastgele-videolar">Rastgele Videolar</a></div>
           			
    	</div>
    </div>    
    <div class="arama-kutu">
    <form name="searchform" action="<?php echo $domain;?>/ara.php" method="get" onsubmit="this.submit();return false;">
    <input type="text" id="arama-input" title="Ara ki Bulasın :)" value="Ara ki Bulasın :)"onclick="this.value=''" name="ara" />
    <input type="image" src="<?php echo $domain;?>/images/ara.jpg" style="border:0px; margin-top:5px;" onclick="window.location = '<?php echo $domain;?>/ara/' + unescape(document.searchform.ara.value);return false;"/>
    </form>
    </div>
    </div>
    </div>
    <div class="orta">
    <div class="yan-menu">
    <div class="vertmenu">
    <h1>Kategoriler</h1>
    <ul>
    	<?
    	$data2 = mysql_query("select * from kategoriler order by id asc");
    	while($sonuc5 = mysql_fetch_array($data2))
    	{
    	$katid=$sonuc5["id"];
    	$kategorim=$sonuc5["kategori"];
    	?>
    	<li><a href="<?php echo $domain;?>/<?php echo $katid;?>/<?php echo $kategorim;?>" tabindex="1"><?php echo $kategorim; ?></a></li>
    	<?
    	}
    	?>  
    </ul>
    </div>
    <?php
    include("kod.php");
    ?>
    
    </div>
    <div class="i-ust"><ul class="cstabs">
    <li><a class="#" ><?php echo $kategori;?> Kategorisine Ait Videolar</a></li>
    </ul></div>
    <div class="orta-ic-izle">
    <div id="cs">
    <div class="tab-content">
    <div class="tab">
    <ul class="gallery">
    					<?
    					$page = $_GET['sayfa'];
    					$max=12;
    					if (!$page) $page=1;
    					$alt=($page - 1) * $max;
    					$sql2="SELECT COUNT(id) FROM videolar where kategori='$kategori'";
    					$result2=mysql_query($sql2);
    					$count=mysql_result($result2,0);    
    					$perpage=ceil($count/$max);
    					$sql = mysql_query ("select * from videolar where kategori='$kategori' order by hit DESC limit $alt,$max");
    					while($cek = mysql_fetch_array($sql)){
    					$adi=$cek["adi"];
    					$resim=$cek["resim"];
    					$sure=$cek["sure"];
    					$id=$cek["id"];
    					$adibol=mb_substr($adi,0,34,'UTF-8');
    					?>
    					    <li>
    						<div class="isim"><?php echo $adibol;?></div>
    						<div class="sure"><?php echo $sure;?> dk.</div>
    						<a href="<?php echo $domain;?>/<?php echo $id;?>/<?php echo sef($adi);?>.html" title="<?php echo $adi; ?>">
    						<img src="<?php echo $resim; ?>" alt="<?php echo $adi; ?> resmi" width="155" height="111" />
    						<span class="video"></span>
    						</a>
    						</li>
    					
    					<?
    					}
    					?>
    	
    
    </ul>
    </div>
    
    
    
    <div style="clear:both; height:0px; overflow:hidden;"></div>
    <div class="pagination">
    	<?php
    		if($count > $perpage) :
    		if($perpage<=5) {
    		$x = 0;
    		} else {
    		  $x = 6; // akrif sayfadan önceki/sonraki sayfa gösterim sayısı
    		}
    		  $lastP = $perpage;
    
    		  // sayfa 1'i yazdır
    		  if($page==1) echo "<span class=\"current\">1</span>";
    		  else echo "<a href=\"$domain/$kid-$kategori/1\">1</a>";
    		  // "..." veya direkt 2
    		  if($page-$x > 2) {
    			echo "...";
    			$i = $page-$x;
    		  } else {
    			$i = 2;
    		  }
    		  // +/- $x sayfaları yazdır
    		  for($i; $i<=$page+$x; $i++) {
    			if($i==$page) echo "<span class=\"current\">$i</span>";
    			else echo "<a href=\"$domain/$kid-$kategori/$i\">$i</a>";
    			if($i==$lastP) break;
    		  }
    		  // "..." veya son sayfa
    		  if($page+$x < $lastP-1) {
    			echo "...";
    			echo "<a href=\"$domain/$kid-$kategori/$lastP\">$lastP</a>";
    		  } elseif($page+$x == $lastP-1) {
    			echo "<a href=\"$domain/$kid-$kategori/$lastP\">$lastP</a>";
    		  }
    		endif; 
    	?>
    </div>
    
    </div>
    </div>
    </div>
    </div>
    <?php
    include("alt.php");
    ?>
    </body>
    </html>
    Db Bu Fonksiyon Kodlarý Yani Ayar.php nin içinde db dende Buradan Goruyor Sorun nerede Acba Videolarda SOrun yok Her Hangi Ama Katagorilerde Sorun Veriyor Sef Fonksiyonundan Gecirmek için ne Yapmam Gerek Aceba

    <li><a href="<?php echo $domain;?>/<?php echo $katid;?>/<?php echo $kategorim;?>" tabindex="1"><?php echo $kategorim; ?></a></li>
    bu kýsmý þöyle deðiþtirip dener misiniz ?

    <li><a href="<?php echo $domain;?>/<?php echo $katid;?>/<?php echo $kategorim;?>" tabindex="1"><?php echo sef($kategorim); ?>.html</a></li>
  • 31-07-2010, 21:08:54
    #7
    Selam Kardeþ Olmadý Hep Þöyle cýktý Linkler

    .html
    .html
    .html
    .html
    .html
    .html
    .html
    .html
    .html
    .html
    .html
    .html
    .html
    .html
    .html
  • 31-07-2010, 21:27:49
    #8
    <li><a href="<?php echo $domain;?>/<?php echo $katid;?>/<?php echo sef($kategorim);?>.html" tabindex="1"><?php echo $kategorim; ?></a></li>
    böyle deneyin hocam. Dalgýnlýðýma gelmiþ, yanlýþ yazmýþým.
  • 31-07-2010, 21:42:20
    #9
    evet bu Þekilde Düzeldi Ama Bu seferde Katagoriyi Acmýyor Kata goriden Bi video Acýyo sadece Yani Kata gorinin içerigini göstermiyo Normal video Linki gibi goruntuleniyo video acýyo