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


PHP dress函数代码示例

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


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

示例1: getRandomTagsView

function getRandomTagsView($tags, $template)
{
    $context = Model_Context::getInstance();
    ob_start();
    list($maxTagFreq, $minTagFreq) = getTagFrequencyRange();
    foreach ($tags as $tag) {
        $view = $template;
        dress('tag_link', $context->getProperty('uri.blog') . "/tag/" . (Setting::getBlogSettingGlobal('useSloganOnTag', true) ? URL::encode($tag['name'], $context->getProperty('service.useEncodedURL')) : $tag['id']), $view);
        dress('tag_name', htmlspecialchars($tag['name']), $view);
        dress('tag_class', "cloud" . getTagFrequency($tag, $maxTagFreq, $minTagFreq), $view);
        print $view;
    }
    $view = ob_get_contents();
    ob_end_clean();
    return $view;
}
开发者ID:Avantians,项目名称:Textcube,代码行数:16,代码来源:view.php

示例2: sendCommentPing

                    $pool->setQualifier('visibility', 'equals', 3);
                    $pool->setQualifier('acceptcomment', 'equals', 1);
                    $row = $pool->getAll('*');
                    if (!empty($row)) {
                        sendCommentPing($entryId, $context->getProperty('uri.default') . "/" . ($context->getProperty('blog.useSloganOnPost') ? "entry/{$row['slogan']}" : $entryId), is_null($user) ? $comment['name'] : $user['name'], is_null($user) ? $comment['homepage'] : $user['homepage']);
                    }
                }
                importlib('model.blog.skin');
                $skin = new Skin($context->getProperty('skin.skin'));
                if ($entryId > 0) {
                    $commentBlock = getCommentView($entry, $skin);
                    dress('article_rep_id', $entryId, $commentBlock);
                    $commentBlock = escapeCData(revertTempTags(removeAllTags($commentBlock)));
                    $recentCommentBlock = escapeCData(revertTempTags(getRecentCommentsView(getRecentComments($blogid), null, $skin->recentCommentItem)));
                    $commentCount = getCommentCount($blogid, $entryId);
                    $commentCount = $commentCount > 0 ? $commentCount : 0;
                    list($tempTag, $commentView) = getCommentCountPart($commentCount, $skin);
                } else {
                    $commentView = '';
                    $commentBlock = getCommentView($entry, $skin);
                    dress('article_rep_id', $entryId, $commentBlock);
                    $commentBlock = escapeCData(revertTempTags(removeAllTags($commentBlock)));
                    $commentCount = 0;
                    $recentCommentBlock = escapeCData(revertTempTags(getRecentCommentsView(getRecentComments($blogid), $skin->recentComment, $skin->recentCommentItem)));
                }
                Respond::PrintResult(array('error' => 0, 'commentView' => $commentView, 'commentCount' => $commentCount, 'commentBlock' => $commentBlock, 'recentCommentBlock' => $recentCommentBlock));
                exit;
            }
        }
    }
}
开发者ID:Avantians,项目名称:Textcube,代码行数:31,代码来源:index.php

示例3: handleSidebars

