當前位置: 首頁>>代碼示例>>PHP>>正文


PHP html::script方法代碼示例

本文整理匯總了PHP中html::script方法的典型用法代碼示例。如果您正苦於以下問題:PHP html::script方法的具體用法?PHP html::script怎麽用?PHP html::script使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在html的用法示例。


在下文中一共展示了html::script方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: head

 static function head($theme)
 {
     // Load fotomoto's js file on photo and album pages.
     if ($theme->page_subtype == "photo" || $theme->page_subtype == "album") {
         return html::script('http://widget.fotomoto.com/stores/script/' . module::get_var("fotomotorw", "fotomoto_site_key") . '.js?api=true');
     }
 }
開發者ID:webmatter,項目名稱:gallery3-contrib,代碼行數:7,代碼來源:fotomotorw_theme.php

示例2: header

 public static function header($form = array())
 {
     if (isset($form['template'])) {
         form::$template = arr::take('template', $form);
     }
     $attrs['class'] = isset($form['class']) ? $form['class'] : 'form';
     $attrs['method'] = isset($form['method']) ? $form['method'] : 'post';
     $attrs['action'] = isset($form['action']) ? $form['action'] : url::current();
     //加載表頭
     $html[] = '';
     $html[] = '<form' . html::attributes($attrs) . '>';
     $html[] = field::hidden(array('name' => '_REFERER', 'value' => request::referer()));
     $html[] = field::hidden(array('name' => '_FORMHASH', 'value' => form::hash()));
     //加載常用js
     $html[] = html::script(url::common() . '/js/jquery.validate.js');
     $html[] = html::script(url::common() . '/js/jquery.validate.additional.js');
     $html[] = html::script(url::common() . '/js/jquery.form.js');
     //表單頭部
     if (isset($form['title']) || isset($form['description'])) {
         $html[] = '<div class="form-header clearfix">';
         $html[] = isset($form['icon']) ? '		<div class="form-icon"></div>' : '';
         $html[] = isset($form['title']) ? '		<div class="form-title">' . $form['title'] . '</div>' : '';
         $html[] = isset($form['description']) ? '		<div class="form-description">' . $form['description'] . '</div>' : '';
         $html[] = '</div>';
     }
     //表單body部分開始
     $html[] = '<div class="form-body">';
     echo implode("\n", $html);
 }
開發者ID:dalinhuang,項目名稱:zotop,代碼行數:29,代碼來源:form.php

示例3: codemirror

 function codemirror($attrs)
 {
     $url = zotop::module('codemirror', 'url');
     $options = new stdClass();
     $options->path = $url . '/codemirror/js/';
     $options->parserfile = array('parsexml.js');
     $options->stylesheet = array($url . '/codemirror/css/xmlcolors.css');
     $options->height = is_numeric($attrs['height']) ? $attrs['height'] . 'px' : $attrs['height'];
     $options->width = is_numeric($attrs['width']) ? $width . 'px' : $attrs['width'];
     $options->continuousScanning = 500;
     $options->autoMatchParens = true;
     if ($attrs['linenumbers'] !== false) {
         $options->lineNumbers = true;
         $options->textWrapping = false;
     }
     if ($attrs['tabmode'] == '') {
         $options->tabMode = 'shift';
     }
     $html = array();
     $html[] = html::script($url . '/codemirror/js/codemirror.js');
     $html[] = html::stylesheet($url . '/codemirror/css/codemirror.css');
     $html[] = '	' . field::textarea($attrs);
     $html[] = '<script type="text/javascript">';
     $html[] = '	var editor = CodeMirror.fromTextArea("' . $attrs['name'] . '", ' . json_encode($options) . ');';
     $html[] = '$(function(){';
     $html[] = '	$("form").submit(function(){';
     $html[] = '		$("textarea[name=+' . $attrs['name'] . '+]").val(editor.getCode());';
     $html[] = '	});';
     $html[] = '})';
     $html[] = '</script>';
     return implode("\n", $html);
 }
開發者ID:dalinhuang,項目名稱:zotop,代碼行數:32,代碼來源:admin.php

