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


PHP riake函数代码示例

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


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

示例1: index

 public function index()
 {
     set_core_vars('options', $options = get_meta('all'), 'read_only');
     if (riake('tendoo_registration_status', $options) == '0') {
         $this->instance->url->redirect(array('error', 'code', 'registration-not-allowed'));
     }
     $this->instance->form_validation->set_rules('user_pseudo', translate('Pseudo'), 'trim|required|min_length[5]|max_length[15]');
     $this->instance->form_validation->set_rules('user_password', __('Password'), 'trim|required|min_length[6]|max_length[15]');
     $this->instance->form_validation->set_rules('user_password_confirm', __('Confirm Password'), 'trim|required|min_length[6]|max_length[15]');
     $this->instance->form_validation->set_rules('user_mail', __('Email'), 'trim|valid_email|required');
     $this->instance->form_validation->set_rules('user_sex', __('Sex'), 'trim|required|min_length[3]|max_length[4]');
     $this->instance->form_validation->set_rules('priv_id', __('Select Privilege'), 'trim|min_length[11]');
     $this->instance->form_validation->set_rules('captchaCorrespondance', __('Captcha Code'), 'trim|required|min_length[6]');
     $this->instance->form_validation->set_rules('user_captcha', __('Captcha validation Code'), 'matches[captchaCorrespondance]|trim|required|min_length[6]');
     if ($this->instance->form_validation->run()) {
         $query = $this->instance->users_global->createUser($this->instance->input->post('user_pseudo'), $this->instance->input->post('user_password'), $this->instance->input->post('user_sex'), $this->instance->input->post('user_mail'), $active = 'FALSE', $this->instance->input->post('priv_id'));
         if ($query == 'userCreated') {
             $this->instance->url->redirect(array('login?notice=' . $query));
         }
         notice('push', fetch_notice_output($query));
     }
     set_core_vars('allowPrivilege', $this->roles->get_public_roles());
     $this->instance->session->set_userdata('captcha_code', $this->instance->captcha->get());
     set_core_vars('captcha', $this->instance->session->userdata('captcha_code'));
     set_core_vars('pageTitle', sprintf(__('Create an account - %s '), riake('site_name', $options)));
     set_page('title', get_core_vars('pageTitle'));
     set_core_vars('body', $this->load->the_view('registration/createUser', true));
     $this->load->view('header');
     $this->load->view('global_body');
 }
开发者ID:RodolfoSilva,项目名称:tendoo-cms,代码行数:30,代码来源:registration.php

示例2: loader

 function loader()
 {
     global $Options;
     // If cache is enabled
     if (riake('enable_cache', $Options) === true) {
         $this->db->cache_on();
     }
 }
开发者ID:2329697501,项目名称:tendoo-cms,代码行数:8,代码来源:Tendoo_Controller.php

示例3: output_files

 private function output_files()
 {
     theme_cpush("css/font-awesome.min");
     theme_cpush("css/bootstrap.min");
     theme_cpush("css/switcher");
     theme_cpush("css/fractionslider");
     theme_cpush("css/style-fraction");
     theme_cpush("css/style");
     $theme_style = get_items('theme_color_and_style');
     if (($background = riake('background', $theme_style)) == 'red') {
         theme_cpush("css/skins/Softred");
     } else {
         if ($background == 'orange') {
             theme_cpush("css/skins/orange");
         } else {
             if ($background == 'purple') {
                 theme_cpush("css/skins/purple");
             } else {
                 if ($background == 'cyan') {
                     theme_cpush("css/skins/Strongcyan");
                 } else {
                     if ($background == 'darkcyan') {
                         theme_cpush("css/skins/DarkCyan");
                     } else {
                         if ($background == 'blue') {
                             theme_cpush("css/skins/blue");
                         }
                     }
                 }
             }
         }
     }
     // Box Style
     if ($box = riake('box_style', $theme_style) == 'boxed') {
         theme_cpush("css/layout/boxed");
     } else {
         theme_cpush("css/layout/wide");
     }
     theme_jpush('js/jquery-1.10.2.min');
     theme_jpush("js/bootstrap.min");
     theme_jpush("js/jquery.easing.1.3");
     theme_jpush("js/retina-1.1.0.min");
     theme_jpush("js/jquery.cookie");
     theme_jpush("js/styleswitch");
     theme_jpush("js/jquery.fractionslider");
     theme_jpush("js/jquery.smartmenus.min");
     theme_jpush("js/jquery.smartmenus.bootstrap.min");
     theme_jpush("js/jquery.jcarousel");
     theme_jpush("js/jflickrfeed");
     theme_jpush("js/jquery.magnific-popup.min");
     theme_jpush("js/jquery.isotope.min");
     theme_jpush("js/swipe");
     theme_jpush("js/jquery-scrolltofixed-min");
     theme_jpush("js/jquery.gmap");
     theme_jpush("js/main");
 }
