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


PHP mw_includes_url函数代码示例

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


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

示例1: index

 public function index()
 {
     $is_installed = mw_is_installed();
     if (!$is_installed) {
         if (!$is_installed) {
             $installer = new InstallController();
             return $installer->index();
         }
     } else {
         if (defined('MW_VERSION')) {
             $config_version = Config::get('microweber.version');
             if ($config_version != MW_VERSION) {
                 $this->app->update->post_update(MW_VERSION);
             }
         }
     }
     if (!defined('MW_BACKEND')) {
         define('MW_BACKEND', true);
     }
     //create_mw_default_options();
     mw()->content_manager->define_constants();
     if (defined('TEMPLATE_DIR')) {
         $load_template_functions = TEMPLATE_DIR . 'functions.php';
         if (is_file($load_template_functions)) {
             include_once $load_template_functions;
         }
     }
     event_trigger('mw.admin');
     event_trigger('mw_backend');
     $view = modules_path() . 'admin/';
     $hasNoAdmin = User::where('is_admin', 1)->limit(1)->count();
     if (!$hasNoAdmin) {
         $this->hasNoAdmin();
     }
     $view .= (!$hasNoAdmin ? 'create' : 'index') . '.php';
     $layout = new View($view);
     $layout = $layout->__toString();
     $layout = mw()->parser->process($layout);
     event_trigger('on_load');
     $layout = execute_document_ready($layout);
     event_trigger('mw.admin.header');
     $apijs_loaded = mw()->template->get_apijs_url();
     $apijs_settings_loaded = mw()->template->get_apijs_settings_url();
     $default_css = '<link rel="stylesheet" href="' . mw_includes_url() . 'default.css" type="text/css" />';
     if (!stristr($layout, $apijs_loaded)) {
         $rep = 0;
         $default_css = $default_css . "\r\n" . '<script src="' . $apijs_settings_loaded . '"></script>' . "\r\n";
         $default_css = $default_css . "\r\n" . '<script src="' . $apijs_loaded . '"></script>' . "\r\n";
         $layout = str_ireplace('<head>', '<head>' . $default_css, $layout, $rep);
     }
     $template_headers_src = mw()->template->admin_head(true);
     if ($template_headers_src != false and $template_headers_src != '') {
         $layout = str_ireplace('</head>', $template_headers_src . '</head>', $layout, $one);
     }
     return $layout;
 }
开发者ID:MenZil-Team,项目名称:microweber,代码行数:56,代码来源:AdminController.php

示例2: url

