Ejemplo n.º 1
0
/// All rights reserved. Licensed under the GPL.
/// See the GNU General Public License for more details. (/documents/LICENSE, /documents/COPYRIGHT)
define('__TEXTCUBE_IPHONE__', true);
require ROOT . '/library/preprocessor.php';
requireView('iphoneView');
$context = Model_Context::getInstance();
printMobileHTMLHeader();
if (empty($suri['id']) && empty($suri['value'])) {
    printMobileHTMLMenu('', 'list');
    $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];
    print printMobileEntryListView($list['items'], 'blog_posts_' . $suri['page'], _text('글목록'), $paging, $list['count']);
    print printMobileListNavigation($paging, 'entry');
} else {
    if (!empty($suri['id'])) {
        list($entries, $paging) = getEntryWithPaging($blogid, $suri['id']);
    } else {
        if (!empty($suri['value'])) {
            $entryPrint = true;
            list($entries, $paging) = getEntryWithPagingBySlogan($blogid, $suri['value']);
            //	printMobileHTMLHeader();
        }
    }
    printMobileHTMLMenu('', 'list');
    $entry = $entries ? $entries[0] : null;
    ?>
	<div id="post_<?php 
Ejemplo n.º 2
0
<?php

/// Copyright (c) 2004-2012, Needlworks  / Tatter Network Foundation
/// All rights reserved. Licensed under the GPL.
/// See the GNU General Public License for more details. (/documents/LICENSE, /documents/COPYRIGHT)
define('__TEXTCUBE_IPHONE__', true);
require ROOT . '/library/preprocessor.php';
requireView('iphoneView');
printMobileHTMLHeader();
printMobileHTMLMenu('', 'list');
$category = $suri['id'];
if (isset($category)) {
    $blog['entriesOnList'] = 8;
    if (!($listWithPaging = getEntriesWithPagingByCategory($blogid, $category, $suri['page'], $blog['entriesOnList'], 1))) {
        $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];
    print printMobileEntryListView($list['items'], 'category_' . $suri['page'], $category == 0 ? _text('모든 카테고리') : ucwords(getCategoryNameById($blogid, $category)), $paging, $list['count']);
    print printMobileListNavigation($paging, 'category/' . $category);
}
Ejemplo n.º 3
0
<?php

/// Copyright (c) 2004-2012, Needlworks  / Tatter Network Foundation
/// All rights reserved. Licensed under the GPL.
/// See the GNU General Public License for more details. (/documents/LICENSE, /documents/COPYRIGHT)
define('__TEXTCUBE_IPHONE__', true);
require ROOT . '/library/preprocessor.php';
requireView('iphoneView');
$context = Model_Context::getInstance();
printMobileHTMLHeader();
printMobileHTMLMenu();
if (!empty($suri['id'])) {
    $period = $suri['id'];
} else {
    $period = Timestamp::getYearMonth();
}
if (isset($period)) {
    $blog['entriesOnList'] = 8;
    $listWithPaging = getEntryListWithPagingByPeriod($blogid, $period, $suri['page'], $blog['entriesOnList']);
    $list = array('title' => getPeriodLabel($period), 'items' => $listWithPaging[0], 'count' => $listWithPaging[1]['total']);
    $paging = $listWithPaging[1];
    print printMobileEntryListView($list['items'], 'archive_' . $suri['page'], getPeriodLabel($period), $paging, $list['count']);
    print printMobileListNavigation($paging, 'archive/' . $period);
    printMobileHTMLFooter();
}
Ejemplo n.º 4
0
    $itemsView = '<li class="blog_info">' . CRLF;
    $itemsView .= '	<div class="logo"><img src="' . $blogLogo . '" /></div>' . CRLF;
    $itemsView .= '	<div class="blog_container">' . CRLF;
    $itemsView .= '		<span class="title">' . htmlspecialchars($context->getProperty('blog.title')) . '</span>' . CRLF;
    $itemsView .= '		<span class="author">by ' . $blogAuthor . '</span>' . CRLF;
    $itemsView .= '		<span class="description">' . htmlspecialchars($context->getProperty('blog.description')) . '</span>' . CRLF;
    $itemsView .= '	</div>' . CRLF;
    $itemsView .= '</li>' . CRLF;
    print $itemsView;
    // Recent posts
    if ($listWithPaging = getEntriesWithPaging($blogid, 1, 3)) {
        $list = $listWithPaging[0];
        $paging = $listWithPaging[1];
        $list = array('title' => '', 'items' => $listWithPaging[0], 'count' => $listWithPaging[1]['total']);
        print '<li data-role="list-divider" class="group">' . _text('최근 글') . '</li>' . CRLF;
        print printMobileEntryListView($list['items'], 'recent_posts', _text('글목록'), $paging, 0, false);
    }
    ?>
		<li data-role="list-divider"><?php 
    echo _text('메뉴');
    ?>
</li>
		<li><a href="<?php 
    echo $context->getProperty('uri.blog');
    ?>
/entry" rel="external" class="link"><?php 
    echo _text('전체 글목록');
    ?>
</a></li>
		<li><a href="#categories" class="link"><?php 
    echo _text('분류');
Ejemplo n.º 5
0
<?php

/// Copyright (c) 2004-2012, Needlworks  / Tatter Network Foundation
/// All rights reserved. Licensed under the GPL.
/// See the GNU General Public License for more details. (/documents/LICENSE, /documents/COPYRIGHT)
define('__TEXTCUBE_IPHONE__', true);
require ROOT . '/library/preprocessor.php';
$context = Model_Context::getInstance();
requireView('iphoneView');
printMobileHTMLHeader();
printMobileHTMLMenu();
if (strlen($suri['value'])) {
    if (!isset($suri['id'])) {
        $tag = getTagId($blogid, $suri['value']);
    } else {
        $tag = $suri['id'];
        $suri['value'] = getTagById($blogid, $suri['id']);
    }
    $blog['entriesOnList'] = 8;
    $listWithPaging = getEntryListWithPagingByTag($blogid, $tag, $suri['page'], $blog['entriesOnList']);
    if (!array_key_exists('total', $listWithPaging[1])) {
        $listWithPaging[1]['total'] = 0;
    }
    $list = array('title' => $suri['value'], 'items' => $listWithPaging[0], 'count' => $listWithPaging[1]['total']);
    $paging = $listWithPaging[1];
    print printMobileEntryListView($list['items'], 'tag_' . $suri['page'], getTagById($blogid, $suri['id']), $paging, $list['count']);
    print printMobileListNavigation($paging, 'tag/' . $suri['id']);
}
printMobileHTMLFooter();