function handleSidebars(&$sval, &$obj, $previewMode)
{
    global $service, $pluginURL, $pluginPath, $pluginName, $configVal, $configMappings;
    importlib('model.blog.sidebar');
    $newSidebarAllOrders = array();
    // [sidebar id][element id](type, id, parameters)
    // type : 1=skin text, 2=default handler, 3=plug-in
    // id : type1=sidebar i, type2=handler id, type3=plug-in handler name
    // parameters : type1=sidebar j, blah blah~
    $sidebarCount = count($obj->sidebarBasicModules);
    $sidebarAllOrders = getSidebarModuleOrderData($sidebarCount);
    if ($previewMode == true) {
        $sidebarAllOrders = null;
    } else {
        if (is_null($sidebarAllOrders)) {
            $sidebarAllOrders = array();
        }
    }
    for ($i = 0; $i < $sidebarCount; $i++) {
        $str = "";
        if (!is_null($sidebarAllOrders) && array_key_exists($i, $sidebarAllOrders)) {
            $currentSidebarOrder = $sidebarAllOrders[$i];
            for ($j = 0; $j < count($currentSidebarOrder); $j++) {
                if ($currentSidebarOrder[$j]['type'] == 1) {
                    // skin text
                    $skini = $currentSidebarOrder[$j]['id'];
                    $skinj = $currentSidebarOrder[$j]['parameters'];
                    if (isset($obj->sidebarBasicModules[$skini]) && isset($obj->sidebarBasicModules[$skini][$skinj])) {
                        $str .= $obj->sidebarBasicModules[$skini][$skinj]['body'];
                    }
                } else {
                    if ($currentSidebarOrder[$j]['type'] == 2) {
                        // default handler
                        // TODO : implement
                    } else {
                        if ($currentSidebarOrder[$j]['type'] == 3) {
                            // plugin
                            $plugin = $currentSidebarOrder[$j]['id']['plugin'];
                            $handler = $currentSidebarOrder[$j]['id']['handler'];
                            include_once ROOT . "/plugins/{$plugin}/index.php";
                            if (function_exists($handler)) {
                                $str .= "[##_temp_sidebar_element_{$i}_{$j}_##]";
                                $parameter = $currentSidebarOrder[$j]['parameters'];
                                $obj->sidebarStorage["temp_sidebar_element_{$i}_{$j}"]['plugin'] = $plugin;
                                $obj->sidebarStorage["temp_sidebar_element_{$i}_{$j}"]['handler'] = $handler;
                                $obj->sidebarStorage["temp_sidebar_element_{$i}_{$j}"]['parameters'] = $parameter;
                            } else {
                                $obj->sidebarStorage["temp_sidebar_element_{$i}_{$j}"] = "";
                            }
                        } else {
                            // WHAT?
                        }
                    }
                }
            }
        } else {
            $newSidebarAllOrders[$i] = array();
            for ($j = 0; $j < count($obj->sidebarBasicModules[$i]); $j++) {
                $str .= $obj->sidebarBasicModules[$i][$j]['body'];
                array_push($newSidebarAllOrders[$i], array('type' => '1', 'id' => "{$i}", 'parameters' => "{$j}"));
            }
            if (!is_null($sidebarAllOrders)) {
                $sidebarAllOrders[$i] = $newSidebarAllOrders[$i];
            }
        }
        dress("sidebar_{$i}", $str, $sval);
    }
    if (count($newSidebarAllOrders) > 0) {
        if ($previewMode == false && !is_null($sidebarAllOrders)) {
            Setting::setBlogSettingGlobal("sidebarOrder", serialize($sidebarAllOrders));
            CacheControl::flushSkin();
        }
    }
}
开发者ID:webhacking,项目名称:Textcube,代码行数:74,代码来源:plugin.php

示例4: pretty_dress

