本文整理汇总了PHP中is_type函数的典型用法代码示例。如果您正苦于以下问题:PHP is_type函数的具体用法?PHP is_type怎么用?PHP is_type使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了is_type函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: mkj_sc_head
function mkj_sc_head($args = array())
{
if (!is_type('page')) {
return $args;
}
// Настройки плагина.
$options = mso_get_option('plugin_mkj_sc', 'plugins', array());
if (!isset($options['type']) or !$options['type']) {
$options['type'] = false;
}
if (!isset($options['css']) or !$options['css']) {
$options['css'] = '';
}
// Если произвольные таблицы стилей пусты, грузим стандартный стиль.
if (!$options['css']) {
echo '<link rel="stylesheet" href="' . getinfo('plugins_url') . 'mkj_sc/mkj_sc.css">', NR;
}
if (!$options['type'] or $options['css']) {
echo '<style>', NR;
if (!$options['type']) {
echo 'input.comments_submit { display: none; }', NR;
}
if ($options['css']) {
echo $options['css'], NR;
}
echo '</style>', NR;
}
return $args;
}
开发者ID:Kmartynov,项目名称:cms,代码行数:29,代码来源:index.php
示例2: template_options_autoload
function template_options_autoload($args = array())
{
mso_create_allow('template_options_admin', t('Доступ к настройкам шаблона'));
if (is_type('admin')) {
mso_hook_add('admin_init', 'template_options_admin_init');
}
# хук на админку
}
开发者ID:LeonisX,项目名称:cms,代码行数:8,代码来源:index.php
示例3: rater_autoload
function rater_autoload($args = array())
{
if (is_type('page')) {
mso_hook_add('head', 'rater_head');
mso_hook_add('content_end', 'rater_content_end');
}
mso_register_widget('rater_widget', t('Рейтинг страниц'));
# регистрируем виджет
}
开发者ID:rb2,项目名称:MaxSite-CMS,代码行数:9,代码来源:index.php
示例4: addzakl_autoload
function addzakl_autoload($args = array())
{
if (is_type('page')) {
$options = mso_get_option('plugin_addzakl', 'plugins', array());
if (!isset($options['priory'])) {
$options['priory'] = 10;
}
mso_hook_add('content_end', 'addzakl_content_end', $options['priory']);
}
}
开发者ID:rb2,项目名称:MaxSite-CMS,代码行数:10,代码来源:index.php
示例5: samborsky_ping_autoload
function samborsky_ping_autoload($args = array())
{
// Ставим хук на публикацию. При mso_new_page и mso_edit_page
mso_hook_add('new_page_publish', 'samborsky_ping_do');
mso_hook_add('edit_page_publish', 'samborsky_ping_do');
if (is_type('admin')) {
// хук на админку
mso_hook_add('admin_init', 'samborsky_ping_init');
}
}
开发者ID:Kmartynov,项目名称:cms,代码行数:10,代码来源:index.php
示例6: samborsky_polls_autoload
function samborsky_polls_autoload($args = array())
{
if (is_type('admin')) {
// хук на админку
mso_hook_add('admin_init', 'samborsky_polls_init');
}
// Ядро
require getinfo('plugins_dir') . 'samborsky_polls/sp_kernel.php';
// Хук в <head></head>
mso_hook_add('head', 'samborsky_polls_head');
mso_hook_add('custom_page_404', 'samborsky_polls_archive_404');
# По какому адресу будем показывать архив
mso_register_widget('samborsky_polls_widget', t('Голосования'));
# регистрируем виджет
}
开发者ID:rb2,项目名称:MaxSite-CMS,代码行数:15,代码来源:index.php
示例7: is_type_dg
/**
* @param string|callable $type
* @param callable|null $var
* @return callable
* @throws Exception
*/
function is_type_dg($type, $var = null)
{
if (is_string($type)) {
$type = return_dg($type);
} else {
debug_enforce(is_type($type, 'callable'), "Invalid type identifier " . var_dump_human_compact($type));
}
if (null === $var) {
$var = tuple_get();
} else {
debug_enforce(is_type($var, 'callable'), "is_type_dg expects callable returning actual variable, given: " . var_dump_human_compact($var));
}
return function () use($type, $var) {
$args = func_get_args();
return is_type(call_user_func_array($type, $args), call_user_func_array($var, $args));
};
}
开发者ID:tapiau,项目名称:muyo,代码行数:23,代码来源:misc.php
示例8: elseif
$add_body_class = 'ie6';
} elseif (stristr($_SERVER['HTTP_USER_AGENT'], 'MSIE 7.0')) {
$add_body_class = 'ie7';
} elseif (stristr($_SERVER['HTTP_USER_AGENT'], 'MSIE 8.0')) {
$add_body_class = 'ie8';
} elseif (stristr($_SERVER['HTTP_USER_AGENT'], 'MSIE 9.0')) {
$add_body_class = 'ie9';
} elseif (stristr($_SERVER['HTTP_USER_AGENT'], 'MSIE 10.0')) {
$add_body_class = 'ie10';
} elseif (stristr($_SERVER['HTTP_USER_AGENT'], 'Trident/7')) {
$add_body_class = 'ie11';
} elseif (stristr($_SERVER['HTTP_USER_AGENT'], 'Edge/12')) {
$add_body_class = 'edge';
}
$add_body_class .= ' is-type-' . getinfo('type');
if (is_type('home')) {
mso_set_val('body_class', 'body-home ' . $add_body_class);
} else {
mso_set_val('body_class', 'body-' . getinfo('type') . ' ' . $add_body_class);
}
// возвращает путь к странице через связи дочерние-родительские страницы
function parents_out_way_to($page_id = 0)
{
$cache_key = 'parents_out_way_to' . $page_id;
$k = mso_get_cache($cache_key);
if ($k) {
return $k;
}
// да есть в кэше
$r = '';
$CI =& get_instance();
开发者ID:nicothin,项目名称:nicothin_ru,代码行数:31,代码来源:functions.php
示例9: exit
<?php
if (!defined('BASEPATH')) {
exit('No direct script access allowed');
}
$p->format('edit', '<i class="i-edit t-gray600 hover-t-black" title="Edit page"></i>', '<div class="b-right mar10-t">', '</div>');
$p->format('title', '<h1 class="t-gray700 bor-double-b bor3px bor-gray300 pad5-b">', '</h1>', !is_type('page'));
$p->format('date', 'j F Y г.', '<time datetime="[page_date_publish_iso]" class="i-calendar">', '</time>');
$p->format('view_count', '<span class="i-eye mar15-l">' . tf('Просмотров') . ': ', '</span>');
$p->format('comments_count', '<span class="i-comment mar15-l">' . tf('Комментарии') . ': ', '</span>');
$p->format('cat', '<i class="i-bookmark-o mar10-l"></i>', '<br><span class="i-bookmark" title="' . tf('Рубрика записи') . '">', '</span>');
$p->format('tag', '<i class="i-tag mar10-l"></i>', '<br><span class="i-tags links-no-color" title="' . tf('Метка записи') . '">', '</span>');
$p->html(NR . '<header class="mar20-b">');
$p->line('[edit][title]');
$p->div_start('info info-top t-gray600 t90');
$p->line('[date][view_count][comments_count][cat][tag]');
$p->div_end('info info-top');
$p->html('</header>');
# end of file
开发者ID:Kmartynov,项目名称:cms,代码行数:19,代码来源:info-top.php
示例10: calendar_widget_custom
function calendar_widget_custom($arg = array(), $num = 1)
{
# массив названий месяцев
if (!isset($arg['months'])) {
$arg['months'] = array(t('Январь'), t('Февраль'), t('Март'), t('Апрель'), t('Май'), t('Июнь'), t('Июль'), t('Август'), t('Сентябрь'), t('Октябрь'), t('Ноябрь'), t('Декабрь'));
}
# массив названий дней недели
if (!isset($arg['days'])) {
$arg['days'] = array(t('Пн'), t('Вт'), t('Ср'), t('Чт'), t('Пт'), t('Сб'), t('Вс'));
}
# оформление виджета
if (!isset($arg['header'])) {
$arg['header'] = '<h2 class="box"><span>' . t('Календарь') . '</span></h2>';
}
if (!isset($arg['block_start'])) {
$arg['block_start'] = '<div class="calendar">';
}
if (!isset($arg['block_end'])) {
$arg['block_end'] = '</div>';
}
if (!isset($arg['elem_previous'])) {
$arg['elem_previous'] = '««';
}
if (!isset($arg['elem_next'])) {
$arg['elem_next'] = '»»';
}
$prefs = array('start_day' => 'monday', 'month_type' => 'long', 'day_type' => 'long', 'show_next_prev' => TRUE, 'local_time' => time(), 'next_prev_url' => getinfo('site_url') . 'archive/');
$prefs['template'] = '
{table_open}<table border="0" cellpadding="0" cellspacing="0">{/table_open}
{heading_row_start}<tr>{/heading_row_start}
{heading_previous_cell}<th><a href="{previous_url}">' . $arg['elem_previous'] . '</a></th>{/heading_previous_cell}
{heading_title_cell}<th colspan="{colspan}">{heading}</th>{/heading_title_cell}
{heading_next_cell}<th><a href="{next_url}">' . $arg['elem_next'] . '</a></th>{/heading_next_cell}
{heading_row_end}</tr>{/heading_row_end}
{week_row_start}<tr class="week">{/week_row_start}
{week_day_cell}<td>{week_day}</td>{/week_day_cell}
{week_row_end}</tr>{/week_row_end}
{cal_row_start}<tr>{/cal_row_start}
{cal_cell_start}<td>{/cal_cell_start}
{cal_cell_content}<a href="{content}">{day}</a>{/cal_cell_content}
{cal_cell_content_today}<div class="today-content"><a href="{content}">{day}</a></div>{/cal_cell_content_today}
{cal_cell_no_content}{day}{/cal_cell_no_content}
{cal_cell_no_content_today}<div class="today">{day}</div>{/cal_cell_no_content_today}
{cal_cell_blank} {/cal_cell_blank}
{cal_cell_end}</td>{/cal_cell_end}
{cal_row_end}</tr>{/cal_row_end}
{table_close}</table>{/table_close}';
$CI =& get_instance();
$CI->load->library('calendar', $prefs);
$mktime = mktime() + getinfo('time_zone') * 60 * 60;
// с учетом часового пояса ?
# если это архив, то нужно показать календарь на этот год и месяц
if (is_type('archive')) {
$year = (int) mso_segment(2);
if ($year > date('Y', $mktime) or $year < 2000) {
$year = date('Y', $mktime);
}
$month = (int) mso_segment(3);
if ($month > 12 or $month < 1) {
$month = date('m', $mktime);
}
} else {
$year = date('Y', $mktime);
$month = date('m', $mktime);
}
# для выделения дат нужно смотреть записи, которые в этом месяце
$CI->db->select('page_date_publish');
$CI->db->from('page');
$CI->db->join('page_type', 'page_type.page_type_id = page.page_type_id');
$CI->db->where('page_status', 'publish');
$CI->db->where('page_type_name', 'blog');
$CI->db->where('page_date_publish >= ', mso_date_convert_to_mysql($year, $month));
$CI->db->where('page_date_publish < ', mso_date_convert_to_mysql($year, $month + 1));
# не выводить неопубликованные
$CI->db->where('page_date_publish < ', mso_date_convert('Y-m-d H:i:s', date('Y-m-d H:i:s')));
$query = $CI->db->get();
$data = array();
if ($query->num_rows() > 0) {
$pages = $query->result_array();
foreach ($pages as $key => $page) {
$d = (int) mso_date_convert('d', $page['page_date_publish']);
$data[$d] = getinfo('site_url') . 'archive/' . $year . '/' . $month . '/' . $d;
}
/* $data = array(
3 => 'http://your-site.com/news/article/2006/03/',
7 => 'http://your-site.com/news/article/2006/07/" title="123',
26 => 'http://your-site.com/news/article/2006/26/'
); */
}
$out = $CI->calendar->generate($year, $month, $data);
//.........这里部分代码省略.........
开发者ID:rb2,项目名称:MaxSite-CMS,代码行数:101,代码来源:index.php
示例11: name_site
function name_site()
{
return !is_type('home') ? $this->link(getinfo('siteurl'), getinfo('name_site')) : getinfo('name_site');
}
开发者ID:Kmartynov,项目名称:cms,代码行数:4,代码来源:page-out.php
示例12: comment_button_head
function comment_button_head($arg = array())
{
if (is_type('page')) {
echo '<script src="' . getinfo('plugins_url') . 'comment_button/comment_button.js"></script>' . NR;
}
}
开发者ID:buyvolov,项目名称:cms,代码行数:6,代码来源:index.php
示例13: multipage_pagination
function multipage_pagination()
{
if (!is_type('page')) {
return true;
}
global $multipage_pagination;
if (isset($multipage_pagination)) {
$options = mso_get_option('plugin_multipage', 'plugins', array());
if (isset($options['before_pag'])) {
echo $options['before_pag'];
}
mso_hook('pagination', $multipage_pagination);
if (isset($options['after_pag'])) {
echo $options['after_pag'];
}
}
}
开发者ID:Kmartynov,项目名称:cms,代码行数:17,代码来源:index.php
示例14: exit
<?php
if (!defined('BASEPATH')) {
exit('No direct script access allowed');
}
/*
info-top файл
предыдущая - следующая запись
вывод рубрик перед заголовком записи
*/
$np_out = '';
if (is_type('page') and $p->val('page_type_name') == 'blog') {
$np = mso_next_prev_page(array('page_id' => $p->val('page_id'), 'page_categories' => $p->val('page_categories'), 'page_date_publish' => $p->val('page_date_publish'), 'use_category' => false));
if ($np['next']) {
$np_out .= '<div class="b-left"><i class="i-long-arrow-left"></i> ' . $p->link(mso_page_url($np['next']['page_slug']), $np['next']['page_title']) . '</div>';
}
if ($np['prev']) {
$np_out .= '<div class="b-right">' . $p->link(mso_page_url($np['prev']['page_slug']), $np['prev']['page_title']) . ' <i class="i-long-arrow-right"></i></div>';
}
$p->block($np_out, '<div class="next-prev-page clearfix t90">', '</div>');
}
$p->format('edit', '<i class="i-edit t-gray600 hover-t-black" title="Edit page"></i>', '<div class="b-right mar10-t">', '</div>');
$p->format('title', '<h1 class="t-gray700 bor-double-b bor3px bor-gray300 pad5-b">', '</h1>', false);
$p->format('date', 'j F Y г.', '<time datetime="[page_date_publish_iso]" class="i-calendar">', '</time>');
$p->format('view_count', '<span class="i-eye mar15-l">' . tf('Просмотров') . ': ', '</span>');
$p->format('comments_count', '<span class="i-comment mar15-l">Комментарии: ', '</span>');
$p->format('cat', '<i class="i-bookmark-o mar10-l"></i>', '<br><span class="i-bookmark" title="' . tf('Рубрика записи') . '">', '</span>');
$p->format('tag', '<i class="i-tag mar10-l"></i>', '<br><span class="i-tags links-no-color" title="' . tf('Метка записи') . '">', '</span>');
$p->html(NR . '<header class="mar20-b">');
$p->line('[edit][title]');
$p->div_start('info info-top t-gray600 t90');
开发者ID:buyvolov,项目名称:cms,代码行数:31,代码来源:info-top-page.php
示例15: tweetmeme_com_content
function tweetmeme_com_content($text = '')
{
global $page;
if (!is_type('page') and !is_type('home')) {
return $text;
}
// если запись не опубликована, не отображаем блок
if (is_type('page') and isset($page['page_status']) and $page['page_status'] != 'publish') {
return $text;
}
$options = mso_get_option('plugin_tweetmeme_com', 'plugins', array());
// получаем опции
// отображать только на одиночной странице
if (!isset($options['show_only_page'])) {
$options['show_only_page'] = 0;
}
if ($options['show_only_page'] and !is_type('page')) {
return $text;
}
if (is_type('page') and isset($options['page_type']) and $options['page_type']) {
$p_type_name = mso_explode($options['page_type'], false);
// нет у указанных типах страниц
if (!in_array($page['page_type_name'], $p_type_name)) {
return $text;
}
}
// стиль выравнивания
if (!isset($options['style'])) {
$options['style'] = '';
}
if (!isset($options['align'])) {
$options['align'] = 'right';
}
if ($options['style']) {
$style = ' style="' . $options['style'] . '"';
} else {
if ($options['align'] == 'left') {
$style = ' style="float: left; margin-right: 10px;"';
} elseif ($options['align'] == 'right') {
$style = ' style="float: right; margin-left: 10px; width: "';
} else {
$style = '';
}
}
if (!isset($options['twitter_orig'])) {
$options['twitter_orig'] = false;
}
// если использовать вывод с tweetmeme.com
if (!$options['twitter_orig']) {
if (!isset($options['tweetmeme_style'])) {
$options['tweetmeme_style'] = 'none';
}
if (is_type('home')) {
$js1 = 'tweetmeme_url = \'' . getinfo('site_url') . 'page/' . $page['page_slug'] . '\';';
} else {
$js1 = 'tweetmeme_url = \'' . mso_current_url(true) . '\';';
}
if ($options['tweetmeme_style'] == 'compact') {
$js2 = 'tweetmeme_style = \'compact\';';
} else {
$js2 = '';
}
if ($js1 or $js2) {
$js = '<script>' . $js1 . $js2 . '</script>';
} else {
$js = '';
}
// $text = '<span style="display: none"><![CDATA[<noindex>]]></span><div class="tweetmeme_com"' . $style . '>' . $js . '<script src="' . getinfo('plugins_url'). 'tweetmeme_com/button.js"></script></div><span style="display: none"><![CDATA[</noindex>]]></span>' . $text;
$text = '<div class="tweetmeme_com"' . $style . '>' . $js . '<script src="http://tweetmeme.com/i/scripts/button.js"></script></div>' . $text;
} else {
// блок выводится с оригинального twitter.com
if (is_type('home')) {
$url = getinfo('site_url') . 'page/' . $page['page_slug'];
} else {
$url = mso_current_url(true);
}
if (!isset($options['twitter_data-count'])) {
$options['twitter_data-count'] = 'vertical';
}
$options['twitter_data-count'] = ' data-count="' . $options['twitter_data-count'] . '" ';
if (!isset($options['twitter_data-via'])) {
$options['twitter_data-via'] = '';
}
if ($options['twitter_data-via']) {
$options['twitter_data-via'] = ' data-via="' . $options['twitter_data-via'] . '" ';
}
$text = '<div class="tweetmeme_com"' . $style . '>' . '<a rel="nofollow" href="http://twitter.com/share" class="twitter-share-button" data-url="' . $url . '"' . $options['twitter_data-count'] . ' data-text="' . $page['page_title'] . '" ' . $options['twitter_data-via'] . '>Tweet</a>
<script src="http://platform.twitter.com/widgets.js"></script>' . '</div>' . $text;
}
return $text;
}
开发者ID:rb2,项目名称:MaxSite-CMS,代码行数:91,代码来源:index.php
示例16: mso_get_pages
//.........这里部分代码省略.........
$r['function_add_custom_sql'] = false;
} else {
if (!function_exists($r['function_add_custom_sql'])) {
$r['function_add_custom_sql'] = false;
}
}
// хук, если нужно поменять параметры
// $r_restore = $r;
$r = mso_hook('mso_get_pages', $r);
# для каждого типа страниц строится свой sql-запрос
# мы оформляем его в $CI, а здесь только выполняем $CI->db->get();
// если указана кастомная функция, то выполняем r1
if ($r['custom_func'] and function_exists($r['custom_func'])) {
$r['custom_func']($r, $pag);
} elseif ($r['custom_type']) {
$custom_type = $r['custom_type'];
if ($custom_type == 'home') {
_mso_sql_build_home($r, $pag);
} elseif ($custom_type == 'page') {
_mso_sql_build_page($r, $pag);
} elseif ($custom_type == 'category') {
_mso_sql_build_category($r, $pag);
} elseif ($custom_type == 'tag') {
_mso_sql_build_tag($r, $pag);
} elseif ($custom_type == 'archive') {
_mso_sql_build_archive($r, $pag);
} elseif ($custom_type == 'search') {
_mso_sql_build_search($r, $pag);
} elseif ($custom_type == 'author') {
_mso_sql_build_author($r, $pag);
} else {
return array();
}
} elseif (is_type('home')) {
_mso_sql_build_home($r, $pag);
} elseif (is_type('page')) {
_mso_sql_build_page($r, $pag);
} elseif (is_type('category')) {
_mso_sql_build_category($r, $pag);
} elseif (is_type('tag')) {
_mso_sql_build_tag($r, $pag);
} elseif (is_type('archive')) {
_mso_sql_build_archive($r, $pag);
} elseif (is_type('search')) {
_mso_sql_build_search($r, $pag);
} elseif (is_type('author')) {
_mso_sql_build_author($r, $pag);
} else {
return array();
}
// сам запрос и его обработка
// $query = $CI->db->get();
// нужно добавить SQL_BUFFER_RESULT
// поскольку CodeIgniteryt не позволяет добавлять его явно, придется извращаться
$query_sql = str_replace('SELECT ', 'SELECT SQL_BUFFER_RESULT ', $CI->db->_compile_select());
// дурацкое экранирование CodeIgniter - используем свои костыли для запятых в запросе
$query_sql = str_replace('_MSO_ZAP_', ',', $query_sql);
$query = $CI->db->query($query_sql);
$CI->db->_reset_select();
// восстанавливать после запроса???
// $r = mso_hook('mso_get_pages_restore', $r_restore);
if ($query and $query->num_rows() > 0) {
$pages = $query->result_array();
$MSO->data['pages_is'] = true;
// ставим признак, что записи получены
if (is_type('page')) {
开发者ID:buyvolov,项目名称:cms,代码行数:67,代码来源:page.php
示例17: exit
exit('No direct script access allowed');
}
/**
* MaxSite CMS
* (c) http://max-3000.com/
*/
// здесь определим $MAIN_FILE — ои используется в main-end.php
global $MAIN_FILE;
// если есть custom/main-template.php, то испольузм его
if ($fn = mso_fe('custom/main-template.php')) {
$MAIN_FILE = $fn;
} else {
// main-шаблон вывода находится в meta-поле page_template
// это определено в shared/meta/meta.ini
// если метаполе не задано, то может использоваться main/type/page/main.php
if (is_type('page') and isset($pages) and isset($pages[0])) {
if ($page_template = mso_page_meta_value('page_template', $pages[0]['page_meta'])) {
if ($fn = mso_fe('main/' . $page_template . '/main.php')) {
mso_set_val('main_file', $fn);
// выставляем путь к файлу
}
} elseif ($fn = mso_fe('main/type/page/main.php')) {
mso_set_val('main_file', $fn);
// выставляем путь к файлу
} else {
if ($page_template = mso_get_option('main_template_page', 'templates', '')) {
if ($fn = mso_fe('main/' . $page_template . '/main.php')) {
mso_set_val('main_file', $fn);
// выставляем путь к файлу
}
}
开发者ID:buyvolov,项目名称:cms,代码行数:31,代码来源:main-start.php
示例18: exit
<?php
if (!defined('BASEPATH')) {
exit('No direct script access allowed');
}
/*
вывод заданного изображения из заданного каталога
*/
// где выводить
$component_output = mso_get_option('component_image_select_output', 'templates', array());
if (!in_array('all', $component_output)) {
if (!in_array(getinfo('type'), $component_output)) {
return;
}
}
$subdir = mso_get_option('default_header_image', 'templates', '-template-');
if ($subdir == '-template-') {
// каталог шаблона
$subdir = getinfo('template_url') . 'images/headers/';
} else {
$subdir = getinfo('uploads_url') . $subdir . '/';
}
// каталог в uploads
$img = '<img src="' . $subdir . mso_get_option('component_image_select', 'templates', '') . '" alt="" title="">';
// ссылка на главную
$component_image_select_link_home = mso_get_option('component_image_select_link_home', 'templates', true);
if ($component_image_select_link_home and !is_type('home')) {
$img = '<a href="' . getinfo('site_url') . '">' . $img . '</a>';
}
echo '<div class="image-select"><div class="wrap">' . $img . '</div></div>';
# end file
开发者ID:ZerGabriel,项目名称:d2_for_MaxSite_CMS,代码行数:31,代码来源:image-select.php
示例19: exit
<?php
if (!defined('BASEPATH')) {
exit('No direct script access allowed');
}
echo '<div class="info info-top">';
mso_page_title($page_slug, $page_title, '<h1>', '</h1>', !is_type('page'));
mso_page_date($page_date_publish, array('format' => 'D, j F Y г.', 'days' => tf('Понедельник Вторник Среда Четверг Пятница Суббота Воскресенье'), 'month' => tf('января февраля марта апреля мая июня июля августа сентября октября ноября декабря')), '<span>', '</span>');
//mso_page_author_link($users_nik, $page_id_autor, '<br><span>Автор:</span> ', '');
echo '</div>';
开发者ID:rb2,项目名称:MaxSite-CMS,代码行数:10,代码来源:info-top.php
示例20: mso_link_rel
function mso_link_rel($rel = 'canonical', $add = '')
{
if (!$rel) {
return;
}
// пустой тип
if ($rel == 'canonical') {
if ($add) {
echo '<link rel="canonical" ' . $add . '>';
} else {
// для разных типов данных формируем разный канонический адрес
// он напрямую зависит от типа
$url = '';
if (is_type('page') or is_type('category') or is_type('tag') or is_type('author')) {
$url = getinfo('site_url') . mso_segment(1) . '/' . mso_segment(2);
} elseif (is_type('home')) {
$url = getinfo('site_url');
}
if ($url) {
echo '<link rel="canonical" href="' . $url . '">' . NR;
}
}
} else {
if ($add) {
echo '<link rel="' . $rel . '" ' . $add . '>';
}
}
}
开发者ID:rb2,项目名称:MaxSite-CMS,代码行数:28,代码来源:common.php
注:本文中的is_type函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论