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


PHP Sanitize::htmlDecode方法代码示例

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


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

示例1: adminBodyEnd

    public function adminBodyEnd()
    {
        global $layout;
        $html = '';
        // Load CSS and JS only on Controllers in array.
        if (in_array($layout['controller'], $this->loadWhenController)) {
            $pluginPath = $this->htmlPath();
            $html = '<script>' . PHP_EOL;
            $html .= '$(document).ready(function() { ' . PHP_EOL;
            $html .= 'var simplemde = new SimpleMDE({
					element: document.getElementById("jscontent"),
					status: false,
					toolbarTips: true,
					toolbarGuideIcon: true,
					autofocus: false,
					lineWrapping: true,
					autoDownloadFontAwesome: false,
					indentWithTabs: true,
					tabSize: ' . $this->getDbField('tabSize') . ',
					spellChecker: false,
					toolbar: [' . Sanitize::htmlDecode($this->getDbField('toolbar')) . ']
			});';
            $html .= '$("#jsaddImage").on("click", function() {
					var filename = $("#jsimageList option:selected" ).text();
					if(!filename.trim()) {
						return false;
					}
					var text = simplemde.value();
					simplemde.value(text + "![alt text]("+filename+")" + "\\n");
			});';
            $html .= '}); </script>';
        }
        return $html;
    }
开发者ID:Tetoq,项目名称:bludit-plugins,代码行数:34,代码来源:plugin.php

示例2: siteBodyEnd

    public function siteBodyEnd()
    {
        // Path plugin.
        $pluginPath = $this->htmlPath();
        $html = '' . PHP_EOL;
        if ($this->getDbField('enable')) {
            $html .= '<!--html-compression no compression-->
<script>
// Set the number of snowflakes (more than 30 - 40 not recommended)
var snowmax=' . $this->getDbField('snowmax') . '
// Set the colors for the snow. Add as many colors as you like ("#aaaacc","#ddddff","#ccccdd","#f3f3f3","#f0ffff")
var snowcolor=new Array(' . Sanitize::htmlDecode($this->getDbField('snowcolor')) . ')
// Set the fonts, that create the snowflakes. Add as many fonts as you like("Times","Arial","Times","Verdana")
var snowtype=new Array("' . $this->getDbField('snowtype') . '")
// Set the letter that creates your snowflake (recommended: * )
var snowletter="' . Sanitize::htmlDecode($this->getDbField('snowletter')) . '"
// Set the speed of sinking (recommended values range from 0.3 to 2)
var sinkspeed=' . $this->getDbField('sinkspeed') . '
// Set the maximum-size of your snowflakes
var snowmaxsize=' . $this->getDbField('snowmaxsize') . '
// Set the minimal-size of your snowflakes
var snowminsize=' . $this->getDbField('snowminsize') . '
// Set the snowing-zone
// Set 1 for all-over-snowing, set 2 for left-side-snowing
// Set 3 for center-snowing, set 4 for right-side-snowing
var snowingzone=' . $this->getDbField('snowingzone') . '
</script>
<script src="' . $pluginPath . 'snowflakes.js"></script>' . PHP_EOL;
        }
        return $html;
    }
开发者ID:specktator,项目名称:bludit-plugins,代码行数:31,代码来源:plugin.php

示例3: ads4u

 private function ads4u()
 {
     $ret = '<!-- Ads4U BEGIN -->' . PHP_EOL;
     $ret .= Sanitize::htmlDecode($this->getDbField('ads4uCode')) . PHP_EOL;
     $ret .= '<!-- Ads4U END -->' . PHP_EOL;
     return $ret;
 }
开发者ID:Dipchikov,项目名称:bludit-plugins,代码行数:7,代码来源:plugin.php

