PhotoPost Photo Gallery Sales PhotoPost Sales Toll Free Phone Number
Mon-Fri 9am-4pm EST
  PhotoPost Photo Sharing Photo Gallery    Visualize community tm
| | | | | | | | |
Old November 13th, 2008, 06:08 AM   #1 (permalink)
Member
Verified Customer
 
Join Date: Nov 2008
Posts: 38
russian titles problem

Configuration:
vbGallery 2.4.3
vBulletin 3.7.4 (in 3.7.3 the same problem)
MySQL charset UTF-8 Unicode (utf8)
vbulletin charset UTF-8
From header:
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="generator" content="PhotoPost vBGallery, vBulletin 3.7.4" />

When I try upload image with russian title vbgallery cut it all except first letter.
For example: I'm upload image with title "Заголовок", after uploading I see only "З" in title. Though in description all ok...

1.JPG
2.JPG
Zakhar is offline   Reply With Quote
Old November 13th, 2008, 06:54 AM   #2 (permalink)
Registered User
 
Join Date: Aug 2005
Posts: 1,229
I had a similar problem.. but NOT at upload..
question: if you edit the title in editimage, does it allow full title?
Luc

the problem are some replacements.. strtolower etc.. functions that are not multibyte compatible. Vbulletin has replacements for those function but not for all..

Vbgallery has a problem with foreign chars (that was my problem) when truncating foreign character titles. There are several fixes that can be applied for that, using vbsubstr instead of substr functions..
But i would only touch that if you really run into the problem.

In Your case i think it could come from the strtolower function with ucwords that is not multibyte compatible.

