当前位置: 首页>>代码示例>>PHP>>正文


PHP _textf函数代码示例

本文整理汇总了PHP中_textf函数的典型用法代码示例。如果您正苦于以下问题:PHP _textf函数的具体用法?PHP _textf怎么用?PHP _textf使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了_textf函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: clearCache

function clearCache()
{
    global $database, $changed, $errorlog, $memcache;
    static $isCleared = false;
    if ($isCleared == true) {
        return;
    }
    if (!is_null($blogids = POD::queryColumn("SELECT blogid FROM {$database['prefix']}PageCacheLog"))) {
        $changed = true;
        $errorlog = false;
        echo '<li>', _textf('페이지 캐시를 초기화합니다.'), ': ';
        foreach ($blogids as $ids) {
            if (CacheControl::flushAll($ids) == false) {
                $errorlog = true;
            }
        }
        if ($errorlog == false) {
            echo '<span class="result success">', _text('성공'), '</span></li>';
        } else {
            echo '<span class="result fail">', _text('실패'), '</span></li>';
        }
    }
    if (!is_null($memcache)) {
        echo '<li>', _textf('Memcached 캐시를 초기화합니다.'), ': ';
        if ($memcache->flush()) {
            echo '<span class="result success">', _text('성공'), '</span></li>';
        } else {
            echo '<span class="result fail">', _text('실패'), '</span></li>';
        }
    }
    echo '<li>', _textf('공지사항 캐시를 초기화합니다.'), ': ';
    if (POD::execute("DELETE FROM {$database['prefix']}ServiceSettings WHERE name like 'TextcubeNotice%'")) {
        echo '<span class="result success">', _text('성공'), '</span></li>';
    } else {
        echo '<span class="result fail">', _text('실패'), '</span></li>';
    }
    $isCleared = true;
}
开发者ID:ragi79,项目名称:Textcube,代码行数:38,代码来源:checkup.php

示例2: openid_ViewCommenter

function openid_ViewCommenter($name, $comment)
{
    $context = Model_Context::getInstance();
    if ($comment['secret']) {
        return $name;
    }
    if (empty($comment['openid'])) {
        return $name;
    }
    $openidlogodisplay = Setting::getBlogSettingGlobal("OpenIDLogoDisplay", 0);
    if ($openidlogodisplay) {
        $name = "<a href=\"" . $comment['openid'] . "\" class=\"openid\"><img src=\"" . $context->getProperty('service.path') . "/resources/image/icon_openid.gif\" alt=\"OpenID Logo\" title=\"" . _textf("오픈아이디(%1)로 작성하였습니다", $comment['openid']) . "\" /></a>" . $name;
    } else {
        preg_match_all('@<a(.*)>(.*)</a>@Usi', $name, $temp);
        for ($i = 0; $i < count($temp[0]); $i++) {
            if (strip_tags($temp[2][$i]) == $comment['name']) {
                $name = str_replace($temp[0][$i], "<a{$temp[1][$i]} title='" . _textf("오픈아이디(%1)로 작성하였습니다", $comment['openid']) . "'>" . $temp[2][$i] . "</a>", $name);
            }
        }
        $name .= "<a href=\"" . $comment['openid'] . "\" class=\"openid\">&nbsp;</a>";
    }
    return $name;
}
开发者ID:Avantians,项目名称:Textcube,代码行数:23,代码来源:index.php

示例3: clearCache