示例4: adminBodyEnd

    public function adminBodyEnd()
    {
        global $layout;
        $html = '';
        // Load CSS and JS only on Controllers in array.
        if (in_array($layout['controller'], $this->loadWhenController)) {
            $pluginPath = $this->htmlPath();
            $html = '<script>' . PHP_EOL;
            $html .= '$(document).ready(function() { ' . PHP_EOL;
            $html .= 'var simplemde = new SimpleMDE({
					element: document.getElementById("jscontent"),
					status: false,
					toolbarTips: true,
					toolbarGuideIcon: true,
					autofocus: false,
					lineWrapping: true,
					indentWithTabs: true,
					tabSize: ' . $this->getDbField('tabSize') . ',
					spellChecker: false,
					toolbar: [' . Sanitize::htmlDecode($this->getDbField('toolbar')) . ']
				});';
            $html .= '}); </script>';
        }
        return $html;
    }
开发者ID:veshinak,项目名称:bludit,代码行数:25,代码来源:plugin.php

示例5: getDbField

 public function getDbField($key, $html = true)
 {
     if (isset($this->db[$key])) {
         if ($html) {
             // All fields from DBField are sanitized.
             return $this->db[$key];
         } else {
             // Decode HTML tags, this action unsanitized the variable.
             return Sanitize::htmlDecode($this->db[$key]);
         }
     }
     return '';
 }
开发者ID:acrox999,项目名称:bludit,代码行数:13,代码来源:plugin.class.php

示例6: adminBodyEnd

    public function adminBodyEnd()
    {
        global $layout;
        $html = '';
        // Load CSS and JS only on Controllers in array.
        if (in_array($layout['controller'], $this->loadWhenController)) {
            $pluginPath = $this->htmlPath();
            $html = '<script>' . PHP_EOL;
            $html .= 'var simplemde = null;' . PHP_EOL;
            $html .= 'function addContentSimpleMDE(content) {
					var text = simplemde.value();
					simplemde.value(text + content + "\\n");
				}' . PHP_EOL;
            $html .= '$(document).ready(function() { ' . PHP_EOL;
            $html .= 'simplemde = new SimpleMDE({
					element: document.getElementById("jscontent"),
					status: false,
					toolbarTips: true,
					toolbarGuideIcon: true,
					autofocus: false,
					lineWrapping: true,
					autoDownloadFontAwesome: false,
					indentWithTabs: true,
					tabSize: ' . $this->getDbField('tabSize') . ',
					spellChecker: false,
					toolbar: [' . Sanitize::htmlDecode($this->getDbField('toolbar')) . ']
			});';
            /*
            $html .= '$("#jsaddImage").on("click", function() {
            
            		if(!imageFilename.trim()) {
            			return false;
            		}
            		var text = simplemde.value();
            		simplemde.value(text + "![alt text]("+imageFilename+")" + "\n");
            });';
            */
            // This is the event for Bludit images
            $html .= '$("body").on("dblclick", "img.bludit-thumbnail", function() {
					var filename = $(this).data("filename");
					addContentSimpleMDE("![alt text]("+filename+")");
			});';
            $html .= '}); </script>';
        }
        return $html;
    }
开发者ID:CryssDOTnet,项目名称:bludit,代码行数:46,代码来源:plugin.php

