function printIphoneTagsView($tags) { global $blogURL, $service; ob_start(); list($maxTagFreq, $minTagFreq) = getTagFrequencyRange(); foreach ($tags as $tag) { $printTag .= '<li class="tag"> <a href="' . $blogURL . '/tag/' . $tag['id'] . '" class="cloud' . getTagFrequency($tag, $maxTagFreq, $minTagFreq) . '" >' . htmlspecialchars($tag['name']); $printTag .= '</a> </li>'; } $view = ob_get_contents(); ob_end_clean(); return $printTag; }
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; }
<?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($cache->contents)) { $tagView = $cache->contents; } else { $tagView = $skin->siteTag; list($maxTagFreq, $minTagFreq) = getTagFrequencyRange(); $itemsView = ''; foreach ($siteTags as $siteTag) { $itemView = $skin->siteTagItem; dress('tag_name', htmlspecialchars($siteTag['name']), $itemView); dress('tag_link', $context->getProperty('uri.blog') . "/tag/" . ($context->getProperty('blog.useSloganOnTag', true) ? URL::encode($siteTag['name'], $service['useEncodedURL']) : $siteTag['id']), $itemView); dress('tag_class', "cloud" . getTagFrequency($siteTag['name'], $maxTagFreq, $minTagFreq), $itemView); $itemsView .= $itemView; } dress('tag_rep', $itemsView, $tagView); if (isset($cache)) { $cache->contents = $tagView; $cache->update(); } } dress('tag', $tagView, $view);
function printMobileTagsView($tags) { $context = Model_Context::getInstance(); ob_start(); list($maxTagFreq, $minTagFreq) = getTagFrequencyRange(); foreach ($tags as $tag) { $printTag .= '<li class="tag"> <a href="' . $context->getProperty('uri.blog') . '/tag/' . $tag['id'] . '" class="cloud' . getTagFrequency($tag, $maxTagFreq, $minTagFreq) . '" >' . htmlspecialchars($tag['name']); $printTag .= '</a> </li>'; } $view = ob_get_contents(); ob_end_clean(); return $printTag; }