Home N-13 News Forums Help Search
RegisterForgot password?
How to add image to post necklacesdiscou
Known bugs - 4.0.3 necklacesdiscou

Latest N-13 News 4.0.3

What is N-13 News?
Where can I get help?
Known bugs

Forums Help & Support Title / story with diferent chars and date()
Rschneider
Posted on 07 Mar 2010, 05:13:40

Access: Member
Total Posts: 15
Joined: 2010-03-03

Here I am again.

I'm working on a site that uses Portuguese language. So in Portuguese, there are some sort of punctuation on certain letters (e.g Lançamento or Fração). I use those words, and they work fine on my {story} or {shortstory}, but on the title, it gives me a different character. How can I fix that? (you can see an example here http://www.agat.com.br/noticias.php?id=4)

Now, the date/time my news are stored, are related to the date/time where my server is, which isn't the same timezone as I'm on. I did try to change the Time option at the system menu, adding a +3 to the option, but it didnt change a thing.

Thanks for your help
#2053
Chris
Posted on 07 Mar 2010, 05:26:07

Access: Admin
Total Posts: 1395
Joined: 2006-05-19

For the title not showing properly, edit functions.php, around line 134~ you'll see this

Code:
$str = str_replace("{title}",$row[title],$str); 


change that to

Code:
$str = str_replace("{title}",bbcode($row['title'],$usehtml),$str);


The timezone is in seconds, so changing it to +3 will only alter the time by 3 seconds. If you want to change it by 3 hours change it to +10800 or -10800 depending on which way you want to go.
#2054
Rschneider
Posted on 07 Mar 2010, 07:18:55

Access: Member
Total Posts: 15
Joined: 2010-03-03

Modifying the function doesn't seem to correct the problem. I still have the letters showing wrong. I tried with a new post to see, and didn't work.

The time fix worked flawless, thanks :)

thanks
#2055
Last edited by Rschneider at 2010-03-07 07:26:04 Reason:
Chris
Posted on 07 Mar 2010, 18:39:41

Access: Admin
Total Posts: 1395
Joined: 2006-05-19

Try running this query against your database using a program like phpmyadmin

Code:
ALTER TABLE `news30_story` CHANGE `title` `title` VARCHAR( 255 ) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL 


Then try adding a new article to see if it shows correctly.
#2056
Rschneider
Posted on 07 Mar 2010, 23:18:58

Access: Member
Total Posts: 15
Joined: 2010-03-03

Unfortunately it didn't work.

What is working now (wasn't before, I tested), is if I use the actual html code on the title. For example:

To get Lançamento

I type

Lançamento

It's kinda of a pain, but at least keeps me running until we can find a solution. Just to point that on the {story} part of the news, it shows correctly.

EDIT: On the actual page title (I use javascript to update the page title with the story title), it shows now the html code on the place of the actual letter (shows ç instead of ç).

thanks for the effort
#2059
Last edited by Rschneider at 2010-03-07 23:26:01 Reason:
Network-13.com © 2013