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


PHP mso_find_ts_file函数代码示例

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


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

示例1: exit

<?php

if (!defined('BASEPATH')) {
    exit('No direct script access allowed');
}
/**
 * MaxSite CMS
 * (c) http://max-3000.com/
 */
if (mso_get_option('page_404_http_not_found', 'templates', 1)) {
    header('HTTP/1.0 404 Not Found');
}
if ($fn = mso_find_ts_file('main/main-start.php')) {
    require $fn;
}
echo NR . '<div class="mso-type-page_404">' . NR;
if ($f = mso_page_foreach('page_404')) {
    require $f;
    // подключаем кастомный вывод
} else {
    if ($fn = mso_find_ts_file('type/page_404/units/page_404.php')) {
        require $fn;
    }
}
echo NR . '</div><!-- class="mso-type-page_404" -->' . NR;
if ($fn = mso_find_ts_file('main/main-end.php')) {
    require $fn;
}
# end file
开发者ID:Kmartynov,项目名称:cms,代码行数:29,代码来源:page_404.php

示例2: mso_get_cat_from_id

                $cat_info = mso_get_cat_from_id($cat_id);
                // все данные рубрики
                // название рубрики и ссылка
                echo '<div class="mso-header-home-cat">' . '<a href="' . getinfo('site_url') . 'category/' . $cat_info['category_slug'] . '">' . htmlspecialchars($cat_info['category_name']) . '</a>' . '</div>';
                // выводить описание рубрики
                if (mso_get_option('default_description_home_cat', 'templates', '0') and $cat_info['category_desc']) {
                    echo '<div class="mso-description-cat">' . $cat_info['category_desc'] . '</div>';
                }
                if ($f = mso_page_foreach('home-cat-block-out-pages-do')) {
                    require $f;
                }
                mso_set_val('container_class', 'mso-type-home mso-type-home-cat-block mso-type-home-cat-block-list');
                if (mso_get_option('default_description_home', 'templates', '0')) {
                    mso_set_val('list_line_format', '[title] - [date] [meta_description]');
                }
                if ($fn = mso_find_ts_file('type/_def_out/list/list.php')) {
                    require $fn;
                }
            }
            // endif $pages
        }
        // end foreach $home_cat_block
    }
    mso_add_cache($key_home_cache, ob_get_flush(), 900);
}
// if $k
if ($f = mso_page_foreach('home-cat-block-posle')) {
    require $f;
}
echo NR . '</div><!-- class="mso-type-home-cat-block" -->' . NR;
# end file
开发者ID:Kmartynov,项目名称:cms,代码行数:31,代码来源:home-cat-block-list.php

示例3: mso_get_pages

            }
            $pages = mso_get_pages($par, $temp);
            if ($pages) {
                $cat_info = mso_get_cat_from_id($cat_id);
                // все данные рубрики
                // название рубрики и ссылка
                echo '<div class="mso-header-home-cat">' . '<a href="' . getinfo('site_url') . 'category/' . $cat_info['category_slug'] . '">' . htmlspecialchars($cat_info['category_name']) . '</a>' . '</div>';
                // выводить описание рубрики
                if (mso_get_option('default_description_home_cat', 'templates', '0') and $cat_info['category_desc']) {
                    echo '<div class="mso-description-cat">' . $cat_info['category_desc'] . '</div>';
                }
                if ($f = mso_page_foreach('home-cat-block-out-pages-do')) {
                    require $f;
                }
                mso_set_val('container_class', 'mso-type-home mso-type-home-cat-block mso-type-home-cat-block-full');
                if ($fn = mso_find_ts_file('type/_def_out/full/full.php')) {
                    require $fn;
                }
            }
            // endif $pages
        }
        // end foreach $home_cat_block
    }
    mso_add_cache($key_home_cache, ob_get_flush(), 900);
}
// if $k
if ($f = mso_page_foreach('home-cat-block-posle')) {
    require $f;
}
echo NR . '</div><!-- class="mso-type-home-cat-block" -->' . NR;
# end file
开发者ID:Kmartynov,项目名称:cms,代码行数:31,代码来源:home-cat-block-full.php

示例4: exit

if (!defined('BASEPATH')) {
    exit('No direct script access allowed');
}
/**
 * MaxSite CMS
 * (c) http://max-3000.com/
 */
// для users может быть несколько разных действий в зависимости от сегментов
// формируем по ним правильный путь к файлу
if (mso_segment(3) == 'edit') {
    if ($fn = mso_find_ts_file('type/users/units/users-form.php')) {
        require $fn;
        return;
    }
} elseif (mso_segment(3) == 'lost') {
    if ($fn = mso_find_ts_file('type/users/units/users-form-lost.php')) {
        require $fn;
        return;
    }
} elseif (mso_segment(2) == '') {
    if ($fn = mso_find_ts_file('type/users/units/users-all.php')) {
        require $fn;
        return;
    }
} else {
    if ($fn = mso_find_ts_file('type/users/units/users.php')) {
        require $fn;
        return;
    }
}
# end file
开发者ID:Kmartynov,项目名称:cms,代码行数:31,代码来源:users.php

示例5: mso_tmpl_ts

function mso_tmpl_ts($fn, $replace = true)
{
    if ($fn = mso_find_ts_file($fn)) {
        return mso_tmpl($fn, $replace);
    } else {
        return '?>';
    }
}
开发者ID:rettebinu,项目名称:cms,代码行数:8,代码来源:common.php

示例6: eval

} else {
    $edit_link = '';
}
if ($comments or $page['page_comment_allow']) {
    echo NR . '<div class="mso-type-page-comments">' . NR;
}
if ($f = mso_page_foreach('page-comments-do-list')) {
    require $f;
}
if ($page_text_ok and $comments) {
    echo '<div class="mso-comments">';
    eval(mso_tmpl_ts('type/page/units/page-comments-count-tmpl.php'));
    echo '<section>';
    static $comment_num = 0;
    // номер комментария по порядку - если нужно выводить в type_foreach-файле
    if ($fn = mso_find_ts_file('type/page/units/page-comments-article-tmpl.php')) {
        $tmpl = mso_tmpl($fn);
    }
    foreach ($comments as $comment) {
        $comment_num++;
        if ($f = mso_page_foreach('page-comments')) {
            require $f;
            continue;
            // следующая итерация
        }
        extract($comment);
        if ($comment_num & 1) {
            $a_class = 'mso-comment-odd';
        } else {
            $a_class = 'mso-comment-even';
        }
开发者ID:Kmartynov,项目名称:cms,代码行数:31,代码来源:page-comments.php

示例7: samborsky_polls_archive_404

function samborsky_polls_archive_404($args = array())
{
    $archive_url = mso_get_option('plugin_samborsky_polls', 'plugins', array('archive_url' => 'polls-archive'));
    if (mso_segment(1) == $archive_url['archive_url']) {
        if ($fn = mso_find_ts_file('main/main-start.php')) {
            require $fn;
        }
        echo samborsky_polls_archive();
        if ($fn = mso_find_ts_file('main/main-end.php')) {
            require $fn;
        }
        # по хуку custom_page_404 нужно возвращать true, если не требуется обработка по page_404
        return true;
    }
    return $args;
}
开发者ID:Kmartynov,项目名称:cms,代码行数:16,代码来源:index.php


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