function clearCache()
{
    global $database, $changed, $errorlog, $memcache;
    static $isCleared = false;
    $context = Model_Context::getInstance();
    if ($isCleared == true) {
        return;
    }
    if (!is_null($blogids = POD::queryColumn("SELECT blogid FROM {$database['prefix']}PageCacheLog"))) {
        $changed = true;
        $errorlog = false;
        echo '<li>', _textf('페이지 캐시를 초기화합니다.'), ': ';
        foreach ($blogids as $ids) {
            if (CacheControl::flushAll($ids) == false) {
                $errorlog = true;
            }
        }
        if ($errorlog == false) {
            echo '<span class="result success">', _text('성공'), '</span></li>';
        } else {
            echo '<span class="result fail">', _text('실패'), '</span></li>';
        }
    }
    if ($context->getProperty('service.codecache', false)) {
        $changed = true;
        $errorlog = false;
        echo '<li>', _textf('코드 캐시를 초기화합니다.'), ': ';
        $code = new CodeCache();
        $code->flush();
        if ($errorlog == false) {
            echo '<span class="result success">', _text('성공'), '</span></li>';
        } else {
            echo '<span class="result fail">', _text('실패'), '</span></li>';
        }
    }
    if (!is_null($memcache)) {
        echo '<li>', _textf('Memcached 캐시를 초기화합니다.'), ': ';
        if ($memcache->flush()) {
            echo '<span class="result success">', _text('성공'), '</span></li>';
        } else {
            echo '<span class="result fail">', _text('실패'), '</span></li>';
        }
    }
    echo '<li>', _textf('공지사항 캐시를 초기화합니다.'), ': ';
    if (POD::execute("DELETE FROM {$database['prefix']}ServiceSettings WHERE name like 'TextcubeNotice%'")) {
        echo '<span class="result success">', _text('성공'), '</span></li>';
    } else {
        echo '<span class="result fail">', _text('실패'), '</span></li>';
    }
    if (!is_null($blogids = POD::queryColumn("SELECT DISTINCT blogid FROM {$database['prefix']}BlogSettings"))) {
        $changed = true;
        $errorlog = false;
        echo '<li>', _textf('댓글 및 트랙백 휴지통을 비웁니다.'), ': ';
        foreach ($blogids as $ids) {
            emptyTrash(true, $ids);
            emptyTrash(false, $ids);
        }
        if ($errorlog == false) {
            echo '<span class="result success">', _text('성공'), '</span></li>';
        } else {
            echo '<span class="result fail">', _text('실패'), '</span></li>';
        }
    }
    $isCleared = true;
}
开发者ID:Avantians,项目名称:Textcube,代码行数:65,代码来源:checkup.php

示例4: printIphoneImageResizer

        if ($imageName = printIphoneAttachmentExtract(printIphoneEntryContent($blogid, $item['userid'], $item['id']))) {
            $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 . '/category/' . $category . '?page=' . $paging['prev'] . '" class="previous">' . _textf('%1 페이지', $paging['prev']) . '</a>' . CRLF;
    }
    if (isset($paging['next'])) {
        $itemsView .= '<a href="' . $blogURL . '/category/' . $category . '?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 
}
开发者ID:hinablue,项目名称:TextCube,代码行数:31,代码来源:index.php

示例5: notifyComment