开发者ID:RodolfoSilva,项目名称:tendoo-cms,代码行数:56,代码来源:handler.php

示例4: log_user_out

 function log_user_out()
 {
     if ($this->users->logout() == NULL) {
         if (($redir = riake('redirect', $_GET)) != false) {
             // if redirect parameter is set
         } else {
             redirect(array('sign-in'));
         }
     }
     // not trying to handle false since this controller require login.
     // While accessing this controller twice, a redirection will be made to login page from "tendoo_controller".
 }
开发者ID:2329697501,项目名称:tendoo-cms,代码行数:12,代码来源:aauth.php

示例5: push_notice

 /**
  * Push notice to UI array
  *
  * @access public
  * @params string message
  * @params string type
  * @returns bool
  **/
 static function push_notice($message, $type = 'info', $icon = false, $href = '#')
 {
     if (is_array($message) && count($message) > 0) {
         foreach ($message as $_message) {
             self::push_notice($_message['msg'], riake('type', $_message), riake('icon', $_message), riake('href', $_message, $href));
         }
     } else {
         if (is_string($message)) {
             self::$notices[] = array('type' => $type, 'msg' => $message, 'icon' => $icon, 'href' => $href);
         }
     }
 }
开发者ID:eboominathan,项目名称:tendoo-cms,代码行数:20,代码来源:UI.php

示例6: run

 function run()
 {
     $this->events->add_filter('admin_menus', function ($menus) {
         if (User::can($this->privilege)) {
             $menus[$this->namespace] = array(array('title' => $this->label, 'href' => '#', 'disable' => true, 'icon' => $this->menu_icon), array('title' => $this->posts_list_label, 'href' => site_url(array('dashboard', 'posttype', $this->namespace, 'list'))), array('title' => $this->new_post_label, 'href' => site_url(array('dashboard', 'posttype', $this->namespace, 'new'))));
             if ($this->comment_enabled === TRUE) {
                 $menus[$this->namespace][] = array('title' => $this->post_comment_label, 'href' => site_url(array('dashboard', 'posttype', $this->namespace, 'comments')));
             }
             foreach (force_array($this->query->get_defined_taxonomies()) as $taxonomy) {
                 $menus[$this->namespace][] = array('title' => riake('taxonomy-list-label', $taxonomy, sprintf(__('%s list'), riake('namespace', $taxonomy))), 'href' => site_url(array('dashboard', 'posttype', $this->namespace, 'taxonomy', riake('namespace', $taxonomy), 'list')));
                 $menus[$this->namespace][] = array('title' => riake('new-taxonomy-label', $taxonomy, sprintf(__('New %s'), riake('namespace', $taxonomy))), 'href' => site_url(array('dashboard', 'posttype', $this->namespace, 'taxonomy', riake('namespace', $taxonomy), 'new')));
             }
         }
         return $menus;
     });
 }
开发者ID:eboominathan,项目名称:tendoo-cms,代码行数:16,代码来源:PostType.php

示例7: run

 function run()
 {
     if (current_user()->can($this->privilege)) {
         create_admin_menu($this->namespace, riake(0, $this->menu_position), riake(1, $this->menu_position));
         add_admin_menu($this->namespace, array('title' => $this->label, 'href' => '#', 'is_submenu' => false, 'icon' => $this->menu_icon));
         add_admin_menu($this->namespace, array('title' => $this->posts_list_label, 'href' => get_instance()->url->site_url(array('admin', 'posttype', $this->namespace, 'list'))));
         add_admin_menu($this->namespace, array('title' => $this->new_post_label, 'href' => get_instance()->url->site_url(array('admin', 'posttype', $this->namespace, 'new'))));
         if ($this->comment_enabled === TRUE) {
             add_admin_menu($this->namespace, array('title' => $this->post_comment_label, 'href' => get_instance()->url->site_url(array('admin', 'posttype', $this->namespace, 'comments'))));
         }
         foreach (force_array($this->query->get_defined_taxonomies()) as $taxonomy) {
             add_admin_menu($this->namespace, array('title' => riake('taxonomy-list-label', $taxonomy, sprintf(__('%s list'), riake('namespace', $taxonomy))), 'href' => get_instance()->url->site_url(array('admin', 'posttype', $this->namespace, 'taxonomy', riake('namespace', $taxonomy), 'list'))));
             add_admin_menu($this->namespace, array('title' => riake('new-taxonomy-label', $taxonomy, sprintf(__('New %s'), riake('namespace', $taxonomy))), 'href' => get_instance()->url->site_url(array('admin', 'posttype', $this->namespace, 'taxonomy', riake('namespace', $taxonomy), 'new'))));
         }
     }
 }
