My real sites

It would be great to see the calendar in action. Post your links here (preferably direct to the calendar). I may well add these links to a page in the actual Ajax Availability Calendar website if I consider them to be interesting implementations (ie due to the styling or for actual use)

Re: My real sites

Postby chst » Sun Jun 13, 2010 8:57 pm

Hello rcph,
give me a hint how you work out with encoding characters. In polish language i've same problems with characters like in czech lang i think.

One more, tell me please how you get two-letter shortcut of day name (instead of 1 letter shortcut) in top of month calendar?

Best regards, Chst.
Posts: 2
Joined: Sun Jun 13, 2010 8:16 pm
Location: Poland

Re: My real sites

Postby rcph » Sun Jul 04, 2010 11:32 pm

Hi, I'm sorry, I've been here a long time. For proper viewing diacritics must be set for all files!!! that are encoded in UTF-8.
You must edit the file
Code: Select all
if($k==7)    $weekday = substr($lang["day_0"][0],0,2);
else      $weekday = substr($lang["day_".$k.""],0,2);

Posts: 31
Joined: Thu Feb 07, 2008 11:58 am
Location: Czech republic

Re: My real sites

Postby mtnliving » Mon Dec 20, 2010 7:09 am

Hi Chris, Thanks for a great easy to use Availability Calendar. I recently took over programming a site for a family member to help him save money while I learn the programming. So I am a novice and was very happy to find this easy to use free calendar. I will donate a few dollars, sorry won't be more, but recently out of work like many others. Anyways wanted to share how I used it in the site. I can at least contribute that much and answer any questions. Thanks again! :) ... &Itemid=55
Posts: 2
Joined: Mon Dec 20, 2010 6:33 am

Encoding problem - substr

Postby andrijana » Thu Jul 14, 2011 1:24 pm

Hello. I had similar/same problem that I have just fixed. Posting here as have not seen this solution in forum.

ajaxcal 1.jpg
ajaxcal 1.jpg (87.39 KiB) Viewed 8789 times

ajaxcal 2.jpg
ajaxcal 2.jpg (87.95 KiB) Viewed 8789 times

You can see that the problem was specific to substr function, and it wasn't the problem with general encoding.

Solution was to change from substr to mb_substr function in file. mb_substr is needed to be able to substring texts with multibyte encodings. No idea if this is good long-term solution (I am not much of a programmer) but it works now :)

< $weekday = mb_substr($lang["day_".$k.""],0,1,'utf-8');
> $weekday = substr($lang["day_".$k.""],0,1);
< if($k==7) $weekday = mb_substr($lang["day_0"][0],0,1,'utf-8');
< else $weekday = mb_substr($lang["day_".$k.""],0,1,'utf-8');
> if($k==7) $weekday = substr($lang["day_0"][0],0,1);
> else $weekday = substr($lang["day_".$k.""],0,1);
Posts: 1
Joined: Thu Jul 14, 2011 1:05 pm


Return to Live Sites

Who is online

Users browsing this forum: No registered users and 1 guest