function notifyComment()
{
    global $database, $service, $blog, $defaultURL;
    $blogid = getBlogId();
    $sql = "SELECT\n\t\t\t\tCN.*,\n\t\t\t\tCNQ.id AS queueId,\n\t\t\t\tCNQ.commentid AS commentid,\n\t\t\t\tCNQ.sendstatus AS sendstatus,\n\t\t\t\tCNQ.checkdate AS checkdate,\n\t\t\t\tCNQ.written  AS queueWritten\n\t\t\tFROM\n\t\t\t\t{$database['prefix']}CommentsNotifiedQueue AS CNQ\n\t\t\tLEFT JOIN\n\t\t\t\t{$database['prefix']}Comments AS CN ON CNQ.commentid = CN.id\n\t\t\tWHERE\n\t\t\t\tCNQ.sendstatus = 0\n\t\t\t\tand CN.parent is not null\n\t\t\tORDER BY CNQ.id ASC LIMIT 1 OFFSET 0";
    $queue = POD::queryRow($sql);
    if (empty($queue) && empty($queue['queueId'])) {
        return false;
    }
    $comments = POD::queryRow("SELECT * FROM {$database['prefix']}Comments WHERE blogid = {$blogid} AND id = {$queue['commentid']}");
    if (empty($comments['parent']) || $comments['secret'] == 1) {
        POD::execute("DELETE FROM {$database['prefix']}CommentsNotifiedQueue WHERE id={$queue['queueId']}");
        return false;
    }
    $parentComments = POD::queryRow("SELECT * FROM {$database['prefix']}Comments WHERE blogid = {$blogid} AND id = {$comments['parent']}");
    if (empty($parentComments['homepage'])) {
        POD::execute("DELETE FROM {$database['prefix']}CommentsNotifiedQueue WHERE id={$queue['queueId']}");
        return false;
    }
    $entry = POD::queryRow("SELECT * FROM {$database['prefix']}Entries WHERE blogid = {$blogid} AND id={$comments['entry']}");
    if (is_null($entry)) {
        $r1_comment_check_url = rawurlencode("{$defaultURL}/guestbook/" . $parentComments['id'] . "#guestbook" . $parentComments['id']);
        $r2_comment_check_url = rawurlencode("{$defaultURL}/guestbook/" . $comments['id'] . "#guestbook" . $comments['id']);
        $entry['title'] = _textf('%1 블로그의 방명록', $blog['title']);
        $entryPermaLink = "{$defaultURL}/guestbook/";
        $entry['id'] = 0;
    } else {
        $r1_comment_check_url = rawurlencode("{$defaultURL}/" . ($blog['useSloganOnPost'] ? "entry/{$entry['slogan']}" : $entry['id']) . "#comment" . $parentComments['id']);
        $r2_comment_check_url = rawurlencode("{$defaultURL}/" . ($blog['useSloganOnPost'] ? "entry/{$entry['slogan']}" : $entry['id']) . "#comment" . $comments['id']);
        $entryPermaLink = "{$defaultURL}/" . ($blog['useSloganOnPost'] ? "entry/{$entry['slogan']}" : $entry['id']);
    }
    $data = "url=" . rawurlencode($defaultURL) . "&mode=fb" . "&s_home_title=" . rawurlencode($blog['title']) . "&s_post_title=" . rawurlencode($entry['title']) . "&s_name=" . rawurlencode($comments['name']) . "&s_no=" . rawurlencode($comments['entry']) . "&s_url=" . rawurlencode($entryPermaLink) . "&r1_name=" . rawurlencode($parentComments['name']) . "&r1_no=" . rawurlencode($parentComments['id']) . "&r1_pno=" . rawurlencode($comments['entry']) . "&r1_rno=0" . "&r1_homepage=" . rawurlencode($parentComments['homepage']) . "&r1_regdate=" . rawurlencode($parentComments['written']) . "&r1_url=" . $r1_comment_check_url . "&r2_name=" . rawurlencode($comments['name']) . "&r2_no=" . rawurlencode($comments['id']) . "&r2_pno=" . rawurlencode($comments['entry']) . "&r2_rno=" . rawurlencode($comments['parent']) . "&r2_homepage=" . rawurlencode($comments['homepage']) . "&r2_regdate=" . rawurlencode($comments['written']) . "&r2_url=" . $r2_comment_check_url . "&r1_body=" . rawurlencode($parentComments['comment']) . "&r2_body=" . rawurlencode($comments['comment']);
    if (strpos($parentComments['homepage'], "http://") === false) {
        $homepage = 'http://' . $parentComments['homepage'];
    } else {
        $homepage = $parentComments['homepage'];
    }
    $request = new HTTPRequest('POST', $homepage);
    $request->contentType = 'application/x-www-form-urlencoded; charset=utf-8';
    $request->content = $data;
    if ($request->send()) {
        $xmls = new XMLStruct();
        if ($xmls->open($request->responseText)) {
            $result = $xmls->selectNode('/response/error/');
            if ($result['.value'] != '1' && $result['.value'] != '0') {
                $homepage = rtrim($homepage, '/') . '/index.php';
                $request = new HTTPRequest('POST', $homepage);
                $request->contentType = 'application/x-www-form-urlencoded; charset=utf-8';
                $request->content = $data;
                if ($request->send()) {
                }
            }
        }
    } else {
    }
    POD::execute("DELETE FROM {$database['prefix']}CommentsNotifiedQueue WHERE id={$queue['queueId']}");
}
开发者ID:hinablue,项目名称:TextCube,代码行数:57,代码来源:blog.comment.php

示例6: notifyComment

