HOW TO change the day link in Monthly View?

Talk and info about common issues and learn how to do almost anything with ApPHP Calendar

Moderator: alexandrleonenko

Site Admin
Site Admin
Posts: 6028
Joined: Jan 7th, '09, 23:18

HOW TO change the day link in Monthly View?

Postby administrator » Jun 10th, '12, 15:49

To change the day link or customize it you have to perform following:

1. Open calendar.class.php file and find DrawMonth() method.

2. In this method find all links that have following format (they appear at least 3 times):

Code: Select all

<a href="javascript:__doPostBack(\'view\',\'daily\',\''.$year.'\',\''.$month.'\',\''.$this->ConvertToDecimal($actday).'\')">'.$actday.'</a>

3. Now change the href='' attribute or link value according to your needs.
For example:

Code: Select all

<a href="javascript:document.location.href=\'events_description.php?date='.$year.'-'.$month.'-'.$this->ConvertToDecimal($actday).'\'>'.$actday.'</a>

That's all!

Return to “ApPHP Calendar {HOW TO}”