function pretty_dress($view)
{
    global $blogid, $blog, $database, $service, $stats, $skinSetting;
    $context = Model_Context::getInstance();
    /* local static */
    global $pd_category, $pd_categoryXhtml, $pd_archive, $pd_calendar, $pd_tags, $pd_notices, $pd_recentEntry;
    global $pd_recentComment, $pd_recentTrackback, $pd_link, $pd_authorList;
    if (isset($_REQUEST['safe'])) {
        // safe mode
        return '<div class="coverpage-element-safebox">&hellip;</div>';
    }
    if (isset($_REQUEST['tag'])) {
        // safe mode
        return '<div class="coverpage-element-safebox"><p>' . nl2br(htmlspecialchars($view, ENT_QUOTES)) . '</p></div>';
    }
    $writer = User::getBlogOwnerName($blogid);
    $pageTitle = _t('페이지 제목');
    dress('page_title', htmlspecialchars($pageTitle), $view);
    dress('blogger', htmlspecialchars($writer), $view);
    dress('title', htmlspecialchars($context->getProperty('blog.title')), $view);
    dress('desc', htmlspecialchars($context->getProperty('blog.description')), $view);
    if ($context->getProperty('blog.logo') != null) {
        dress('image', $context->getProperty('service.path') . "/attach/{$blogid}/" . $context->getProperty('blog.logo'), $view);
    } else {
        dress('image', $context->getProperty('service.path') . "/resources/image/spacer.gif", $view);
    }
    dress('blog_link', $context->getProperty('uri.blog') . "/", $view);
    dress('keylog_link', $context->getProperty('uri.blog') . "/keylog", $view);
    dress('localog_link', $context->getProperty('uri.blog') . "/location", $view);
    dress('taglog_link', $context->getProperty('uri.blog') . "/tag", $view);
    dress('guestbook_link', $context->getProperty('uri.blog') . "/guestbook", $view);
    list($view, $searchView) = Skin::cutSkinTag($view, 'search');
    dress('search_name', 'search', $searchView);
    dress('search_text', isset($search) ? htmlspecialchars($search) : '', $searchView);
    dress('search_onclick_submit', 'searchBlog()', $searchView);
    dress('search', '<form id="TTSearchForm" action="' . parseURL($context->getProperty('uri.blog') . '/search/') . '" method="get" onsubmit="return searchBlog()">' . $searchView . '</form>', $view);
    dress('category', $pd_category, $view);
    dress('category_list', $pd_categoryXhtml, $view);
    dress('count_total', $stats['total'], $view);
    dress('count_today', $stats['today'], $view);
    dress('count_yesterday', $stats['yesterday'], $view);
    list($view, $archiveView) = Skin::cutSkinTag($view, 'archive_rep');
    dress('archive_rep', getArchivesView($pd_archive, $archiveView), $view);
    dress('calendar', $pd_calendar, $view);
    list($view, $randomView) = Skin::cutSkinTag($view, 'random_tags');
    dress('random_tags', getRandomTagsView($pd_tags, $randomView), $view);
    list($view, $recentNoticeItem) = Skin::cutSkinTag($view, 'rct_notice_rep');
    list($view, $noticeView) = Skin::cutSkinTag($view, 'rct_notice');
    $notices = $pd_notices;
    if (sizeof($notices) == 0) {
        $notices = array(array('title' => _t('공지 제목'), 'id' => -1));
    }
    if (sizeof($notices) > 0) {
        $itemsView = '';
        foreach ($notices as $notice) {
            $itemView = $recentNoticeItem;
            dress('notice_rep_title', htmlspecialchars(fireEvent('ViewNoticeTitle', Utils_Unicode::lessenAsEm($notice['title'], $skinSetting['recentNoticeLength']), $notice['id'])), $itemView);
            dress('notice_rep_link', "{$context->getProperty}('uri.blog')/notice/{$notice['id']}", $itemView);
            $itemsView .= $itemView;
        }
        dress('rct_notice_rep', $itemsView, $noticeView);
        dress('rct_notice', $noticeView, $view);
    }
    list($view, $authorList) = Skin::cutSkinTag($view, 'author_rep');
    dress('author_rep', getAuthorListView($pd_authorList, $authorList), $view);
    list($view, $recentEntry) = Skin::cutSkinTag($view, 'rctps_rep');
    dress('rctps_rep', getRecentEntriesView($pd_recentEntry, null, $recentEntry), $view);
    list($view, $recentComments) = Skin::cutSkinTag($view, 'rctrp_rep');
    dress('rctrp_rep', getRecentCommentsView($pd_recentComment, null, $recentComments), $view);
    list($view, $recentTrackback) = Skin::cutSkinTag($view, 'rcttb_rep');
    dress('rcttb_rep', getRecentTrackbacksView($pd_recentTrackback, null, $recentTrackback), $view);
    list($view, $s_link_rep) = Skin::cutSkinTag($view, 'link_rep');
    dress('link_rep', getLinksView($pd_link, $s_link_rep), $view);
    dress('rss_url', "{$context->getProperty}('uri.blog')/rss", $view);
    dress('owner_url', "{$context->getProperty}('uri.blog')/owner", $view);
    dress('textcube_name', TEXTCUBE_NAME, $view);
    dress('textcube_version', TEXTCUBE_VERSION, $view);
    $tagSearches = array('@<a @i', '@</a *>@i', '@ id *= *".*"@isU', '@ onkey(down|up|press) *="@i', '@ on(click|load|unload) *="@i', '@<input +@i', '@<script.*</script *>@siU', '@<form @siU', '@</form>@siU');
    $tagReplaces = array('<span ', '</span>', '', ' onnothing="', ' onnothing="', '<input disabled="disabled" ', '', '<div ', '</div>');
    $view = preg_replace($tagSearches, $tagReplaces, $view);
    return correctCoverpageImage($view);
}
开发者ID:webhacking,项目名称:Textcube,代码行数:82,代码来源:index.php

示例5: foreach

<?php