function notifyComment()
{
    $blogid = getBlogId();
    $context = Model_Context::getInstance();
    $pool = DBModel::getInstance();
    $pool->init("CommentsNotifiedQueue");
    $pool->setAlias("CommentsNotifiedQueue", "CNQ");
    $pool->setAlias("Comments", "CN");
    $pool->join("Comments", "left", array(array("CNQ.commentid", "eq", "CN.id")));
    $pool->setQualifier("CNQ.sendstatus", "eq", 0);
    $pool->setQualifier("CN.parent", "neq", null);
    $pool->setOrder("CNQ.id", "asc");
    $pool->setLimit(1);
    $queue = $pool->getRow("CN.*,\n\t\t\t\tCNQ.id AS queueId,\n\t\t\t\tCNQ.commentid AS commentid,\n\t\t\t\tCNQ.sendstatus AS sendstatus,\n\t\t\t\tCNQ.checkdate AS checkdate,\n\t\t\t\tCNQ.written  AS queueWritten");
    if (empty($queue) && empty($queue['queueId'])) {
        return false;
    }
    $pool->init("Comments");
    $pool->setQualifier("blogid", "eq", $blogid);
    $pool->setQualifier("id", "eq", $queue['commentid']);
    $comments = $pool->getRow();
    if (empty($comments['parent']) || $comments['secret'] == 1) {
        $pool->init("CommentsNotifiedQueue");
        $pool->setQualifier("id", "eq", $queue['queueId']);
        $pool->delete();
        return false;
    }
    $pool->init("Comments");
    $pool->setQualifier("blogid", "eq", $blogid);
    $pool->setQualifier("id", "eq", $queue['parent']);
    $parentComments = $pool->getRow();
    if (empty($parentComments['homepage'])) {
        $pool->init("CommentsNotifiedQueue");
        $pool->setQualifier("id", "eq", $queue['queueId']);
        $pool->delete();
        return false;
    }
    $pool->init("Entries");
    $pool->setQualifier("blogid", "eq", $blogid);
    $pool->setQualifier("id", "eq", $comments['entry']);
    $entry = $pool->getRow();
    if (is_null($entry)) {
        $r1_comment_check_url = rawurlencode($context->getProperty('uri.default') . "/guestbook/" . $parentComments['id'] . "#guestbook" . $parentComments['id']);
        $r2_comment_check_url = rawurlencode($context->getProperty('uri.default') . "/guestbook/" . $comments['id'] . "#guestbook" . $comments['id']);
        $entry['title'] = _textf('%1 블로그의 방명록', $context->getProperty('blog.title'));
        $entryPermaLink = $context->getProperty('uri.default') . "/guestbook/";
        $entry['id'] = 0;
    } else {
        $r1_comment_check_url = rawurlencode($context->getProperty('uri.default') . "/" . ($context->getProperty('blog.useSloganOnPost') ? "entry/{$entry['slogan']}" : $entry['id']) . "#comment" . $parentComments['id']);
        $r2_comment_check_url = rawurlencode($context->getProperty('uri.default') . "/" . ($context->getProperty('blog.useSloganOnPost') ? "entry/{$entry['slogan']}" : $entry['id']) . "#comment" . $comments['id']);
        $entryPermaLink = $context->getProperty('uri.default') . "/" . ($context->getProperty('blog.useSloganOnPost') ? "entry/{$entry['slogan']}" : $entry['id']);
    }
    $data = "url=" . rawurlencode($context->getProperty('uri.default')) . "&mode=fb" . "&s_home_title=" . rawurlencode($context->getProperty('blog.title')) . "&s_post_title=" . rawurlencode($entry['title']) . "&s_name=" . rawurlencode($comments['name']) . "&s_no=" . rawurlencode($comments['entry']) . "&s_url=" . rawurlencode($entryPermaLink) . "&r1_name=" . rawurlencode($parentComments['name']) . "&r1_no=" . rawurlencode($parentComments['id']) . "&r1_pno=" . rawurlencode($comments['entry']) . "&r1_rno=0" . "&r1_homepage=" . rawurlencode($parentComments['homepage']) . "&r1_regdate=" . rawurlencode($parentComments['written']) . "&r1_url=" . $r1_comment_check_url . "&r2_name=" . rawurlencode($comments['name']) . "&r2_no=" . rawurlencode($comments['id']) . "&r2_pno=" . rawurlencode($comments['entry']) . "&r2_rno=" . rawurlencode($comments['parent']) . "&r2_homepage=" . rawurlencode($comments['homepage']) . "&r2_regdate=" . rawurlencode($comments['written']) . "&r2_url=" . $r2_comment_check_url . "&r1_body=" . rawurlencode($parentComments['comment']) . "&r2_body=" . rawurlencode($comments['comment']);
    if (strpos($parentComments['homepage'], "http://") === false) {
        $homepage = 'http://' . $parentComments['homepage'];
    } else {
        $homepage = $parentComments['homepage'];
    }
    $request = new HTTPRequest('POST', $homepage);
    $request->contentType = 'application/x-www-form-urlencoded; charset=utf-8';
    $request->content = $data;
    if ($request->send()) {
        $xmls = new XMLStruct();
        if ($xmls->open($request->responseText)) {
            $result = $xmls->selectNode('/response/error/');
            if ($result['.value'] != '1' && $result['.value'] != '0') {
                $homepage = rtrim($homepage, '/') . '/index.php';
                $request = new HTTPRequest('POST', $homepage);
                $request->contentType = 'application/x-www-form-urlencoded; charset=utf-8';
                $request->content = $data;
                if ($request->send()) {
                }
            }
        }
    }
    $pool->init("CommentsNotifiedQueue");
    $pool->setQualifier("id", "eq", $queue['queueId']);
    $pool->delete();
}
开发者ID:webhacking,项目名称:Textcube,代码行数:79,代码来源:comment.php

