Special character / Umlaut / accent Tag issue solved

Register an Account
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old 03-22-2008, 01:51 PM
New Pligger
 
Join Date: Aug 2007
Posts: 2
for all those non-english pligg installations:

file: /search.php
Code:
// breadcrumbs and page title
$navwhere['text1'] = $main_smarty->get_config_vars('PLIGG_Visual_Breadcrumb_Search') . urldecode(stripslashes($search->searchTerm));
$navwhere['link1'] = getmyurl('search', urlencode($search->searchTerm));
$main_smarty->assign('navbar_where', $navwhere);
$main_smarty->assign('posttitle', " / " . $main_smarty->get_config_vars('PLIGG_Visual_Breadcrumb_Search') . urldecode(stripslashes($search->searchTerm)));
file: /libs/search.php
Code:
	function get_search_clause($option='') {
		if(!empty($this->searchTerm)) {
			// make sure there is a search term
			$words = $this->searchTerm;
			$words = urldecode($words);
file: /libs/html1.php
Code:
	if ($URLMethod == 1) {
... cutted
		If ($x == "tag") {return my_pligg_base."/search.php?search=" . urlencode($var1) . "&tag=true";}
		If ($x == "tag2") {return my_pligg_base."/search.php?search=" . urlencode($var1) . "&tag=true&from=" . urlencode($var2);}
	}
	if ($URLMethod == 2) { 
... cutted
		If ($x == "tag") {return my_pligg_base."/tag/" . urlencode($var1);}
		If ($x == "tag2") {return my_pligg_base."/tag/" . urlencode($var1) . "/" . urlencode($var2) . "/";}
file: /templates/yourtemplate/search_center.tpl
Code:
{if $templatelite.get.search neq ""}
	<h2 class="title">{#PLIGG_Visual_Search_SearchResults#} {$templatelite.get.search|sanitize:2|stripslashes|urldecode}</h2>
{/if}
{if isset($templatelite.get.q)}
	<h2 class="title">{#PLIGG_Visual_Search_SearchResults#} {$templatelite.get.q|sanitize:2|stripslashes|urldecode}</h2>
{/if}
file: /templates/yourtemplate/pligg.tpl
Code:
<div class="search">
{if $templatelite.get.search neq ""}
	{assign var=searchboxtext value=$templatelite.get.search|sanitize:2|urldecode}
{else}
hope this helps!
for me this works now... it's an ugly hack but the whole pligg code seems to be one as well! at least regarding internationalization...

Last edited by geneticwaste; 03-22-2008 at 02:03 PM.
Reply With Quote
  #2 (permalink)  
Old 03-22-2008, 01:54 PM
Constant Pligger
 
Join Date: Apr 2007
Posts: 1,042
Your system runs with UTF-8 (default) and you don´t have any problems with stories, RSS feeds and tags using this characters?

Sounds better than real!
Reply With Quote
  #3 (permalink)  
Old 03-22-2008, 02:07 PM
New Pligger
 
Join Date: Aug 2007
Posts: 2
didn't change it, so it still must be utf-8.
haven't looked at stories and rss feeds so far. but i guess it all has to do with the missing urlencoding in the file html1.php! it's really bad that variables assigned to urls don't get encoded!
and additionally of course one has to find all the functions where the variables get outputed and apply "urldecode".

edit:
just checked: stories work with umlauts in the title out of the box, didn't have to change anything (and it's certainly not because of my hack)

Last edited by geneticwaste; 03-22-2008 at 02:14 PM.
Reply With Quote
  #4 (permalink)  
Old 03-22-2008, 03:09 PM
Constant Pligger
 
Join Date: Apr 2007
Posts: 1,042
Please check it with tags an feeds (esp. Internet Explorer). This would solve a long lasting problem of mine.

P.S.: If you´re interested in that stuff: Here´s a sketch of mine how to use the special characters for user names. I´m not a coder, therefore just a sketch. (http://forums.pligg.com/bug-report/1...ves-404-a.html)

Last edited by tbones; 03-22-2008 at 03:14 PM.
Reply With Quote
  #5 (permalink)  
Old 05-21-2008, 07:27 PM
New Pligger
 
Join Date: May 2008
Posts: 5
For me this doesn' t work. This is all real funny to me. Seems that the author is a nationalist and wants the world speak english only! !LOL!
Reply With Quote
  #6 (permalink)  
Old 06-24-2008, 12:41 PM
Casual Pligger
 
Join Date: Apr 2007
Location: Arlington, Virginia
Posts: 47
Except that Pligg is derived from Meneame, coded by a Spanish-speaker. And Spanish does use a few special characters/diacritics.

Quote:
Originally Posted by kimock View Post
For me this doesn' t work. This is all real funny to me. Seems that the author is a nationalist and wants the world speak english only! !LOL!
Reply With Quote
  #7 (permalink)  
Old 07-17-2009, 11:13 PM
iamstraggler's Avatar
New Pligger
Pligg Version: 1.0.0
Pligg Template: Thestandard
 
Join Date: Jul 2009
Location: Shenzhen
Posts: 5
I still have this problem.
Version:Plig 1.0.0
Template:Yankidank's Standard
Language: Chinese

Help!
Reply With Quote
  #8 (permalink)  
Old 07-18-2009, 01:00 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
iamstraggler: this is an old thread that you dug up. Could you open up a new one with more details and examples of your problem?

The Twitter Module for Pligg CMS!
Register, Login, and Submit Stories with Twitter. An absolute MUST HAVE for all Pligg sites!
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Pligg 1.0 > RSS Importer > replace special character martinjunker Questions and Comments 2 03-31-2011 03:06 PM
welcome_email Special character problem xiesi Questions and Comments 3 05-11-2008 11:15 PM
Special character problems in RSS and mail subject ditto Questions and Comments 8 04-22-2008 05:28 PM
Special character difference in tag / search Ghool Questions and Comments 2 01-27-2008 08:34 PM
Hungarian special character problem boomo Questions and Comments 8 06-07-2007 10:25 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