示例7: adminBodyEnd

    public function adminBodyEnd()
    {
        global $layout;
        global $Language;
        $html = '';
        // Load CSS and JS only on Controllers in array.
        if (in_array($layout['controller'], $this->loadWhenController)) {
            // Autosave
            global $_Page, $_Post;
            $autosaveID = $layout['controller'];
            $autosaveEnable = $this->getDbField('autosave') ? 'true' : 'false';
            if (isset($_Page)) {
                $autosaveID = $_Page->key();
            }
            if (isset($_Post)) {
                $autosaveID = $_Post->key();
            }
            $pluginPath = $this->htmlPath();
            $html = '<script>' . PHP_EOL;
            $html .= 'var simplemde = null;' . PHP_EOL;
            $html .= 'function addContentSimpleMDE(content) {
					var text = simplemde.value();
					simplemde.value(text + content + "\\n");
				}' . PHP_EOL;
            // This function is necesary on each Editor, it is used by Bludit Images v8.
            $html .= 'function editorAddImage(filename) {
					addContentSimpleMDE("![' . $Language->get('Image description') . ']("+filename+")");
				}' . PHP_EOL;
            $html .= '$(document).ready(function() { ' . PHP_EOL;
            $html .= 'simplemde = new SimpleMDE({
					element: document.getElementById("jscontent"),
					status: false,
					toolbarTips: true,
					toolbarGuideIcon: true,
					autofocus: false,
					lineWrapping: true,
					autoDownloadFontAwesome: false,
					indentWithTabs: true,
					tabSize: ' . $this->getDbField('tabSize') . ',
					spellChecker: false,
					autosave: {
						enabled: ' . $autosaveEnable . ',
						uniqueId: "' . $autosaveID . '",
						delay: 1000,
					},
					toolbar: [' . Sanitize::htmlDecode($this->getDbField('toolbar')) . ']
			});';
            $html .= '}); </script>';
        }
        return $html;
    }
开发者ID:vorons,项目名称:bludit,代码行数:51,代码来源:plugin.php

示例8: siteBodyEnd

    public function siteBodyEnd()
    {
        // Path plugin.
        $pluginPath = $this->htmlPath();
        $html = '' . PHP_EOL;
        if ($this->getDbField('adblock')) {
            $html .= '<script src="' . $pluginPath . 'js/advert.js"></script>' . PHP_EOL;
            $html .= '<script>
if (document.getElementById("ads") == null) {

    document.write("<div id=\'advert-notice\'>' . Sanitize::htmlDecode($this->getDbField('adblock_message')) . '</div>");

}
</script>' . PHP_EOL;
        }
        return $html;
    }
开发者ID:joryphillips,项目名称:bludit-plugins,代码行数:17,代码来源:plugin.php

示例9: adminBodyEnd

    public function adminBodyEnd()
    {
        global $layout;
        $html = '';
        // Load CSS and JS only on Controllers in array.
        if (in_array($layout['controller'], $this->loadWhenController)) {
            // Autosave
            global $_Page, $_Post;
            $autosaveID = $layout['controller'];
            $autosaveEnable = $this->getDbField('autosave') ? 'true' : 'false';
            if (isset($_Page)) {
                $autosaveID = $_Page->key();
            }
            if (isset($_Post)) {
                $autosaveID = $_Post->key();
            }
            $pluginPath = $this->htmlPath();
            $html = '<script>' . PHP_EOL;
            $html .= 'var simplemde = null;' . PHP_EOL;
            $html .= 'function addContentSimpleMDE(content) {
					var text = simplemde.value();
					simplemde.value(text + content + "\\n");
				}' . PHP_EOL;
            $html .= '$(document).ready(function() { ' . PHP_EOL;
            $html .= 'simplemde = new SimpleMDE({
					element: document.getElementById("jscontent"),
					status: false,
					toolbarTips: true,
					toolbarGuideIcon: true,
					autofocus: false,
					lineWrapping: true,
					autoDownloadFontAwesome: false,
					indentWithTabs: true,
					tabSize: ' . $this->getDbField('tabSize') . ',
					spellChecker: false,
					autosave: {
						enabled: ' . $autosaveEnable . ',
						uniqueId: "' . $autosaveID . '",
						delay: 1000,
					},
					toolbar: [' . Sanitize::htmlDecode($this->getDbField('toolbar')) . ']
			});';
            // This is the event for Bludit images
            $html .= '$("body").on("dblclick", "img.bludit-thumbnail", function() {
					var filename = $(this).data("filename");
					addContentSimpleMDE("![alt text]("+filename+")");
			});';
            $html .= '}); </script>';
        }
        return $html;
    }
开发者ID:MSylvia,项目名称:bludit,代码行数:51,代码来源:plugin.php


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