Turkish Pligg Users Websites Fall Down - Help US

Register an Account
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old 09-10-2008, 11:36 PM
amsy's Avatar
New Pligger
Pligg Template: TheMissingpiec
 
Join Date: Jul 2007
Location: İstanbul
Posts: 20
hey people ...anyone help the turkish people...We need the source about the pligg...Someone help us ?? Turkish Pligg users sites down...because we don't know anything about the pligg...

We are trying the learn everything from the here but this is not enough...

Please help us...

especially turkish character problem...

Our tag is not working...

for example:
özlem , çimen, üzüm

Thats tags not work..especially "ö" "ç" "ü" character

I was do this:
PHP Code:
PHP Code:
$output str_replace("ç""c"$output); 
$output str_replace("ü""u"$output); 
$output str_replace("ö""o"$output); 
and this :


PHP Code:
// function makeCategoryFriendly has been moved to admin_categories.php

function remove_error_creating_chars($chars) { 
    
$replace=array( 
    
'ç' => 'c',
    
'ü' => 'u',
    
'ö' => 'o',
    
'Ç' => 'c',
    
'Ü' => 'u',
    
'Ö' => 'o'
"ı ğ ü ş" character is work our tags but this "ç ü ö" characters not work in the tag...

Please help US PLİGG TEAM...
Reply With Quote
  #2 (permalink)  
Old 09-11-2008, 06:54 AM
ozlegolas's Avatar
Casual Pligger
Pligg Version: 1.0.4
 
Join Date: Apr 2008
Posts: 55
try this:
PHP Code:
$replace_what = array("ç","ğ","ı","ö","ş","ü");
$replace_with = array("c","g","i","o","s","u");
$word_safestr_ireplace($replace_what,$replace_with,$word); 
Reply With Quote
  #3 (permalink)  
Old 09-11-2008, 07:04 AM
ozlegolas's Avatar
Casual Pligger
Pligg Version: 1.0.4
 
Join Date: Apr 2008
Posts: 55
You can look at this topic for this issue
Reply With Quote
  #4 (permalink)  
Old 09-11-2008, 10:52 AM
amsy's Avatar
New Pligger
Pligg Template: TheMissingpiec
 
Join Date: Jul 2007
Location: İstanbul
Posts: 20
thanks body,

but if you try this not work...İf want to submit a new story I'm dispilaying this eroor message:
Quote:
Warning: Unknown column 'tag_safe' in 'field list' in /home/webburda/public_html/libs/db.php on line 233

Warning: Unknown column 'tag_safe' in 'field list' in /home/webburda/public_html/libs/db.php on line 233

Warning: Unknown column 'tag_safe' in 'field list' in /home/webburda/public_html/libs/db.php on line 233
Reply With Quote
  #5 (permalink)  
Old 09-11-2008, 11:32 AM
ozlegolas's Avatar
Casual Pligger
Pligg Version: 1.0.4
 
Join Date: Apr 2008
Posts: 55
You have to create a new column named tag_safe in database.
Reply With Quote
  #6 (permalink)  
Old 09-11-2008, 11:40 AM
Yankidank's Avatar
Pligg Founder/Coder/Designer
Pligg Version: SVN
Pligg Template: Wistie
 
Join Date: Dec 2005
Location: Ocala, FL
Posts: 4,934
Send a message via AIM to Yankidank
Ozlegolas, if you are able to help us out we would be glad to add some changes to the Pligg core to make Pligg more multi-lingual friendly. Please let us know specifically what we can do to help out and we will apply your changes for the next release.

The Twitter Module for Pligg CMS!
Register, Login, and Submit Stories with Twitter. An absolute MUST HAVE for all Pligg sites!
Reply With Quote
  #7 (permalink)  
Old 09-11-2008, 11:46 AM
ozlegolas's Avatar
Casual Pligger
Pligg Version: 1.0.4
 
Join Date: Apr 2008
Posts: 55
Quote:
Ozlegolas, if you are able to help us out we would be glad to add some changes to the Pligg core to make Pligg more multi-lingual friendly. Please let us know specifically what we can do to help out and we will apply your changes for the next release.
I am not a guru in php, I have done some changes to the core applying the things written in forum for 4-5 months and this is a long time to remember exactly what files I changed, but I'm ready to help you as much as I can do

Last edited by ozlegolas; 09-11-2008 at 11:58 AM.
Reply With Quote
  #8 (permalink)  
Old 09-11-2008, 12:05 PM
ozlegolas's Avatar
Casual Pligger
Pligg Version: 1.0.4
 
Join Date: Apr 2008
Posts: 55
The thread which I referred solves tag localization problem, but still there are turkish chars in tag url and this causes weird urls contain chars like %. I solved this problem, but as I mentioned before I don't remember exactly what I changed for this issue, however I can share my files if it helps.
Reply With Quote
  #9 (permalink)  
Old 09-11-2008, 12:39 PM
amsy's Avatar
New Pligger
Pligg Template: TheMissingpiec
 
Join Date: Jul 2007
Location: İstanbul
Posts: 20
Quote:
Originally Posted by ozlegolas View Post
I am not a guru in php, I have done some changes to the core applying the things written in forum for 4-5 months and this is a long time to remember exactly what files I changed, but I'm ready to help you as much as I can do

Not work again:

1: I was create table same this:

Code:
alter table pligg_tags add column tag_safe varchar(30)
2:this my tag.php code:

Code:
function tags_insert_string($link, $lang, $string, $date = 0) {
	global $db;

	$string = tags_normalize_string($string);
	if ($date == 0) $date=time();
	$words = preg_split('/[,;]+/', $string);
	if ($words) {
		$db->query("delete from " . table_tags . " where tag_link_id = $link");
		foreach ($words as $word) {
			$word=trim($word);
            //************************************************************
            //SAFE words
              $replace_what = array("ç","ğ","ı","ö","ş","ü","Ö","Ş","Ü");
              $replace_with = array("c","g","i","o","s","u","O","S","U");
              $word_safe= str_ireplace($replace_what,$replace_with,$word);
              
              
            //*******************************************************
			if (!$inserted[$word] && !empty($word)) {
    
				$db->query("insert into " . table_tags . " (tag_link_id, tag_lang, tag_words, tag_safe,tag_date) values ($link, '$lang', '$word','$word_safe', from_unixtime($date))");
				$inserted[$word] = true;
			}
		}
		return true;
	}
	return false;

}

3.this my search.php

Code:
function get_search_clause($option='') {
		if(!empty($this->searchTerm)) {
			// make sure there is a search term
            //change to search
			$words = $this->searchTerm;
			$SearchMethod = SearchMethod; // create a temp variable so we can change the value without possibly affecting anything else

			if($this->isTag == true){
				// search the tags table
				$this->searchTable = table_tags . " INNER JOIN " . table_links . " ON " . table_tags . ".tag_link_id = " . table_links . ".link_id";
				
				// thanks to jalso for this code
					$x = explode(",",$words);
					$sq .= "(";
					foreach($x as $k=>$v){
                    //**************************************************************** 
                        
                                                       
                        $replace_what = array("ú","ó","é","ý","š","á","í","á","e","š","c","r","z","y","á","í","é","n","t","d","ó","ç","ğ","ı","ö","ş","ü");
                        $replace_with = array("u","o","e","y","s","a","i","a","e","s","c","r","z","y","a","i","e","n","t","d","o","c","g","i","o","s","u");
                        $word_safe= str_ireplace($replace_what,$replace_with,trim($x[$k]));
                        
                        
                    
					 $sq .= "tag_safe = '".$word_safe."'";
					//*************************************************************************************   
                       
					 if($k != (count($x) - 1))$sq .= " OR ";
					}
					$sq .= ")";
                
					$where .= " AND ".$sq." GROUP BY " . table_links . ".link_id, `link_votes` ORDER BY `link_votes` DESC"; 
				
				// ---

this tags looking like this in the phpmyadmin into tag_safe table:




I'm starting the boring.ufffffff

Last edited by amsy; 09-11-2008 at 01:00 PM.
Reply With Quote
  #10 (permalink)  
Old 09-11-2008, 12:57 PM
ozlegolas's Avatar
Casual Pligger
Pligg Version: 1.0.4
 
Join Date: Apr 2008
Posts: 55
This hack is for not to get a null value when you click a tag contains special chars. If you expect not to have tag urls contain special chars like "http://mysite.com/tag/çevre", this hack is not for that. Could you say what the problem is exactly?
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Ok I set up Pligg now what? chuckroast Wiki Articles 3 05-26-2011 05:28 PM
Pligg integration with SMF Forum autoinc Questions and Comments 66 08-27-2010 04:04 AM
Pligg 1.0.0 RC3 Yankidank Current Version 2 04-02-2009 12:21 PM
Pligg 1.0.0 RC2 Yankidank Current Version 1 04-02-2009 12:21 PM
Can users submit word documents to a Pligg site? legalbeavers Questions and Comments 2 04-23-2008 02:55 AM


Pligg Modules and Pligg Templates from Pligg Pro Find support on the Pligg CMS Forum - 24 hours a day! Make a donation to support Pligg CMS development