Go Back   Pligg CMS Forum > Pligg Development > Bug Report

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 10-23-2006, 03:39 AM
New Pligger
 
Join Date: Feb 2006
Posts: 16
Thanks: 2
Thanked 0 Times in 0 Posts
Exclamation 8.2 Category names in Sidebar using UTF-8

I use Greek characters [UTF-8] in my Pligg installation and work everything [Tags, Category links under the post, etc] fine, except of the names of the Categories in the sidebar.
When i use UTF8 in Category names then the link of a Category in the sidebar [and only there] is like this: http://site.com/index.php?category=
instead of http://site.com/index.php?category=Τεχνολογία
[Τεχνολογία=Technology]

[this happens with both templates so i suppose that is a core problem]

I need your help so to build the first Pligg site in Greece PLEASE!!
Thank you!
Reply With Quote
  #2 (permalink)  
Old 10-26-2006, 09:32 AM
New Pligger
 
Join Date: Feb 2006
Posts: 16
Thanks: 2
Thanked 0 Times in 0 Posts
Any Help On This???
PLS...
Reply With Quote
  #3 (permalink)  
Old 10-28-2006, 02:37 AM
athle's Avatar
Casual Pligger
 
Join Date: Oct 2006
Posts: 54
Thanks: 5
Thanked 26 Times in 6 Posts
you can use the category_safe_name as the link of the category。

in other language i thought category_id is the best way to solve the problem。(this may modify "link.php" in libs and change the template files )
Reply With Quote
The Following User Says Thank You to athle For This Useful Post:
  #4 (permalink)  
Old 10-28-2006, 03:24 AM
New Pligger
 
Join Date: Feb 2006
Posts: 16
Thanks: 2
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by athle View Post
you can use the category_safe_name as the link of the category。

in other language i thought category_id is the best way to solve the problem。(this may modify "link.php" in libs and change the template files )
THANK YOU VERY MUCH!
is it possible to make the changes and send me the files?
if yes tell me your email to send you some $ via Paypal.
Reply With Quote
  #5 (permalink)  
Old 10-29-2006, 01:41 AM
athle's Avatar
Casual Pligger
 
Join Date: Oct 2006
Posts: 54
Thanks: 5
Thanked 26 Times in 6 Posts
Smile

there is the method
1. replace this code in file libs/link.php
Code:
		global $URLMethod;
		//if ($URLMethod == 1)
		//{$catvar = $this->category;}
		//if ($URLMethod == 2)
		{$catvar = $this->category_safe_name();}
with this code
Code:
		global $URLMethod;
		//if ($URLMethod == 1)
		{$catvar = $this->category;}
		//if ($URLMethod == 2)
		//{$catvar = $this->category_safe_name();}
2. find the sidebar_modules/categories.tpl in your template folder
search the code
Code:
<a href='{$cat_url}{$categorylist[nr].category_safe_name}'>
replace it with
Code:
<a href='{$cat_url}{$categorylist[nr].category_id}'>
3. open the index.php and shakeit.php in line 24
replace this
Code:
if(isset($_REQUEST['category'])){$thecat = $db->get_var("SELECT category_name FROM categories WHERE `category_safe_name` = '".$_REQUEST['category']."';");}
with
Code:
if(isset($_REQUEST['category'])){$thecat = $db->get_var("SELECT category_name FROM categories WHERE `category_id` = '".$_REQUEST['category']."';");}
there still maybe have some bug. but i thought it's the better method for us who use the utf-8 as the charset.

at the end, i upload the files i have already modified. you can use this files to replace you files.

my email is athlechina@gmail.com ,if you find other bugs of it please tell me.

this code i have used in www.athle.cn, but it's a chinese website.
Attached Files
File Type: zip pligg.zip (15.2 KB, 21 views)

Last edited by athle; 10-29-2006 at 01:45 AM..
Reply With Quote
The Following 2 Users Say Thank You to athle For This Useful Post:
Reply

Thread Tools
Display Modes
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Similar Threads
Thread Thread Starter Forum Replies Last Post
Control of meta description - categories Divisive Cotton Suggestions 64 11-23-2008 07:37 PM
How to remove category names like "general" from url ibbpero Customization Assistance 0 08-03-2008 02:52 PM
Show Top Stories by Category in Sidebar - A How To TrailofDead Modification Tutorials 0 04-23-2007 09:30 PM
category related sidebar stories Andtony Modification Tutorials 0 04-07-2007 10:55 AM
non-english category names NEC Bug Report 6 02-16-2007 09:08 AM


Search Engine Friendly URLs by vBSEO 3.2.0