示例7: sendInvitationMail

function sendInvitationMail($blogid, $userid, $name, $comment, $senderName, $senderEmail)
{
    $ctx = Model_Context::getInstance();
    $pool = DBModel::getInstance();
    if (empty($blogid)) {
        $pool->reset('BlogSettings');
        $blogid = $pool->getCell('max(blogid)');
        // If no blogid, get the latest created blogid.
    }
    $email = User::getEmail($userid);
    $pool->reset('Users');
    $pool->setQualifier('userid', 'eq', $userid);
    $password = getCell('password');
    $authtoken = getAuthToken($userid);
    $blogName = getBlogName($blogid);
    if (empty($email)) {
        return 1;
    }
    if (!preg_match('/^[^@]+@([-a-zA-Z0-9]+\\.)+[-a-zA-Z0-9]+$/', $email)) {
        return 2;
    }
    if (empty($name)) {
        $name = User::getName($userid);
    }
    if (strcmp($email, Utils_Unicode::lessenAsEncoding($email, 64)) != 0) {
        return 11;
    }
    //$loginid = POD::escapeString(Utils_Unicode::lessenAsEncoding($email, 64));
    $name = POD::escapeString(Utils_Unicode::lessenAsEncoding($name, 32));
    //$headers = 'From: ' . encodeMail($senderName) . '<' . $senderEmail . ">\n" . 'X-Mailer: ' . TEXTCUBE_NAME . "\n" . "MIME-Version: 1.0\nContent-Type: text/html; charset=utf-8\n";
    if (empty($name)) {
        $subject = _textf('귀하를 %1님이 초대합니다', $senderName);
    } else {
        $subject = _textf('%1님을 %2님이 초대합니다', $name, $senderName);
    }
    $message = file_get_contents(ROOT . "/resources/style/letter/letter.html");
    $message = str_replace('[##_title_##]', _text('초대장'), $message);
    $message = str_replace('[##_content_##]', $comment, $message);
    $message = str_replace('[##_images_##]', $ctx->getProperty('uri.service') . "/resources/style/letter", $message);
    $message = str_replace('[##_link_##]', getInvitationLink(getBlogURL($blogName), $email, $password, $authtoken), $message);
    $message = str_replace('[##_go_blog_##]', getBlogURL($blogName), $message);
    $message = str_replace('[##_link_title_##]', _text('블로그 바로가기'), $message);
    if (empty($name)) {
        $message = str_replace('[##_to_##]', '', $message);
    } else {
        $message = str_replace('[##_to_##]', _text('받는 사람') . ': ' . $name, $message);
    }
    $message = str_replace('[##_sender_##]', _text('보내는 사람') . ': ' . $senderName, $message);
    $ret = sendEmail($senderName, $senderEmail, $name, $email, $subject, $message);
    if ($ret !== true) {
        return array(14, $ret[1]);
    }
    return true;
}
开发者ID:ragi79,项目名称:Textcube,代码行数:54,代码来源:blog.blogSetting.php

示例8: define