开发者ID:RodolfoSilva,项目名称:tendoo-cms,代码行数:16,代码来源:PostType.Class.php

示例8: __construct

 function __construct()
 {
     // Saving Theme Settings
     $active_theme = get_core_vars('active_theme');
     if (riake('namespace', $active_theme)) {
         $settings = get_meta($active_theme['namespace'] . '_theme_settings');
         if ($settings) {
             push_core_vars('active_theme', 'theme_settings', $settings);
         }
     }
     $this->module = get_modules('filter_namespace', 'tim');
     if (is_admin()) {
         $this->menu = new Menu();
         $this->menu = new Menu();
         $this->menu->add_admin_menu_core('themes', array('title' => __('Theme Options'), 'icon' => 'fa fa-columns', 'href' => get_instance()->url->site_url(array('admin', 'open', 'modules', $this->module['namespace']))));
     }
 }
开发者ID:RodolfoSilva,项目名称:tendoo-cms,代码行数:17,代码来源:init.php

示例9: __construct

 public function __construct($data)
 {
     $this->instance = get_instance();
     $this->data =& $data;
     $this->theme = get_core_vars('active_theme_object');
     $this->location = MODULES_DIR . $this->data['currentWidget']['WIDGET_MODULE']['encrypted_dir'];
     if (!class_exists('News_smart')) {
         include_once $this->location . '/library.php';
     }
     $this->news = new News_smart();
     $this->data['mostViewed'] = $this->news->getMostViewed(0, 10);
     $end = '<ul>';
     if ($this->instance->users_global->isConnected()) {
         $this->instance->load->library('tendoo_admin');
         if ($this->instance->users_global->isAdmin()) {
             $priv = $this->instance->users_global->current('REF_ROLE_ID');
             if ($this->instance->users_global->isSuperAdmin()) {
                 $end .= '<li><a href="' . $this->instance->url->site_url(array('admin', 'modules')) . '">Liste des modules</a></li>';
                 $end .= '<li><a href="' . $this->instance->url->site_url(array('admin', 'setting')) . '">Param&egrave;tres</a></li>';
                 $end .= '<li><a href="' . $this->instance->url->site_url(array('admin', 'system', 'manage_actions')) . '">Gestion d\'actions</a></li>';
                 $end .= '<li><a href="' . $this->instance->url->site_url(array('admin', 'installer')) . '">Installer une application</a></li>';
             } else {
                 if (!$this->instance->tendoo_admin->is_public_role($priv)) {
                     $end .= '<li><a href="' . $this->instance->url->site_url(array('admin')) . '">Espace administration</a></li>';
                 }
             }
         }
         $end .= '<li><a href="' . $this->instance->url->site_url(array('account')) . '">Mon profil</a></li>';
         $end .= '<li><a href="' . $this->instance->url->site_url(array('account', 'messaging', 'home')) . '">Ma messagerie</a></li>';
     } else {
         $options = get_meta('all');
         if (riake('allow_registration', $options) == '1') {
             $end .= '<li><a href="' . $this->instance->url->site_url(array('registration')) . '">Inscription</a></li>';
         }
         $end .= '<li><a href="' . $this->instance->url->site_url(array('login')) . '">Connexion</a></li>';
     }
     $end .= '</ul>';
     // For Zones
     if (in_array($this->data['widgets']['requestedZone'], array('LEFT', 'BOTTOM', 'RIGHT'))) {
         $widget_title = $this->data['currentWidget']['WIDGET_INFO']['WIDGET_TITLE'];
         $zone = $this->data['widgets']['requestedZone'];
         // requestedZone
         set_widget(strtolower($zone), $widget_title, $end, 'text');
     }
 }
开发者ID:RodolfoSilva,项目名称:tendoo-cms,代码行数:45,代码来源:sys_links.php

示例10: index

 /**
  * Sign In index page
  *
  *	Displays login page
  * 	@return : void
  **/
 public function index()
 {
     $this->events->do_action('set_login_rules');
     // in order to let validation return true
     $this->form_validation->set_rules('submit_button', __('Submit button'), 'alpha_dash');
     if ($this->form_validation->run()) {
         // Log User After Applying Filters
         $this->events->do_action('do_login');
         $exec = $this->events->apply_filters('tendoo_login_notice', 'user-logged-in');
         if ($exec == 'user-logged-in') {
             if (riake('redirect', $_GET)) {
                 redirect(urldecode(riake('redirect', $_GET)));
             } else {
                 redirect(array('dashboard'));
             }
         }
         $this->notice->push_notice($this->lang->line($exec));
     }
     // load login fields
     $this->config->set_item('signin_fields', $this->events->apply_filters('signin_fields', $this->config->item('signin_fields')));
     Html::set_title(sprintf(__('Sign In &mdash; %s'), get('core_signature')));
     $this->load->view('shared/header');
     $this->load->view('sign-in/body');
 }
