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


PHP Themes::footer_block方法代码示例

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


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

示例1: _pre_render

 /**
  * Trigger themes->requirements() at the last minute
  * 
  * This is in case features are enabled/disabled
  */
 public function _pre_render()
 {
     $this->themes->requirements();
     $this->themes->plugin_requirements();
     $this->template->header->header_block = $this->themes->header_block();
     $this->template->footer->footer_block = $this->themes->footer_block();
 }
开发者ID:rjmackay,项目名称:Ushahidi_Web,代码行数:12,代码来源:main.php

示例2: index


//.........这里部分代码省略.........
     $show_year = $first_year;
     $selected_start_flag = TRUE;
     while ($show_year <= $last_year) {
         $startDate .= "<optgroup label=\"" . $show_year . "\">";
         $s_m = 1;
         if ($show_year == $first_year) {
             // If we are showing the first year, the starting month may not be January
             $s_m = $first_month;
         }
         $l_m = 12;
         if ($show_year == $last_year) {
             // If we are showing the last year, the ending month may not be December
             $l_m = $last_month;
         }
         for ($i = $s_m; $i <= $l_m; $i++) {
             if ($i < 10) {
                 // All months need to be two digits
                 $i = "0" . $i;
             }
             $startDate .= "<option value=\"" . strtotime($show_year . "-" . $i . "-01") . "\"";
             if ($selected_start_flag == TRUE) {
                 $display_startDate = strtotime($show_year . "-" . $i . "-01");
                 $startDate .= " selected=\"selected\" ";
                 $selected_start_flag = FALSE;
             }
             $startDate .= ">" . date('M', mktime(0, 0, 0, $i, 1)) . " " . $show_year . "</option>";
         }
         $startDate .= "</optgroup>";
         $endDate .= "<optgroup label=\"" . $show_year . "\">";
         for ($i = $s_m; $i <= $l_m; $i++) {
             if ($i < 10) {
                 // All months need to be two digits
                 $i = "0" . $i;
             }
             $endDate .= "<option value=\"" . strtotime($show_year . "-" . $i . "-" . date('t', mktime(0, 0, 0, $i, 1)) . " 23:59:59") . "\"";
             if ($i == $l_m and $show_year == $last_year) {
                 $display_endDate = strtotime($show_year . "-" . $i . "-" . date('t', mktime(0, 0, 0, $i, 1)) . " 23:59:59");
                 $endDate .= " selected=\"selected\" ";
             }
             $endDate .= ">" . date('M', mktime(0, 0, 0, $i, 1)) . " " . $show_year . "</option>";
         }
         $endDate .= "</optgroup>";
         // Show next year
         $show_year++;
     }
     Event::run('ushahidi_filter.active_startDate', $display_startDate);
     Event::run('ushahidi_filter.active_endDate', $display_endDate);
     Event::run('ushahidi_filter.startDate', $startDate);
     Event::run('ushahidi_filter.endDate', $endDate);
     $this->template->content->div_timeline->startDate = $startDate;
     $this->template->content->div_timeline->endDate = $endDate;
     // Javascript Header
     $this->themes->map_enabled = TRUE;
     $this->themes->main_page = TRUE;
     // Map Settings
     $clustering = Kohana::config('settings.allow_clustering');
     $marker_radius = Kohana::config('map.marker_radius');
     $marker_opacity = Kohana::config('map.marker_opacity');
     $marker_stroke_width = Kohana::config('map.marker_stroke_width');
     $marker_stroke_opacity = Kohana::config('map.marker_stroke_opacity');
     // pdestefanis - allows to restrict the number of zoomlevels available
     $numZoomLevels = Kohana::config('map.numZoomLevels');
     $minZoomLevel = Kohana::config('map.minZoomLevel');
     $maxZoomLevel = Kohana::config('map.maxZoomLevel');
     // pdestefanis - allows to limit the extents of the map
     $lonFrom = Kohana::config('map.lonFrom');
     $latFrom = Kohana::config('map.latFrom');
     $lonTo = Kohana::config('map.lonTo');
     $latTo = Kohana::config('map.latTo');
     $this->themes->js = new View('main_js');
     $this->themes->js->json_url = $clustering == 1 ? "json/cluster" : "json";
     $this->themes->js->marker_radius = $marker_radius >= 1 && $marker_radius <= 10 ? $marker_radius : 5;
     $this->themes->js->marker_opacity = $marker_opacity >= 1 && $marker_opacity <= 10 ? $marker_opacity * 0.1 : 0.9;
     $this->themes->js->marker_stroke_width = $marker_stroke_width >= 1 && $marker_stroke_width <= 5 ? $marker_stroke_width : 2;
     $this->themes->js->marker_stroke_opacity = $marker_stroke_opacity >= 1 && $marker_stroke_opacity <= 10 ? $marker_stroke_opacity * 0.1 : 0.9;
     // pdestefanis - allows to restrict the number of zoomlevels available
     $this->themes->js->numZoomLevels = $numZoomLevels;
     $this->themes->js->minZoomLevel = $minZoomLevel;
     $this->themes->js->maxZoomLevel = $maxZoomLevel;
     // pdestefanis - allows to limit the extents of the map
     $this->themes->js->lonFrom = $lonFrom;
     $this->themes->js->latFrom = $latFrom;
     $this->themes->js->lonTo = $lonTo;
     $this->themes->js->latTo = $latTo;
     $this->themes->js->default_map = Kohana::config('settings.default_map');
     $this->themes->js->default_zoom = Kohana::config('settings.default_zoom');
     $this->themes->js->latitude = Kohana::config('settings.default_lat');
     $this->themes->js->longitude = Kohana::config('settings.default_lon');
     $this->themes->js->default_map_all = Kohana::config('settings.default_map_all');
     // Get default icon
     $this->themes->js->default_map_all_icon = $this->template->content->default_map_all_icon;
     $this->themes->js->active_startDate = $display_startDate;
     $this->themes->js->active_endDate = $display_endDate;
     $this->themes->js->blocks_per_row = Kohana::config('settings.blocks_per_row');
     //$myPacker = new javascriptpacker($js , 'Normal', false, false);
     //$js = $myPacker->pack();
     // Build Header and Footer Blocks
     $this->template->header->header_block = $this->themes->header_block();
     $this->template->footer->footer_block = $this->themes->footer_block();
 }
开发者ID:nemmy,项目名称:Ushahidi_Web,代码行数:101,代码来源:main.php


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