define('__TEXTCUBE_CUSTOM_HEADER__', true);
define('__TEXTCUBE_LOGIN__', true);
require ROOT . '/library/preprocessor.php';
requireStrictBlogURL();
$context = Model_Context::getInstance();
$author = $suri['value'];
$authorId = User::getUserIdByName($author);
if (empty($authorId)) {
    exit;
}
$blogid = getBlogId();
$cache = pageCache::getInstance();
$cache->reset('authorATOM-' . $authorId);
if (!$cache->load()) {
    importlib("model.blog.feed");
    list($entries, $paging) = getEntriesWithPagingByAuthor($blogid, $author, 1, 1, 1);
    if (empty($entries)) {
        header("Location: " . $context->getProperty('uri.host') . $context->getProperty('uri.blog') . "/atom");
        exit;
    }
    $result = getFeedWithEntries($blogid, $entries, _textf('%1 의 글 목록', $author), 'atom');
    if ($result !== false) {
        $cache->reset('authorATOM-' . $authorId);
        $cache->contents = $result;
        $cache->update();
    }
}
header('Content-Type: application/atom+xml; charset=utf-8');
fireEvent('FeedOBStart');
echo fireEvent('ViewAuthorATOM', $cache->contents);
fireEvent('FeedOBEnd');
开发者ID:Avantians,项目名称:Textcube,代码行数:31,代码来源:index.php

示例9: getCategoryFeedByCategoryId

function getCategoryFeedByCategoryId($blogid, $categoryIds, $mode = 'rss', $categoryTitle = null)
{
    $context = Model_Context::getInstance();
    $channel = array();
    $channel = initializeRSSchannel($blogid);
    $pool = DBModel::getInstance();
    $pool->reset("Entries");
    $pool->setAlias("Entries", "e");
    $pool->setAlias("Categories", "c");
    $pool->setAlias("Users", "u");
    $pool->extend("Categories", "left", array(array("e.blogid", "eq", "c.blogid"), array("e.category", "eq", "c.id")));
    $pool->extend("Users", "left", array(array("e.userid", "eq", "u.userid")));
    $pool->setQualifier("e.blogid", "eq", $blogid);
    $pool->setQualifier("e.draft", "eq", 0);
    $pool->setQualifier("e.visibility", ">=", $context->getProperty('blog.publishEolinSyncOnRSS') ? 2 : 3);
    $pool->setQualifier("e.category", "hasoneof", $categoryIds);
    $pool->setOrder("e.published", "desc");
    $pool->setLimit($context->getProperty('blog.entriesOnRSS'));
    $entries = $pool->getAll("e.*, c.name AS categoryName, u.name as author, u.loginid AS email");
    return getFeedWithEntries($blogid, $entries, _textf('%1 카테고리 글 목록', $categoryTitle), $mode);
}
开发者ID:Avantians,项目名称:Textcube,代码行数:21,代码来源:feed.php

示例10: htmlspecialchars

    $itemsView = '<li class="group ui-bar ui-bar-e">' . CRLF;
    $itemsView .= '	<span class="left">' . htmlspecialchars($search) . ' ' . _text('검색 결과') . '(' . $list['count'] . ')</span>' . CRLF;
    $itemsView .= '	<span class="right ui-li-aside">' . _text('페이지') . '<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 = printMobileAttachmentExtract(printMobileEntryContent($blogid, $item['userid'], $item['id']))) {
            $imageSrc = printMobileImageResizer($blogid, $imageName, 80);
        } else {
            $imageSrc = $service['path'] . '/resources/style/iphone/image/noPostThumb.png';
        }
        $itemsView .= '<li class="post_item">' . CRLF;
        $itemsView .= '	<a href="' . $context->getProperty('uri.blog') . '/entry/' . $item['id'] . '" class="link">' . CRLF;
        $itemsView .= '	<img src="' . $imageSrc . '"  />' . CRLF;
        $itemsView .= '	<h3>' . fireEvent('ViewListTitle', htmlspecialchars($item['title'])) . '</h3>' . CRLF;
        $itemsView .= '	<p>' . Timestamp::format5($item['published']) . '</span><span class="ui-li-count"> ' . _textf('댓글 %1개', $item['comments'] > 0 ? $item['comments'] : 0) . '</p>' . CRLF;
        $itemsView .= '	</a>' . CRLF;
        $itemsView .= '</li>' . CRLF;
    }
    $itemsView .= '</ul>' . CRLF;
    print $itemsView;
    print printMobileListNavigation($paging, 'search/' . $search);
    ?>
	</ul>
