- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
switch ($m->type) {
case 'photo':
echo sprintf('<div class="fb_photo %s"><a %s href="%s"><div style="background-image: url(\'%s\');"><b>%s</b><br>%s%s<div class="status">%s <img src="%s" /> %s <img src="%s" /></div></div></div>', ($showProfilePic ? 'padding65' : ''), (isset($_GET['nonavbar']) ? 'target="_top"' : 'target="_blank"'), $m->link . (isset($_GET['nonavbar']) ? '&openwithnavigation=1' : ''), str_replace("_s", "_n", $m->picture), $m->from->name, (!empty($m->message) ? $m->message.'<br>' : ''), ago($m->created_time, $timezone), isset($m->likes) && isset($m->likes->count) ? $m->likes->count : '', isset($m->likes) && isset($m->likes->count) ? buildUri('images/icons/like.png') : '', isset($m->comments) && isset($m->comments->count) ? $m->comments->count : '', isset($m->comments) && isset($m->comments->count) ? buildUri('images/icons/comment.png') : '');
break;
case 'video':
case 'link':
echo sprintf('<div class="fb_link %s"><a %s href="%s"><div style="width: 100%%; padding: 30px; box-sizing: border-box;border-bottom:1px solid #ccc;border-top:1px solid #ccc;"><img style="max-width: none; width:100px;" src="%s" /><div style="width: 100%%"><b>%s</b><br>%s</div></div><div style="position:absolute; right: 10px; bottom: 10px;" class="status">%s <img style="display: inline-block" src="%s" /> %s <img style="display: inline-block" src="%s" /></div></a></div>', ($showProfilePic ? 'padding65' : ''), (isset($_GET['nonavbar']) ? 'target="_top"' : 'target="_blank"'), $m->link . (isset($_GET['nonavbar']) ? '&openwithnavigation=1' : ''), $m->picture, $m->name, $m->message, ago($m->created_time, $timezone), isset($m->likes) && isset($m->likes->count) ? $m->likes->count : '', isset($m->likes) && isset($m->likes->count) ? buildUri('images/icons/like.png') : '', isset($m->comments) && isset($m->comments->count) ? $m->comments->count : '', isset($m->comments) && isset($m->comments->count) ? buildUri('images/icons/comment.png') : '');
//echo sprintf('<div class="fb_link"><a href="%s"><div><img src="%s" /><b>%s</b><br>%s<div class="status">%s likes, %s comments</div></div></div></div>', $m->link, str_replace("_s", "_n", $m->picture), $m->from->name, $m->message, $m->likes->count, $m->comments->count);
break;
case 'status':
echo sprintf('<div class="fb_link %s"><a %s href="%s"><div style="width: 100%%; padding: 30px; box-sizing: border-box;border-bottom:1px solid #ccc;border-top:1px solid #ccc;"><img style="max-width: none; width:100px;" src="%s" /><div style="width: 100%%"><b>%s</b><br>%s</div></div><div style="position:absolute; right: 10px; bottom: 10px;" class="status">%s <img style="display: inline-block" src="%s" /> %s <img style="display: inline-block" src="%s" /></div></a></div>', ($showProfilePic ? 'padding65' : ''), '', '', $m->picture, $m->name, $m->message, ago($m->created_time, $timezone), isset($m->likes) && isset($m->likes->count) ? $m->likes->count : '', isset($m->likes) && isset($m->likes->count) ? buildUri('images/icons/like.png') : '', isset($m->comments) && isset($m->comments->count) ? $m->comments->count : '', isset($m->comments) && isset($m->comments->count) ? buildUri('images/icons/comment.png') : '');
break;
default:
//echo 'TODO: ' . $m->type;
//var_dump($m);
break;
}
Верстка.
Уровень - бог.