Beispiel #1
0
function getBlogURL($name = null, $domain = null, $path = null, $type = null)
{
    $context = Model_Context::getInstance();
    $context->useNamespace('service');
    if ($type === null) {
        $type = $context->getProperty('type');
    }
    if ($path === null) {
        $path = $context->getProperty('path');
    }
    if ($domain === null) {
        $domain = $context->getProperty('domain') . ($context->getProperty('port') ? ':' . $context->getProperty('port') : '');
    }
    if ($name === null) {
        $name = $context->getProperty('blog.name');
    }
    switch ($type) {
        case 'domain':
            return "http://{$name}.{$domain}{$path}";
        case 'path':
            return "http://{$domain}{$path}/{$name}";
        case 'single':
        default:
            return "http://{$domain}{$path}" . getFancyURLpostfix();
    }
}
Beispiel #2
0
function getBlogURL($name = null, $domain = null, $path = null, $type = null)
{
    $context = Model_Context::getInstance();
    $context->useNamespace('service');
    $prefix = $context->getProperty('service.useSSL', false) ? 'https://' : 'http://';
    if ($type === null) {
        $type = $context->getProperty('type');
    }
    if ($path === null) {
        $path = $context->getProperty('path');
    }
    if ($domain === null) {
        $domain = $context->getProperty('domain') . ($context->getProperty('port') ? ':' . $context->getProperty('port') : '');
    }
    if ($name === null) {
        $name = $context->getProperty('blog.name');
    }
    switch ($type) {
        case 'domain':
            return $prefix . $name . $domain . $path;
        case 'path':
            return $prefix . $domain . $path . '/' . $name;
        case 'single':
        default:
            return $prefix . $domain . $path . getFancyURLpostfix();
    }
}
Beispiel #3
0
<?php

/// Copyright (c) 2004-2011, 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_MOBILE__', true);
require ROOT . '/library/preprocessor.php';
// Redirect for ipod touch / iPhone
if (strpos($_SERVER['HTTP_USER_AGENT'], 'iPod') || strpos($_SERVER['HTTP_USER_AGENT'], 'iPhone')) {
    header("Location: " . $pathURL . getFancyURLpostfix() . "/i");
    exit;
}
requireView('mobileView');
if (empty($suri['id'])) {
    list($entry, $paging) = getEntriesWithPaging($blogid, 1, 1);
    if (empty($entry)) {
        printMobileErrorPage(_text('페이지 오류'), _text('글이 하나도 없습니다.'), $blogURL);
    } else {
        header("Location: {$blogURL}/{$entry[0]['id']}");
    }
} else {
    list($entries, $paging) = getEntryWithPaging($blogid, $suri['id']);
    $entry = $entries ? $entries[0] : null;
    printMobileHtmlHeader();
    ?>
	<div id="content">
		<h2><?php 
    echo htmlspecialchars($entry['title']);
    ?>
</h2>	
		<hr />
Beispiel #4
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_MOBILE__', true);
require ROOT . '/library/preprocessor.php';
// Redirect for ipod touch / iPhone
if (strpos($_SERVER['HTTP_USER_AGENT'], 'iPod') || strpos($_SERVER['HTTP_USER_AGENT'], 'iPhone')) {
    header("Location: " . $context->getProperty('uri.path') . getFancyURLpostfix() . "/i");
    exit;
}
requireView('mobileView');
if (empty($suri['id'])) {
    list($entry, $paging) = getEntriesWithPaging($blogid, 1, 1);
    if (empty($entry)) {
        printMobileErrorPage(_text('페이지 오류'), _text('글이 하나도 없습니다.'), $context->getProperty('uri.blog'));
    } else {
        header("Location: {$context->getProperty}('uri.blog')/{$entry[0]['id']}");
    }
} else {
    list($entries, $paging) = getEntryWithPaging($blogid, $suri['id']);
    $entry = $entries ? $entries[0] : null;
    printMobileHtmlHeader();
    ?>
	<div id="content">
		<h2><?php 
    echo htmlspecialchars($entry['title']);
    ?>
</h2>	
		<hr />