示例4: admin_head

 static function admin_head($theme)
 {
     $head = array();
     if (strpos(Router::$current_uri, "admin/users") !== false) {
         $head[] = html::script("lib/gallery.panel.js");
     }
     return implode("\n", $head);
 }
開發者ID:xafr,項目名稱:gallery3,代碼行數:8,代碼來源:user_theme.php

示例5: init

 /**
  * Initializes Facebook Connect
  */
 public static function init()
 {
     widget::add('foot', html::script(array('js/fbconnect.js', 'http://static.ak.connect.facebook.com/js/api_lib/v0.4/FeatureLoader.js.php/en_US')));
     widget::add('foot', html::script_source("FB.init('" . FB::$config['api_key'] . "');"));
     // Add logged in Facebook user id to session for easier access
     if ($logged_in = FB::instance()->get_loggedin_user()) {
         $_SESSION['fb_uid'] = $logged_in;
     }
 }
開發者ID:anqqa,項目名稱:Anqh,代碼行數:12,代碼來源:FB.php

示例6: head

 static function head($theme)
 {
     // @tdo remove the addition css and organize.js (just here to test)
     $script[] = html::script("modules/organize/js/organize_init.js");
     $script[] = html::script("modules/organize/js/organize.js");
     $script[] = "<link rel=\"stylesheet\" type=\"text/css\" href=\"" . url::file("modules/organize/css/organize.css") . "\" />";
     return implode("\n", $script);
     //return html::script("modules/organize/js/organize_init.js");
 }
開發者ID:xafr,項目名稱:gallery3,代碼行數:9,代碼來源:organize_theme.php

示例7: render

 public function render($template = "forge_template", $custom = false)
 {
     $script = array();
     if (!empty($this->data["url"])) {
         $script[] = html::script($this->data["url"]);
     }
     if (!empty($this->data["text"])) {
         $script[] = "<script type=\"text/javascript\">\n{$this->data['text']}\n</script>\n";
     }
     return implode("\n", $script);
 }
開發者ID:HarriLu,項目名稱:gallery3,代碼行數:11,代碼來源:Form_Script.php

示例8: render

 public static function render($print = FALSE)
 {
     $output = '';
     foreach (self::$scripts as $script) {
         $output .= html::script($script);
     }
     if ($print) {
         echo $output;
     }
     return $output;
 }
開發者ID:bicho44,項目名稱:imglistados,代碼行數:11,代碼來源:javascript.php

示例9: source

 public static function source($attrs)
 {
     $html = array();
     $html[] = '';
     $html[] = '<div style="height:460px;overflow:hidden;">';
     $html[] = '<div id="SourceEditorPannel">正在加載編輯器,請稍後……</div>';
     $html[] = html::script(url::common() . '/js/swfobject.js');
     $html[] = html::script(url::module() . '/admin/js/file.js');
     $html[] = field::textarea($attrs);
     $html[] = '</div>';
     return implode("\n", $html);
 }
開發者ID:dalinhuang,項目名稱:zotop,代碼行數:12,代碼來源:file.php

示例10: head

 static function head($theme)
 {
     $buf = "";
     if (Session::instance()->get("debug")) {
         $buf .= "<link rel=\"stylesheet\" type=\"text/css\" href=\"" . url::file("core/css/debug.css") . "\" />";
     }
     if ($theme->page_type == "album" && access::can("edit", $theme->item())) {
         $buf .= "<link rel=\"stylesheet\" type=\"text/css\" href=\"" . url::file("core/css/quick.css") . "\" />";
         $buf .= html::script("core/js/quick.js");
     }
     return $buf;
 }
開發者ID:Juuro,項目名稱:Dreamapp-Website,代碼行數:12,代碼來源:core_theme.php

示例11: header

 public static function header($header = array())
 {
     $attrs['class'] = isset($header['class']) ? $header['class'] : 'form';
     $attrs['method'] = isset($header['method']) ? $header['method'] : 'post';
     $attrs['action'] = isset($header['action']) ? $header['action'] : url::current();
     $html[] = '';
     $html[] = '<form' . html::attributes($attrs) . '>';
     $html[] = isset($header['title']) ? '<div class="form-title">' . $header['title'] . '</div>' : '';
     $html[] = isset($header['title']) ? '<div class="form-description">' . $header['description'] . '</div>' : '';
     $html[] = html::script(url::theme() . '/js/jquery.form.js');
     $html[] = html::script(url::theme() . '/js/zotop.form.js');
     echo implode("\n", $html);
 }
