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


PHP Tools::htmlentitiesutf8方法代码示例

本文整理汇总了PHP中Tools::htmlentitiesutf8方法的典型用法代码示例。如果您正苦于以下问题:PHP Tools::htmlentitiesutf8方法的具体用法?PHP Tools::htmlentitiesutf8怎么用?PHP Tools::htmlentitiesutf8使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Tools的用法示例。


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

示例1: renderContent

 public function renderContent($args, $setting)
 {
     $t = array('name' => '', 'image_folder_path' => '', 'limit' => 12, 'columns' => 4);
     $protocol = !empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off' || $_SERVER['SERVER_PORT'] == 443 ? "https://" : "http://";
     $url = Tools::htmlentitiesutf8($protocol . $_SERVER['HTTP_HOST'] . __PS_BASE_URI__);
     $setting = array_merge($t, $setting);
     $oimages = array();
     if ($setting['image_folder_path']) {
         $path = _PS_ROOT_DIR_ . '/' . trim($setting['image_folder_path']) . '/';
         $path = str_replace("//", "/", $path);
         if (is_dir($path)) {
             $images = glob($path . '*.*');
             $exts = array('jpg', 'gif', 'png');
             foreach ($images as $cnt => $image) {
                 $ext = Tools::substr($image, Tools::strlen($image) - 3, Tools::strlen($image));
                 if (in_array(Tools::strtolower($ext), $exts)) {
                     if ($cnt < (int) $setting['limit']) {
                         $i = str_replace("\\", "/", '' . $setting['image_folder_path'] . "/" . basename($image));
                         $i = str_replace("//", "/", $i);
                         $oimages[] = $url . $i;
                     }
                 }
             }
         }
     }
     $images = array();
     $setting['images'] = $oimages;
     $output = array('type' => 'image', 'data' => $setting);
     return $output;
 }
开发者ID:ekachandrasetiawan,项目名称:BeltcareCom,代码行数:30,代码来源:image.php

示例2: getContent

    public function getContent()
    {
        // If we try to update the settings
        $output = '';
        if (isset($_POST['submitModule'])) {
            Configuration::updateValue('blocksocial_facebook', $_POST['facebook_url'] != '' ? $_POST['facebook_url'] : '');
            Configuration::updateValue('blocksocial_twitter', $_POST['twitter_url'] != '' ? $_POST['twitter_url'] : '');
            Configuration::updateValue('blocksocial_rss', $_POST['rss_url'] != '' ? $_POST['rss_url'] : '');
            $output = '<div class="conf confirm">' . $this->l('Configuration updated') . '</div>';
        }
        return '
		<h2>' . $this->displayName . '</h2>
		' . $output . '
		<form action="' . Tools::htmlentitiesutf8($_SERVER['REQUEST_URI']) . '" method="post">
			<fieldset class="width2">				
				<label for="facebook_url">' . $this->l('Facebook URL: ') . '</label>
				<input type="text" id="facebook_url" name="facebook_url" value="' . Tools::safeOutput(Configuration::get('blocksocial_facebook') != "" ? Configuration::get('blocksocial_facebook') : "") . '" />
				<div class="clear">&nbsp;</div>		
				<label for="twitter_url">' . $this->l('Twitter URL: ') . '</label>
				<input type="text" id="twitter_url" name="twitter_url" value="' . Tools::safeOutput(Configuration::get('blocksocial_twitter') != "" ? Configuration::get('blocksocial_twitter') : "") . '" />
				<div class="clear">&nbsp;</div>		
				<label for="rss_url">' . $this->l('RSS URL: ') . '</label>
				<input type="text" id="rss_url" name="rss_url" value="' . Tools::safeOutput(Configuration::get('blocksocial_rss') != "" ? Configuration::get('blocksocial_rss') : "") . '" />
				<div class="clear">&nbsp;</div>						
				<br /><center><input type="submit" name="submitModule" value="' . $this->l('Update settings') . '" class="button" /></center>
			</fieldset>
		</form>';
    }
开发者ID:jicheng17,项目名称:vipinsg,代码行数:28,代码来源:blocksocial.php

