[G2] cyrillic problems in sidebar.tpl (matrix theme)
boyan7640
Joined: 2006-05-10
Posts: 5 |
Posted: Wed, 2006-05-10 15:57 | |||
OK, hello to all. I have some small cyrillic problems in my sidebar. I have got cyrillic characters in my gallery names and this part of code doesn't show them correctly: Quote:
{foreach from=$theme.params.sidebarBlocks item=block} Everything is OK in my PostgreSQL database and I use UTF-8 encoding in it and default charset in apache2. The webpage is also UTF encoded. I am using bulgarian translation. The strange thing is that first part of this code work and show me correctly admin system menu for adding album, photo, edit and so on. But the second part of the sidebar ("Links to album/photo peers"), album hierarchy, is BAD. I made a screenshot for you friends. I don't know where to search in the code about this error. [img]http://www.boyan-bg.com/images/misc/2006-05-10/Screenshot.png[/img] OK, I hope for your help! Thanks!
|
||||
Posts: 5
OK, I found this but it couldn't help me to solve the problem!
http://sourceforge.net/tracker/?group_id=7130&atid=107130&func=detail&aid=1164831
If someone see the error please write!
Posts: 5
OK, I found the problem in the core template in Gallery2 and more precisely in modules/core/templates/blocks/PeerList.tpl !
There are two smarty tags like this:
They must be change to this:
Don't have time to completely undestand the problem (somewhere in smarty markup or strip, or entitytruncate).
I hope this will help to someone because I lost too much time to find it!
Posts: 8601
I did a quick test and couldn't reproduce this.. more likely the problem is with entitytruncate and not markup:strip. If you can post your system info and the exact bytes of one such item title that has this problem, we might be able to track it down. But if your workaround is working, that's good.
Posts: 5
OK, you are right mindless. The markup:strip is not the problem but entitytruncate. I made a test and everything looks great with this:
OK, this is my system info:
I didn't understand this in your post:
Thank you!
Posts: 8601
Put this at the top of themes/{yourtheme}/templates/photo.tpl
Now visit a photo that would get its title improperly truncated (before your fix) and you'll see a bunch of "int(..)" strings on the page. Post those here.
Posts: 5
The problem is not in photo.tpl, but in sidebar.tpl and more precisely in modules/core/templates/blocks/PeerList.tpl !
I put this php code there and this is the result with entitytruncate (original) for photo with whole title "Язовира в местност:Туричка Черква (в заден план вр.Синаница)":
The same result with truncate(my fix) except the first row of course:
OK, don't bother too much mindless, maybe the problem is only in my gallery, not big deal. Thank you for your efforts!
Posts: 8601
Thanks.. I created $testStr with those bytes and couldn't reproduce the problem.
Resulting output was:
Maybe entitytruncate would work for you on a different PHP version or something.. otherwise your workaround is ok i guess.