.avatartype-mysteryman {
    background: url(<?php 
print mw_includes_url();
?>
img/avatars.jpg) no-repeat;
}
.avatartype-randomcolor {
	background: #9F41AA;
	transition: background-color 0.2s;
	-moz-transition: background-color 0.2s;
	-webkit-transition: background-color 0.2s;
	-o-transition: background-color 0.2;
}
.avatartype-mwuser {
    background: url(<?php 
print mw_includes_url();
?>
img/avatars.jpg) no-repeat 0 -70px;
}
.avatartype-upload {
	width:30px;
	height: 30px;
	border: 1px solid #CACACA;
	background-repeat: no-repeat;
	background-size: cover;
    background-image: url(<?php 
print get_option('avatartype_custom', 'comments');
?>
);
}
.avatars-holder {
开发者ID:hyrmedia,项目名称:microweber,代码行数:31,代码来源:settings.php

示例3: editor_tools


//.........这里部分代码省略.........
         if (isset($page['content_type']) and $page['content_type'] != 'post' and $page['content_type'] != 'page' and $page['content_type'] != 'product') {
             if (isset($page['subtype']) and ($page['subtype'] != 'post' and $page['subtype'] != 'product')) {
                 $standalone_edit = true;
             }
         } elseif (isset($page['content_type']) and $page['content_type'] == 'post') {
             if (isset($page['subtype']) and ($page['subtype'] != 'post' and $page['subtype'] != 'product')) {
                 $standalone_edit = true;
             }
         }
         if ($standalone_edit) {
             if (!isset($page['content'])) {
                 $page['content'] = '<div class="element"></div>';
             }
             $page['content'] = '<div class="edit" field="content" rel="content" contenteditable="true">' . $page['content'] . '</div>';
             $page['render_file'] = false;
         }
         //
         //  $page['content'] = '<div class="edit" field="content" rel="content" contenteditable="true">' . $page['content'] . '</div>';
     }
     $default_css = '';
     $apijs_settings_loaded = '';
     $apijs_loaded = '';
     $p = normalize_path($p, false);
     $l = new \Microweber\View($p_index);
     $l->params = $params;
     $layout = $l->__toString();
     $apijs_loaded = false;
     if ($layout != false) {
         //$apijs_loaded = $this->app->template->get_apijs_url() . '?id=' . CONTENT_ID;
         $apijs_loaded = $this->app->template->get_apijs_url();
         // $apijs_settings_loaded = $this->app->template->get_apijs_settings_url() . '?id=' . CONTENT_ID . '&category_id=' . CATEGORY_ID;
         $apijs_settings_loaded = $this->app->template->get_apijs_settings_url();
         // $is_admin = $this->app->user_manager->is_admin();
         $default_css = '<link rel="stylesheet" href="' . mw_includes_url() . 'default.css" type="text/css" />';
         $headers = event_trigger('site_header', TEMPLATE_NAME);
         $template_headers_append = '';
         $one = 1;
         if (is_array($headers)) {
             foreach ($headers as $modify) {
                 if ($modify != false and is_string($modify) and $modify != '') {
                     $template_headers_append = $template_headers_append . $modify;
                 }
             }
             if ($template_headers_append != false and $template_headers_append != '') {
                 $layout = str_ireplace('</head>', $template_headers_append . '</head>', $l, $one);
             }
         }
         if (function_exists('template_headers_src')) {
             $template_headers_src = template_headers_src();
             if ($template_headers_src != false and $template_headers_src != '') {
                 $layout = str_ireplace('</head>', $template_headers_src . '</head>', $l, $one);
             }
         }
         if (isset($page['active_site_template'])) {
             if ($page['active_site_template'] == '') {
                 $page['active_site_template'] = 'default';
             }
             if ($page['active_site_template'] == 'default') {
                 $active_site_template = $this->app->option_manager->get('current_template', 'template');
             } else {
                 $active_site_template = $page['active_site_template'];
                 if ($active_site_template == 'mw_default') {
                     $active_site_template = 'default';
                 }
             }
             $live_edit_css_folder = userfiles_path() . 'css' . DS . $active_site_template . DS;
开发者ID:microweber,项目名称:microweber,代码行数:67,代码来源:DefaultController.php

示例4: mw_includes_url

<?php

$path = mw_includes_url() . "toolbar/editor_tools/rte_image_editor/";
?>

<script type="text/javascript">
     parent.mw.require("external_callbacks.js");
     mw.require("events.js");
     mw.require("forms.js");
     mw.require("files.js");
     mw.require("tools.js");
     mw.require("url.js");
</script>

<?php 
if (array_key_exists('types', $_GET)) {
    $types = explode(',', $_GET['types']);
} else {
    $types = array('files', 'images', 'videos');
}
?>
<script type="text/javascript">

    var hash = window.location.hash;
    var hash = hash.replace(/#/g, "");

    hash = hash!=='' ? hash : 'insert_html';

    afterMediaIsInserted = function(url, todo, eventType){   /* what to do after image is uploaded (depending on the hash in the url)    */

      if(typeof todo =='undefined'){var todo = false;}
开发者ID:minhkiller,项目名称:microweber,代码行数:31,代码来源:index.php

示例5: uniqid

<?php

$uid = uniqid();
$here = mw_includes_url() . 'toolbar/editor_tools/plupload/';
?>

<script>mw.require('tools.js');</script>
<script>mw.require('url.js');</script>
<script>mw.require('events.js');</script>
<style type="text/css">
    html, body, #container, #pickfiles_<?php 
print $uid;
?>
 {
        position: absolute;
        width: 100%;
        height: 100%;
        top: 0;
        left: 0;
        background: transparent;
    }

    * {
        cursor: pointer;
    }

    .plupload.html5 {
        /* IE does not scales it correctly when visibility is set to hidden  */
        width: 100% !important;
        height: 100% !important;
    }
开发者ID:minhkiller,项目名称:microweber,代码行数:31,代码来源:index.php

示例6: __construct

 public function __construct()
 {
     $this->admin_logo_login = mw_includes_url() . 'images/logo-login.svg';
     $this->defaults();
 }
开发者ID:microweber,项目名称:microweber,代码行数:5,代码来源:Ui.php

示例7: mw_includes_url

?>
css/ui.css"/>
    <link type="text/css" rel="stylesheet" media="all" href="<?php 
echo mw_includes_url();
?>
css/admin.css"/>
    <link type="text/css" rel="stylesheet" media="all" href="<?php 
echo mw_includes_url();
?>
css/components.css"/>
    <link type="text/css" rel="stylesheet" media="all" href="<?php 
echo mw_includes_url();
?>
css/install.css"/>
    <script type="text/javascript" src="<?php 
echo mw_includes_url();
?>
api/jquery.js"></script>
    <?php 
$rand = uniqid();
$ua = $_SERVER['HTTP_USER_AGENT'];
$defhost = strpos($_SERVER['HTTP_USER_AGENT'], 'Linux') ? 'localhost' : '127.0.0.1';
?>
    <script type="text/javascript">
        function prefix_add(el) {
            var val = el.value.replace(/ /g, '').replace(/[^\w\s]/gi, '');
            el.value = val;
            if (val != '') {
                var last = val.slice(-1);
                if (last != '_') {
                    el.value = el.value + '_';
开发者ID:microweber,项目名称:microweber,代码行数:31,代码来源:install.php


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