Exemplo n.º 1
0
 public function __construct($registry)
 {
     parent::__construct($registry);
     $this->load->model('kuler/common');
     $this->common = $this->model_kuler_common;
     ModelKulerCommon::loadTexts($this->language->load('module/kuler_advanced_html'));
 }
Exemplo n.º 2
0
 public function index()
 {
     $this->load->model('setting/setting');
     $this->load->model('extension/module');
     $this->data['store_id'] = isset($this->request->get['store_id']) ? $this->request->get['store_id'] : 0;
     $this->data['token'] = $this->session->data['token'];
     $this->data['extension_code'] = 'kuler_testimonial';
     $this->data['default_module'] = $this->getDefaultModule();
     $this->data['default_testimonial'] = $this->getDefaultModule();
     $this->data['config_language'] = $this->config->get('config_language');
     $this->data['stores'] = $this->common->getStores();
     $this->data['languages'] = $this->common->getLanguages();
     $this->data['layouts'] = $this->common->getLayoutOptions();
     $this->data['positions'] = $this->common->getPositions();
     $this->data['front_base'] = $this->common->getFrontBase();
     $this->data['animations'] = array('horizontal' => _t('text_horizontal', 'Horizontal'), 'vertical' => _t('text_vertical', 'Vertical'));
     if (!empty($this->request->get['module_id'])) {
         $module = $this->model_extension_module->getModule($this->request->get['module_id']);
         $module['module_id'] = $this->request->get['module_id'];
         $module['short_code'] = "[kuler_testimonial.{$module['module_id']}]";
         $this->data['modules'] = array($module);
     } else {
         $this->data['modules'] = array(array('module_id' => 0, 'name' => 'Testimonial', 'status' => '1'));
     }
     if (is_array($this->data['modules'])) {
         foreach ($this->data['modules'] as &$module) {
             if (!empty($module['testimonials'])) {
                 foreach ($module['testimonials'] as &$testimonial) {
                     if (!empty($testimonial['testimonial_information']) && !empty($testimonial['testimonial'])) {
                         $testimonial['testimonial_information'] = $this->common->decodeMultilingualText($testimonial['testimonial_information']);
                         $testimonial['testimonial'] = $this->common->decodeMultilingualText($testimonial['testimonial']);
                     }
                 }
             }
         }
     }
     $this->data['messages'] = ModelKulerCommon::getTexts();
     $this->data['action_url'] = $this->common->createLink('module/kuler_testimonial/save');
     $this->data['cancel_url'] = $this->common->createLink('extension/module');
     $this->data['store_url'] = $this->common->createLink('module/kuler_testimonial');
     // Breadcrumbs
     $this->data['breadcrumbs'] = array();
     $this->data['breadcrumbs'][] = array('text' => $this->language->get('text_home'), 'href' => $this->url->link('common/dashboard', 'token=' . $this->session->data['token'], 'SSL'));
     $this->data['breadcrumbs'][] = array('text' => $this->language->get('text_module'), 'href' => $this->url->link('extension/module', 'token=' . $this->session->data['token'], 'SSL'));
     if (!isset($this->request->get['module_id'])) {
         $this->data['breadcrumbs'][] = array('text' => $this->language->get('heading_title'), 'href' => $this->url->link('module/kuler_testimonial', 'token=' . $this->session->data['token'], 'SSL'));
     } else {
         $this->data['breadcrumbs'][] = array('text' => $this->language->get('heading_title'), 'href' => $this->url->link('module/kuler_testimonial', 'token=' . $this->session->data['token'] . '&module_id=' . $this->request->get['module_id'], 'SSL'));
     }
     $this->document->setTitle(_t('heading_module'));
     $this->common->insertCommonResources();
     $this->document->addScript('view/kuler/js/testimonial.js');
     $this->data['header'] = $this->load->controller('common/header');
     $this->data['column_left'] = $this->load->controller('common/column_left');
     $this->data['footer'] = $this->load->controller('common/footer');
     $this->response->setOutput($this->load->view('module/kuler_testimonial.tpl', $this->data));
 }
 public function __construct($registry)
 {
     parent::__construct($registry);
     $this->load->model('kuler/common');
     $this->common = $this->model_kuler_common;
     ModelKulerCommon::loadTexts($this->language->load('module/kbm_mod_popular_article'));
     $this->load->model('module/kbm');
     $this->kbm_model = $this->model_module_kbm;
     $this->data['token'] = $this->session->data['token'];
     self::$__ = $this->getLanguages();
     $this->data['__'] = self::$__;
 }
