Guestbook in Hungarian
igorlaszlo wrote: Oh, yes, it works ! But only with the new messages... i guess you can change the date of the existing messages also, in the list.txt in the data folder but i prefer not to touch it until Pete confirms that it is possible and we do not lose the old messages with editing the text file...
I don't recommend editing the list.txt data file manually, as it stores entries as serialized objects and is a lot more complex then it looks. But if you are set on changing it, review this post I wrote a while back on how to do it:
www.digioz.com/forum/2-php/885-how-to-sa...-guestbook-data-file
igorlaszlo wrote: So Pete, just to summerize :
- how can we integrate GMT+1 in the code ?
- how can we change the language for the day (ie. Friday = Péntek) to Hungarian ?
- how to change the charset to UTF-8 to show the special characters like "é" ?
I thought i am ready with my website, i always find things :woohoo:
For timezone, you will have to use the "date_timezone_set" function in PHP ( list of supported timezones ):
As for changing the days of the week, you will have to use the local function:
As for UTF-8, the guestbook should already show special characters in UTF-8, but only if:
1- The guestbook script files were created as UTF-8 (which they were), and also when you edited the contents of the PHP file, you didn't change the encoding.
2- The Server tells what's the encoding of the delivered file. Usually if #1 is true, then the server renders the UTF-8, but there is a way to force the server to render UTF-8:
I. Add the following header right below each PHP opening tag in each PHP file:
II. Put a .htaccess file which contains the following in it:
III. Add the following meta to the HTML header section of the guestbook:
That should do it for you!
Pete
DigiOz Webmaster
www.digioz.com
Please Log in or Create an account to join the conversation.
- igorlaszlo
- Topic Author
- Offline
- New Member
- Posts: 15
- Thank you received: 1
thanks for your answer, i hope you had a nice trip the weekend...
So, nothing works for the moment...
To changing the days of the week, i did not try because i would not like to use it, i do not know if Boby had a succes or not...
Concerning the Time Zone, i put your code
When i want to post a test message, the system does not let me but saying the followings : "Fatal error: Call to a member function setTimezone() on a non-object in /home/igorlasz/public_html/guestbook/add.php on line 77". It corresponds exactly with your code...
Concerning the UTF-8...
I added your code
You have to know that i visualize the guesbook on my webpage in an iframe. My webpage shows special characters. Also the posted messages are well-shown. But when you see for example the label of the form : Email (Not published / Non publié), it has a "�" instead of an "é". Also, when you write a message, the confirmation text does not support the special characters... so it is something about the language file, isn't it ?
Do you still have patience to solve it ?
Please Log in or Create an account to join the conversation.
Please provide the following info:
- What is the exact version of PHP on your Server?
- What Operating System does your Server run on?
- What is your Web Server Software (Apache/IIS) and exact version?
Also, could you zip up your whole guestbook folder and send it over to me at webmaster@digioz.com?
Thanks,
Pete
DigiOz Webmaster
www.digioz.com
Please Log in or Create an account to join the conversation.