try following:
there are 2 or 3 instances where this or similar code is used:
Code:
Content visible to verified customers only.
search for ucwords in gallery_functions.php, upload.php, gallery_imageedit.php and maybe showimage.php.. (not sure.. i'm on a laptop at work and cant see my install)
Just rem them out with // the change will be, that the titles will no longer be lowercase with first letter capitalized.
example:
Code:
Content visible to verified customers only.
Not sure if that works.. but its a try
Luc
Luciano is offline   Reply With Quote
Old November 13th, 2008, 07:30 AM   #3 (permalink)
Member
Verified Customer
 
Join Date: Nov 2008
Posts: 38
Quote:
question: if you edit the title in editimage, does it allow full title?
Luc
Yes! You new it!

Quote:
search for ucwords in gallery_functions.php, upload.php, gallery_imageedit.php and maybe showimage.php.. (not sure.. i'm on a laptop at work and cant see my install)
Just rem them out with // the change will be, that the titles will no longer be lowercase with first letter capitalized.
example:
Luciano you are great! It works! Thanks for your response!
As I understand that only thing that doing this line is capitalize the first character of each word in string $massimageinfo['title'] and nothing anymore.
right?

Do you now where all developers? It's my second quetion for 2 days and you first who answer me (thanks again!). May be need ask somewhere else?
Zakhar is offline   Reply With Quote
Old November 13th, 2008, 07:58 AM   #4 (permalink)
Photopost Developer
Verified Customer
 
Chuck S's Avatar
 
Join Date: Jun 2002
Location: Abingdon,MD
Posts: 71,938
It is early AM here so not everyone is up yet.

The problem really is vbgallery is not designed to support russian. Now in the future that could be a possibility. As Luciano suggests we rely on many PHP functions and to support certain things would need to rewrite functions to add multibyte character support.
__________________
Photopost Developer and Support Engineer

Please do not PM me for support or sales questions. Thank you for your understanding.
Chuck S is offline   Reply With Quote
Old November 13th, 2008, 08:14 AM   #5 (permalink)
Registered User
 
Join Date: Aug 2005
Posts: 1,229
Quote:
Originally Posted by Zakhar View Post
As I understand that only thing that doing this line is capitalize the first character of each word in string $massimageinfo['title'] and nothing anymore.
right?
glad it worked out
Right.. it is not very friendly for foreigh characters..

You will find another problem.. (only appears sometimes). You can have strange charachters appearing at the end of some titles (in the preview images in browseimages or elsewhere). That error comes from the fact that strlen and strpos treat multibyte characters differently if you are in UTF8 or if you are in other charset. So if the strlen of a character does not point to the real end of a russian character, the character gets truncated in the middle of that character.. => strange sign.. but it only happens if the title is longer than the length you define, and if it is a multibyte character..


the fix for that is more complicated.. and it depends on your version of PHP...
I will post a fix for that in a week or 2.. (i am off on holiday tomorow and will only be back in 10 days) I will look into it then..




Quote:
Originally Posted by Zakhar View Post
Do you now where all developers? It's my second quetion for 2 days and you first who answer me (thanks again!). May be need ask somewhere else?
Well first it takes time.. it is now only 6... AM where they are.. (here it is 3PM) so they will see your post in a couple of hours when they wake up

Luc

[EDIT] oooops as I said.. chuck got up... loool[/EDIT]
Luciano is offline   Reply With Quote
Old November 13th, 2008, 08:18 AM   #6 (permalink)
Photopost Developer
Verified Customer
 
Chuck S's Avatar
 
Join Date: Jun 2002
Location: Abingdon,MD
Posts: 71,938
Yep I am up now I am on the east coast here 9am here 6 am where the main office is.

Zahkar if your looking for a more foreign language friendly program you might want to try Photopost Pro.
__________________
Photopost Developer and Support Engineer

Please do not PM me for support or sales questions. Thank you for your understanding.
Chuck S is offline   Reply With Quote
Old November 13th, 2008, 08:50 AM   #7 (permalink)
Member
Verified Customer
 
Join Date: Nov 2008
Posts: 38
Quote:
It is early AM here so not everyone is up yet.
Yes, i know. I'm periodicaly communicate with my colleagues in US and some time it's really problematical

Quote:
The problem really is vbgallery is not designed to support russian. Now in the future that could be a possibility.
Ohh... It's ray of hope

Quote:
Zahkar if your looking for a more foreign language friendly program you might want to try Photopost Pro.
That was first that I tried, but in this case i will have more complex problems
1. different design. in vbGallery i can use child style of forum - its very useful for me..
2. Different admin panel, it's not useful for me
3. I saw problems in pro with russian more harmeful than that (As I undestend - pro version use win-1251 for russian trunslate that not multibyte charset and may be with this charset all works fine, but with utf-8 i had problems)

Chuck, may be you know answer for quetion about style in adjacent forum?
I ask you, because as I can see You are the only developer who answer
Thanks for your work!
Zakhar is offline   Reply With Quote
Old November 13th, 2008, 09:18 AM   #8 (permalink)
Photopost Developer
Verified Customer
 
Chuck S's Avatar
 
Join Date: Jun 2002
Location: Abingdon,MD
Posts: 71,938
What do you mean by style in adjacent forum?
__________________
Photopost Developer and Support Engineer

Please do not PM me for support or sales questions. Thank you for your understanding.
Chuck S is offline   Reply With Quote
Old November 13th, 2008, 09:26 AM   #9 (permalink)
Member
Verified Customer
 
Join Date: Nov 2008
Posts: 38
I mean this quetion:
http://www.photopost.com/forum/vbgal...ot-logged.html

PS. sory for my english
Zakhar is offline   Reply With Quote
Old November 13th, 2008, 09:35 AM   #10 (permalink)
Photopost Developer
Verified Customer
 
Chuck S's Avatar
 
Join Date: Jun 2002
Location: Abingdon,MD
Posts: 71,938
I will have to see if I can check that out. I do not work with vbgallery so I would need to see what I can see.
__________________
Photopost Developer and Support Engineer

Please do not PM me for support or sales questions. Thank you for your understanding.
Chuck S is offline   Reply With Quote
Old November 13th, 2008, 09:52 AM   #11 (permalink)
Member
Verified Customer
 
Join Date: Nov 2008
Posts: 38
Unfortunately I can't give you access to vbGallery because it's only test machine and does not have public access. But I can create snapshots as many as you need and give another info.
Zakhar is offline   Reply With Quote
Old November 13th, 2008, 10:24 AM   #12 (permalink)
Photopost Developer
Verified Customer
 
Chuck S's Avatar
 
Join Date: Jun 2002
Location: Abingdon,MD
Posts: 71,938
works fine from what I see read my post in other thread
__________________
Photopost Developer and Support Engineer

Please do not PM me for support or sales questions. Thank you for your understanding.
Chuck S is offline   Reply With Quote
Old February 27th, 2009, 02:30 PM   #13 (permalink)
Junior Member
Verified Customer
 
Join Date: Oct 2008
Posts: 3
support

I know it is almost a dead threat but I had a problem with the special Hungarian characters.

I hope the support team can use it for the next version.


gallery/upload.php
original:
Code:
Content visible to verified customers only.
to:
Code:
Content visible to verified customers only.
forum/includes/functions_gallery_imageedit.php
original:
Code:
Content visible to verified customers only.
to:
Code:
Content visible to verified customers only.
koconborz is offline   Reply With Quote
Old February 27th, 2009, 06:34 PM   #14 (permalink)
Photopost Developer
Verified Customer
 
Chuck S's Avatar
 
Join Date: Jun 2002
Location: Abingdon,MD
Posts: 71,938
ucwords can not be used on special languages correct. I will pass that along.
__________________
Photopost Developer and Support Engineer

Please do not PM me for support or sales questions. Thank you for your understanding.
Chuck S is offline   Reply With Quote
Old February 27th, 2009, 09:25 PM   #15 (permalink)
Registered User
 
Join Date: Aug 2005
Posts: 1,229
Quote:
Originally Posted by Chuck S View Post
ucwords can not be used on special languages correct. I will pass that along.
Neither can strtolower!!!!
which is definetely used more often than ucwords. But if you need strtolower there is a vbulletin function that can be used with specialchars: vbstrtolower(). it checks if you have mb_string extensions in php installed.. if yes it uses them.. if no it does only a stingtolower on english characters.. Didnt find any vbulletin replacement for ucwords :-(

as to
Code:
Content visible to verified customers only.
it will work with hungarian.. but can give you some unpredicted results with some languages and chars (chinese and russian.. depending if you use unicode or utf-8_general_ci in your database)

i removed all the addslashes stuff from my code for title AND description.. and just added, everywhere where title or description are added to database:
EXAMPLE:
Code:
Content visible to verified customers only.
advantage: you dont have to worry about stripslashes when getting from db...

but you will need a:
Code:
Content visible to verified customers only.
when you pull from the db (instead of stripslashes)

hope that helps someone..
Luc

Last edited by Luciano; February 27th, 2009 at 09:49 PM.
Luciano is offline   Reply With Quote
Old February 28th, 2009, 07:54 AM   #16 (permalink)
Photopost Developer
Verified Customer
 
Chuck S's Avatar
 
Join Date: Jun 2002
Location: Abingdon,MD
Posts: 71,938
Yeah thats why you really need to typecast a variable like we do in Photopost Pro

You want to addslash on adding to the database but ONLY WHEN YOU NEED TO. If its done correctly you should never have to use stripslashes.
__________________
Photopost Developer and Support Engineer

Please do not PM me for support or sales questions. Thank you for your understanding.
Chuck S is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

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
Problem with Russian names of users olga6880 Photopost Pro Bug Reports 5 December 4th, 2008 08:12 PM
Problem with Long Titles dakis Photopost Pro How Do I...? 12 December 17th, 2007 04:22 PM


All times are GMT -5. The time now is 04:11 PM.

Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0