Beispiel #1
0
*/
   width: 600px;
   height: 50px;
}

img.connected {
   display: none !important;
}

</style>

<h1>Recently on <a href="http://nataliepo.typepad.com/hobbitted">Hobbitted</a>...</h1>

<?php 
$freebie_url = 'http://api.typepad.com/blogs/6a00e5539faa3b88330120a7aa0fdb970b/post-assets.json?max-results=5';
$handle = fopen($freebie_url, "rb");
$doc = stream_get_contents($handle);
/*$doc = str_replace('callback(','',$doc);
$doc = substr($doc,0,-1);*/
$events = json_decode($doc);
foreach ($events->{'entries'} as $entry) {
    echo "<div class='wallkit_frame clearfix'>\n    <div class='wallkit_post'>\n        <div class='wallkit_profilepic'>\n            <img src='" . get_resized_avatar($entry->author, 35) . "' />\n        </div>\n        \n        <div class='wallkit_postcontent clearfix'>\n        \n            <h4><span><a href='" . $entry->author->profilePageUrl . "'>" . $entry->author->displayName . "</a></span></h4>\n            <div class='braided_entry_outer'>";
    $thumbnail = get_first_thumbnail($entry->embeddedImageLinks);
    echo "\n               <div class='braided_thumbnail_outer'>\n            ";
    if ($thumbnail) {
        echo "\n                  <img class='braided_thumbnail' src='" . get_first_thumbnail($entry->embeddedImageLinks) . "' />\n               ";
    }
    //        $date =  new DateTime($entry->published);
    //        $timestamp = print_timestamp($date);
    echo "\n               </div>\n        \n               <div class='braided_entry'>\n                  <a href='" . $entry->permalinkUrl . "'>" . get_title($entry) . "</a>\n                  <p>" . chop_str($entry->content, 200) . "</p>\n               </div>\n            </div>\n            \n            <div class='commentable_item'>\n               <fb:comments xid='braided_comments-" . $entry->urlId . "' can_post='true' candelete='false'>" . "              </fb:comments>\n            </div>\n         </div>\n    </div>\n</div>";
}
Beispiel #2
0
 function Entry($params)
 {
     if (!array_key_exists('xid', $params)) {
         debug("[Entry::Entry] The entry XID is required in the constructor...");
         return;
     }
     if (!array_key_exists('json', $params)) {
         $params['json'] = pull_json(get_entry_api_url($params['xid']));
     }
     // otherwise, ($type == 'json'), format is ready to parse.
     $this->title = get_entry_title($params['json']);
     $this->body = $params['json']->content;
     $this->permalink = $params['json']->permalinkUrl;
     $this->thumbnail = get_first_thumbnail($params['json']->embeddedImageLinks);
     $this->xid = $params['json']->urlId;
     $this->author = new Author(array('xid' => $params['json']->author->urlId, 'json' => $params['json']->author));
     // GETTING RID OF DateTime for PHP 5.1.6 compatibility
     //       $date =  new DateTime($entry_json->published);
     //       $this->timestamp = print_timestamp($date);
     $this->timestamp = new TPDate($params['json']->published);
 }
Beispiel #3
0
					</div>
        		</div>
        		<div class="clearfix"> </div>
				<!--===================================== Gallery [end] =====================================-->

                <!--===================================== Video [start] =====================================-->
                <div class="content-video">
					<a href="gallery.php" style="text-decoration:none;"><h2 class="new" style="padding-bottom: 14px"><?php 
echo $lang['HEADER_VIDEO'];
?>
</h2></a>
					<div class="wrap">
                        <ul>
                            <div class="col-md-5" style="padding-top: 10px">
                                <?php 
$result = get_first_thumbnail();
if (mysqli_num_rows($result) > 0) {
    $video = mysqli_fetch_array($result, MYSQLI_ASSOC);
    ?>
                                    <a href="video.php?vid=<?php 
    echo $video['video_id'];
    ?>
" ><img src="images/thumbnails/<?php 
    echo $video['thumbnail'];
    ?>
" alt="<?php 
    echo $video['title'];
    ?>
" width="455" height="260" ></a>
                                    <h3 class="title-video"><?php 
    echo $video['title'];