/// Copyright (c) 2004-2015, Needlworks  / Tatter Network Foundation
/// All rights reserved. Licensed under the GPL.
/// See the GNU General Public License for more details. (/documents/LICENSE, /documents/COPYRIGHT)
$keywordView = $skin->keyword;
$previousGroup = '';
$itemsView = '';
if (isset($keywords)) {
    foreach ($keywords as $item) {
        $itemView = $skin->keywordItem;
        dress('keyword_label', htmlspecialchars($item), $itemView);
        if ($skinSetting['keylogSkin'] != null) {
            dress('onclick_keyword', "openKeyword('" . $context->getProperty('uri.blog') . "/keylog/" . escapeJSInAttribute($item) . "'); return false;", $itemView);
        } else {
            dress('onclick_keyword', "return false;", $itemView);
        }
        $itemsView .= $itemView;
    }
}
dress('keyword_rep', $itemsView, $keywordView);
dress('keyword', $keywordView, $view);
开发者ID:Avantians,项目名称:Textcube,代码行数:22,代码来源:keywords.php

示例6: getTrackbackCountPart

function getTrackbackCountPart($trackbackCount, &$skin)
{
    $noneTrackbackMessage = $skin->noneTrackbackMessage;
    $singleTrackbackMessage = $skin->singleTrackbackMessage;
    if ($trackbackCount == 0 && !empty($noneTrackbackMessage)) {
        dress('article_rep_tb_cnt', 0, $noneTrackbackMessage);
        $trackbackView = $noneTrackbackMessage;
    } else {
        if ($trackbackCount == 1 && !empty($singleTrackbackMessage)) {
            dress('article_rep_tb_cnt', 1, $singleTrackbackMessage);
            $trackbackView = $singleTrackbackMessage;
        } else {
            $trackbackPart = $skin->trackbackCount;
            dress('article_rep_tb_cnt', $trackbackCount, $trackbackPart);
            $trackbackView = $trackbackPart;
        }
    }
    return array("tb_count", $trackbackView);
}
开发者ID:hinablue,项目名称:TextCube,代码行数:19,代码来源:blog.response.remote.php

示例7: list

        list($entries, $paging) = getEntryWithPagingBySlogan($blogid, $suri['value'], true);
    } else {
        list($entries, $paging) = getEntryWithPaging($blogid, $suri['id'], true);
    }
    if (count($entries) === 1) {
        unset($paging);
    }
    fireEvent('OBStart');
    require ROOT . '/interface/common/blog/begin.php';
    if (empty($entries)) {
        header('HTTP/1.1 404 Not Found');
        if (empty($skin->pageError)) {
            dress('article_rep', fireEvent('ViewErrorPage', '<div class="TCwarning">' . _text('존재하지 않는 페이지입니다.') . '</div>'), $view);
        } else {
            dress('article_rep', NULL, $view);
            dress('page_error', fireEvent('ViewErrorPage', $skin->pageError), $view);
        }
        unset($paging);
    } else {
        require ROOT . '/interface/common/blog/entries.php';
    }
    require ROOT . '/interface/common/blog/end.php';
    fireEvent('OBEnd');
} else {
    if (!empty($freeSlogan)) {
        header("HTTP/1.1 404 Not Found");
        exit;
    }
    list($entries, $paging) = getEntriesWithPagingByPage($blogid, $suri['page'], $blog['entriesOnPage']);
    fireEvent('OBStart');
    require ROOT . '/interface/common/blog/begin.php';
开发者ID:ragi79,项目名称:Textcube,代码行数:31,代码来源:page.php

示例8: foreach

<?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)
$commentListView = $skin->commentList;
$itemsView = '';
foreach ($commentList['items'] as $item) {
    $itemView = $skin->commentListItem;
    dress('rplist_rep_regdate', fireEvent('ViewCommentListDate', Timestamp::format3($item['written']), $item['written']), $itemView);
    dress('rplist_rep_link', $context->getProperty('uri.blog') . "/" . ($context->getProperty('blog.useSloganOnPost') ? "entry/" . URL::encode($item['slogan'], $service['useEncodedURL']) : $item['entry']) . "#comment{$item['id']}", $itemView);
    dress('rplist_rep_name', htmlspecialchars($item['name']), $itemView);
    dress('rplist_rep_body', htmlspecialchars(fireEvent('ViewCommentListTitle', Utils_Unicode::lessenAsEm($item['comment'], 70))), $itemView);
    $itemsView .= $itemView;
}
dress('rplist_rep', $itemsView, $commentListView);
dress('rplist_conform', htmlspecialchars(fireEvent('ViewCommentListHeadTitle', $commentList['title'])), $commentListView);
dress('rplist_count', count($commentList['items']), $commentListView);
dress('rplist', $commentListView, $view);
开发者ID:ragi79,项目名称:Textcube,代码行数:19,代码来源:commentList.php