開發者ID:dalinhuang,項目名稱:zotop,代碼行數:13,代碼來源:form.php

示例12: admin_head

 static function admin_head($theme)
 {
     $head = array();
     if (strpos(Router::$current_uri, "admin/server_add") !== false) {
         $head[] = "<link media=\"screen, projection\" rel=\"stylesheet\" type=\"text/css\" href=\"" . url::file("lib/jquery.autocomplete.css") . "\" />";
         $base = url::site("__ARGS__");
         $csrf = access::csrf_token();
         $head[] = "<script> var base_url = \"{$base}\"; var csrf = \"{$csrf}\";</script>";
         $head[] = html::script("lib/jquery.autocomplete.js");
         $head[] = html::script("modules/server_add/js/admin.js");
     }
     return implode("\n", $head);
 }
開發者ID:krgeek,項目名稱:gallery3,代碼行數:13,代碼來源:server_add_theme.php

示例13: admin_head

 static function admin_head($theme)
 {
     $session = Session::instance();
     $buf = "";
     if ($session->get("debug")) {
         $buf .= "<link rel=\"stylesheet\" type=\"text/css\" href=\"" . url::file("modules/gallery/css/debug.css") . "\" />";
     }
     if ($session->get("l10n_mode", false)) {
         $buf .= "<link rel=\"stylesheet\" type=\"text/css\" href=\"" . url::file("modules/gallery/css/l10n_client.css") . "\" />";
         $buf .= html::script("lib/jquery.cookie.js");
         $buf .= html::script("modules/gallery/js/l10n_client.js");
     }
     return $buf;
 }
開發者ID:krgeek,項目名稱:gallery3,代碼行數:14,代碼來源:gallery_theme.php

示例14: add

	/**
	 * Adds all the events to the main Ushahidi application
	 */
	public function add()
	{
		// Add JS for Map Settings Page
		$api_url_all = Kohana::config('settings.api_url_all');
		$api_url_all .= html::script(url::base().'plugins/cloudmade/views/js/cloudmade.js');
		Kohana::config_set('settings.api_url_all', $api_url_all);
		
		// Add a Sub-Nav Link
		Event::add('ushahidi_filter.map_base_layers', array($this, '_add_layer'));
		
		// Reconfigure the default map api
		if (Kohana::config('settings.default_map') == "cloudmade")
		{
			Kohana::config_set('settings.api_url', "<script type=\"text/javascript\" src=\"".url::base()."plugins/cloudmade/views/js/cloudmade.js\"></script>" );
		}
	}
開發者ID:rindou240,項目名稱:Ushahidi_Web,代碼行數:19,代碼來源:cloudmade.php

示例15: header

 public static function header($header = array())
 {
     if (isset($header['template'])) {
         form::$template = arr::take('template', $header);
     }
     $attrs['class'] = isset($header['class']) ? $header['class'] : 'form';
     $attrs['method'] = isset($header['method']) ? $header['method'] : 'post';
     $attrs['action'] = isset($header['action']) ? $header['action'] : url::current();
     $html[] = '';
     $html[] = '<form' . html::attributes($attrs) . '>';
     $html[] = isset($header['title']) ? '<div class="form-title">' . $header['title'] . '</div>' : '';
     $html[] = isset($header['description']) ? '<div class="form-description">' . $header['description'] . '</div>' : '';
     $html[] = field::hidden(array('name' => '_REFERER', 'value' => request::referer()));
     $html[] = html::script(url::common() . '/js/jquery.validate.js');
     $html[] = html::script(url::common() . '/js/jquery.validate.additional.js');
     $html[] = html::script(url::common() . '/js/jquery.form.js');
     $html[] = html::script(url::common() . '/js/zotop.form.js');
     echo implode("\n", $html);
 }
開發者ID:dalinhuang,項目名稱:zotop,代碼行數:19,代碼來源:form.php


注:本文中的html::script方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。