function printIphoneTrackbackView($entryId, $page, $mode = null) { global $paging, $blogid; if ($mode == 'recent') { list($trackbacks, $paging) = getRemoteResponsesWithPaging($blogid, -1, $page, 10, null, '?page='); } else { $trackbacks = getTrackbacks($entryId); } if (count($trackbacks) == 0) { ?> <p> <?php echo _text('트랙백이 없습니다'); ?> </p> <?php } else { foreach ($trackbacks as $trackback) { ?> <ul id="trackback_<?php echo $commentItem['id']; ?> " class="trackback"> <li class="group"> <span class="left"> <?php echo htmlspecialchars($trackback['subject']); ?> </span> <span class="right"> <a href="<?php echo $blogURL; ?> /i/entry/<?php echo $trackback['entry']; ?> "><?php echo _text('글보기'); ?> </a> </span> </li> <li class="body"> <span class="date">DATE : <?php echo Timestamp::format5($trackback['written']); ?> </span> <?php echo htmlspecialchars($trackback['excerpt']); ?> </li> </ul> <?php } } }
function printMobileTrackbackView($entryId) { $trackbacks = getTrackbacks($entryId); if (count($trackbacks) == 0) { ?> <div class="trackback"> <?php echo _text('걸린 글이 없습니다'); ?> </div> <?php } else { foreach (getTrackbacks($entryId) as $trackback) { ?> <div class="trackback"> <div class="name"> <strong><?php echo htmlspecialchars($trackback['subject']); ?> </strong> (<?php echo Timestamp::format5($trackback['written']); ?> ) </div> <div class="body"><?php echo htmlspecialchars($trackback['excerpt']); ?> </div> </div> <hr /> <?php } } }
function getTrackbacksView($entry, $skin, $accepttrackback) { $context = Model_Context::getInstance(); importlib('model.blog.remoteresponse'); importlib('blogskin'); $trackbacksContainer = $skin->trackbackContainer; $trackbacksView = ''; $trackbacks = getTrackbacks($entry['id']); foreach ($trackbacks as $trackback) { $trackbackView = $skin->trackback; dress('tb_rep_title', htmlspecialchars(fireEvent('ViewTrackbackTitle', $trackback['subject'], array($trackback['id'], $trackback['url']))), $trackbackView); dress('tb_rep_site', htmlspecialchars($trackback['site']), $trackbackView); dress('tb_rep_url', htmlspecialchars($trackback['url']), $trackbackView); dress('tb_rep_desc', htmlspecialchars($trackback['excerpt']), $trackbackView); dress('tb_rep_onclick_delete', "deleteTrackback({$trackback['id']}, {$entry['id']})", $trackbackView); dress('tb_rep_date', fireEvent('ViewTrackbackDate', Timestamp::format5($trackback['written']), $trackback['written']), $trackbackView); if (dress('tb_rep_id', 'trackback' . $trackback['id'], $trackbackView) == false) { $trackbackView = "<a id=\"trackback{$trackback['id']}\"></a>" . $trackbackView; } $trackbacksView .= $trackbackView; } if (count($trackbacks) > 0) { dress('tb_rep', $trackbacksView, $trackbacksContainer); } else { $trackbacksContainer = ''; } if ($context->getProperty('skin.expandTrackback') == 1 || $context->getProperty('suri.url') != $context->getProperty('uri.blog') . '/index.php' && $context->getProperty('suri.url') != $context->getProperty('service.path') . '/index.php' && ($context->getProperty('suri.directive') == '/' || $context->getProperty('suri.directive') == '/entry') && $context->getProperty('suri.value') != '') { $style = 'block'; } else { $style = 'none'; } $trackbacksView = "<div id=\"entry{$entry['id']}Trackback\" style=\"display:{$style}\">" . str_replace('[##_tb_container_##]', $trackbacksContainer, $skin->trackbacks) . '</div>'; if ($context->getProperty('blog.acceptTrackbacks', 1) && $accepttrackback) { // Blocked. (Too many encoding issues with various trackback sender.) //$trackbackAddress = $context->getProperty('uri.default')."/trackback/".($blog['useSloganOnPost'] ? $entry['slogan'] : $entry['id']); $trackbackAddress = $context->getProperty('uri.default') . "/trackback/" . $entry['id']; dress('tb_address', "<span onclick=\"copyUrl('{$trackbackAddress}', this)\">{$trackbackAddress}</span>", $trackbacksView); } else { dress('tb_address', _t('이 글에는 트랙백을 보낼 수 없습니다'), $trackbacksView); } return $trackbacksView; }
function printMobileTrackbackView($entryId, $page, $mode = null) { $context = Model_Context::getInstance(); $blogid = $context->getProperty('blog.id'); global $paging; if ($mode == 'recent') { list($trackbacks, $paging) = getRemoteResponsesWithPaging($blogid, -1, $page, 10, null, '?page='); } else { $trackbacks = getTrackbacks($entryId); } if (count($trackbacks) == 0) { ?> <div class="center ui-bar ui-bar-e"><?php echo _text('트랙백이 없습니다'); ?> </div> <?php } else { foreach ($trackbacks as $trackback) { ?> <ul data-role="listview" data-inset="true" id="trackback_<?php echo $commentItem['id']; ?> " class="trackback"> <li class="group"> <a href="<?php echo $context->getProperty('uri.blog'); ?> /entry/<?php echo $trackback['entry']; ?> "> <?php echo htmlspecialchars($trackback['subject']); ?> </a> </li> <li class="body"> <p class="ui-li-aside"><?php echo Timestamp::format5($trackback['written']); ?> </p> <?php echo htmlspecialchars($trackback['excerpt']); ?> </li> </ul> <?php } } }