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


PHP cms_module_prefix函数代码示例

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


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

示例1: setting

 public function setting()
 {
     $module_directory = $this->cms_module_path();
     $data = array();
     $data['IS_ACTIVE'] = $this->IS_ACTIVE;
     $data['module_directory'] = $module_directory;
     if (!$this->IS_ACTIVE) {
         // get setting
         $module_table_prefix = $this->input->post('module_table_prefix');
         $module_prefix = $this->input->post('module_prefix');
         // set values
         if (isset($module_table_prefix) && $module_table_prefix !== FALSE) {
             cms_module_config($module_directory, 'module_table_prefix', $module_table_prefix);
         }
         if (isset($module_prefix) && $module_prefix !== FALSE) {
             cms_module_prefix($module_directory, $module_prefix);
         }
         // get values
         $data['module_table_prefix'] = cms_module_config($module_directory, 'module_table_prefix');
         $data['module_prefix'] = cms_module_prefix($module_directory);
     } else {
         $slideshow_height = $this->input->post('slideshow_height');
         if (isset($slideshow_height) && $slideshow_height !== FALSE) {
             cms_module_config($module_directory, 'slideshow_height', $slideshow_height);
         }
         // get values
         $data['slideshow_height'] = cms_module_config($module_directory, 'slideshow_height');
     }
     $navigation_name = $this->cms_navigation_name($module_directory . '/install/setting');
     if ($navigation_name === NULL || $navigation_name == '') {
         $navigation_name = 'main_module_management';
     }
     $this->view($module_directory . '/install_setting', $data, $navigation_name);
 }
开发者ID:kevinmel2000,项目名称:ci_webblog,代码行数:34,代码来源:install.php

示例2: setting

 public function setting()
 {
     $module_directory = $this->cms_module_path();
     $data = array();
     $data['IS_ACTIVE'] = $this->IS_ACTIVE;
     $data['module_directory'] = $module_directory;
     if (!$this->IS_ACTIVE) {
         // get setting
         $module_table_prefix = $this->input->post('module_table_prefix');
         $module_prefix = $this->input->post('module_prefix');
         // set values
         if (isset($module_table_prefix) && $module_table_prefix !== FALSE) {
             cms_module_config($module_directory, 'module_table_prefix', $module_table_prefix);
         }
         if (isset($module_prefix) && $module_prefix !== FALSE) {
             cms_module_prefix($module_directory, $module_prefix);
         }
         // get values
         $data['module_table_prefix'] = cms_module_config($module_directory, 'module_table_prefix');
         $data['module_prefix'] = cms_module_prefix($module_directory);
     }
     $this->view($module_directory . '/install_setting', $data, 'main_module_management');
 }
开发者ID:heruprambadi,项目名称:simpeg,代码行数:23,代码来源:install.php

示例3: cms_submenu_screen

 /**
  * @author  goFrendiAsgard
  * @param   string navigation_name
  * @return  string
  * @desc    return submenu screen
  */
 public function cms_submenu_screen($navigation_name)
 {
     $submenus = array();
     if (!isset($navigation_name)) {
         $submenus = $this->cms_navigations(NULL, 1);
     } else {
         $query = $this->db->select('navigation_id')->from(cms_table_name('main_navigation'))->where('navigation_name', $navigation_name)->get();
         if ($query->num_rows() == 0) {
             return '';
         } else {
             $row = $query->row();
             $navigation_id = $row->navigation_id;
             $submenus = $this->cms_navigations($navigation_id, 1);
         }
     }
     $html = '<ul class="thumbnails row-fluid">';
     $module_path = $this->cms_module_path();
     $image_directories = array();
     if ($module_path != '') {
         $image_directories[] = "modules/{$module_path}/assets/navigation_icon";
     }
     $image_directories[] = "assets/nocms/navigation_icon";
     foreach ($this->cms_get_module_list() as $module_list) {
         $other_module_path = $module_list['module_path'];
         $image_directories[] = "modules/{$other_module_path}/assets/navigation_icon";
     }
     foreach ($submenus as $submenu) {
         $navigation_name = $submenu["navigation_name"];
         $title = $submenu["title"];
         $url = $submenu["url"];
         $description = $submenu["description"];
         $allowed = $submenu["allowed"];
         if (!$allowed) {
             continue;
         }
         // check image in current module
         $image_file_names = array();
         $image_file_names[] = $navigation_name . '.png';
         if ($module_path !== '' && $module_path !== 'main') {
             $module_prefix = cms_module_prefix($this->cms_module_path());
             $navigation_parts = explode('_', $navigation_name);
             if (count($navigation_parts) > 0 && $navigation_parts[0] == $module_prefix) {
                 $image_file_names[] = substr($navigation_name, strlen($module_prefix) + 1) . '.png';
             }
         }
         $image_file_path = '';
         foreach ($image_directories as $image_directory) {
             foreach ($image_file_names as $image_file_name) {
                 $image_file_path = $image_directory . '/' . $image_file_name;
                 if (!file_exists($image_file_path)) {
                     $image_file_path = '';
                 }
                 if ($image_file_path !== '') {
                     break;
                 }
             }
             if ($image_file_path !== '') {
                 break;
             }
         }
         // default icon
         if ($image_file_path == '') {
             $image_file_path = 'assets/nocms/images/icons/package.png';
         }
         $html .= '<li class="well" style="width:80px!important; height:90px!important; float:left!important; list-style-type:none;">';
         $html .= '<a href="' . $url . '" style="width: 100%; height: 100%; display: block;">';
         if ($image_file_path != '') {
             $html .= '<img style="max-width:32px; max-height:32px;" src="' . base_url($image_file_path) . '" /><br /><br />';
         }
         $html .= $title . '</a>';
         $html .= '</li>';
     }
     $html .= '</ul>';
     return $html;
 }