示例9: array

<?php

/// Copyright (c) 2004-2016, Needlworks  / Tatter Network Foundation
/// All rights reserved. Licensed under the GPL.
/// See the GNU General Public License for more details. (/documents/LICENSE, /documents/COPYRIGHT)
if (isset($_POST['page'])) {
    $_GET['page'] = $_POST['page'];
}
$IV = array('GET' => array('page' => array('int', 1, 'default' => 1)));
require ROOT . '/library/preprocessor.php';
fireEvent('OBStart');
require ROOT . '/interface/common/blog/begin.php';
if (count($coverpageMappings) > 0) {
    dress('article_rep', '', $view);
    dress('paging', '', $view);
    require ROOT . '/interface/common/blog/cover.php';
}
require ROOT . '/interface/common/blog/end.php';
fireEvent('OBEnd');
开发者ID:webhacking,项目名称:Textcube,代码行数:19,代码来源:cover.php

示例10: KeylogSkin

/// Copyright (c) 2004-2015, Needlworks  / Tatter Network Foundation
/// All rights reserved. Licensed under the GPL.
/// See the GNU General Public License for more details. (/documents/LICENSE, /documents/COPYRIGHT)
// $keylog : $keylog (explanation for specific keyword)
// $entries : Posts that contain specific keyword.
$skin = new KeylogSkin($skinSetting['keylogSkin']);
$out = str_replace("[##_SKIN_head_end_##]", '<script type="text/javascript">//<![CDATA' . CRLF . 'var servicePath = "' . $context->getProperty('service.path') . '"; var blogURL = "' . $context->getProperty('uri.blog') . '"; var adminSkin = "' . $context->getProperty('panel.skin', 'canon') . '";//]]></script><script type="text/javascript" src="' . $service['resourcepath'] . '/script/common3.min.js"></script><script type="text/javascript" src="' . $service['resourcepath'] . '/script/gallery.min.js"></script>' . $skin->skin, $skin->outter);
$keylogView = $skin->keylog;
$itemsView = '';
$contentContainer = array();
foreach ($entries as $item) {
    $itemView = $skin->keylogItem;
    dress('blog_rep_link', $context->getProperty('uri.blog') . "/{$item['id']}", $itemView);
    dress('blog_rep_title', htmlspecialchars($item['title']), $itemView);
    dress('blog_rep_regdate', Timestamp::format3($item['published']), $itemView);
    if ($item['comments'] > 0) {
        dress('blog_rep_rp_cnt', "({$item['comments']})", $itemView);
    }
    $itemsView .= $itemView;
}
dress('blog_rep', $itemsView, $keylogView);
$contentContainer["keyword_{$keylog['id']}"] = getEntryContentView($blogid, $keylog['id'], $keylog['content'], $keylog['contentformatter'], array(), 'Keyword');
dress('blog_desc', setTempTag("keyword_{$keylog['id']}"), $keylogView);
dress('blog_conform', htmlspecialchars($keylog['title']), $keylogView);
dress('blog', $keylogView, $out);
dress('blog_word', htmlspecialchars($keylog['title']), $out);
dress('body_id', "tt-body-keylog", $out);
$out = revertTempTags(removeAllTags($out));
fireEvent('OBStart');
print $out;
fireEvent('OBEnd');
开发者ID:Avantians,项目名称:Textcube,代码行数:31,代码来源:keylog.php

示例11: foreach

