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


PHP Lobby::addScript方法代码示例

本文整理汇总了PHP中Lobby::addScript方法的典型用法代码示例。如果您正苦于以下问题:PHP Lobby::addScript方法的具体用法?PHP Lobby::addScript怎么用?PHP Lobby::addScript使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Lobby的用法示例。


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

示例1: addScript

 public function addScript($fileName)
 {
     $url = "/contents/apps/{$this->id}/src/JS/{$fileName}";
     \Lobby::addScript("{$this->id}-{$fileName}", $url);
 }
开发者ID:saviobosco,项目名称:lobby,代码行数:5,代码来源:App.php

示例2: array

<?php

if (!\Lobby::status("lobby.serve")) {
    /**
     * For enabling access by \Lobby\Panel
     */
    require __DIR__ . "/class.panel.php";
    /**
     * Panel UI
     */
    if (!\Lobby::status("lobby.install")) {
        \Lobby::addScript("superfish", "/includes/lib/modules/panel/lib/superfish.js");
        \Lobby::addStyle("panel", "/includes/lib/modules/panel/lib/panel.css");
        \Lobby::addScript("panel", "/includes/lib/modules/panel/lib/panel.js");
    }
    if (\Lobby::$config['server_check'] === true) {
        /**
         * Default Items provided by the module
         */
        \Lobby\Panel::addTopItem("netStatus", array("html" => "<span id='net' title='Online'></span>", "position" => "right"));
        \Lobby::addScript("panel-item-connection", "/includes/lib/modules/panel/connection/connection.js");
    }
    \Lobby::hook("body.begin", function () {
        include __DIR__ . "/panel.ui.php";
    });
    \Lobby::hook("admin.body.begin", function () {
        include __DIR__ . "/panel.ui.php";
    });
}
开发者ID:anandubajith,项目名称:lobby,代码行数:29,代码来源:load.php

示例3:

<?php

if (!\Lobby::status("lobby.admin")) {
    \Lobby::addScript("keyring_module", L_URL . "/contents/apps/keyring/module/js/keyring.js");
}
开发者ID:saviobosco,项目名称:lobby,代码行数:5,代码来源:load.php

示例4: run

 /**
  * Return the app class object
  */
 public function run()
 {
     if ($this->app) {
         require_once L_DIR . "/includes/src/App.php";
         require_once $this->appDir . "/App.php";
         \Lobby::addScript("app", "/includes/lib/core/JS/app.js");
         $appInfo = $this->info;
         $className = str_replace("-", "_", $this->app);
         /* Create the \Lobby\App Object */
         $class = new $className();
         /* Send app details to the \Lobby\App */
         $class->setTheVars($appInfo);
         /**
          * Define the App Constants
          */
         define("APP_DIR", $this->appDir);
         define("APP_SRC", $this->info['srcURL']);
         if (!defined("APP_URL")) {
             /**
              * We specifically check if APP_URL is defined,
              * because it may be already defined by `singleapp` module.
              */
             define("APP_URL", $this->info['URL']);
         }
         /* Return the App Object */
         return $class;
     }
 }
开发者ID:saviobosco,项目名称:lobby,代码行数:31,代码来源:Apps.php

示例5:

<?php

\Lobby::addScript("dynscroll", "/includes/lib/scrollbar/scrollbar.js");
\Lobby::addStyle("dynscroll", "/includes/lib/scrollbar/scrollbar.css");
$this->addScript("/jquery.scrollTo.js");
$this->addStyle("/game.css");
$this->addScript("/game.js");
?>
<div class="contents">
  <div class="loading">
    <img src="<?php 
echo APP_SRC;
?>
/src/Image/loading.gif" />
  </div>
  <div class="controls">
    <a id="newGame">New</a>
    <a id="solveGame">Solve</a>
  </div>
  <div class="letters"></div>
  <div class="input"></div>
  <div class="submit">
    <a class='button'>Submit</a>
    <div class='status'></div>
  </div>
  <div class="boxes">
    <div class="boxes-inner">
      <div class='section' id='sec1'></div>
    </div>
  </div>
  <audio src='<?php 
开发者ID:saviobosco,项目名称:lobby,代码行数:31,代码来源:index.php

示例6: addScript

 /**
  * Tell Lobby to load a script
  */
 public function addScript($file_location)
 {
     $url = "/contents/themes/" . THEME_ID . $file_location;
     \Lobby::addScript("theme." . THEME_ID . "-{$file_location}", $url);
 }
开发者ID:saviobosco,项目名称:lobby,代码行数:8,代码来源:Theme.php

示例7: array

/**
 * Add the <head> files if it's not the install page
 */
