Best of joomla gives you news, joomla templates, tutorials and websites about Joomla , FireBoard and FireMessage official page.
| No account yet?   |
The FireBoard forum component development is still going on. In order to get better, FireBoard will be moved from the Best of Joomla website.
During this transition period, the forum in Best of Joomla will be closed to new posts.
Welcome, Guest
Please Login or Register.    Lost Password?
FireBoard Manual Latest release discussions Download FireBoard
[FIX] Message Preview UTF-8 (1 viewing) (1) Guest
TOPIC: [FIX] Message Preview UTF-8
#39569
[FIX] Message Preview UTF-8 11 Months, 3 Weeks ago  
Hi,
this is a combination of a solution proposed here (with a little twist for smile support)

I'm posting here the final changes (without the original)

in file ../components/com_fireboard/fireboard.php (line 129):
[code:1]
$message = urldecode(decode_unicode_url($msgpreview));
[/code:1]

in file [i]../components/com_fireboard/fireboard.php[/i] (line 135):
[code:1]
echo $msgbody;
[/code:1]
[size=2][anything in between should stay as it was before (original 1.0.4)][/size]

somewhere in the same file (I did this at its end), add the described function:
[code:1]
function decode_unicode_url($str) //from the link provided above
{
...
}
[/code:1]


That's it - you can see this working in an Hebrew (utf-8) site: [url=http://www.datecafe.co.il/component/option,com_fireboard/Itemid,5]Date Cafe - Dating[/url]
mtk (User)
Junior Boarder
Posts: 28
graphgraph
User Offline Click here to see the profile of this user
Gender: Male MtK - Smart Internet Solution Location: BGU
Logged Logged
 
Last Edit: 2008/01/18 16:26 By mtk.
 
MtK - Smart Internet Solutions
www.smartmtk.com
 
 
#39792
Re:[FIX] Message Preview UTF-8 11 Months, 3 Weeks ago  
Thank you very much!

It is still having some wrong char display - vietnamese Unicode utf-8.


Hope it will be fixed in next released!
viet4777 (User)
Senior Boarder
Posts: 291
graphgraph
User Offline Click here to see the profile of this user
Luyenkim.NET
Logged Logged
 
Last Edit: 2008/01/19 20:16 By viet4777.
 
Luyenkim.Net
utf-8 Vietnamese language package will be complete in mid of Oct.
luyenkim.net/home9/index.php?option=com_...5&id=282#282
 
 
#39829
Re:[FIX] Message Preview UTF-8 11 Months, 3 Weeks ago  
This is weird since there is no difference between "Vietnamese Unicode UTF-8" & "Hebrew UTF-8", that's the whole ides of the Unicode name...
mtk (User)
Junior Boarder
Posts: 28
graphgraph
User Offline Click here to see the profile of this user
Gender: Male MtK - Smart Internet Solution Location: BGU
Logged Logged
 
MtK - Smart Internet Solutions
www.smartmtk.com
 
 
#49157
Re:[FIX] Message Preview UTF-8 8 Months, 3 Weeks ago  
I got this message from my friend. It solves our utf-8 problem!

I solve my problem, so I share it.

First I replace escape(content) function in bojForumCore.js->fbGetPreview(content, sitemid) to encodeURIComponent(content);. I read that it is better than old escape.

And then I replace //echo utf8_encode($msgbody); to echo $msgbody; in fireboard.php as was suggested in this thread.

Finally I replace original function urldecode as follows

$message = utf8_urldecode(utf8_decode($msgpreview));

and body of function I found on php.net
function utf8_urldecode($str) {
$str = preg_replace("/%u([0-9a-f]{3,4})/i","1;",urldecode($str));
return html_entity_decode($str,null,'UTF-8';;
}

It is work for me in encoding I use.
viet4777 (User)
Senior Boarder
Posts: 291
graphgraph
User Offline Click here to see the profile of this user
Luyenkim.NET
Logged Logged
 
Luyenkim.Net
utf-8 Vietnamese language package will be complete in mid of Oct.
luyenkim.net/home9/index.php?option=com_...5&id=282#282
 
 
Go to top