-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathsample_code.php
More file actions
46 lines (40 loc) · 1.26 KB
/
Copy pathsample_code.php
File metadata and controls
46 lines (40 loc) · 1.26 KB
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
<?php
/****
* To get a listing of regular TypePad comments on this entry...
*****/
$entry = new Entry($post_xid);
$comments = $entry->comments();
foreach ($comments as $comment) {
echo
'<div class="comment-outer">
<div class="comment-avatar">
<a href="' . $comment->author->profile_url . '"><img class="avatar" src="' . $comment->author->avatar. '" /></a>
</div>
<div class="comment-contents">
<a href="' . $comment->author->profile_url . '">' . $comment->author->display_name . '</a>
wrote <p>' .
$comment->content .
'</p> on ' . $comment->timestamp . '<br />
</div>
</div>';
}
/****
* To get a listing of just Facebook comments on this entry...
*****/
$entry = new Entry($post_xid);
$fb_comments = $entry->fb_comments();
foreach ($fb_comments as $comment) {
echo
'<div class="comment-outer">
<div class="comment-avatar">
<a href="' . $comment->author->profile_url . '"><img class="avatar" src="' . $comment->author->avatar. '" /></a>
</div>
<div class="comment-contents">
<a href="' . $comment->author->profile_url . '">' . $comment->author->display_name . '</a>
wrote <p>' .
$comment->content .
'</p> on ' . $comment->timestamp . '<br />
</div>
</div>';
}
?>