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


PHP e107::wysiwyg方法代码示例

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


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

示例1: define

*/
if (!empty($_GET['action']) && $_GET['action'] == 'dialog') {
    define('e_MINIMAL', true);
}
if (!defined('e107_INIT')) {
    require_once "../class2.php";
}
if (!getperms("A") && $_GET['action'] != 'dialog') {
    header("location:" . e_HTTP . "index.php");
    exit;
}
e107::js('core', 'plupload/plupload.full.js', 'jquery', 2);
e107::css('core', 'plupload/jquery.plupload.queue/css/jquery.plupload.queue.css', 'jquery');
e107::js('core', 'plupload/jquery.plupload.queue/jquery.plupload.queue.js', 'jquery', 2);
e107::js('core', 'core/mediaManager.js', "jquery", 5);
e107::wysiwyg(true);
/*
 * CLOSE - GO TO MAIN SCREEN
 */
if (isset($_POST['submit_cancel_show'])) {
    header('Location: ' . e_SELF);
    exit;
}
include_lan(e_LANGUAGEDIR . e_LANGUAGE . '/admin/lan_' . e_PAGE);
if ($_GET['action'] == 'dialog') {
    e107::css('inline', "body { background-color: #373737 } ");
}
if (vartrue($_GET['action']) == 'nav' && e_AJAX_REQUEST) {
    define("e_IFRAME", true);
    // require_once(e_ADMIN."auth.php");
    $bbcodeMode = $_GET['bbcode'] == 'img' ? 'bbcode=img' : FALSE;
开发者ID:e107Bulgaria,项目名称:e107,代码行数:31,代码来源:image.php

示例2: define

if (!defined("USER_WIDTH")) {
    define("USER_WIDTH", "width:95%");
}
if (!empty($pref['news_subheader'])) {
    $text .= "\n\t  <div class='alert alert-block alert-info '>\n\t    " . $tp->toHTML($pref['news_subheader'], true, "BODY") . "\n\t  </div>";
}
$text .= "\n<div>\n  <form id='dataform' method='post' action='" . e_SELF . "' enctype='multipart/form-data' onsubmit='return frmVerify()'>\n    <table class='table fborder'>";
if (!USER) {
    $text .= "\n\t  <tr>\n\t    <td style='width:20%' class='forumheader3'>" . LAN_7 . "</td>\n\t    <td style='width:80%' class='forumheader3'>\n\t      <input class='tbox' type='text' name='submitnews_name' size='60' value='" . $tp->toHTML($submitnews_user, FALSE, 'USER_TITLE') . "' maxlength='100' required />\n\t    </td>\n\t  </tr>\n\t  <tr>\n\t    <td style='width:20%' class='forumheader3'>" . LAN_112 . "</td>\n\t    <td style='width:80%' class='forumheader3'>\n\t      <input class='tbox' type='text' name='submitnews_email' size='60' value='" . $tp->toHTML($submitnews_email, FALSE, 'LINKTEXT') . "' maxlength='100' required />\n\t    </td>\n\t  </tr>";
}
$text .= "\n<tr>\n  <td style='width:20%' class='forumheader3'>" . NWSLAN_6 . ": </td>\n\t<td style='width:80%' class='forumheader3'>";
if (!$sql->select("news_category")) {
    $text .= NWSLAN_10;
} else {
    $text .= "\n\t\t<select name='cat_id' class='tbox form-control'>";
    while (list($cat_id, $cat_name, $cat_icon) = $sql->db_Fetch(MYSQL_NUM)) {
        $sel = varset($_POST['cat_id'], '') == $cat_id ? "selected='selected'" : "";
        $text .= "<option value='{$cat_id}' {$sel}>" . $tp->toHTML($cat_name, FALSE, "defs") . "</option>";
    }
    $text .= "</select>";
}
$text .= "\n  </td>\n</tr>\n<tr>\n  <td style='width:20%' class='forumheader3'>" . LAN_TITLE . "</td>\n\t<td style='width:80%' class='forumheader3'>\n    <input class='tbox form-control' type='text' id='submitnews_title' name='submitnews_title' size='60' value='" . $tp->toHTML(vartrue($_POST['submitnews_title']), TRUE, 'USER_TITLE') . "' maxlength='200' style='width:90%' required />\n\t</td>\n</tr>\n<tr>\n  \t<td style='width:20%' class='forumheader3'>" . LAN_135 . "</td>\n\t<td style='width:80%' class='forumheader3'>\n\t\t" . e107::getForm()->bbarea('submitnews_item', $tp->toForm(vartrue($_POST['submitnews_item'])), null, null, 'large', 'required=1') . "\n\t</td>\n</tr>\n";
if ($pref['subnews_attach'] && $pref['upload_enabled'] && check_class($pref['upload_class']) && FILE_UPLOADS) {
    $text .= "\n  <tr>\n    <td style='width:20%' class='forumheader3'>" . SUBNEWSLAN_5 . "<br /><span class='smalltext'>" . SUBNEWSLAN_6 . "</span></td>\n    <td style='width:80%' class='forumheader3'>\n      <input class='tbox' type='file' name='file_userfile[]' style='width:90%' multiple='multiple' />\n    </td>\n  </tr>";
}
$text .= "\n      <tr>\n        <td colspan='2' style='text-align:center' class='forumheader'>\n          <input class='btn btn-success button' type='submit' name='submitnews_submit' value='" . LAN_136 . "' />\n           <input type='hidden' name='e-token' value='" . e_TOKEN . "' />\n        </td>\n      </tr>\n    </table>\n  </form>\n</div>";
$ns->tablerender(LAN_136, $text);
if (!vartrue($pref['subnews_htmlarea'])) {
    e107::wysiwyg(false);
}
require_once FOOTERF;
开发者ID:armpit,项目名称:e107,代码行数:31,代码来源:submitnews.php

示例3: bbarea

 /**
  * Bbcode Area. Name, value, template, media-Cat, size, options array eg. counter
  * IMPORTANT: $$mediaCat is also used is the media-manager category identifier
  * @param $name
  * @param $value
  * @param $template
  * @param $mediaCat _common
  * @param $size : small | medium | large
  * @param $options array(); 
  */
 function bbarea($name, $value, $template = '', $mediaCat = '_common', $size = 'large', $options = array())
 {
     if (is_string($options)) {
         parse_str($options, $options);
     }
     //size - large|medium|small
     //width should be explicit set by current admin theme
     //	$size = 'input-large';
     switch ($size) {
         case 'tiny':
             $rows = '3';
             //	$height = "style='height:250px'"; // inline required for wysiwyg
             break;
         case 'small':
             $rows = '7';
             $height = "style='height:230px'";
             // inline required for wysiwyg
             $size = "input-block-level";
             break;
         case 'medium':
             $rows = '10';
             $height = "style='height:375px'";
             // inline required for wysiwyg
             $size = "input-block-level";
             break;
         case 'large':
         default:
             $rows = '15';
             $size = 'large input-block-level';
             //	$height = "style='height:500px;width:1025px'"; // inline required for wysiwyg
             break;
     }
     // auto-height support
     $options['class'] = 'tbox bbarea ' . ($size ? ' ' . $size : '') . ' e-wysiwyg e-autoheight form-control';
     $bbbar = '';
     $help_tagid = $this->name2id($name) . "--preview";
     if (e107::wysiwyg(true) === false) {
         $options['other'] = "onselect='storeCaret(this);' onclick='storeCaret(this);' onkeyup='storeCaret(this);' {$height}";
     } else {
         $options['other'] = " " . $height;
     }
     $counter = vartrue($options['counter'], false);
     $ret = "<div class='bbarea {$size}'>\r\n\t\t<div class='field-spacer'><!-- --></div>\n";
     $ret .= e107::getBB()->renderButtons($template, $help_tagid);
     $ret .= $this->textarea($name, $value, $rows, 70, $options, $counter);
     // higher thank 70 will break some layouts.
     $ret .= "</div>\n";
     $_SESSION['media_category'] = $mediaCat;
     // used by TinyMce.
     return $ret;
     // Quick fix - hide TinyMCE links if not installed, dups are handled by JS handler
     /*
     
     		e107::getJs()->footerInline("
     				if(typeof tinyMCE === 'undefined')
     				{
     					\$$('a.e-wysiwyg-switch').invoke('hide');
     				}
     		");
     */
 }
开发者ID:armpit,项目名称:e107,代码行数:71,代码来源:form_handler.php

示例4: function

<?php

/*
 * e107 website system
 *
 * Copyright (C) 2008-2015 e107 Inc (e107.org)
 * Released under the terms and conditions of the
 * GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
 *
 */
if (!defined('e107_INIT')) {
    exit;
}
$pref = e107::getPref();
if (e107::wysiwyg() === true && check_class($pref['post_html']) || strpos(e_SELF, "tinymce4/admin_config.php")) {
    if (e_PAGE != 'image.php') {
        //e107::js('tinymce','tiny_mce.js','jquery');
        //e107::js('tinymce','wysiwyg.php','jquery',5);
        //	e107::js('footer', "https://tinymce.cachefly.net/4.2/tinymce.min.js");
        e107::js('footer', "https://tinymce.cachefly.net/4.0/tinymce.min.js");
        // 4.1 and 4.2 have issues with saving under Firefox.  http://www.tinymce.com/develop/bugtracker_view.php?id=7655
        e107::js('footer', e_PLUGIN . 'tinymce4/wysiwyg.php', 'jquery', 5);
        // Add to e107_config.php to view hidden content when TinyMce not saving correctly
        if (deftrue('e_TINYMCE_DEBUG')) {
            e107::js('footer-inline', '


				window.onload = function () {

				$("textarea.e-wysiwyg").css("display","block");
				$("textarea.e-wysiwyg").css("visibility","inherit");
开发者ID:xxlinkexx,项目名称:e107,代码行数:31,代码来源:e_footer.php

示例5: bb_emotes

 function bb_emotes($id)
 {
     $pref = e107::getPref();
     if ($pref['comments_emoticons'] && $pref['smiley_activate'] && !e107::wysiwyg()) {
         if (deftrue('BOOTSTRAP')) {
             $text = '<div class="btn-group" >';
             $text .= '<a class="btn dropdown-toggle" data-toggle="dropdown" href="#"  title="' . LANHELP_44 . '">';
             $text .= $this->button(e_IMAGE_ABS . "bbcode/emotes.png", "smile-o");
             //	$text .= ' <span class="caret"></span>';
             //		$text .= "<img class='btn bbcode_buttons e-pointer' src='".e_IMAGE_ABS."bbcode/emotes.png' alt='' title=\"".LANHELP_44."\" />";
             $text .= '</a>';
             $text .= "<div class='dropdown-menu' style='white-space:normal;padding:10px; width:170px'>";
             $text .= $this->renderEmotes();
             $text .= "</div>";
             $text .= "</div>";
             return $text;
         }
         // Legacy BC version.
         $text = '<a class="e-expandit" href="#' . $id . '">';
         $text .= "<img class='btn btn-small bbcode_buttons e-pointer' src='" . e_IMAGE_ABS . "bbcode/emotes.png' alt='' title=\"" . LANHELP_44 . "\" />";
         $text .= '</a>';
         $text .= "<!-- Start of Emoticon selector -->\n\t\t\t<div style='margin-left:0px;margin-right:0px; position:relative;z-index:1000;float:right;display:none' id='{$id}' onclick=\"this.style.display='none'\" >\n\t\t\t\t<div style='position:absolute; bottom:30px; right:75px; width:221px; height:133px; overflow:auto;'>\n\t\t\t\t\t<table class='fborder' style='background-color:#fff;'>\n\t\t\t\t\t<tr><td class='forumheader3'>\n\t\t\t\t\t" . $this->renderEmotes() . "\n\t\t\t\t\t</td></tr></table>\n\t\t\t\t</div>\n\t\t\t</div>\n<!-- End of Emoticon selector -->\n";
         return $text;
     }
 }
开发者ID:gitye,项目名称:e107,代码行数:25,代码来源:bbcode_shortcodes.php

示例6: toForm

 function toForm($text)
 {
     if (empty($text)) {
         return $text;
     }
     if (is_string($text) && substr($text, 0, 6) == '[html]') {
         // $text = $this->toHtml($text,true);
         $search = array('&quot;', '&#039;', '&#092;', '&');
         // '&' must be last.
         $replace = array('"', "'", "\\", '&amp;');
         //	return htmlspecialchars_decode($text);
         $text = str_replace($search, $replace, $text);
         //	return $text;
         //$text  = htmlentities($text,ENT_NOQUOTES, "UTF-8");
         //	return $text;
     }
     //	return htmlentities($text);
     $search = array('&#036;', '&quot;', '<', '>');
     $replace = array('$', '"', '&lt;', '&gt;');
     $text = str_replace($search, $replace, $text);
     if (e107::wysiwyg() !== true) {
         // fix for utf-8 issue with html_entity_decode(); ???
         //	$text = str_replace("&nbsp;", " ", $text);
     }
     return $text;
 }
开发者ID:timscholten,项目名称:e107,代码行数:26,代码来源:e_parse_class.php


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