if (!empty($sidebarElements)) {
    foreach ($sidebarElements as $element) {
        $pluginData = $skin->sidebarStorage[$element];
        $plugin = $pluginData['plugin'];
        include_once ROOT . "/plugins/{$plugin}/index.php";
        $pluginURL = $context->getProperty('service.path') . "/plugins/{$plugin}";
        // LEGACY SUPPORT
        $pluginPath = ROOT . "/plugins/{$plugin}";
        // LEGACY SUPPORT
        $context->setProperty('plugin.uri', $context->getProperty('service.path') . "/plugins/{$plugin}");
        $context->setProperty('plugin.path', ROOT . "/plugins/{$plugin}");
        $context->setProperty('plugin.name', ROOT . $plugin);
        if (!empty($configMappings[$plugin]['config'])) {
            $configVal = getCurrentSetting($plugin);
            // LEGACY SUPPORT
            $context->setProperty('plugin.config', Setting::fetchConfigVal($configVal));
        } else {
            $configVal = '';
            $context->setProperty('plugin.config', array());
        }
        dress($element, call_user_func($pluginData['handler'], $pluginData['parameters']), $view);
    }
}
// Coverpage dressing
$coverpageElements = array_keys($skin->coverpageStorage);
foreach ($coverpageElements as $element) {
    dress($element, $skin->coverpageStorage[$element], $view);
}
$view = revertTempTags(removeAllTags($view));
print $view;
$gCacheStorage->save();
开发者ID:webhacking,项目名称:Textcube,代码行数:31,代码来源:end.php

示例12: unset

        if (count($entries) > 1 || count($entries) == 1 && empty($suri['value'])) {
            unset($totalTags);
        }
        if (count($entries) == 1) {
            // Adds trackback RDF
            $info = array();
            $info['title'] = htmlspecialchars($entries[0]['title']);
            $info['permalink'] = $permalink;
            $info['trackbackURL'] = $context->getProperty('uri.default') . "/trackback/" . $entries[0]['id'];
            $entriesView .= getTrackbackRDFView($blogid, $info);
        }
        if (isset($cache)) {
            $cache->contents = revertTempTags(removeAllTags($entriesView));
            if (isset($paging)) {
                $cache->dbContents = $paging;
            }
            $cache->update();
        }
    }
}
$view = str_replace("[##_article_rep_##]", "<div class=\"hfeed\">[##_article_rep_##]</div>", $view);
if (isset($isKeylog) && $isKeylog) {
    dressInsertBefore('list', $entriesView, $view);
    $isKeylog = false;
} else {
    if (isset($cache->contents)) {
        dressInsertBefore('article_rep', $entriesView, $view);
    } else {
        dress('article_rep', $entriesView, $view);
    }
}
开发者ID:Avantians,项目名称:Textcube,代码行数:31,代码来源:entries.php

示例13: dress

if (isset($cache->contents)) {
    dress('line', $cache->contents, $view);
} else {
    if (isset($lines) && isset($skin)) {
        $lineView = $skin->line;
        $itemsView = '';
        $printDate = '';
        foreach ($lines as $item) {
            $time = Timestamp::getHumanReadable($item['created']);
            if ($item['root'] == 'default') {
                $item['root'] = 'Textcube Line';
            }
            $itemsView .= str_replace(array('[##_line_rep_regdate_##]', '[##_line_rep_content_##]', '[##_line_rep_author_##]', '[##_line_rep_source_##]', '[##_line_rep_permalink_##]'), array(fireEvent('ViewLineDate', $time, $item['created']), fireEvent('ViewLineContent', $item['content']), fireEvent('ViewLineAuthor', htmlspecialchars($item['author'])), fireEvent('ViewLineSource', htmlspecialchars($item['root'])), fireEvent('ViewLinePermalink', $item['permalink'])), $skin->lineItem);
        }
        $itemsView = '<div id="line-content">' . CRLF . $itemsView . CRLF . '</div>';
        dress('line_rep', $itemsView, $lineView);
        $buttonView = str_replace(array('[##_line_onclick_more_##]'), array('getMoreLineStream(2,20,\'bottom\');return false;'), $skin->lineButton);
        $buttonView = '<div id="line-more-page">' . CRLF . $buttonView . CRLF . '</div>';
        dress('line_button', $buttonView, $lineView);
        $lineView = fireEvent('ViewLine', $lineView, $lines);
        dress('line_rssurl', $context->getProperty('uri.default') . '/rss/line', $lineView);
        dress('line_atomurl', $context->getProperty('uri.default') . '/atom/line', $lineView);
        //	if(empty($lines)) $lineView = $lineView.CRLF.'[##_paging_line_##]';
        dress('line', $lineView, $view);
        if (isset($cache)) {
            $cache->contents = $lineView;
            $cache->dbContents = $paging;
            $cache->update();
        }
    }
}
开发者ID:webhacking,项目名称:Textcube,代码行数:31,代码来源:line.php

示例14: array

<?php

