[!Ditto? startID=`id____` &summarize=`100` &format=`json` &dateFormat=`%d-%m-%Y` &sortDir=`desc`!]
[!DittoCal? &calSource=`_./blog-json-output` &dayNameLength=`1`!]
$title = htmlentities(ucfirst($month_name)).' '.$year; #note that some locales don't capitalize month and day names
switch(ucfirst($month_name))
{
case "January": $title=""; break;
case "February": $title=""; break;
case "March": $title=""; break;
case "April": $title=""; break;
case "May": $title=""; break;
case "June": $title=""; break;
case "July": $title=""; break;
case "August": $title=""; break;
case "September": $title=""; break;
case "October": $title=""; break;
case "November": $title=""; break;
case "December": $title=""; break;
}
$title.=' '.$year;
foreach($day_names as $d)
$calendar .= ''.htmlentities($day_name_length < 4 ? substr($d,0,$day_name_length) : $d).'';
$calendar .= '';
$calendar .= '';
$calendar .= '';
$calendar .= '';
$calendar .= '';
$calendar .= '';
$calendar .= '';
/*********************************************
CSS
*********************************************/
table.calendar {
width: 182px;
padding: 0px;
margin: 0px auto;
margin-bottom: 5px;
border-left: 1px solid #A2ADBC;
font: bold 12px/20px;
text-align: center;
background-color: #EEE;
color: #888888;
}
.calendar-prev, .calendar-prev a, .calendar-next, .calendar-next a {
font-size: 24px;
text-align: center;
text-decoration: none;
}
caption.calendar-month {
margin: 0px auto;
margin-top: 5px;
padding: 5px 0px;
width: 182px;
color: #8e2c3a;
font-size: 18px;
text-align: center;
}
table.calendar th {
font-size: 16px;
color: #616B76;
width: 26px;
height: 25px;
border-right: 1px solid #A2ADBC;
border-bottom: 1px solid #A2ADBC;
border-top: 1px solid #A2ADBC;
text-align: center;
}
table.calendar td {
border-right: 1px solid #A2ADBC;
border-bottom: 1px solid #A2ADBC;
width: 26px;
height: 25px;
text-align: center;
}
table.calendar td a {
text-decoration: none;
font-weight: bold;
display: block;
font-size:100%;
}
table.calendar td a:link, table.calendar td a:visited {
color: #000;
}
table.calendar td a:hover, table.calendar td a:active {
color: #8e2c3a;
}
&calSource
: ,
: [ URI ]
: , (.. : www.mysite.ru/blog-json-output)
&linkClass
: cal_link
: [ string ]
: (td), .
&dayNameLength
: 3
: [ 0 | 1 | 2 | 3 | 4 ]
: (4 - ).
&firstDay
: 0
: [ 0 | 1 | 2 | 3 | 4 | 5 | 6 ]
: . 0=, 1=, ....
&showPn
: 1
: [ 0 | 1 ]
: / .
&debug
: 0
: [ 0 | 1 ]
: , 1 - .
&ph
: cal_link
: [ string ]
: , .
&activeDay
: curDay
: [ string ]
: , .
Source: https://habr.com/ru/post/91062/
All Articles