public function __construct() { // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= parent::__construct(); __extends($this); $this->instance = get_instance(); // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= $this->load->library('install'); $this->load->library('file'); // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= if ($this->instance->db_connected()) { $this->load->library('users_global'); $this->data['options'] = get_meta('all'); trigger_inits(); // For Core menu extension, they are called after default menu. /** * Declare Notices : Notices are internal(system) or module/theme alert. **/ set_core_vars('tendoo_notices', trigger_filters('declare_notices', array(get_core_vars('default_notices')))); // @since 1.4 } else { $this->users_global = FALSE; $this->data['options'] = FALSE; } }
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(); $setting = $this->news->getBlogsterSetting(); // if (!(bool) $this->data['currentWidget']['WIDGET_INFO']['IS_CODE']) { $LIMIT = $this->data['currentWidget']['WIDGET_INFO']['WIDGET_PARAMETERS'] == '' ? 5 : $this->data['currentWidget']['WIDGET_INFO']['WIDGET_PARAMETERS']; } else { } //eval($LIMIT) $this->data['ttCat'] = $this->news->getCatForWidgets(0, $LIMIT); $controller = $this->instance->tendoo->getControllersAttachedToModule($this->data['currentWidget']['WIDGET_MODULE']['namespace']); $final_array = array(); foreach ($this->data['ttCat'] as $t) { $final_array[] = array('text' => $t['CATEGORY_NAME'] . ' (' . $t['TOTAL_ARTICLES'] . ')', 'link' => $this->instance->url->site_url(array($controller[0]['PAGE_CNAME'])) . '/categorie/' . $t['URL_TITLE']); } $widget_title = $this->data['currentWidget']['WIDGET_INFO']['WIDGET_TITLE']; // For Each Zone 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, $final_array, 'categories'); } }
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'; } // var_dump($this->data['currentWidget']); $this->news = new News_smart(); $setting = $this->news->getBlogsterSetting(); // var_dump($this->data['currentWidget']['WIDGET_INFO']['WIDGET_PARAMETERS']); $LIMIT = $this->data['currentWidget']['WIDGET_INFO']['WIDGET_PARAMETERS']; $this->data['mostViewed'] = $this->news->getMostViewed(0, $LIMIT); $end = '<ul>'; $controller = $this->instance->tendoo->getControllersAttachedToModule($this->data['currentWidget']['WIDGET_MODULE']['namespace']); // var_dump( $this->data['currentWidget']['WIDGET_MODULE'] ); // var_dump( $controller ); foreach ($this->data['mostViewed'] as $t) { $end .= '<li><a href="' . $this->instance->url->site_url(array($controller[0]['PAGE_CNAME'])) . '/lecture/' . $t['URL_TITLE'] . '">' . $t['TITLE'] . '</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'); } }
public function __construct($data) { /* Reçois la zone dans laquelle le widget est appellé, voir clé ['widgets']['requestedZone'] : (LEFT, RIGHT, BOTTOM). */ $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(); // Dans le cas ou aucune limite n'est fixé nous fixon la limite par défaut à 5 commentaires. $LIMIT = $this->data['currentWidget']['WIDGET_INFO']['WIDGET_PARAMETERS'] == '' ? 5 : $this->data['currentWidget']['WIDGET_INFO']['WIDGET_PARAMETERS']; // Utilisation de la limite fixée $this->data['getTotalKeyWords'] = $this->news->getAllPopularKeyWords($LIMIT); // Recupération du contrôleur attaché au module. $controler = $this->instance->tendoo->getControllersAttachedToModule('blogster'); $tags = array(); foreach ($this->data['getTotalKeyWords'] as $gtk) { $tags[] = array('link' => $this->instance->url->site_url(array($controler[0]['PAGE_CNAME'], 'tags', $gtk['URL_TITLE'])), 'text' => $gtk['TITLE']); } if (in_array($this->data['widgets']['requestedZone'], array('LEFT', 'BOTTOM', 'RIGHT'))) { $widget_title = $this->data['currentWidget']['WIDGET_INFO']['WIDGET_TITLE']; $rZone = $this->data['widgets']['requestedZone']; // requestedZone set_widget(strtolower($rZone), $widget_title, $tags, 'tags'); } }
public function index() { set_page('title', $this->data['page'][0]['PAGE_TITLE']); set_page('description', $this->data['page'][0]['PAGE_DESCRIPTION']); get_core_vars('active_theme_object')->definePageTitle($this->data['page'][0]['PAGE_TITLE']); get_core_vars('active_theme_object')->definePageDescription($this->data['page'][0]['PAGE_DESCRIPTION']); set_core_vars('module_content', $this->load->view($this->data['module']['uri_path'] . '/views/common_main', $this->data, true, TRUE)); get_core_vars('active_theme_object')->head($this->data); get_core_vars('active_theme_object')->body($this->data); }
public function __construct() { // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= parent::__construct(); __extends($this); // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= $this->config(); // -------------------------------------------------------------------- $this->data = array(); $this->data['lmenu'] = $this->load->view(VIEWS_DIR . '/admin/left_menu', $this->data, true, TRUE); $this->data['inner_head'] = $this->load->view('admin/inner_head', $this->data, true); $this->opened_module = get_core_vars('opened_module'); $this->opened_module = $this->opened_module; $this->lib = new page_library(); }
public function __construct() { // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= parent::__construct(); __extends($this); // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= $this->instance = get_instance(); $this->theme = get_core_vars('active_theme'); $this->data = array(); // Inclusion du ficher "library.php". if (file_exists(THEMES_DIR . $this->theme['encrypted_dir'] . '/library.php')) { include_once THEMES_DIR . $this->theme['encrypted_dir'] . '/library.php'; } $this->output_files(); }
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'])))); } }
public function __construct($data) { // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= parent::__construct(); __extends($this); // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= $this->data = $data; $module = get_core_vars('opened_module'); $this->config(); $this->opened_module = $module; $this->data['module'] = $module; $this->lib = $this->data['lib'] = $this->file_contentAdmin = new file_contentAdmin($this->data); $this->data['module_dir'] = MODULES_DIR . $this->opened_module['encrypted_dir']; $this->data['repository_dir'] = MODULES_DIR . $this->opened_module['encrypted_dir'] . '/content_repository'; $this->data['inner_head'] = $this->load->view('admin/inner_head', $this->data, true); $this->data['lmenu'] = $this->load->view(VIEWS_DIR . '/admin/left_menu', $this->data, true, TRUE); }
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è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'); } }
public function index() { $active_theme = get_core_vars('active_theme'); $setting_key = $active_theme['namespace'] . '_theme_settings'; $this->load->library('form_validation'); $this->form_validation->set_rules('api_limit', 'API LIMIT', 'required'); $this->form_validation->set_rules('declared_apis', 'Declared API', 'required'); $this->form_validation->set_rules('declared_item', 'Declared Item', 'required'); // For Static using API if ($this->form_validation->run()) { if ($active_theme) { $datas_get = get_meta($setting_key); $saved_settings = $datas_get ? $datas_get : array(); // If there are same setting already saved, they'll be overwrited $saved_settings[$this->input->post('declared_item')] = array('api_limit' => $this->input->post('api_limit'), 'declared_apis' => $this->input->post('declared_apis'), 'declared_item' => $this->input->post('declared_item')); if (set_meta($active_theme['namespace'] . '_theme_settings', $saved_settings)) { notice('push', fetch_notice_output('done')); } } } // For Static not draggable if ($this->input->post('is_static_item')) { $this->load->library('form_validation'); if ($static = return_if_array_key_exists('static', $_POST)) { if (is_array($static)) { $active_theme = get_core_vars('active_theme'); $saved_settings = get_meta($active_theme['namespace'] . '_theme_settings'); foreach ($static as $namespace => $item) { if (is_array($item)) { foreach ($item as $name => $fields) { $saved_settings[$namespace][$name] = $fields; } } } if (set_meta($active_theme['namespace'] . '_theme_settings', $saved_settings)) { notice('push', fetch_notice_output('done')); } } } } // Add Settings to Core vars push_core_vars('active_theme', 'theme_settings', get_meta($setting_key)); set_page('title', 'TIM | ' . get('core_version')); return $this->load->view($this->module_metas['uri_path'] . 'views/body', $this->data, true, true); }
public function __construct($data) { // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= parent::__construct(); __extends($this); // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= $this->instance = get_instance(); $this->data = $data; $this->tendoo =& $this->instance->tendoo; $this->tendoo_admin =& $this->instance->tendoo_admin; $this->users_global =& $this->instance->users_global; $module = get_core_vars('opened_module'); $this->dir = 'tendoo-modules/' . $module['encrypted_dir']; if (!is_dir($this->dir . '/content_repository')) { mkdir($this->dir . '/content_repository'); } $this->cp_dir = $this->dir . '/content_repository'; }
public function __construct($data) { /* Reçois la zone dans laquelle le widget est appellé, voir clé ['widgets']['requestedZone'] : (LEFT, RIGHT, BOTTOM). */ $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(); $setting = $this->news->getBlogsterSetting(); // Dans le cas ou aucune limite n'est fixé nous fixon la limite par défaut à 5 commentaires. $LIMIT = $this->data['currentWidget']['WIDGET_INFO']['WIDGET_PARAMETERS'] == '' ? 5 : $this->data['currentWidget']['WIDGET_INFO']['WIDGET_PARAMETERS']; $this->data['comments'] = $this->news->getComments(false, 0, $LIMIT, 'desc'); $controler = $this->instance->tendoo->getControllersAttachedToModule('news'); $end = '<ul>'; foreach ($this->data['comments'] as $c) { $user = $this->instance->users_global->getUser($c['AUTEUR']); $article = $this->news->getSpeNews($c['REF_ART']); if ($article) { if ($user) { $end .= ' <a href="' . $this->instance->url->site_url(array('account', 'profile', $user['PSEUDO'])) . '">' . $user['PSEUDO'] . '</a> dit : "' . word_limiter($c['CONTENT'], 10) . '" dans <a href="' . $this->instance->url->main_url() . 'index.php/' . $controler[0]['PAGE_CNAME'] . '/lecture/' . $article[0]['URL_TITLE'] . '">' . $article[0]['TITLE'] . '</a><br><br>'; } else { $offlineUser = $c['OFFLINE_AUTEUR'] != '' ? $c['OFFLINE_AUTEUR'] : 'Utilisateur inconnu'; $end .= ' <a href="#">' . $offlineUser . '</a> dit : "' . word_limiter($c['CONTENT'], 10) . '" dans <a href="' . $this->instance->url->main_url() . 'index.php/' . $controler[0]['PAGE_CNAME'] . '/lecture/' . $article[0]['URL_TITLE'] . '">' . $article[0]['TITLE'] . '</a><br><br>'; } } } $end .= '</ul>'; 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'); } }
public function __construct($data) { parent::__construct(); $this->instance = get_instance(); $this->tendoo = $this->instance->tendoo; $this->module = get_core_vars('opened_module'); $this->moduleNamespace = $this->module['namespace']; // retreive namespace $this->tendoo_admin =& $this->instance->tendoo_admin; $this->data =& $data; $this->notice =& $this->instance->notice; $this->data['module_dir'] = $this->module['uri_path']; $this->lib = new widhandler_lib($this->data); $this->data['lib'] =& $this->lib; $this->data['inner_head'] = $this->load->view('admin/inner_head', $this->data, true); $this->data['lmenu'] = $this->load->view(VIEWS_DIR . '/admin/left_menu', $this->data, true, TRUE); if (!current_user()->can('manage_widgets@tendoo_widget_administrator')) { $this->instance->url->redirect(array('admin', 'index?notice=access-denied')); } }
public function index($parameters) { // var_dump( $parameters ); set_core_vars('pages_editor_parameters', $parameters); set_core_vars('pages_editor_loaded_page', $static_page = $this->lib->get_static_page($parameters), 'read_only'); if (is_array($static_page)) { if (is_array(return_if_array_key_exists('THREAD', $static_page[0]))) { foreach ($static_page[0]['THREAD'] as $_thread) { $_current_page = $this->lib->get_pages('filter_title_url', $_thread); if ($_current_page) { if (return_if_array_key_exists('THREAD', $_current_page[0])) { set_bread(array('link' => get_instance()->url->site_url($_current_page[0]['THREAD']), 'text' => $_current_page[0]['TITLE'])); } } } } } set_core_vars('module_content', $this->load->view($this->module['uri_path'] . '/views/common', $this->data, true, TRUE)); get_core_vars('active_theme_object')->head($this->data); get_core_vars('active_theme_object')->body($this->data); }
public function superAdmin() { // Has Admin ? $this->users_global->hasAdmin() === TRUE ? $this->instance->url->redirect(array('login')) : false; $this->instance->form_validation->set_rules('super_admin_pseudo', __('Pseudo'), 'trim|required|min_length[5]|max_length[15]'); $this->instance->form_validation->set_rules('super_admin_password', __('Password'), 'trim|required|min_length[6]|max_length[15]'); $this->instance->form_validation->set_rules('super_admin_password_confirm', __('Confirm Password'), 'trim|required|min_length[6]|matches[super_admin_password]'); $this->instance->form_validation->set_rules('super_admin_mail', __('Email'), 'trim|valid_email|required'); $this->instance->form_validation->set_rules('super_admin_sex', __('Sex selection'), 'trim|required|min_length[3]|max_length[4]'); if ($this->instance->form_validation->run()) { if ($this->instance->users_global->createSuperAdmin($this->instance->input->post('super_admin_pseudo'), $this->instance->input->post('super_admin_password'), $this->instance->input->post('super_admin_sex'), $this->instance->input->post('super_admin_mail'))) { $this->instance->url->redirect(array('login?notice=user-has-been-created&ref=' . urlencode($this->instance->url->site_url(array('admin', 'index'))))); } notice('push', fetch_notice_output('super-admin-creation-failed')); } set_core_vars('pageTitle', __('Create Admin - Tendoo')); set_page('title', get_core_vars('pageTitle')); set_page('description', __('Create Super Admin - Tendoo')); set_core_vars('body', $this->load->view('registration/createSuperAdmin', true)); $this->load->view('header'); $this->load->view('global_body'); }
/** * Its create post type interface quickly. Callable from "init.php" module and theme file. **/ function __construct($config) { $this->namespace = $this->config['namespace'] = riake('namespace', $config); // $this->meta = $this->config[ 'meta' ] = riake( 'meta' , $config ); Meta are no more white listed. They should be created using a proper form to be saved as meta data. $this->label = $this->config['label'] = riake('label', $config, $this->namespace); $this->new_post_label = $this->config['new-post-label'] = riake('new-post-label', $config, sprintf(__('Create a new %s'), $this->namespace)); $this->edit_post_label = $this->config['edit-post-label'] = riake('edit-post-label', $config, sprintf(__('Edit %s'), $this->namespace)); $this->posts_list_label = $this->config['posts-list-label'] = riake('posts-list-label', $config, sprintf(__('%s list'), $this->namespace)); $this->delete_post_label = $this->config['delete-post-label'] = riake('delete-post-label', $config, sprintf(__('delete %s'), $this->namespace)); $this->menu_position = $this->config['menu-position'] = riake('menu-position', $config, array('after', 'dashboard')); $this->menu_icon = $this->config['menu-icon'] = riake('menu-icon', $config, 'fa fa-star'); $this->privilege = $this->config['privilege'] = riake('privilege', $config, 'system@manage_modules'); $this->displays = $this->config['displays'] = riake('displays', $config, array('title', 'editor', 'publish')); $this->comment_enabled = $this->config['comment-enabled'] = riake('comment-enabled', $config, TRUE); $this->post_comment_label = $this->config['post-comment-label'] = riake('post-comment-label', $config, __('Comments')); $this->comments_list_label = $this->config['comments-list-label'] = riake('comments-list-label', $config, sprintf(__('%s comments'), $this->namespace)); if (!$this->namespace) { return false; } $this->query = new CustomQuery(array('namespace' => $this->namespace)); $posttypes = get_core_vars('posttypes'); $posttypes[$this->namespace] = $this; set_core_vars('posttypes', $posttypes); }
<?php $page = get_core_vars('page'); ?> <!--start wrapper--> <section class="wrapper"> <section class="page_head"> <div class="container"> <div class="row"> <div class="col-lg-12 col-md-12 col-sm-12"> <h2><?php echo get_page('title'); ?> </h2> <?php get_breads(); ?> </div> </div> </div> </section> <section class="content blog"> <div class="container"> <div class="row"> <div class="col-xs-12 col-sm-8 col-md-8 col-lg-8"> <div class="blog_medium"> <?php if (have_blog_posts() !== false) { while ($post = get_blog_posts()) { $full_date = $this->instance->date->time($post->timestamp, TRUE);
<?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 } ?> <div class="col-sm-4 text-center"> </div> <?php if (in_array('pagination', $enabled) && get_core_vars('pagination_data')) { ?> <div class="col-sm-4 text-right text-center-xs"> <?php bs_pagination(get_core_vars('pagination_data'), $additionnal_class = "pagination-sm m-t-none m-b-none"); ?> </div> <?php } ?> </div> </section> </aside> </div>
<?php $options = get_core_vars('options'); $body = get_core_vars('body'); if (is_array(get_core_vars('body'))) { if (array_key_exists('MCO', $body)) { if ($body['MCO'] == FALSE) { page_header(); } } else { get_instance()->tendoo->show_error('Le tableau renvoyé manque d\'information suffisante pour l\'affichage intégrale de la page', 'Interprétation mal exprimé'); } } else { page_header(); } //*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Affiche le contenu par le module -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*// //*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*// echo is_array($body) ? $body['RETURNED'] : $body; //*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*// if (is_array($body)) { if (array_key_exists('MCO', $body)) { if ($body['MCO'] == FALSE) { echo $this->instance->file_2->js_load(); page_bottom($options, $this); } } else { $this->instance->tendoo->show_error('Le tableau renvoyé manque d\'information suffisante pour l\'affichage intégrale de la page', 'Interprétation mal exprimé'); } } else { echo $this->instance->file_2->js_load(); page_bottom($options, $this);
<!-- Site wrapper --> <div class="wrapper"> <?php echo get_core_vars('inner_head'); ?> <!-- Left side column. contains the logo and sidebar --> <?php output('content-left-menu'); ?> <!-- Right side column. Contains the navbar and content of the page --> <aside class="right-side"> <!-- Content Header (Page header) --> <?php output('content-header'); ?> <!-- Main content --> <section class="content"> <!-- Small boxes (Stat box) --> <?php output('content-cards'); ?> <!-- /.row --> <!-- Widgets as boxes --> <?php output('content-widgets'); ?> <!-- /.row --> </section><!-- /.content -->
<?php $this->gui->cols_width(1, 4); // Creating Meta $this->gui->set_meta(array('namespace' => core_meta_namespace(array('users', 'create')), 'title' => __('Create User'), 'type' => 'panel', 'form_wrap' => array('method' => 'post', 'submit_text' => __('Create user'), 'reset_text' => __('Reset Form'))))->push_to(1); $this->gui->set_meta(array('namespace' => 'tips', 'title' => __('How to create a user'), 'type' => 'panel'))->push_to(2); // Creating Fields // Static Fields $this->gui->set_item(array('type' => 'text', 'name' => 'admin_pseudo', 'placeholder' => __('Enter a Username'), 'label' => __('Username')))->push_to(core_meta_namespace(array('users', 'create'))); $this->gui->set_item(array('type' => 'password', 'name' => 'admin_password', 'placeholder' => __('Password'), 'label' => __('Enter a password')))->push_to(core_meta_namespace(array('users', 'create'))); $this->gui->set_item(array('type' => 'password', 'name' => 'admin_password_confirm', 'placeholder' => __('Confirm password'), 'label' => __('Confirm password')))->push_to(core_meta_namespace(array('users', 'create'))); $this->gui->set_item(array('type' => 'text', 'name' => 'admin_password_email', 'placeholder' => __('Email'), 'label' => __('Enter a user email')))->push_to(core_meta_namespace(array('users', 'create'))); $this->gui->set_item(array('type' => 'select', 'name' => 'admin_sex', 'placeholder' => __('Select user sex'), 'value' => array('', 'MASC', 'FEM'), 'text' => array(__('Choose...'), __('Male'), __('Female')), 'label' => __('User Sex')))->push_to(core_meta_namespace(array('users', 'create'))); $roles = array(''); $text = array(__('Choose...')); foreach (force_array($getPrivs) as $_role) { $roles[] = riake('ID', $_role); $text[] = riake('NAME', $_role); } $this->gui->set_item(array('type' => 'select', 'name' => 'admin_privilege', 'placeholder' => __('Select user role'), 'value' => $roles, 'text' => $text, 'label' => __('User role')))->push_to(core_meta_namespace(array('users', 'create'))); // Loading Generated Fields using "user_form_fields" hook $user_fields = trigger_filters('user_form_fields', array(get_core_vars('tendoo_user_fields'))); // Filter user fields or add foreach (force_array($user_fields) as $field) { $this->gui->set_item($field)->push_to(core_meta_namespace(array('users', 'create'))); } $this->gui->get();
<body class="login-page"> <?php echo get_core_vars('body'); ?> <?php echo output('js'); ?> </body> </html>
public function tags($tags_name = '', $page = 1) { $this->data['keyWords'] = $this->news->keyWordExists($tags_name, 'filter_url_title'); if (!$this->data['keyWords']) { module_location(array('index?notice=unknowKeyWord')); } $this->data['countArticles'] = count($this->news->getKeyWordsArticles($this->data['keyWords'][0]['ID'], null, null, 'filter_id')); $this->data['paginate'] = pagination_helper(10, $this->data['countArticles'], $page, module_url(array('tags')), $RedirectUrl = array('error', 'code', 'page-404')); $this->data['tagArticles'] = $this->data['news']->getKeyWordsArticles($this->data['keyWords'][0]['URL_TITLE'], $this->data['paginate']['start'], $this->data['paginate']['end'], 'filter_url_title'); // $title = $this->data['page'][0]['PAGE_TITLE'] . ' » ' . $this->data['keyWords'][0]['TITLE'] . ' (mot-clé)'; $description = strip_tags($this->data['keyWords'][0]['DESCRIPTION']); // Fetching KeyWords Description // set_page('title', $title); set_page('description', $description); // get_core_vars('active_theme_object')->definePageTitle($title); get_core_vars('active_theme_object')->definePageDescription($description); // if ($this->data['tagArticles'] == false) { $this->data['tagArticles'] = array(array('TITLE' => 'Aucune publication disponible', 'CONTENT' => 'Aucune publication n\'est disponible pour ce mot-clé', 'AUTEUR' => '1', 'DATE' => get_instance()->date->datetime(), 'THUMB' => $this->url->img_url('hub_back.png'), 'IMAGE' => $this->url->img_url('hub_back.png'), 'ID' => 0)); } $this->data['section'] = 'keywords'; set_core_vars('module_content', $this->load->view(MODULES_DIR . $this->data['module']['encrypted_dir'] . '/views/common_keywords', $this->data, true, TRUE)); // ----------------------------------------------------------------------------------------------------------------------------------// get_core_vars('active_theme_object')->head($this->data); get_core_vars('active_theme_object')->body($this->data); }
/** * push_core_vars : ajoute une nouvelle valeur à un tableau déjà existant dans le tableau du noyau * Deprecated **/ function push_core_vars($key, $var, $value = null) { $vars = get_core_vars($key); if ($vars) { if ($value != null) { $vars[$var] = $value; return set_core_vars($key, $vars); } else { $vars[] = $var; return set_core_vars($key, $vars); } } else { // if value is not set create an array $vars = array(); if ($value != null) { $vars[$var] = $value; return set_core_vars($key, $vars); } else { $vars[] = $var; return set_core_vars($key, $vars); } } return false; }
show_admin_menu('after', 'modules'); if (riake('tendoo_mode', get_core_vars('options'), 'website') == 'website') { show_admin_menu('before', 'themes'); get_instance()->menu->get_admin_menu_core('themes'); show_admin_menu('after', 'themes'); } show_admin_menu('before', 'users'); get_instance()->menu->get_admin_menu_core('users'); show_admin_menu('after', 'users'); show_admin_menu('before', 'roles'); get_instance()->menu->get_admin_menu_core('roles'); show_admin_menu('after', 'roles'); show_admin_menu('before', 'settings'); get_instance()->menu->get_admin_menu_core('settings'); show_admin_menu('after', 'settings'); if (riake('tendoo_mode', get_core_vars('options'), 'website') == 'website') { show_admin_menu('before', 'frontend'); get_instance()->menu->get_admin_menu_core('frontend'); show_admin_menu('after', 'frontend'); } show_admin_menu('before', 'about'); get_instance()->menu->get_admin_menu_core('about'); show_admin_menu('after', 'about'); show_admin_menu('after', 'menu'); ?> <!-- <li> <a href="../calendar.html"> <i class="fa fa-calendar"></i> <span>Calendar</span> <small class="label pull-right bg-red">3</small> </a> </li> --> </ul> </section> <!-- /.sidebar --> </aside>
<?php $this->gui->cols_width(1, 4); $this->gui->set_meta(array('type' => 'panel', 'title' => __('Install/Update Apps'), 'namespace' => core_meta_namespace(array('admin', 'installer')), 'form_wrap' => array('submit_text' => __('Install'), 'enctype' => 'multipart/form-data')))->push_to(1); $this->gui->set_item(array('type' => 'file', 'name' => 'installer_file', 'label' => __('Choose a file to upload'), 'description' => __(sprintf('Install new app. The install file must necessary be a zip file, and should be compatible with your current Tendoo Version : <strong>%s</strong>. Be safe, and install app from secure provider.', get('core_id')))))->push_to(core_meta_namespace(array('admin', 'installer'))); $this->gui->get(); return; ?> <?php echo get_core_vars('inner_head'); ?> <section id="w-f"> <section class="hbox stretch"> <?php echo get_core_vars('lmenu'); ?> <section class="scrollable" id="pjax-container"> <header> <div class="row b-b m-l-none m-r-none"> <div class="col-sm-4"> <h4 class="m-t m-b-none"><?php echo get_page('title'); ?> </h4> <p class="block text-muted"><?php echo translate('install a new application'); ?> </p> </div> <div class="col-sm-8">
/** * 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; }
<?php $this->gui->cols_width(1, 4); $this->gui->set_meta(array('namespace' => core_meta_namespace(array('users', 'edit')), 'title' => __('Edit user'), 'type' => 'panel', 'form_wrap' => array('method' => 'POST')))->push_to(1); $this->gui->set_item(array('type' => 'text', 'attrs' => array('readonly' => 'readonly'), 'value' => $adminInfo['PSEUDO'], 'placeholder' => __('User Pseudo'), 'label' => __('User Pseudo')))->push_to(core_meta_namespace(array('users', 'edit'))); $this->gui->set_item(array('type' => 'text', 'name' => 'user_email', 'placeholder' => __('Enter Email'), 'text' => __('User Email'), 'label' => __('User Email'), 'value' => $adminInfo['EMAIL']))->push_to(core_meta_namespace(array('users', 'edit'))); // Get Roles $text[] = __('User Role'); $value[] = ''; foreach (force_array($get_roles) as $_role) { $value[] = riake('ID', $_role); $text[] = riake('NAME', $_role); } $this->gui->set_item(array('type' => 'select', 'name' => 'edit_priv', 'value' => $value, 'placeholder' => __('Select User Role'), 'text' => $text, 'active' => $adminInfo['REF_ROLE_ID'], 'label' => __('User Role')))->push_to(core_meta_namespace(array('users', 'edit'))); $this->gui->set_item(array('type' => 'hidden', 'name' => 'current_admin', 'value' => $adminInfo['PSEUDO']))->push_to(core_meta_namespace(array('users', 'edit'))); // Loading Generated Fields using "user_fields" hook $user_fields = trigger_filters('user_form_fields', array(get_core_vars('tendoo_user_fields'), $adminInfo['ID'])); // Filter user fields or add foreach (force_array($user_fields) as $field) { $this->gui->set_item($field)->push_to(core_meta_namespace(array('users', 'edit'))); } $this->gui->set_item(array('type' => 'buttons', 'name' => array('set_admin', 'delete_admin'), 'value' => array(__('Save User'), __('Delete User')), 'classes' => array('btn-primary', 'btn-warning'), 'button_types' => array('submit', 'submit'), 'attrs_string' => array('', 'onclick="return confirm( \'' . __('Do you really want to delete this user ?') . '\')" ')))->push_to(core_meta_namespace(array('users', 'edit'))); $this->gui->get();
<body> <?php echo current_user("menu"); echo get_core_vars('theme_header'); ?> <div <?php echo current_user('top_margin'); ?> > <?php echo get_core_vars('module_content'); ?> <?php echo get_core_vars('theme_footer'); ?> </div> </body> </html>