forked from colorlabsproject/lensa
-
Notifications
You must be signed in to change notification settings - Fork 0
/
template-picasa.php
26 lines (22 loc) · 919 Bytes
/
template-picasa.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
<?php
$content = file_get_contents("https://picasaweb.google.com/data/feed/base/user/".get_option('colabs_username_picasa')."?alt=rss&kind=photo&hl=id&imgmax=1600&max-results=".get_option('colabs_piccount_picasa')."&start-index=1");
$x = new SimpleXmlElement($content);
foreach($x->channel->item as $entry => $value){
$title = $value->title;
$image = $value->enclosure->attributes()->url;
$urlimg= $image[0];
$urlimgori= $image[0];
$date = str_ireplace('+0000', '', $value->pubDate);
echo '<li class="gallery-item">
<a href="'.$urlimgori.'" title="'.$title.'" rel="lightbox">
'.colabs_image('width=280&link=img&return=true&src='.$urlimg).'
</a>
<div class="time">
<p class="entry-time">
<i class="icon-time"></i>
<span>'.$date.'</span>
</p>
</div>
</li>';
}
?>