当前位置: 首页>>代码示例>>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;未经允许,请勿转载。