public function index() { $this->load->parser(); $validation_rules = array(array('field' => 'email_test_form_captcha', 'label' => 'Captcha', 'rules' => 'nohtml|trim|callback__captcha')); $success = false; $messages = array(); $this->form_validation->set_rules($validation_rules); if ($this->form_validation->run()) { $custom_text = $this->input->post('custom_text'); $custom_html = trim($custom_text) != '' ? $this->parser->parse_string($custom_text, null, true, array('textile' => array('restricted_mode' => true))) : ''; $success = (bool) Events::trigger('email_test', array('custom_text' => $custom_html)); if ($success) { $messages[] = $this->lang->line('mailer_your_message_has_been_sent'); } else { if ($this->registry->get('email_debugger') != '') { $messages[] = $this->lang->line('mailer_error') . '<br /><br />' . $this->registry->get('email_debugger'); } else { $messages[] = $this->lang->line('mailer_error'); } } } else { $messages = validation_errors_array(); } extract(Modules::run('email/test/get_message')); $has_logo = file_exists(DEFAULTFCPATH . 'apple-touch-icon-precomposed.png'); $body = $this->parser->parse_string($body, array('has_logo' => $has_logo, 'logo_src' => default_base_url('apple-touch-icon-precomposed.png')), true, 'mustache'); $this->captcha->clear(); $this->template->set(compact('success', 'messages', 'subject', 'body'))->enable_parser_body('i18n')->build('email_test'); }
public function __construct() { parent::__construct(); $this->load->library('image_lib')->helper('url'); $this->image_base_url = default_base_url(); $this->image_base_path = DEFAULTFCPATH; }
public function get_message($custom_text = null) { $subject = '[' . $this->settings->lang('site_name') . '] ' . 'Test Message'; $body = ' {{#has_logo}} <p><img src="{{logo_src}}" /></p> {{/has_logo}} <h1>This is a message for testing purpose</h1> '; if ($custom_text != '') { $body .= $custom_text; } $body .= ' <p>Greetings from the team of <a href="' . default_base_url() . '">' . $this->settings->lang('site_name') . '</a>.</p> '; return compact('subject', 'body'); }
public function __construct() { parent::__construct(); $this->load->library('image_lib')->helper('url'); $this->image_base_url = default_base_url(); $this->image_base_path = DEFAULTFCPATH; // The following options could be taken from a configuration file. $this->image_cache_path = WRITABLEPATH . 'image_cache/image_process/'; file_exists($this->image_cache_path) or @mkdir($this->image_cache_path, 0755, TRUE); $this->bg_r = 255; $this->bg_g = 255; $this->bg_b = 255; $this->has_watermark = true; $this->wm_enabled_min_w = 100; $this->wm_enabled_min_h = 50; // See https://www.codeigniter.com/user_guide/libraries/image_lib.html#watermarking-preferences // Common Watermarking Options $this->wm_type = 'text'; // 'text' or 'overlay' $this->wm_padding = 0; $this->wm_vrt_alignment = 'B'; $this->wm_hor_alignment = 'C'; $this->wm_hor_offset = 0; $this->wm_vrt_offset = 0; // Text Watermarking Options $this->wm_text = 'Watermark'; $this->wm_font_path = ''; $this->wm_font_size = 17; $this->wm_font_color = '#ff0000'; $this->wm_shadow_color = ''; $this->wm_shadow_distance = 2; // Overlay Watermarking Options $this->wm_overlay_path = ''; $this->wm_opacity = 50; $this->wm_x_transp = 4; $this->wm_y_transp = 4; }
<?php defined('BASEPATH') or exit('No direct script access allowed'); ?> <div class="page-header"> <h1>Administrator's Home Page</h1> </div> <?php echo Modules::run('feedback_messages_widget/index', array('full_width' => false)); ?> <p> You have to build your administration interface here. </p> <p> Back to the public site: <a href="<?php echo default_base_url(); ?> "><?php echo default_base_url(); ?> </a> </p> <p>A Material Design icon: <i class="mdi mdi-star"></i></p> <p>A Font Awesome icon: <i class="fa fa-star"></i></p> <p>A Glyphicon: <span class="glyphicon glyphicon-star"></span></p>