/// Copyright (c) 2004-2016, Needlworks  / Tatter Network Foundation
/// All rights reserved. Licensed under the GPL.
/// See the GNU General Public License for more details. (/documents/LICENSE, /documents/COPYRIGHT)
$locativeView = '[##_SKIN_local_rep_start_##]';
$prevPath = array();
foreach ($locatives as $locative) {
    $path = explode('/', $locative['location']);
    array_shift($path);
    for ($depth = $i = 0; $i < count($path); $i++, $depth += 20) {
        $spotView = $skin->locativeSpot;
        dress('local_spot_depth', $depth, $spotView);
        dress('local_spot', htmlspecialchars($path[$i]), $spotView);
        if (empty($prevPath[$i]) || $path[$i] != $prevPath[$i]) {
            $locativeView .= $spotView;
        }
    }
    $entryView = $skin->locativeEntry;
    dress('local_info_depth', $depth + 20, $entryView);
    dress('local_info_link', $context->getProperty('uri.blog') . "/" . ($context->getProperty('blog.useSloganOnPost') ? 'entry/' . URL::encode($locative['slogan'], $service['useEncodedURL']) : $locative['id']), $entryView);
    dress('local_info_title', htmlspecialchars($locative['title']), $entryView);
    dress('local_info_author', User::getName($locative['userid']), $entryView);
    $locativeView .= $entryView;
    $prevPath = $path;
}
dress('local', '[##_SKIN_local_start_##]' . str_replace('[##_local_spot_rep_##]', $locativeView, $skin->locative) . '[##_SKIN_local_end_##]', $view);
开发者ID:webhacking,项目名称:Textcube,代码行数:27,代码来源:locatives.php

示例15: dressStaticElements

function dressStaticElements(&$view)
{
    $context = Model_Context::getInstance();
    $blogid = $context->getProperty('blog.id');
    $writer = User::getBlogOwnerName($blogid);
    dress('title', htmlspecialchars($context->getProperty('blog.title')), $view);
    dress('blogger', htmlspecialchars($writer), $view);
    dress('desc', htmlspecialchars($context->getProperty('blog.description')), $view);
    $logo = $context->getProperty('blog.logo');
    if (!empty($logo)) {
        dress('image', $context->getProperty('uri.service') . "/attach/{$blogid}/" . $context->getProperty('blog.logo'), $view);
    } else {
        dress('image', $context->getProperty('uri.service') . "/resources/image/spacer.gif", $view);
    }
    dress('blog_link', $context->getProperty('uri.blog') . "/", $view);
    dress('keylog_link', $context->getProperty('uri.blog') . "/keylog", $view);
    dress('localog_link', $context->getProperty('uri.blog') . "/location", $view);
    dress('taglog_link', $context->getProperty('uri.blog') . "/tag", $view);
    dress('guestbook_link', $context->getProperty('uri.blog') . "/guestbook", $view);
    if ($context->getProperty('blog.rssURL', null) != null) {
        dress('rss_url', $context->getProperty('blog.rssURL'), $view);
    } else {
        dress('rss_url', $context->getProperty('uri.default') . "/rss", $view);
    }
    dress('response_rss_url', $context->getProperty('uri.default') . "/rss/response", $view);
    dress('comment_rss_url', $context->getProperty('uri.default') . "/rss/comment", $view);
    dress('trackback_rss_url', $context->getProperty('uri.default') . "/rss/trackback", $view);
    if ($context->getProperty('blog.atomURL', null) != null) {
        dress('atom_url', $context->getProperty('blog.atomURL'), $view);
    } else {
        dress('atom_url', $context->getProperty('uri.default') . "/atom", $view);
    }
    dress('response_atom_url', $context->getProperty('uri.default') . "/atom/response", $view);
    dress('comment_atom_url', $context->getProperty('uri.default') . "/atom/comment", $view);
    dress('trackback_atom_url', $context->getProperty('uri.default') . "/atom/trackback", $view);
    dress('owner_url', $context->getProperty('uri.blog') . "/owner", $view);
    dress('textcube_name', TEXTCUBE_NAME, $view);
    dress('textcube_version', TEXTCUBE_VERSION, $view);
    dress('tattertools_name', TEXTCUBE_NAME, $view);
    // For skin legacy.
    dress('tattertools_version', TEXTCUBE_VERSION, $view);
}
开发者ID:webhacking,项目名称:Textcube,代码行数:42,代码来源:blogskin.php


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