 | |  | | | Photopost Pro Bug Reports Post post installation PhotoPost Pro problems here. |
November 27th, 2006, 09:49 AM
|
#1 (permalink)
| | Junior Member Verified Customer
Join Date: Nov 2006
Posts: 14
| Correct encoding in showframe.php
I've added a line after "authenticate();" in showframe.php to fix the problem with AJAX and encoding, as I am using windows-1251:
header ("Content-Type: text/html; charset=windows-1251");
This way the problem with cyrillic and photopost/ajax has been resolved.
Maybe it will be very nice if the header encoding in showframe.php is changed by the maintainers in the next releases. So that I may not need to modify the script again. 10x
|
| |
November 27th, 2006, 10:08 AM
|
#2 (permalink)
| | Photopost Developer Verified Customer
Join Date: Jun 2002 Location: Abingdon,MD
Posts: 71,941
|
Your just doing arbitrary code patch's trying to patch in things using some other language that is not included in our distro.
The meta tag to say what charset is loaded is right at the top of the language file the program uses. The language file is located in the languages directory. If you properly create your own language file you can load your own language and its charset. |
| |
November 27th, 2006, 10:17 AM
|
#3 (permalink)
| | Junior Member Verified Customer
Join Date: Nov 2006
Posts: 14
|
Yes, I made a bulgarian translation, and used the correct encoding there, but the problem is with AJAX. It should has the correct headers too, and they are not included. That's why I did that patch and everything is fine now |
| |
November 27th, 2006, 10:32 AM
|
#4 (permalink)
| | Photopost Developer Verified Customer
Join Date: Jun 2002 Location: Abingdon,MD
Posts: 71,941
|
our ajax should have no bearing on charset as ajax is just loaded as part of the header as long as your charset in your language file is set to windows-1251 in the loaded language there should never be a need to hack code. It should already be set properly when the language file loads
|
| |
November 27th, 2006, 10:35 AM
|
#5 (permalink)
| | Junior Member Verified Customer
Join Date: Nov 2006
Posts: 14
|
AJAX and proper encoding is common problem I found in many sites. So the solution was to include everytime in the header of the AJAX call the correct encoding. This has solved the problem with PhotoPost too.
|
| |
November 27th, 2006, 10:40 AM
|
#6 (permalink)
| | Photopost Developer Verified Customer
Join Date: Jun 2002 Location: Abingdon,MD
Posts: 71,941
|
well the issue here is what are you trying to call this file outside Photopost or something like that cause our code works as it is designed to work and the content meta in the header does load fine.
Ajax calls still load the Photopost header and the language file is aaded through our global file and the contentmeta is loaded in the header like so Code: Content visible to verified customers only.
see those bold lines the header loads both the content meta and the ajaxcode. Code: Content visible to verified customers only.
So basically seeing how we do our header that the ajax simply refresh's a page where the content meta already loads the charset you should never have to alter code.
Your posting in our bug forum and hense I am saying there is not an issue.
|
| |
November 27th, 2006, 10:46 AM
|
#7 (permalink)
| | Junior Member Verified Customer
Join Date: Nov 2006
Posts: 14
|
Well, the first time when the page loads everything is fine. But whenever you go to an AJAX control (like show exif or more photos) the loaded html is without the correct encoding. Calendar is a mess when u press the previous or next month. When i added the correct header inside the showframe.php everything is pefect. This is why i decided to post it to the forums.
|
| |
November 27th, 2006, 10:53 AM
|
#8 (permalink)
| | Photopost Developer Verified Customer
Join Date: Jun 2002 Location: Abingdon,MD
Posts: 71,941
|
Your not posting any links to see what you mean and as I clearly posted content meta and ajax are two separate things. The content meta is loaded in your header and ajax simply refreshes a page so it has no bearing on your content meta.
I can post a couple sites here http://www.reeftalk.com/gallery http://www.viperalley.com/gallery
There is no problem with ajax I hit MORE or anything else and the page simply refresh's and different thumbnails are shown. How does the content meta play into this?
If I view the page source before and after hitting an ajax thing and every single time here is my pages charset clearly printed Code: Content visible to verified customers only.
Therefore my suggestion to you since you have created your own language we do not support is to look at what you did. Without more info here I can not respond further. The content meta and ajax are completely separate things and have nothing to do with each other at all. One should not interfere with the other and from what I see by viewing any site is there is no bearing to this.
|
| |
December 2nd, 2006, 08:10 AM
|
#9 (permalink)
| | Junior Member Verified Customer
Join Date: Nov 2006
Posts: 14
|
Sorry for long delay answer, but I was away for a while.
I believe our translation is correctly done. We have all the necessary headers in the file. Code: Content visible to verified customers only.
AJAX + showframe.php doesn't include the correct encoding without my modification in the php. Maybe there is something else wrong. Just notifying.
The same is in russian.php.
|
| |
December 2nd, 2006, 02:45 PM
|
#10 (permalink)
| | Photopost Developer Verified Customer
Join Date: Jun 2002 Location: Abingdon,MD
Posts: 71,941
|
Your page encoding should not need to change as we load the encoding in each language file.
|
| |
December 5th, 2006, 06:40 AM
|
#11 (permalink)
| | Junior Member Verified Customer
Join Date: Nov 2006
Posts: 14
|
ChuckS, thanks for your support, but I really cannot understand what you are now talking about, so I will explain once again...
The code that I posted with the correct encoding is from my language file. In my case bulgarian.php. It is the default language here on our site.
I added the header in showframe.php because the Ajax scripts DID NOT set correct encoding. That's all!
|
| |
December 5th, 2006, 07:14 AM
|
#12 (permalink)
| | Photopost Developer Verified Customer
Join Date: Jun 2002 Location: Abingdon,MD
Posts: 71,941
|
enjoy then and code it as you wish |
| |
December 5th, 2006, 10:38 AM
|
#13 (permalink)
| | Junior Member Verified Customer
Join Date: Nov 2006
Posts: 14
|
10x Chuck! Keep up the good work! I thought you might need some information about such problems. That's why the forum exists |
| | |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | | | | Thread Tools | | | | Display Modes | Rate This Thread | Linear Mode | |
Posting Rules
| You may not post new threads You may not post replies You may not post attachments You may not edit your posts HTML code is Off | | | All times are GMT -5. The time now is 10:12 AM. | |