Skip to content

Commit

Permalink
refs #1249
Browse files Browse the repository at this point in the history
  * 글주소 바로 접근을 위한 사전 작업
  • Loading branch information
inureyes committed Nov 26, 2009
1 parent 516f4f7 commit 1fa4949
Showing 1 changed file with 51 additions and 54 deletions.
105 changes: 51 additions & 54 deletions interface/i/entry/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,53 +5,50 @@
define('__TEXTCUBE_IPHONE__', true);
require ROOT . '/library/preprocessor.php';
requireView('iphoneView');
if (false) {
fetchConfigVal();
}
if(empty($suri['id']) && empty($suri['value'])) {
$blog['entriesOnList'] = 8;
if(!$listWithPaging = getEntriesWithPaging($blogid, $suri['page'], $blog['entriesOnList']))
$listWithPaging = array(array(), array('total' => 0));
$list = array('title' => (empty($suri['value']) ? getCategoryLabelById($blogid, 0) : $suri['value']), 'items' => $listWithPaging[0], 'count' => $listWithPaging[1]['total']);
$paging = $listWithPaging[1];
?>
?>
<ul class="posts" id="blog_posts_<?php echo $suri['page'];?>" title="<?php echo _text('글목록');?>" selected="false">
<?php
$itemsView = '<li class="group">'.CRLF;
$itemsView .= ' <span class="left">'._text('글목록').'('.$list['count'].')</span>'.CRLF;
$itemsView .= ' <span class="right">Page <span class="now_page">' . $paging['page'] . '</span> / '.$paging['pages'].'</span>'.CRLF;
$itemsView .= '</li>'.CRLF;
foreach ($list['items'] as $item) {
$author = User::getName($item['userid']);
if($imageName = printIphoneAttachmentExtract($item['content'])){
$imageSrc = printIphoneImageResizer($blogid, $imageName, 28);
}else{
$imageSrc = $service['path'] . '/resources/style/iphone/image/noPostThumb.png';
}
$itemsView .= '<li class="post_item">'.CRLF;
$itemsView .= ' <span class="image"><img src="' . $imageSrc . '" width="28" height="28" /></span>'.CRLF;
$itemsView .= ' <a href="' . $blogURL . '/entry/' . $item['id'] . '" class="link">'.CRLF;
$itemsView .= ' <div class="post">'.CRLF;
$itemsView .= ' <span class="title">' . fireEvent('ViewListTitle', htmlspecialchars($item['title'])) . '</span>'.CRLF;
$itemsView .= ' <span class="description">' . Timestamp::format5($item['published']) . ', ' . 'Comments(' . ($item['comments'] > 0 ? $item['comments'] : 0) . ')' . '</span>'.CRLF;
$itemsView .= ' </div>'.CRLF;
$itemsView .= ' </a>'.CRLF;
$itemsView .= '</li>'.CRLF;
}

$itemsView .= '<li class="pagination">'.CRLF;
if(isset($paging['prev'])){
$itemsView .= '<a href="' .$blogURL . '/entry?page=' . $paging['prev'] . '" class="previous">'._textf('%1 페이지',$paging['prev']) . '</a>'.CRLF;
}
if (isset($paging['next'])) {
$itemsView .= '<a href="' .$blogURL . '/entry?page=' . $paging['next'] . '" class="next">'._textf('%1 페이지',$paging['next']) . '</a>'.CRLF;
}
if ($suri['page'] > 1 && $suri['page'] != $paging['pages']) {
$itemsView .= '<strong>' . $suri['page'] . '</strong>'.CRLF;
<?php
$itemsView = '<li class="group">'.CRLF;
$itemsView .= ' <span class="left">'._text('글목록').'('.$list['count'].')</span>'.CRLF;
$itemsView .= ' <span class="right">Page <span class="now_page">' . $paging['page'] . '</span> / '.$paging['pages'].'</span>'.CRLF;
$itemsView .= '</li>'.CRLF;
foreach ($list['items'] as $item) {
$author = User::getName($item['userid']);
if($imageName = printIphoneAttachmentExtract($item['content'])){
$imageSrc = printIphoneImageResizer($blogid, $imageName, 28);
}else{
$imageSrc = $service['path'] . '/resources/style/iphone/image/noPostThumb.png';
}
$itemsView .= '<li class="post_item">'.CRLF;
$itemsView .= ' <span class="image"><img src="' . $imageSrc . '" width="28" height="28" /></span>'.CRLF;
$itemsView .= ' <a href="' . $blogURL . '/entry/' . $item['id'] . '" class="link">'.CRLF;
$itemsView .= ' <div class="post">'.CRLF;
$itemsView .= ' <span class="title">' . fireEvent('ViewListTitle', htmlspecialchars($item['title'])) . '</span>'.CRLF;
$itemsView .= ' <span class="description">' . Timestamp::format5($item['published']) . ', ' . 'Comments(' . ($item['comments'] > 0 ? $item['comments'] : 0) . ')' . '</span>'.CRLF;
$itemsView .= ' </div>'.CRLF;
$itemsView .= ' </a>'.CRLF;
$itemsView .= '</li>'.CRLF;
print $itemsView;
?>
}

$itemsView .= '<li class="pagination">'.CRLF;
if(isset($paging['prev'])){
$itemsView .= '<a href="' .$blogURL . '/entry?page=' . $paging['prev'] . '" class="previous">'._textf('%1 페이지',$paging['prev']) . '</a>'.CRLF;
}
if (isset($paging['next'])) {
$itemsView .= '<a href="' .$blogURL . '/entry?page=' . $paging['next'] . '" class="next">'._textf('%1 페이지',$paging['next']) . '</a>'.CRLF;
}
if ($suri['page'] > 1 && $suri['page'] != $paging['pages']) {
$itemsView .= '<strong>' . $suri['page'] . '</strong>'.CRLF;
}
$itemsView .= '</li>'.CRLF;
print $itemsView;
?>
</ul>
<?php
} else {
Expand All @@ -69,32 +66,32 @@
</div>
<div class="content"><?php printIphoneEntryContentView($blogid, $entry, null); ?></div>
<?php
$entryTags = getTags($entry['blogid'], $entry['id']);
if (sizeof($entryTags) > 0) {
$entryTags = getTags($entry['blogid'], $entry['id']);
if (sizeof($entryTags) > 0) {
?>
<h2 class="tags_title">Tags</h2>
<div class="entry_tags">
<?php
$tags = array();
$relTag = Setting::getBlogSettingGlobal('useMicroformat', 3)>1 && (count($entries) == 1 || !empty($skin->hentryExisted) );
foreach ($entryTags as $entryTag) {
$tags[$entryTag['name']] = "<a href=\"$blogURL/tag/" . $entryTag['id'] . '">' . htmlspecialchars($entryTag['name']) . '</a>';
}
echo implode(",\r\n", array_values($tags));
$tags = array();
$relTag = Setting::getBlogSettingGlobal('useMicroformat', 3)>1 && (count($entries) == 1 || !empty($skin->hentryExisted) );
foreach ($entryTags as $entryTag) {
$tags[$entryTag['name']] = "<a href=\"$blogURL/tag/" . $entryTag['id'] . '">' . htmlspecialchars($entryTag['name']) . '</a>';
}
echo implode(",\r\n", array_values($tags));
?>
</div>
<?php
}
}
?>
<fieldset class="margin-top10">
<?php
<?php

if(doesHaveOwnership() || ($entry['visibility'] >= 2) || (isset($_COOKIE['GUEST_PASSWORD']) && (trim($_COOKIE['GUEST_PASSWORD']) == trim($entry['password'])))) {
printIphoneNavigation($entry, true, true, $paging);
} else {
printIphoneNavigation($entry, false, false, $paging);
}
?>
if(doesHaveOwnership() || ($entry['visibility'] >= 2) || (isset($_COOKIE['GUEST_PASSWORD']) && (trim($_COOKIE['GUEST_PASSWORD']) == trim($entry['password'])))) {
printIphoneNavigation($entry, true, true, $paging);
} else {
printIphoneNavigation($entry, false, false, $paging);
}
?>
</fieldset>
</div>
<?php
Expand Down

0 comments on commit 1fa4949

Please # to comment.