开发者ID:heruprambadi,项目名称:simpeg,代码行数:81,代码来源:MY_Model.php

示例4: cms_submenu_screen

 /**
  * @author  goFrendiAsgard
  * @param   string navigation_name
  * @return  string
  * @desc    return submenu screen
  */
 public function cms_submenu_screen($navigation_name)
 {
     $submenus = array();
     if (!isset($navigation_name)) {
         $submenus = $this->cms_navigations(NULL, 1);
     } else {
         $query = $this->db->select('navigation_id')->from(cms_table_name('main_navigation'))->where('navigation_name', $navigation_name)->get();
         if ($query->num_rows() == 0) {
             return '';
         } else {
             $row = $query->row();
             $navigation_id = $row->navigation_id;
             $submenus = $this->cms_navigations($navigation_id, 1);
         }
     }
     $html = '
     <script type="text/javascript">
         function __adjust_component(identifier){
             var max_height = 0;
             $(identifier).each(function(){
                 $(this).css("margin-bottom", 0);
                 if($(this).height()>max_height){
                     max_height = $(this).height();
                 }
             });
             $(identifier).each(function(){
                 $(this).height(max_height);
                 var margin_bottom = 0;
                 if($(this).height()<max_height){
                     margin_bottom = max_height - $(this).height();
                 }
                 margin_bottom += 10;
                 $(this).css("margin-bottom", margin_bottom);
             });
         }
         function __adjust_thumbnail_submenu(){
             __adjust_component(".thumbnail_submenu img");
             __adjust_component(".thumbnail_submenu div.caption");
             __adjust_component(".thumbnail_submenu");
         }
         $(window).load(function(){
             __adjust_thumbnail_submenu();
             // resize
             $(window).resize(function(){
                 __adjust_thumbnail_submenu();
             });
         });
     </script>';
     $html .= '<div class="row">';
     $module_path = $this->cms_module_path();
     $image_directories = array();
     if ($module_path != '') {
         $image_directories[] = "modules/{$module_path}/assets/navigation_icon";
     }
     $image_directories[] = "assets/nocms/navigation_icon";
     foreach ($this->cms_get_module_list() as $module_list) {
         $other_module_path = $module_list['module_path'];
         $image_directories[] = "modules/{$other_module_path}/assets/navigation_icon";
     }
     foreach ($submenus as $submenu) {
         $navigation_id = $submenu["navigation_id"];
         $navigation_name = $submenu["navigation_name"];
         $title = $submenu["title"];
         $url = $submenu["url"];
         $description = $submenu["description"];
         $allowed = $submenu["allowed"];
         $notif_url = $submenu["notif_url"];
         if (!$allowed) {
             continue;
         }
         // check image in current module
         $image_file_names = array();
         $image_file_names[] = $navigation_name . '.png';
         if ($module_path !== '' && $module_path !== 'main') {
             $module_prefix = cms_module_prefix($this->cms_module_path());
             $navigation_parts = explode('_', $navigation_name);
             if (count($navigation_parts) > 0 && $navigation_parts[0] == $module_prefix) {
                 $image_file_names[] = substr($navigation_name, strlen($module_prefix) + 1) . '.png';
             }
         }
         $image_file_path = '';
         foreach ($image_directories as $image_directory) {
             foreach ($image_file_names as $image_file_name) {
                 $image_file_path = $image_directory . '/' . $image_file_name;
                 if (!file_exists($image_file_path)) {
                     $image_file_path = '';
                 }
                 if ($image_file_path !== '') {
                     break;
                 }
             }
             if ($image_file_path !== '') {
                 break;
             }
//.........这里部分代码省略.........
开发者ID:kevinmel2000,项目名称:ci_webblog,代码行数:101,代码来源:MY_Model.php

示例5: cms_module_navigation_name

function cms_module_navigation_name($module_directory, $name)
{
    $module_prefix = cms_module_prefix($module_directory);
    if ($module_prefix != '') {
        return $module_prefix . '_' . $name;
    } else {
        return $name;
    }
}
开发者ID:jeremywong1992,项目名称:No-CMS,代码行数:9,代码来源:cms_helper.php

示例6: cms_execute_sql

 public function cms_execute_sql($SQL, $separator)
 {
     $queries = explode($separator, $SQL);
     foreach ($queries as $query) {
         if (trim($query) == '') {
             continue;
         }
         $table_prefix = cms_module_table_prefix($this->cms_module_path());
         $module_prefix = cms_module_prefix($this->cms_module_path());
         $query = preg_replace('/\\{\\{ complete_table_name:(.*) \\}\\}/si', $table_prefix == '' ? '$1' : $table_prefix . '_' . '$1', $query);
         $query = preg_replace('/\\{\\{ module_prefix \\}\\}/si', $module_prefix, $query);
         $this->db->query($query);
     }
 }
开发者ID:engirocha,项目名称:No-CMS,代码行数:14,代码来源:CMS_Model.php


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