<?php 
    printMobileHTMLFooter();
} else {
    ?>
	<div data-role="page" data-theme="a" id="search">
		<form id="searchForm" method="GET" class="dialog snug editorBar" action="<?php 
    echo $blogURL;
开发者ID:ragi79,项目名称:Textcube,代码行数:31,代码来源:index.php

示例11: getCategoryFeedByCategoryId

function getCategoryFeedByCategoryId($blogid, $categoryIds, $mode = 'rss', $categoryTitle = null)
{
    $ctx = Model_Context::getInstance();
    $channel = array();
    $channel = initializeRSSchannel($blogid);
    $entries = POD::queryAll("SELECT \n\t\t\te.*, \n\t\t\tc.name AS categoryName, \n\t\t\tu.name AS author,\n\t\t\tu.loginid AS email\n\t\tFROM " . $ctx->getProperty('database.prefix') . "Entries e \n\t\tLEFT JOIN " . $ctx->getProperty('database.prefix') . "Categories c\n\t\t\tON e.blogid = c.blogid AND e.category = c.id\n\t\tLEFT JOIN " . $ctx->getProperty('database.prefix') . "Users u\n\t\t\tON e.userid = u.userid\n\t\tWHERE e.blogid = {$blogid} AND e.draft = 0 AND e.visibility >= " . ($ctx->getProperty('blog.publishEolinSyncOnRSS') ? '2' : '3') . " AND e.category IN (" . implode(',', $categoryIds) . ")\n\t\tORDER BY e.published \n\t\tDESC LIMIT " . $ctx->getProperty('blog.entriesOnRSS'));
    return getFeedWithEntries($blogid, $entries, _textf('%1 카테고리 글 목록', $categoryTitle), $mode);
}
开发者ID:ragi79,项目名称:Textcube,代码行数:8,代码来源:blog.feed.php

示例12: printMobileErrorPage

    if (!doesHaveOwnership() && empty($_POST["comment_{$replyId}"])) {
        printMobileErrorPage(_text('댓글 작성 오류.'), _text('내용을 입력해 주세요.'), "{$blogURL}/comment/comment/{$replyId}");
    } else {
        $comment = array();
        $comment['entry'] = $entryId;
        $comment['parent'] = $replyId;
        $comment['name'] = empty($_POST["name_{$replyId}"]) ? '' : $_POST["name_{$replyId}"];
        $comment['password'] = empty($_POST["password_{$replyId}"]) ? '' : $_POST["password_{$replyId}"];
        $comment['homepage'] = empty($_POST["homepage_{$replyId}"]) || $_POST["homepage_{$replyId}"] == 'http://' ? '' : $_POST["homepage_{$replyId}"];
        $comment['secret'] = empty($_POST["secret_{$replyId}"]) ? 0 : 1;
        $comment['comment'] = $_POST["comment_{$replyId}"];
        $comment['ip'] = $_SERVER['REMOTE_ADDR'];
        $result = addComment($blogid, $comment);
        if (in_array($result, array('ip', 'name', 'homepage', 'comment', 'openidonly', 'etc'))) {
            if ($result == 'openidonly') {
                $blockMessage = _text('댓글을 쓰기 위해서는 OpenID로 로그인해야 합니다.');
            } else {
                $blockMessage = _textf('%1 은 차단되었습니다.', $result);
            }
            printMobileErrorPage(_text('댓글 작성이 차단되었습니다.'), $blockMessage, "{$blogURL}/comment/{$entryId}");
        } else {
            if ($result === false) {
                printMobileErrorPage(_text('댓글 작성 오류.'), _text('댓글을 작성할 수 없었습니다.'), "{$blogURL}/comment/{$entryId}");
            } else {
                setcookie('guestName', $comment['name'], time() + 2592000, $blogURL);
                setcookie('guestHomepage', $comment['homepage'], time() + 2592000, $blogURL);
                printMobileSimpleMessage(_text('댓글이 등록되었습니다.'), _text('댓글 페이지로 이동'), "{$blogURL}/comment/{$entryId}");
            }
        }
    }
}
开发者ID:ragi79,项目名称:Textcube,代码行数:31,代码来源:index.php