开发者ID:eboominathan,项目名称:tendoo-cms,代码行数:30,代码来源:Sign_in.php

示例11: while

						<div class="blog_medium">
                        	<?php 
if (have_blog_posts() !== false) {
    while ($post = get_blog_posts()) {
        $full_date = $this->instance->date->time($post->timestamp, TRUE);
        $date = $this->instance->date->time($post->timestamp);
        // loop_categories($post->categories);
        ?>
							<article class="post">
								<div class="post_date">
									<span class="day"><?php 
        echo riake('d', $full_date);
        ?>
</span>
									<span class="month"><?php 
        echo riake('m', $full_date);
        ?>
</span>
								</div>
								<figure class="post_img">
									<a href="<?php 
        echo $post->link;
        ?>
">
										<img src="<?php 
        echo $post->thumb;
        ?>
" alt="blog post">
									</a>
								</figure>
								<div class="post_content">
开发者ID:RodolfoSilva,项目名称:tendoo-cms,代码行数:31,代码来源:blog.posts.php

示例12: get_instance

    ?>
                        <?php 
    get_instance()->load->view('admin/others/gui_dynamic_table_js');
    ?>
                    <?php 
}
?>
                </div>
                <?php 
/**
 *	Details : Output content after cols
 *	Usage : set 'after_cols' key with GUI::config()
 **/
?>
                <?php 
echo riake('after_cols', $output, '');
?>
        </section>
        <section class="content-footer" style="">
        	<div class="row m-t-sm text-center-xs">
				<?php 
if (in_array('loader', $enabled)) {
    ?>
                <div class="col-sm-2 pull-left" id="ajaxLoading">
                </div>
                <?php 
} else {
    ?>
                <div class="col-sm-2">
                </div>
                <?php 
开发者ID:eboominathan,项目名称:tendoo-cms,代码行数:31,代码来源:gui+-+deprecated.php

示例13:

                }
                // if pagination is enabled
                if (riake('pagination', $footer)) {
                    ?>
						<ul class="pagination pagination-sm no-margin pull-right">
							<li><a href="#">«</a></li>
							<li><a href="#">1</a></li>
							<li><a href="#">2</a></li>
							<li><a href="#">3</a></li>
							<li><a href="#">»</a></li>
						  </ul>
						<?php 
                }
            }
            // enable gui form saver
            if (riake('gui_saver', $meta)) {
                ?>
						</form>
						<?php 
            }
        }
    }
    // Inner Closing Wrapper
    echo $this->events->apply_filters('gui_inner_wrapper', '');
    ?>
        </div>
        <?php 
    echo $this->events->apply_filters('gui_footer', '');
    ?>
        <?php 
}
开发者ID:2329697501,项目名称:tendoo-cms,代码行数:31,代码来源:body.php

示例14: meta_namespace

/**
 * return a almost unique namespace for meta box for plugin which use GUI
 * @return string or bool (false)
 **/
function meta_namespace($segments)
{
    if ($opened_module = get_core_vars('opened_module')) {
        return core_meta_namespace($segments, riake('namespace', $opened_module, 'custom'));
    }
    return false;
}
开发者ID:RodolfoSilva,项目名称:tendoo-cms,代码行数:11,代码来源:modules_helper.php

示例15: loop_tags

    loop_tags($post->keywords, array('item_class' => 'btn btn-xs btn-primary', 'divider' => ' '));
    ?>
					<p>&nbsp;</p>
					<div class="author well">
						<div class="media">
							<div class="pull-left"> <img class="avatar img-thumbnail" src="<?php 
    echo riake('avatar_link', $post->author);
    ?>
" alt=""> </div>
							<div class="media-body">
								<div class="media-heading"> <strong><?php 
    echo $post->author['PSEUDO'];
    ?>
</strong> </div>
								<p><?php 
    echo riake('bio', $post->author);
    ?>
</p>
							</div>
						</div>
					</div>
					<!--/.author-->
					
					<div id="comments">
						<div id="comments-list">
							<h3><?php 
    echo $post->comments;
    ?>
 Commentaire(s)</h3>
							<?php 
    if (have_blog_comments()) {
开发者ID:RodolfoSilva,项目名称:tendoo-cms,代码行数:31,代码来源:blog.single.php


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