示例3: getData

        public function getData($params, $table = 'leobtslidermini')
        {
            $this->context = Context::getContext();
            $id_shop = $this->context->shop->id;
            $id_lang = $this->context->language->id;
            $slideminirs = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS('
				SELECT hs.`id_' . $table . '_slides` as id_slide,
						   hssl.`image`,
						   hss.`position`,
						   hss.`active`,
						   hssl.`title`,
						   hssl.`url`,
						   hssl.`legend`,
						   hssl.`description`
				FROM ' . _DB_PREFIX_ . $table . ' hs
				LEFT JOIN ' . _DB_PREFIX_ . $table . '_slides hss ON (hs.id_leobtslidermini_slides = hss.id_' . $table . '_slides)
				LEFT JOIN ' . _DB_PREFIX_ . $table . '_slides_lang hssl ON (hss.id_leobtslidermini_slides = hssl.id_' . $table . '_slides)
				WHERE (id_shop = ' . (int) $id_shop . ')
				AND hssl.id_lang = ' . (int) $id_lang . ' AND hss.`active` = 1
				ORDER BY hss.position DESC');
            $iwidth = $params->get('imgwidth', 960);
            $iheight = $params->get('imgheight', 360);
            $twidth = $params->get('thumbwidth', 160);
            $theight = $params->get('thumbheight', 90);
            $site_url = Tools::htmlentitiesutf8('http://' . $_SERVER['HTTP_HOST'] . __PS_BASE_URI__) . 'modules/' . $this->module . '/images/';
            foreach ($slideminirs as $i => $slideminir) {
                $slideminir['image'] = $site_url . $slideminir['image'];
                $slideminirs[$i]['mainimage'] = $this->renderThumb($slideminir['image'], $iwidth, $iheight);
                $slideminirs[$i]['thumbnail'] = $this->renderThumb($slideminir['image'], $twidth, $theight);
            }
            return $slideminirs;
        }
开发者ID:pacxs,项目名称:pacxscom,代码行数:32,代码来源:source.php

示例4: getContent

    public function getContent()
    {
        // If we try to update the settings
        if (isset($_POST['submitModule'])) {
            Configuration::updateValue('blockcontactinfos_company', (isset($_POST['company']) and $_POST['company'] != '') ? $_POST['company'] : Configuration::get('PS_SHOP_NAME'));
            Configuration::updateValue('blockcontactinfos_address', (isset($_POST['address']) and $_POST['address'] != '') ? $_POST['address'] : '');
            Configuration::updateValue('blockcontactinfos_phone', (isset($_POST['phone']) and $_POST['phone'] != '') ? $_POST['phone'] : '');
            Configuration::updateValue('blockcontactinfos_email', (isset($_POST['email']) and $_POST['email'] != '') ? $_POST['email'] : Configuration::get('PS_SHOP_EMAIL'));
            echo '<div class="conf confirm"><img src="../img/admin/ok.gif"/>' . $this->l('Configuration updated') . '</div>';
        }
        $content = '
		<h2>' . $this->displayName . '</h2>
		<form action="' . Tools::htmlentitiesutf8($_SERVER['REQUEST_URI']) . '" method="post">
			<fieldset class="width2">	
				<p><label for="company">' . $this->l('Company name') . ' :</label>
				<input type="text" id="company" name="company" value="' . Configuration::get('blockcontactinfos_company') . '" /></p>
				<p><label for="address">' . $this->l('Address') . ' :</label>
				<textarea id="address" name="address">' . Configuration::get('blockcontactinfos_address') . '</textarea></p>
				<p><label for="phone">' . $this->l('Phone number') . ' :</label>
				<input type="text" id="phone" name="phone" value="' . Configuration::get('blockcontactinfos_phone') . '" /></p>
				<p><label for="email">' . $this->l('Email') . ' :</label>
				<input type="text" id="email" name="email" value="' . Configuration::get('blockcontactinfos_email') . '" />	</p>
				<div class="clear">&nbsp;</div>
				<br /><center><input type="submit" name="submitModule" value="' . $this->l('Update settings') . '" class="button" /></center>
			</fieldset>
		</form>
		<div class="clear">&nbsp;</div>
		<fieldset>
			<legend>Addons</legend>
			' . $this->l('This module has been developped by PrestaShop and can only be sold through') . ' <a href="http://addons.prestashop.com">addons.prestashop.com</a>.<br />
			' . $this->l('Please report all bugs to') . ' <a href="mailto:addons@prestashop.com">addons@prestashop.com</a> ' . $this->l('or using our') . ' <a href="http://addons.prestashop.com/contact-form.php">' . $this->l('contact form') . '</a>.
		</fieldset>';
        return $content;
    }
开发者ID:greench,项目名称:prestashop,代码行数:34,代码来源:blockcontactinfos.php

示例5: renderContent

 /**
  *
  */
 public function renderContent($setting)
 {
     $t = array('name' => '', 'image' => '', 'imagesize' => '80x80', 'alignment' => '', 'animation' => '', 'ispopup' => '1', 'imageurl' => '', 'icon' => '', 'widget_heading' => '', 'icon_position' => 'left');
     $protocol = !empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off' || $_SERVER['SERVER_PORT'] == 443 ? 'https://' : 'http://';
     $url = Tools::htmlentitiesutf8($protocol . $_SERVER['HTTP_HOST'] . __PS_BASE_URI__);
     $setting = array_merge($t, $setting);
     $size = explode('x', $setting['imagesize']);
     //$setting['thumbnailurl'] = $url.'modules/pspagebuilder/images/'.$setting['imagefile'];
     //$setting['imageurl'] = $url.'modules/pspagebuilder/images/'.$setting['imagefile'];
     $setting['thumbnailurl'] = '';
     $setting['imageurl'] = '';
     if (count($size) == 2 && empty($setting['icon'])) {
         $cache = _PS_CACHE_DIR_ . 'pspagebuilder/';
         if (!file_exists($cache . $setting['imagefile'])) {
             if (!is_dir($cache)) {
                 mkdir($cache, 0777);
             }
             if (ImageManager::resize(_PAGEBUILDER_IMAGE_DIR_ . $setting['imagefile'], $cache . $setting['imagefile'], $size[0], $size[1])) {
                 $setting['thumbnailurl'] = $url . 'cache/pspagebuilder/' . $setting['imagefile'];
             }
         } else {
             $setting['thumbnailurl'] = $url . 'cache/pspagebuilder/' . $setting['imagefile'];
         }
     }
     $setting['content'] = $this->getValueByLang($setting, 'content');
     $output = array('type' => 'ourservice', 'data' => $setting);
     return $output;
 }
开发者ID:vuduykhuong1412,项目名称:GitHub,代码行数:31,代码来源:ourservice.php

示例6: renderContent

 public function renderContent($args, $setting)
 {
     $link = new Link();
     $protocol = !empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off' || $_SERVER['SERVER_PORT'] == 443 ? "https://" : "http://";
     $url = Tools::htmlentitiesutf8($protocol . $_SERVER['HTTP_HOST'] . __PS_BASE_URI__);
     $smallimage = $setting['smallimage'] ? $setting['smallimage'] : 'small' . '_default';
     $thickimage = $setting['thickimage'] ? $setting['thickimage'] : 'thickbox' . '_default';
     switch ($setting['ip_source']) {
         case 'ip_pproductids':
             if (empty($setting['ip_pproductids'])) {
                 return false;
             }
             if ($pproductids = $setting['ip_pproductids']) {
                 $results = $this->getImagesByProductId($pproductids, 0, $setting['ip_limit'], (int) Context::getContext()->language->id);
                 $setting['images'] = $results;
             }
             break;
         case 'ip_pcategories':
             $catids = isset($setting['categories']) && $setting['categories'] ? $setting['categories'] : array();
             if ($catids) {
                 $categories = implode(",", $catids);
                 $results = $this->getImagesByCategory($categories, 0, $setting['ip_limit'], (int) Context::getContext()->language->id);
                 $setting['images'] = $results;
             }
             break;
     }
     $setting['thickimage'] = $thickimage;
     $setting['smallimage'] = $smallimage;
     $output = array('type' => 'imageproduct', 'data' => $setting);
     return $output;
 }
开发者ID:ekachandrasetiawan,项目名称:BeltcareCom,代码行数:31,代码来源:imageproduct.php

示例7: getContent

    public function getContent()
    {
        $html = '';
        // If we try to update the settings
        if (Tools::isSubmit('submitModule')) {
            Configuration::updateValue('blockcontact_telnumber', Tools::getValue('telnumber'));
            Configuration::updateValue('blockcontact_email', Tools::getValue('email'));
            $html .= '<div class="confirm">' . $this->l('Configuration updated') . '</div>';
        }
        $html .= '
		<h2>' . $this->displayName . '</h2>
		<form action="' . Tools::htmlentitiesutf8($_SERVER['REQUEST_URI']) . '" method="post">
			<fieldset>			
				<label for="telnumber">' . $this->l('Telephone number:') . '</label>
				<input type="text" id="telnumber" name="telnumber" value="' . (Configuration::get('blockcontact_telnumber') != '' ? Tools::safeOutput(Configuration::get('blockcontact_telnumber')) : '') . '" />
				<div class="clear">&nbsp;</div>
				<label for="email">' . $this->l('Email:') . '</label>
				<input type="text" id="email" name="email" value="' . (Configuration::get('blockcontact_email') != '' ? Tools::safeOutput(Configuration::get('blockcontact_email')) : '') . '" />
				<div class="clear">&nbsp;</div>
				<div class="margin-form">
					<input type="submit" name="submitModule" value="' . $this->l('Update settings') . '" class="button" /></center>
				</div>
			</fieldset>
		</form>';
        return $html;
    }
开发者ID:rrameshsat,项目名称:Prestashop,代码行数:26,代码来源:blockcontact.php

示例8: renderContent

 /**
  *
  */
 public function renderContent($setting)
 {
     $t = array('name' => '', 'image' => '', 'imagesize' => '', 'alignment' => '', 'animation' => '', 'ispopup' => '1', 'imageurl' => '');
     $protocol = !empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off' || $_SERVER['SERVER_PORT'] == 443 ? 'https://' : 'http://';
     $url = Tools::htmlentitiesutf8($protocol . $_SERVER['HTTP_HOST'] . __PS_BASE_URI__);
     $setting = array_merge($t, $setting);
     $size = explode('x', $setting['size']);
     $setting['thumbnailurl'] = _PAGEBUILDER_IMAGE_URL_ . $setting['imagefile'];
     $setting['imageurl'] = _PAGEBUILDER_IMAGE_URL_ . $setting['imagefile'];
     if (count($size) == 2) {
         $cache = _PS_CACHE_DIR_ . 'pspagebuilder/';
         if (!file_exists($cache . $setting['imagefile'])) {
             if (!is_dir($cache)) {
                 mkdir($cache, 0755);
             }
             if (ImageManager::resize(_PAGEBUILDER_IMAGE_DIR_ . $setting['imagefile'], $cache . $setting['imagefile'], $size[0], $size[1])) {
                 $setting['thumbnailurl'] = $url . 'cache/pspagebuilder/' . $setting['imagefile'];
             }
         } else {
             $setting['thumbnailurl'] = $url . 'cache/pspagebuilder/' . $setting['imagefile'];
         }
     }
     $output = array('type' => 'image', 'data' => $setting);
     return $output;
 }
开发者ID:vuduykhuong1412,项目名称:GitHub,代码行数:28,代码来源:image.php

示例9: getContent

    public function getContent()
    {
        // If we try to update the settings
        if (isset($_POST['submitModule'])) {
            Configuration::updateValue('blocksocial_facebook', $_POST['facebook_url'] != '' ? $_POST['facebook_url'] : '');
            Configuration::updateValue('blocksocial_twitter', $_POST['twitter_url'] != '' ? $_POST['twitter_url'] : '');
            Configuration::updateValue('blocksocial_rss', $_POST['rss_url'] != '' ? $_POST['rss_url'] : '');
            echo '<div class="conf confirm"><img src="../img/admin/ok.gif"/>' . $this->l('Configuration updated') . '</div>';
        }
        return '
		<h2>' . $this->displayName . '</h2>
		<form action="' . Tools::htmlentitiesutf8($_SERVER['REQUEST_URI']) . '" method="post">
			<fieldset class="width2">				
				<label for="facebook_url">' . $this->l('Facebook URL : ') . '</label>
				<input type="text" id="facebook_url" name="facebook_url" value="' . (Configuration::get('blocksocial_facebook') != "" ? Configuration::get('blocksocial_facebook') : "") . '" />
				<div class="clear">&nbsp;</div>		
				<label for="twitter_url">' . $this->l('Twitter URL : ') . '</label>
				<input type="text" id="twitter_url" name="twitter_url" value="' . (Configuration::get('blocksocial_twitter') != "" ? Configuration::get('blocksocial_twitter') : "") . '" />
				<div class="clear">&nbsp;</div>		
				<label for="rss_url">' . $this->l('RSS URL : ') . '</label>
				<input type="text" id="rss_url" name="rss_url" value="' . (Configuration::get('blocksocial_rss') != "" ? Configuration::get('blocksocial_rss') : "") . '" />
				<div class="clear">&nbsp;</div>						
				<br /><center><input type="submit" name="submitModule" value="' . $this->l('Update settings') . '" class="button" /></center>
			</fieldset>
		</form>
		<div class="clear">&nbsp;</div>
		<fieldset>
			<legend>Addons</legend>
			' . $this->l('This module has been developped by PrestaShop and can only be sold through') . ' <a href="http://addons.prestashop.com">addons.prestashop.com</a>.<br />
			' . $this->l('Please report all bugs to') . ' <a href="mailto:addons@prestashop.com">addons@prestashop.com</a> ' . $this->l('or using our') . ' <a href="http://addons.prestashop.com/contact-form.php">' . $this->l('contact form') . '</a>.
		</fieldset>';
    }
开发者ID:greench,项目名称:prestashop,代码行数:32,代码来源:blocksocial.php

示例10: getContent

    public function getContent()
    {
        $html = '';
        // If we try to update the settings
        if (isset($_POST['submitModule'])) {
            Configuration::updateValue('blockcontactinfos_company', isset($_POST['company']) && $_POST['company'] != '' ? $_POST['company'] : Configuration::get('PS_SHOP_NAME'));
            Configuration::updateValue('blockcontactinfos_address', isset($_POST['address']) && $_POST['address'] != '' ? $_POST['address'] : '');
            Configuration::updateValue('blockcontactinfos_phone', isset($_POST['phone']) && $_POST['phone'] != '' ? $_POST['phone'] : '');
            Configuration::updateValue('blockcontactinfos_email', isset($_POST['email']) && $_POST['email'] != '' ? $_POST['email'] : Configuration::get('PS_SHOP_EMAIL'));
            $html .= '<div class="confirm">' . $this->l('Configuration updated') . '</div>';
        }
        $html .= '
		<h2>' . $this->displayName . '</h2>
		<form action="' . Tools::htmlentitiesutf8($_SERVER['REQUEST_URI']) . '" method="post">
			<fieldset>	
				<p><label for="company">' . $this->l('Company name') . ' :</label>
				<input type="text" id="company" name="company" value="' . Tools::safeOutput(Configuration::get('blockcontactinfos_company')) . '" /></p>
				<p><label for="address">' . $this->l('Address') . ' :</label>
				<textarea id="address" name="address" cols="60" rows="4">' . Tools::safeOutput(Configuration::get('blockcontactinfos_address')) . '</textarea></p>
				<p><label for="phone">' . $this->l('Phone number') . ' :</label>
				<input type="text" id="phone" name="phone" value="' . Tools::safeOutput(Configuration::get('blockcontactinfos_phone')) . '" /></p>
				<p><label for="email">' . $this->l('Email') . ' :</label>
				<input type="text" id="email" name="email" value="' . Tools::safeOutput(Configuration::get('blockcontactinfos_email')) . '" />	</p>
				<div class="margin-form">
					<input type="submit" name="submitModule" value="' . $this->l('Update settings') . '" class="button" /></center>
				</div>
			</fieldset>
		</form>
		';
        return $html;
    }
开发者ID:jicheng17,项目名称:pengwine,代码行数:31,代码来源:blockcontactinfos.php

示例11: renderView

 public function renderView()
 {
     $link = $this->context->link;
     $quicktools = array();
     $quicktools[] = array('title' => $this->l('Categories'), 'href' => $link->getAdminLink('AdminLeoblogCategories'), 'icon' => 'icon-desktop', 'class' => '');
     $quicktools[] = array('title' => $this->l('Add Category'), 'href' => $link->getAdminLink('AdminLeoblogCategories'), 'icon' => 'icon-list', 'class' => '');
     $quicktools[] = array('title' => $this->l('Blogs'), 'href' => $link->getAdminLink('AdminLeoblogBlogs'), 'icon' => 'icon-list', 'class' => '');
     $quicktools[] = array('title' => $this->l('Add Blog'), 'href' => $link->getAdminLink('AdminLeoblogBlogs') . '&addleoblog_blog', 'icon' => 'icon-list', 'class' => '');
     $quicktools[] = array('title' => $this->l('Comments'), 'href' => $link->getAdminLink('AdminLeoblogBlogs') . '&listcomments', 'icon' => 'icon-list', 'class' => '');
     $onoff = array(array('id' => 'indexation_on', 'value' => 1, 'label' => $this->l('Enabled')), array('id' => 'indexation_off', 'value' => 0, 'label' => $this->l('Disabled')));
     //$obj           = new Leoblogcat();
     //$menus         = $obj->getDropdown(null, $obj->id_parent);
     $templates = LeoBlogHelper::getTemplates();
     $url_rss = Tools::htmlentitiesutf8('http://' . $_SERVER['HTTP_HOST'] . __PS_BASE_URI__) . 'modules/leoblog/rss.php';
     $form = '';
     $this->fields_form[0]['form'] = array('tinymce' => true, 'legend' => array('title' => $this->l('General Setting'), 'icon' => 'icon-folder-close'), 'input' => array(array('type' => 'select', 'label' => $this->l('Theme - Template'), 'name' => 'template', 'options' => array('query' => $templates, 'id' => 'template', 'name' => 'template'), 'default' => 'default'), array('type' => 'text', 'label' => $this->l('Root Link Title'), 'name' => 'blog_link_title', 'required' => true, 'lang' => true, 'desc' => $this->l('Make Link Title For Blog Root Link, Example http://domain/blog'), 'default' => 'Blog'), array('type' => 'text', 'label' => $this->l('Root Friendly URL'), 'name' => 'link_rewrite', 'required' => true, 'lang' => true, 'desc' => $this->l('Make seo start with this, Example http://domain/blog'), 'default' => 'blog'), array('type' => 'text', 'label' => $this->l('Meta Title'), 'name' => 'meta_title', 'lang' => true, 'cols' => 40, 'rows' => 10, 'default' => 'Blog', 'desc' => $this->l('Display browser title on frontpage blog')), array('type' => 'textarea', 'label' => $this->l('Meta description'), 'name' => 'meta_description', 'lang' => true, 'cols' => 40, 'rows' => 10, 'default' => '', 'desk' => $this->l('Display meta descrition on frontpage blog') . 'note: note &lt;&gt;;=#{}'), array('type' => 'tags', 'label' => $this->l('Meta keywords'), 'name' => 'meta_keywords', 'default' => '', 'lang' => true, 'desc' => array($this->l('Invalid characters:') . ' &lt;&gt;;=#{}', $this->l('To add "tags" click in the field, write something, and then press "Enter."'))), array('type' => 'switch', 'label' => $this->l('Enable Rss:'), 'name' => 'indexation', 'required' => false, 'class' => 't', 'is_bool' => true, 'default' => '', 'values' => $onoff, 'desc' => $url_rss), array('type' => 'text', 'label' => $this->l('Rss Limit Items'), 'name' => 'rss_limit_item', 'default' => '20', 'desc' => 'Set Maximun shows in rss'), array('type' => 'text', 'label' => $this->l('Rss Title'), 'name' => 'rss_title_item', 'default' => 'RSS FEED', 'desc' => 'Set title in rss')), 'submit' => array('title' => $this->l('Save'), 'class' => 'btn btn-danger'));
     $this->fields_form[1]['form'] = array('tinymce' => true, 'default' => '', 'legend' => array('title' => $this->l('Listing Blog Setting'), 'icon' => 'icon-folder-close'), 'input' => array(array('type' => 'switch', 'label' => $this->l('Show Category Info:'), 'name' => 'listing_show_categoryinfo', 'required' => false, 'class' => 't', 'desc' => $this->l('Display category information in listing blogs'), 'is_bool' => true, 'default' => '1', 'values' => $onoff), array('type' => 'switch', 'label' => $this->l('Show Sub Categories:'), 'name' => 'listing_show_subcategories', 'required' => false, 'class' => 't', 'is_bool' => true, 'default' => '1', 'values' => $onoff, 'desc' => $this->l('Display subcategory in listing blog')), array('type' => 'text', 'label' => $this->l('Leading Column:'), 'name' => 'listing_leading_column', 'required' => false, 'class' => 't', 'default' => '1'), array('type' => 'text', 'label' => $this->l('Leading Limit Items:'), 'name' => 'listing_leading_limit_items', 'required' => false, 'class' => 't', 'default' => '2'), array('type' => 'text', 'label' => $this->l('Leading Image Width:'), 'name' => 'listing_leading_img_width', 'required' => false, 'class' => 't', 'default' => '690'), array('type' => 'text', 'label' => $this->l('Leading Image Height:'), 'name' => 'listing_leading_img_height', 'required' => false, 'class' => 't', 'default' => '300'), array('type' => 'text', 'label' => $this->l('Secondary Column:'), 'name' => 'listing_secondary_column', 'required' => false, 'class' => 't', 'default' => '3'), array('type' => 'text', 'label' => $this->l('Secondary Limit Items:'), 'name' => 'listing_secondary_limit_items', 'required' => false, 'class' => 't', 'default' => '6'), array('type' => 'text', 'label' => $this->l('Secondary Image Width:'), 'name' => 'listing_secondary_img_width', 'required' => false, 'class' => 't', 'default' => '390'), array('type' => 'text', 'label' => $this->l('Secondary Image Height:'), 'name' => 'listing_secondary_img_height', 'required' => false, 'class' => 't', 'default' => '220'), array('type' => 'switch', 'label' => $this->l('Show Title:'), 'name' => 'listing_show_title', 'required' => false, 'class' => 't', 'is_bool' => true, 'default' => '1', 'values' => $onoff), array('type' => 'switch', 'label' => $this->l('Show Description:'), 'name' => 'listing_show_description', 'required' => false, 'class' => 't', 'is_bool' => true, 'default' => '1', 'values' => $onoff), array('type' => 'switch', 'label' => $this->l('Show Readmore:'), 'name' => 'listing_show_readmore', 'required' => false, 'class' => 't', 'is_bool' => true, 'default' => '1', 'values' => $onoff), array('type' => 'switch', 'label' => $this->l('Show Image:'), 'name' => 'listing_show_image', 'required' => false, 'class' => 't', 'is_bool' => true, 'default' => '1', 'values' => $onoff), array('type' => 'switch', 'label' => $this->l('Show Author:'), 'name' => 'listing_show_author', 'required' => false, 'class' => 't', 'is_bool' => true, 'default' => '1', 'values' => $onoff), array('type' => 'switch', 'label' => $this->l('Show Category:'), 'name' => 'listing_show_category', 'required' => false, 'class' => 't', 'is_bool' => true, 'default' => '1', 'values' => $onoff), array('type' => 'switch', 'label' => $this->l('Show Created Date:'), 'name' => 'listing_show_created', 'required' => false, 'class' => 't', 'is_bool' => true, 'default' => '1', 'values' => $onoff), array('type' => 'switch', 'label' => $this->l('Show Hits:'), 'name' => 'listing_show_hit', 'required' => false, 'class' => 't', 'is_bool' => true, 'default' => '1', 'values' => $onoff), array('type' => 'switch', 'label' => $this->l('Show Counter:'), 'name' => 'listing_show_counter', 'required' => false, 'class' => 't', 'default' => '1', 'values' => $onoff)), 'submit' => array('title' => $this->l('Save'), 'class' => 'btn btn-danger'));
     $this->fields_form[2]['form'] = array('tinymce' => true, 'default' => '', 'legend' => array('title' => $this->l('Item Blog Setting'), 'icon' => 'icon-folder-close'), 'input' => array(array('type' => 'text', 'label' => $this->l('Item Image Width:'), 'name' => 'item_img_width', 'required' => false, 'class' => 't', 'default' => '690'), array('type' => 'text', 'label' => $this->l('Item Image Height:'), 'name' => 'item_img_height', 'required' => false, 'class' => 't', 'default' => '350'), array('type' => 'switch', 'label' => $this->l('Show Description:'), 'name' => 'item_show_description', 'required' => false, 'class' => 't', 'is_bool' => true, 'default' => '1', 'values' => $onoff), array('type' => 'switch', 'label' => $this->l('Show Image:'), 'name' => 'item_show_image', 'required' => false, 'class' => 't', 'is_bool' => true, 'default' => '', 'values' => $onoff), array('type' => 'switch', 'label' => $this->l('Show Author:'), 'name' => 'item_show_author', 'required' => false, 'class' => 't', 'is_bool' => true, 'default' => '1', 'values' => $onoff), array('type' => 'switch', 'label' => $this->l('Show Category:'), 'name' => 'item_show_category', 'required' => false, 'class' => 't', 'is_bool' => true, 'default' => '1', 'values' => $onoff), array('type' => 'switch', 'label' => $this->l('Show Created Date:'), 'name' => 'item_show_created', 'required' => false, 'class' => 't', 'is_bool' => true, 'default' => '1', 'values' => $onoff), array('type' => 'switch', 'label' => $this->l('Show Hits:'), 'name' => 'item_show_hit', 'required' => false, 'class' => 't', 'is_bool' => true, 'default' => '1', 'values' => $onoff), array('type' => 'switch', 'label' => $this->l('Show Counter:'), 'name' => 'item_show_counter', 'required' => false, 'class' => 't', 'default' => '1', 'values' => $onoff), array('type' => 'textarea', 'label' => $this->l('Social Sharing CODE'), 'name' => 'social_code', 'required' => false, 'default' => '', 'desc' => 'put sharing social code from sharethis service....to replace current sharing social.'), array('type' => 'select', 'label' => $this->l('Comment Engine:'), 'name' => 'item_comment_engine', 'id' => 'item_comment_engine', 'options' => array('query' => array(array('id' => 'local', 'name' => $this->l('Local')), array('id' => 'facebook', 'name' => $this->l('Facebook')), array('id' => 'diquis', 'name' => $this->l('Diquis'))), 'id' => 'id', 'name' => 'name'), 'default' => 'local'), array('type' => 'text', 'label' => $this->l('Limit Local Comment'), 'name' => 'item_limit_comments', 'required' => false, 'class' => 't', 'default' => '10'), array('type' => 'text', 'label' => $this->l('Diquis Account:'), 'name' => 'item_diquis_account', 'required' => false, 'class' => 't', 'default' => 'demo4leotheme', 'desc' => '<a target="_blank" href="https://disqus.com/admin/signup/">' . $this->l('Sign Up Diquis') . '</a>'), array('type' => 'text', 'label' => $this->l('Facebook Application ID:'), 'name' => 'item_facebook_appid', 'required' => false, 'class' => 't', 'default' => '100858303516', 'desc' => '<a target="_blank" href="http://developers.facebook.com/docs/reference/plugins/comments/">' . $this->l('Register A Comment Box, Then Get Application ID in Script Or Register Facebook Application ID to moderate comments') . '</a>'), array('type' => 'text', 'label' => $this->l('Facebook Width:'), 'name' => 'item_facebook_width', 'required' => false, 'class' => 't', 'default' => '600')), 'submit' => array('title' => $this->l('Save'), 'class' => 'btn btn-danger'));
     $data = LeoBlogConfig::getConfigValue('cfg_global');
     $obj = new stdClass();
     if ($data && ($tmp = unserialize($data))) {
         foreach ($tmp as $key => $value) {
             # validate module
             $obj->{$key} = $value;
         }
     }
     $fields_value = $this->getConfigFieldsValues($obj);
     $helper = new HelperForm($this);
     $this->setHelperDisplay($helper);
     $helper->fields_value = $fields_value;
     $helper->tpl_vars = $this->tpl_form_vars;
     !is_null($this->base_tpl_form) ? $helper->base_tpl = $this->base_tpl_form : '';
     if ($this->tabAccess['view']) {
         $helper->tpl_vars['show_toolbar'] = false;
         $helper->tpl_vars['submit_action'] = 'saveConfiguration';
         if (Tools::getValue('back')) {
             $helper->tpl_vars['back'] = '';
         } else {
             $helper->tpl_vars['back'] = '';
         }
     }
     $form = $helper->generateForm($this->fields_form);
     $template = $this->createTemplate('panel.tpl');
     $comments = LeoBlogComment::getComments(null, 10, $this->context->language->id);
     $blogs = LeoBlogBlog::getListBlogs(null, $this->context->language->id, 0, 10, 'hits', 'DESC');
     $template->assign(array('quicktools' => $quicktools, 'showed' => 1, 'comment_link' => $link->getAdminLink('AdminLeoblogComments'), 'blog_link' => $link->getAdminLink('AdminLeoblogBlogs'), 'blogs' => $blogs, 'count_blogs' => LeoBlogBlog::countBlogs(null, $this->context->language->id), 'count_cats' => Leoblogcat::countCats(), 'count_comments' => LeoBlogComment::countComments(), 'latest_comments' => $comments, 'globalform' => $form));
     return $template->fetch();
 }
开发者ID:ahmedonee,项目名称:morinella,代码行数:48,代码来源:AdminLeoblogDashboard.php

示例12: renderView

 public function renderView()
 {
     $link = $this->context->link;
     $quicktools = array();
     $quicktools[] = array('title' => $this->l('Categories'), 'href' => $link->getAdminLink('AdminLeoblogCategories'), 'icon' => 'icon-desktop', 'class' => '');
     $quicktools[] = array('title' => $this->l('Add Category'), 'href' => $link->getAdminLink('AdminLeoblogCategories'), 'icon' => 'icon-list', 'class' => '');
     $quicktools[] = array('title' => $this->l('Blogs'), 'href' => $link->getAdminLink('AdminLeoblogBlogs'), 'icon' => 'icon-list', 'class' => '');
     $quicktools[] = array('title' => $this->l('Add Blog'), 'href' => $link->getAdminLink('AdminLeoblogBlogs') . '&addleoblog_blog', 'icon' => 'icon-list', 'class' => '');
     $quicktools[] = array('title' => $this->l('Comments'), 'href' => $link->getAdminLink('AdminLeoblogBlogs') . '&listcomments', 'icon' => 'icon-list', 'class' => '');
     $onoff = array(array('id' => 'indexation_on', 'value' => 1, 'label' => $this->l('Enabled')), array('id' => 'indexation_off', 'value' => 0, 'label' => $this->l('Disabled')));
     $obj = new Leoblogcat();
     $menus = $obj->getDropdown(null, $obj->id_parent);
     $templates = LeoBlogHelper::getTemplates();
     $url_rss = Tools::htmlentitiesutf8('http://' . $_SERVER['HTTP_HOST'] . __PS_BASE_URI__) . 'modules/leoblog/rss.php';
     $form = '';
     $this->fields_form[0]['form'] = array('tinymce' => true, 'legend' => array('title' => $this->l('General Setting'), 'icon' => 'icon-folder-close'), 'input' => array(array('type' => 'html', 'html_content' => 'Please access <a href="http://apollotheme.com/" target="_blank" title="apollo site">Apollotheme.com</a> to buy professional version to use this '), array('type' => 'html', 'html_content' => '<a target="_blank" href="http://apollotheme.com/how-to-buy-pro-version/" target="_blank" title="How to buy">How to buy Professional Version</a>'), array('type' => 'html', 'html_content' => '<a target="_blank" href="http://apollotheme.com/different-between-free-pro-version/" target="_blank" title="Why should use">Why should use Professional Version</a>')), 'submit' => array('title' => $this->l('Save'), 'class' => 'btn btn-danger'));
     $this->fields_form[1]['form'] = array('tinymce' => true, 'default' => '', 'legend' => array('title' => $this->l('Listing Blog Setting'), 'icon' => 'icon-folder-close'), 'input' => array(array('type' => 'html', 'html_content' => 'Please access <a href="http://apollotheme.com/" target="_blank" title="apollo site">Apollotheme.com</a> to buy professional version to use this '), array('type' => 'html', 'html_content' => '<a target="_blank" href="http://apollotheme.com/how-to-buy-pro-version/" target="_blank" title="How to buy">How to buy Professional Version</a>'), array('type' => 'html', 'html_content' => '<a target="_blank" href="http://apollotheme.com/different-between-free-pro-version/" target="_blank" title="Why should use">Why should use Professional Version</a>')), 'submit' => array('title' => $this->l('Save'), 'class' => 'btn btn-danger'));
     $this->fields_form[2]['form'] = array('tinymce' => true, 'default' => '', 'legend' => array('title' => $this->l('Item Blog Setting'), 'icon' => 'icon-folder-close'), 'input' => array(array('type' => 'html', 'html_content' => 'Please access <a href="http://apollotheme.com/" target="_blank" title="apollo site">Apollotheme.com</a> to buy professional version to use this '), array('type' => 'html', 'html_content' => '<a target="_blank" href="http://apollotheme.com/how-to-buy-pro-version/" target="_blank" title="How to buy">How to buy Professional Version</a>'), array('type' => 'html', 'html_content' => '<a target="_blank" href="http://apollotheme.com/different-between-free-pro-version/" target="_blank" title="Why should use">Why should use Professional Version</a>')), 'submit' => array('title' => $this->l('Save'), 'class' => 'btn btn-danger'));
     $data = LeoBlogConfig::getConfigValue('cfg_global');
     $obj = new stdClass();
     if ($data && ($tmp = unserialize($data))) {
         foreach ($tmp as $key => $value) {
             $obj->{$key} = $value;
         }
     }
     $fields_value = $this->getConfigFieldsValues($obj);
     $helper = new HelperForm($this);
     $this->setHelperDisplay($helper);
     $helper->fields_value = $fields_value;
     $helper->tpl_vars = $this->tpl_form_vars;
     !is_null($this->base_tpl_form) ? $helper->base_tpl = $this->base_tpl_form : '';
     if ($this->tabAccess['view']) {
         $helper->tpl_vars['show_toolbar'] = false;
         $helper->tpl_vars['submit_action'] = 'saveConfiguration';
         if (Tools::getValue('back')) {
             $helper->tpl_vars['back'] = '';
         } else {
             $helper->tpl_vars['back'] = '';
         }
     }
     $form = $helper->generateForm($this->fields_form);
     $template = $this->createTemplate('panel.tpl');
     $comments = LeoBlogComment::getComments(null, 10, $this->context->language->id);
     $blogs = LeoBlogBlog::getListBlogs(null, $this->context->language->id, 0, 10, 'hits', 'DESC');
     $template->assign(array('quicktools' => $quicktools, 'showed' => 1, 'comment_link' => $link->getAdminLink('AdminLeoblogComments'), 'blog_link' => $link->getAdminLink('AdminLeoblogBlogs'), 'blogs' => $blogs, 'count_blogs' => LeoBlogBlog::countBlogs(null, $this->context->language->id), 'count_cats' => Leoblogcat::countCats(), 'count_comments' => LeoBlogComment::countComments(), 'latest_comments' => $comments, 'globalform' => $form));
     return $template->fetch();
 }
开发者ID:pacxs,项目名称:pacxscom,代码行数:47,代码来源:AdminLeoblogDashboard.php

示例13: LofParams

        /**
         * Constructor
         */
        public function LofParams($name, $hookAssign = array())
        {
            global $cookie;
            $this->name = $name;
            $this->hookAssign = $hookAssign;
            $id_lang = intval($cookie->id_lang);
            $this->site_url = Tools::htmlentitiesutf8('http://' . $_SERVER['HTTP_HOST'] . __PS_BASE_URI__);
            $result = Db::getInstance()->ExecuteS('
		SELECT c.name,IFNULL(' . ($id_lang ? 'cl' : 'c') . '.`value`, c.`value`) AS value
		FROM `' . _DB_PREFIX_ . 'configuration` c
		' . ($id_lang ? 'LEFT JOIN `' . _DB_PREFIX_ . 'configuration_lang` cl ON (c.`id_configuration` = cl.`id_configuration` AND cl.`id_lang` = ' . intval($id_lang) . ')' : '') . '
		WHERE `name` LIKE \'' . pSQL($name) . '%\'');
            foreach ($result as $row) {
                $this->_data[$row["name"]] = $row["value"];
            }
            $this->Languages();
        }
开发者ID:FAVHYAN,项目名称:a3workout,代码行数:20,代码来源:params.php

示例14: renderContent

 public function renderContent($setting)
 {
     $t = array('name' => '', 'imageslist' => '', 'size' => '', 'columns' => 4, 'links' => '', 'type' => 'grid', 'images' => array(), 'id' => time());
     $protocol = !empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off' || $_SERVER['SERVER_PORT'] == 443 ? 'https://' : 'http://';
     $url = Tools::htmlentitiesutf8($protocol . $_SERVER['HTTP_HOST'] . __PS_BASE_URI__);
     $setting = array_merge($t, $setting);
     $size = explode('x', $setting['size']);
     $tmp = explode(',', $setting['imageslist']);
     $links = preg_split('#\\s+#', trim($setting['links']));
     $output = array();
     foreach ($tmp as $key => $file) {
         $info = $this->renderImage($url, trim($file), $size);
         $info['link'] = isset($links[$key]) ? $links[$key] : '';
         $output[] = $info;
     }
     $setting['images'] = $output;
     $output = array('type' => 'gallery', 'data' => $setting);
     return $output;
 }
开发者ID:vuduykhuong1412,项目名称:GitHub,代码行数:19,代码来源:gallery.php

示例15: processHook

 /**
  * Proccess module by hook
  * $pparams: param of module
  * $pos: position call
  */
 function processHook($pparams, $pos = "home")
 {
     global $smarty, $cookie;
     //load param
     $params = $this->_params;
     $this->site_url = Tools::htmlentitiesutf8('http://' . $_SERVER['HTTP_HOST'] . __PS_BASE_URI__);
     $module_title = $params->get('module_title_' . $cookie->id_lang, 'Custom HTML');
     $show_title = $params->get('show_title', '');
     $class_prefix = $params->get('class_prefix', '');
     $content = str_replace('LOF_DEMO_CUSTOM_URL/', __PS_BASE_URI__, $params->get('content_' . $cookie->id_lang, ''));
     $objLang = new Language($cookie->id_lang);
     $defaultC = $this->contentDefault();
     if ($content == "") {
         $content = $objLang->iso_code == 'fr' ? $defaultC['fr'] : $defaultC['en'];
     }
     // template asignment variables
     $smarty->assign(array('pos' => $pos, 'module_title' => $module_title, 'show_title' => $show_title, 'class_prefix' => $class_prefix, 'content' => $content));
     return $this->display(__FILE__, 'tmpl/default.tpl');
 }
开发者ID:FAVHYAN,项目名称:a3workout,代码行数:24,代码来源:leocustomhome.php


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