• Rejestracja
vBHELP.pl - polskie wsparcie vBulletin
Strona 3 z 5 PierwszyPierwszy 12345 OstatniOstatni
  1. #21
    Awatar Slateer
    Slateer jest nieaktywny Użytkownik
    Dołączył
    Oct 2009
    Posty
    97

    Domyślnie

    zrobilem tak: pobralem, rozpakowalem, wrzucilem php do glownego katalogu forum, zainstalowalem produkt i pojawilo sie tylko takie coś:
    http://img404.imageshack.us/img404/2113/beztytuuerw.png



  2. #22
    Awatar Krisuuu
    Krisuuu jest nieaktywny Stały bywalec
    Dołączył
    Apr 2009
    Posty
    283

    Domyślnie

    Jeśli chcesz polskie znaki to:
    Znajdź:

    Kod:
    if ($a > 0.8)
    i dajesz przed tym:

    Kod:
    $datas[kw]=iconv("utf-8","iso-8859-2",$datas[kw]);


  3. #23
    Awatar Slateer
    Slateer jest nieaktywny Użytkownik
    Dołączył
    Oct 2009
    Posty
    97

    Domyślnie

    Cytat Zamieszczone przez Krisuuu Zobacz posta
    Jeśli chcesz polskie znaki to:
    Znajdź:

    Kod:
    if ($a > 0.8)
    gdzie niby to znajde? w stylach ani w modzie tego nie mam


  4. #24
    Awatar Krisuuu
    Krisuuu jest nieaktywny Stały bywalec
    Dołączył
    Apr 2009
    Posty
    283

    Domyślnie

    Taki kod możesz znaleźć w głównym pliku PHP


  5. #25
    Awatar Slateer
    Slateer jest nieaktywny Użytkownik
    Dołączył
    Oct 2009
    Posty
    97

    Domyślnie

    Nadal nie wiem o czym piszesz, sorry. :E


  6. #26
    Awatar Krisuuu
    Krisuuu jest nieaktywny Stały bywalec
    Dołączył
    Apr 2009
    Posty
    283

    Domyślnie

    Cytat Zamieszczone przez Slateer Zobacz posta
    zrobilem tak: pobralem, rozpakowalem, wrzucilem php do glownego katalogu forum, zainstalowalem produkt i pojawilo sie tylko takie coś:
    http://img404.imageshack.us/img404/2113/beztytuuerw.png
    Już masz odpowiedź


  7. #27
    Awatar Slateer
    Slateer jest nieaktywny Użytkownik
    Dołączył
    Oct 2009
    Posty
    97

    Domyślnie

    no to żeśmy się dogadali przecież pisałem że nie ma tego w plikach od moda, było tylko takie coś:

    Kod:
    $datas = parse_url(iconv("utf-8","iso-8859-2",urldecode($ref)));
    zamieniłem to na to co napisałeś, ale i tak nie pomaga...

    tutaj masz caly search_cloud.php

    Kod:
    <?php
    
      /*  
    	******************************************************************************
    	vB Google Search Cloud v1.0.5
    	by NeutralizeR - msxlabs.org, for vBulletin Integration, in May 2008
    	with the permission of Dan Fletcher to share @ vbulletin.org
    	******************************************************************************  	  
      	Simple Search Cloud
    	Written by Dan Fletcher, for buymyscripts.net, in April 2008
    	This script does not have resell rights!
    	You have the right to use it on your website (personal or commercial), but NOT
    	to sell it, or give it away free
    	******************************************************************************
      */
      
    require_once('./global.php');
    
    class SearchCloud
    {
    	// Varables you can set (if you want), but the defaults are fine.
    
    	var $m_minFont     = 75;   // The minimum font size. No keywords will be smaller than this. This is a %
    	var $m_maxFont     = 150;  // The maximum font size. No keywords will be bigger than this. This is a %
    	var $m_averageFont = 100;   // The font size of an average searhced for keyword. This is a %
    	var $m_maxEntries  = 50;   // Maximum number of entries displayed in the cloud
    
    	var $m_blackList   = array();   // list of disallowed words. An example is commented out below...
    	
    	//var $m_blackList   = array("sex","boob","cheatz");   
    
    	function SearchCloud()
    	{
    	}
    
    	function handlePageHit()
    	{
    		$domain = $_SERVER['HTTP_HOST'];
    	
    		$ref = $_SERVER['HTTP_REFERER'];
    
    		$datas = parse_url(iconv("utf-8","iso-8859-2",urldecode($ref)));
    	
    		$queryValues = $datas['query'];
    		$hostname = $datas['host'];
    	
    		if (strpos($hostname,".google."))
    		{
    			parse_str($queryValues,$values);
    		
    			$search=$values['q'];
    			$pageURL = $this->_getURL();
    
    			if (strlen($search)>0)
    			{
    				$this->_logHit(strtolower($search),$pageURL);		
    			}
    		}
    	}
    
    
    	function _getURL()
    	{
    		$s = empty($_SERVER["HTTPS"]) ? ''
    			: ($_SERVER["HTTPS"] == "on") ? "s"
    			: "";
    		$protocol = $this->_strleft(strtolower($_SERVER["SERVER_PROTOCOL"]), "/").$s;
    		$port = ($_SERVER["SERVER_PORT"] == "80") ? ""
    			: (":".$_SERVER["SERVER_PORT"]);
    		return $protocol."://".$_SERVER['SERVER_NAME'].$port.$_SERVER['REQUEST_URI'];
    	}
    	function _strleft($s1, $s2)
    	{
    		return substr($s1, 0, strpos($s1, $s2));
    	}
    
    	function getMysqlReadyString($a)
    	{
    		
    		if(get_magic_quotes_gpc())
    		{
    			$tmp = stripslashes($a);
    		}
    		else
    		{
    			$tmp = $a;
    		}
    		return mysql_real_escape_string($tmp);
    	}
    
    
    	function _validKeyword($k)
    	{
    		if (!(strpos($k,"site:") === FALSE))
    		{
    			return FALSE;
    		}
    
    		foreach ($this->m_blackList as $w)
    		{
    			if (!(strpos($k,$w) === FALSE))
    			{
    				return FALSE;
    			}
    		}
    
    
    		return TRUE;
    	}
    
    	function _logHit($search,$pageURL)
    	{
    		global $vbulletin;
    		$pageURL = $this->getMysqlReadyString($pageURL);
    		$search = $this->getMysqlReadyString(trim($search));
    
    		if (!$this->_validKeyword($search))
    		{
    			return;
    		}
    
    
    		$sql = $vbulletin->db->query_read("SELECT hits FROM " . TABLE_PREFIX . "google_searches where kw='$search'");
    		$rec = $sql or die($vbulletin->db->error());
    
    		if ($vbulletin->db->num_rows($rec)==0)
    		{
    			$sql = $vbulletin->db->query_write("INSERT into " . TABLE_PREFIX . "google_searches VALUES ('$search','$pageURL',1)");
    			$rec = $sql or die($vbulletin->db->error());
    		}
    		else
    		{
    			$datas = $vbulletin->db->fetch_row($rec);
    			$count = $datas[0];
    			$count++;
    			$sql = $vbulletin->db->query_write("UPDATE " . TABLE_PREFIX . "google_searches set url='$pageURL',hits=$count where kw='$search'");
    			$rec = $sql or die($vbulletin->db->error());
    		}
    
    	}
    
    
    	function showCloud()
    	{
    		global $vbulletin;
    		$maxEntries = $this->m_maxEntries;
    	
    		$sql = $vbulletin->db->query_read("SELECT * FROM " . TABLE_PREFIX . "google_searches order by hits DESC limit $maxEntries");
    		$rec = $sql or die($vbulletin->db->error());
    
    		$numRows = $vbulletin->db->num_rows($rec);
    		if ($numRows == 0)
    		{
    		    return;
    		}
    
    		while ($datas = $vbulletin->db->fetch_array($rec))
    		{
    			$d[] = $datas;
    		}
    
    		$minFont=$this->m_minFont;
    		$maxFont=$this->m_maxFont;
    		$averageFont=$this->m_averageFont;
    
    		usort($d,_cmpKw);
    		$count=0;
    		foreach ($d as $datas)
    		{
    		    $sum += $datas['hits'];
    		    $count++;
    		}
    
        $avg = ($count == 0) ? 1 : $sum / $count;
    
    		foreach ($d as $datas)
    		{
    			if (!$this->_validKeyword($datas['kw']))
    			{
    				continue;
    			}
    
    			$a = $datas['hits'] / $avg;
    
    			$fontSize = ceil($a * $averageFont);
    
    			if ($fontSize < $minFont)
    		  {
    				$fontSize = $minFont;
    		  }
    			if ($fontSize > $maxFont)
    		  {
    				$fontSize = $maxFont;
    		  }		  
    			$searchcloud .= " <a href=\"".$datas['url']."\" style=\"font-size:".$fontSize."%\">".$datas['kw']."</a>";		
    		}			
        return $searchcloud;
    	}
    };
    
    function _cmpKw($a,$b)
    {
    	return strcmp($a['kw'],$b['kw']);
    }
    
    ?>


  8. #28
    Awatar Slateer
    Slateer jest nieaktywny Użytkownik
    Dołączył
    Oct 2009
    Posty
    97

    Domyślnie

    Bardzo bym prosił o dostosowanie tego moda pod polskie forum na vb4.0.3.

    Będę bardzo wdzięczny, a przy najbliższej okazji postawie piwko za pomoc.


  9. #29
    Awatar Slateer
    Slateer jest nieaktywny Użytkownik
    Dołączył
    Oct 2009
    Posty
    97

    Domyślnie

    reffffffffffffffff


  10. #30
    Marek jest nieaktywny Banned
    Dołączył
    May 2008
    Przegląda
    Where my hat is
    Posty
    0
    Przydatne posty
    26

    Domyślnie

    Cytat Zamieszczone przez Slateer Zobacz posta
    Będę bardzo wdzięczny, a przy najbliższej okazji postawie piwko za pomoc.
    Ale takiej okazji na pewno nie będzie


Podobne wątki

  1. Tag Cloud - Polskie znaki
    By Krisuuu in forum Pytania i problemy
    Odpowiedzi: 2
    Ostatni post / autor: 25.12.2010, 13:42
  2. Odpowiedzi: 68
    Ostatni post / autor: 20.01.2010, 12:03
  3. vB Google Search Cloud - brak polskich znaków
    By Krisuuu in forum Pytania i problemy
    Odpowiedzi: 1
    Ostatni post / autor: 29.12.2009, 03:33
  4. Zniknął search cloud po zmianie stylu
    By baciarek in forum Pytania i problemy
    Odpowiedzi: 0
    Ostatni post / autor: 12.12.2009, 12:57
  5. Live search
    By Ctrl in forum Pytania i problemy
    Odpowiedzi: 1
    Ostatni post / autor: 02.10.2008, 06:23
Chmurka.pl

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67