if (\Lobby::curPage() != "/admin/install.php") {
    /**
     * Styles
     */
    \Lobby::addStyle("jqueryui", "/includes/lib/jquery/jquery-ui.css");
    // jQuery UI
    /**
     * Scripts
     */
    \Lobby::addScript("jquery", "/includes/lib/jquery/jquery.js");
    \Lobby::addScript("jqueryui", "/includes/lib/jquery/jquery-ui.js");
    // jQuery UI
    \Lobby::addScript("main", "/includes/lib/core/JS/main.js");
    /**
     * Left Menu
     */
    \Lobby\UI\Panel::addTopItem("lobbyHome", array("text" => "Home", "href" => L_URL, "position" => "left"));
    $adminArray = array("text" => "Admin", "href" => "/admin", "position" => "left");
    $adminArray["subItems"] = array("AppManager" => array("text" => "Apps", "href" => "/admin/apps.php"), "LobbyStore" => array("text" => "Lobby Store", "href" => "/admin/lobby-store.php"), "About" => array("text" => "About", "href" => "/admin/about.php"));
    \Lobby\UI\Panel::addTopItem("lobbyAdmin", $adminArray);
    /**
     * If there is a update available either app or core, add an 
     * "Update Available" icon on the right side of panel
     */
    $AppUpdates = json_decode(getOption("app_updates"), true);
    $lobby_version = getOption("lobby_version");
    $latestVersion = getOption("lobby_latest_version");
    if (\Lobby\FS::exists("/upgrade.lobby")) {
开发者ID:saviobosco,项目名称:lobby,代码行数:31,代码来源:init.php

示例8: defaults

 /**
  * Define some pages by default
  */
 public static function defaults()
 {
     /**
      * Route App Pages (/app/{appname}/{page}) to according apps
      */
     self::route("/app/[:appID]?/[**:page]?", function ($request) {
         $AppID = $request->appID;
         $GLOBALS['AppID'] = $AppID;
         $page = $request->page != "" ? "/{$request->page}" : "/";
         /**
          * Check if App exists
          */
         $App = new \Lobby\Apps($AppID);
         if ($App->exists && $App->isEnabled() && substr($page, 0, 7) != "/Admin/") {
             $class = $App->run();
             $AppInfo = $App->info;
             /**
              * Set the title
              */
             \Lobby::setTitle($AppInfo['name']);
             /**
              * Add the App item to the navbar
              */
             \Lobby\Panel::addTopItem("lobbyApp{$AppID}", array("text" => $AppInfo['name'], "href" => APP_URL, "position" => "left"));
             $page_response = $class->page($page);
             if ($page_response == "auto") {
                 if ($page == "/") {
                     $page = "/index";
                 }
                 $GLOBALS['workspaceHTML'] = $class->inc("/src/Page{$page}.php");
             } else {
                 $GLOBALS['workspaceHTML'] = $page_response;
             }
             if ($GLOBALS['workspaceHTML'] == null) {
                 ser();
             }
         } else {
             ser();
         }
     });
     /**
      * Dashboard Page
      * The main Page. Add CSS & JS accordingly
      */
     self::route("/", function () {
         \Lobby::addScript("metrojs", "/includes/lib/metrojs/metrojs.js");
         \Lobby::addStyle("metrojs", "/includes/lib/metrojs/metrojs.css");
         \Lobby::addScript("dynscroll", "/includes/lib/scrollbar/scrollbar.js");
         \Lobby::addStyle("dynscroll", "/includes/lib/scrollbar/scrollbar.css");
         \Lobby::addScript("jquery.contextmenu", "/includes/lib/jquery/jquery.contextmenu.js");
         \Lobby::addStyle("jquery.contextmenu", "/includes/lib/jquery/jquery.contextmenu.css");
         \Lobby::addScript("dashboard", "/includes/lib/core/JS/dashboard.js");
         \Lobby::addStyle("dashboard", "/includes/lib/core/CSS/dashboard.css");
         \Lobby::setTitle("Dashboard");
         $GLOBALS['workspaceHTML'] = array("/includes/lib/core/Inc/main.php");
     });
     /**
      * Administration
      */
     self::route("/admin/app/[:appID]?/[**:page]?", function ($request) {
         $AppID = $request->appID;
         $GLOBALS['AppID'] = $AppID;
         $page = $request->page != "" ? "/Admin/{$request->page}" : "/Admin/index";
         /**
          * Check if App exists
          */
         $App = new \Lobby\Apps($AppID);
         if ($App->exists && $App->isEnabled()) {
             /**
              * Redirect /src/ files to App's Source in /contents folder
              */
             $class = $App->run();
             $AppInfo = $App->info;
             /**
              * Set the title
              */
             \Lobby::setTitle($AppInfo['name']);
             /**
              * Add the App item to the navbar
              */
             \Lobby\Panel::addTopItem("lobbyApp{$AppID}", array("text" => "Admin > " . $AppInfo['name'], "href" => "/admin/app/{$AppID}", "position" => "left"));
             $page_response = $class->page($page);
             if ($page_response == "auto") {
                 if ($page == "/") {
                     $page = "/index";
                 }
                 $GLOBALS['workspaceHTML'] = $class->inc("/src/Page{$page}.php");
             } else {
                 $GLOBALS['workspaceHTML'] = $page_response;
             }
             if ($GLOBALS['workspaceHTML'] === false || $GLOBALS['workspaceHTML'] == null) {
                 ob_start();
                 ser("Error", "The app '<strong>{$AppID}</strong>' does not have an Admin Page");
                 $error = ob_get_contents();
                 ob_end_clean();
                 $GLOBALS['workspaceHTML'] = "<div class='contents'>" . $error . "</div>";
             }
//.........这里部分代码省略.........
开发者ID:anandubajith,项目名称:lobby,代码行数:101,代码来源:Router.php


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