示例13: _text

    ?>
</a></li>
								<?php 
}
?>
								<?php 
if (!empty($openid_signup_link)) {
    ?>
								<li><a href="<?php 
    echo $openid_signup_link;
    ?>
"><?php 
    echo _text('오픈아이디 발급하기');
    ?>
</a></li>
								<?php 
}
?>
								<li id="openid-helper"><?php 
echo _textf('Technically supported by %1', '<a href="http://www.idtail.com/">idtail.com</a>');
?>
</li>
							</ul>
						</div>
					</div>
				</div>
			</form>
		</div>
	</div>
</body>
</html>
开发者ID:ragi79,项目名称:Textcube,代码行数:31,代码来源:index.php

示例14: getCategoryFeedByCategoryId

function getCategoryFeedByCategoryId($blogid, $categoryIds, $mode = 'rss', $categoryTitle = null)
{
    global $database, $serviceURL, $defaultURL, $blog, $service;
    $channel = array();
    $channel = initializeRSSchannel($blogid);
    $entries = POD::queryAll("SELECT \n\t\t\te.*, \n\t\t\tc.name AS categoryName, \n\t\t\tu.name AS author,\n\t\t\tu.loginid AS email\n\t\tFROM {$database['prefix']}Entries e \n\t\tLEFT JOIN {$database['prefix']}Categories c\n\t\t\tON e.blogid = c.blogid AND e.category = c.id\n\t\tLEFT JOIN {$database['prefix']}Users u\n\t\t\tON e.userid = u.userid\n\t\tWHERE e.blogid = {$blogid} AND e.draft = 0 AND e.visibility >= " . ($blog['publishEolinSyncOnRSS'] ? '2' : '3') . " AND e.category IN (" . implode(',', $categoryIds) . ")\n\t\tORDER BY e.published \n\t\tDESC LIMIT {$blog['entriesOnRSS']}");
    if (!$entries) {
        $entries = array();
    }
    $channel['items'] = getFeedItemByEntries($entries);
    if (!is_null($categoryTitle)) {
        $channel['title'] = RSSMessage($blog['title'] . ': ' . _textf('%1 카테고리 글 목록', htmlspecialchars($categoryTitle)));
    }
    $rss = array('channel' => $channel);
    if ($mode == 'rss') {
        return publishRSS($blogid, $rss);
    } else {
        if ($mode == 'atom') {
            return publishATOM($blogid, $rss);
        }
    }
    return false;
}
开发者ID:hinablue,项目名称:TextCube,代码行数:23,代码来源:blog.feed.php

示例15: applyMF2Comment

 function applyMF2Comment($type, $commentItem, $debugType)
 {
     $type .= "_rep";
     if (!preg_match('/<(p|div|li|table|tr|td|span|cite|strong)[^>]*class=[\'"][^\'"]*\\bvcard\\b[^\'"]*[\'"][^>]*>/sm', $commentItem)) {
         $commentItem = addAttributeCore($commentItem, '@(.*?)(<(p|div|li|td|span|cite|strong)[^>]*>[^<>]*?\\[##_' . $type . '_name_##\\].*?</\\3>)(.*)@sm', array('class' => 'vcard'), array(1, 2, 4), 1);
         if (!preg_match('@<(p|div|li|td|span|cite|strong)[^>]*class=[\'"][^\'"]*\\bvcard\\b[^\'"]*[\'"][^>]*>@sm', $commentItem)) {
             $commentItem = str_replace("[##_{$type}_name_##]", "<span class=\"vcard\">[##_{$type}_name_##]</span>", $commentItem);
             array_push($this->microformatDebug, _textf('Microformat-info: %1 작성자를 감싸고 있는 태그가 없어 span으로 감싼 뒤 class="vcard"를 추가합니다.', $debugType));
         } else {
             array_push($this->microformatDebug, _textf('Microformat-info: %1 영역에 class="vcard"를 삽입합니다.', $debugType));
         }
     } else {
         array_push($this->microformatDebug, _textf('Microformat-info: %1 영역에 class="vcard"가 있으므로, vcard는 삽입하지 않았습니다.', $debugType));
     }
     return $commentItem;
 }
开发者ID:webhacking,项目名称:Textcube,代码行数:16,代码来源:blogskin.php


注:本文中的_textf函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。