Exemplo n.º 4
0
 public function index()
 {
     $this->load->model('setting/setting');
     $this->load->model('extension/module');
     $this->data['store_id'] = isset($this->request->get['store_id']) ? $this->request->get['store_id'] : 0;
     $this->data['token'] = $this->session->data['token'];
     $this->data['extension_code'] = 'kuler_contact_form';
     $this->data['default_module'] = $this->getDefaultModule();
     $this->data['config_language'] = $this->config->get('config_language');
     $this->data['stores'] = $this->common->getStores();
     $this->data['languages'] = $this->common->getLanguages();
     $this->data['layouts'] = $this->common->getLayoutOptions();
     $this->data['positions'] = $this->common->getPositions();
     if (!empty($this->request->get['module_id'])) {
         $module = $this->model_extension_module->getModule($this->request->get['module_id']);
         $module['module_id'] = $this->request->get['module_id'];
         $module['short_code'] = "[kuler_contact_form.{$module['module_id']}]";
         $this->data['modules'] = array($module);
     } else {
         $this->data['modules'] = array(array('module_id' => 0, 'name' => 'Contact Form', 'status' => '1'));
     }
     // Prepare modules
     foreach ($this->data['modules'] as &$module) {
         if (!empty($module['custom_information'])) {
             foreach ($this->data['languages'] as $language) {
                 if (!empty($module['custom_information'][$language['code']])) {
                     $module['custom_information'][$language['code']] = html_entity_decode($module['custom_information'][$language['code']], ENT_QUOTES, 'UTF-8');
                 }
             }
         }
     }
     $this->data['messages'] = ModelKulerCommon::getTexts();
     $this->data['action_url'] = $this->common->createLink('module/kuler_contact_form/save');
     $this->data['cancel_url'] = $this->common->createLink('extension/module');
     $this->data['store_url'] = $this->common->createLink('module/kuler_contact_form');
     // Breadcrumbs
     $this->data['breadcrumbs'] = array();
     $this->data['breadcrumbs'][] = array('text' => $this->language->get('text_home'), 'href' => $this->url->link('common/dashboard', 'token=' . $this->session->data['token'], 'SSL'));
     $this->data['breadcrumbs'][] = array('text' => $this->language->get('text_module'), 'href' => $this->url->link('extension/module', 'token=' . $this->session->data['token'], 'SSL'));
     if (!isset($this->request->get['module_id'])) {
         $this->data['breadcrumbs'][] = array('text' => $this->language->get('heading_title'), 'href' => $this->url->link('module/kuler_contact_form', 'token=' . $this->session->data['token'], 'SSL'));
     } else {
         $this->data['breadcrumbs'][] = array('text' => $this->language->get('heading_title'), 'href' => $this->url->link('module/kuler_contact_form', 'token=' . $this->session->data['token'] . '&module_id=' . $this->request->get['module_id'], 'SSL'));
     }
     $this->document->setTitle(_t('heading_module'));
     $this->common->insertCommonResources();
     $this->document->addScript('view/kuler/js/contact_form.js');
     $this->data['header'] = $this->load->controller('common/header');
     $this->data['column_left'] = $this->load->controller('common/column_left');
     $this->data['footer'] = $this->load->controller('common/footer');
     $this->response->setOutput($this->load->view('module/kuler_contact_form.tpl', $this->data));
 }
Exemplo n.º 5
0
 public function __construct($registry)
 {
     parent::__construct($registry);
     $this->load->model('module/kbm');
     $this->model = $this->model_module_kbm;
     // Language
     self::$__ = $this->language->load('module/kbm');
     ModelKulerCommon::loadTexts(self::$__);
     // Breadcrumb
     $home_title = $this->model->getSetting('home', 'blog_name');
     $this->data['breadcrumbs'] = array();
     $this->data['breadcrumbs'][] = array('text' => $this->language->get('text_home'), 'href' => $this->model->link('common/home'), 'separator' => false);
     $this->data['breadcrumbs'][] = array('text' => $home_title, 'href' => $this->model->link('module/kbm'), 'separator' => false);
 }
Exemplo n.º 6
0
 public function jsMessages()
 {
     $js = 'var _tMessages = ' . json_encode(ModelKulerCommon::getTexts());
     $this->response->addHeader('Content-Type: application/javascript');
     $this->response->setOutput($js);
 }
Exemplo n.º 7
0
 public static function loadTexts(array $texts)
 {
     self::$__ = array_merge(self::$__, $texts);
 }
Exemplo n.º 8
0
 public function loginPopupInit(&$data)
 {
     ModelKulerCommon::loadTexts($this->language->load('account/login'));
     $this->data['popup_login_url'] = 'index.php?route=module/kuler_cp/onePageCheckoutLogin';
     $this->data['register_url'] = $this->url->link('account/register', '', 'SSL');
     $this->data['forgotten_url'] = $this->url->link('account/forgotten', '', 'SSL');
 }
Exemplo n.º 9
0
 public function jsMessages()
 {
     $js = 'var _tMessages = ' . json_encode(ModelKulerCommon::getTexts());
     $this->response->setOutput($js);
 }