[zEditor] zEditor 1.7.1 [English]

  Bài viết hay nhất1
First topic message reminder :

Introduction:

zEditor is a light-weight editor with many new features, brought to you by Zero. zEditor is available on phpBB3, Invision, and punBB. By using zEditor, you can edit your post, send a reply, etc...without having to go through all the confirmation pages. More than that, zEditor will update all the posts that you made and edited immediately so you don't have to reload the page again to see them

Github:

https://github.com/mysticzero/zEditor
Changelogs are also on there

License:

MIT license

Demo:

Spoiler:

How to install js and css:

Step 1:

Remove old version of zEditor completely. Download the latest release
here, open latest.js and latest.css

Step 2:

Create a new javascript on your site with In all the topics selected, copy everything in latest.js file to the javascript you just created. Copy everything latest.css file to CSS, also scroll down and look for Optimize your CSS, select No

Step 3:

Go back to the javascript you just created, look for version = 'punbb';, change punbb to the forum version you're using (lowercase)

Editing viewtopic_body template:

Step 1:

Go to viewtopic_body, look for {postrow.displayed.MESSAGE}, change it to
Code:
<span class="zeditor-message"><span>{postrow.displayed.MESSAGE}</span></span>

Step 2:

Look for <!-- BEGIN displayed -->, below it, there should be a line that looks like this <div class="post post--{postrow.displayed.U_POST_ID}"{postrow.displayed.THANK_BGCOLOR} style="{postrow.displayed.DISPLAYABLE_STATE}">, change it to
Code:
<div class="post post--{postrow.displayed.U_POST_ID}"{postrow.displayed.THANK_BGCOLOR} style="{postrow.displayed.DISPLAYABLE_STATE}" id="p{postrow.displayed.U_POST_ID}">
If you don't have that line, look for the element that wraps your post (mine is <div class="post"></div>), then add id="p{postrow.displayed.U_POST_ID}" to it, you should only have one p{postrow.displayed.U_POST_ID} in your viewtopic_body template. If you have extra, please delete.

Step 3:

Look for <!-- BEGIN switch_signature -->, above it, there should be a line that looks like this </div>, put the code below above
Code:
<div class="zeditor"></div>
The code above indicates where zEditor will be displayed in a post, you can put it anywhere you like. In this case, I want it to be below the post buttons, so I place it below <div class="post-entry"></div>

Step 4:

Find
Code:
{postrow.displayed.THANK_IMG} {postrow.displayed.MULTIQUOTE_IMG} {postrow.displayed.QUOTE_IMG} {postrow.displayed.EDIT_IMG} {postrow.displayed.DELETE_IMG} {postrow.displayed.IP_IMG} {postrow.displayed.REPORT_IMG}
Those are variables for the post buttons. If they happen to be inside an element, add zeditor-buttons class to that element. If they don't, put them inside this element <div class="zeditor-buttons></div>


How to register your own IMGUR

Go to https://api.imgur.com/oauth2/addclient you can login using your facebook or twitter. Fill in the name and email, choose OAuth2 without a callback URL. Then copy the secret ID, open the zeditor script, find 6528448c258cff474ca9701c5bab6927 and replace it with your secret ID

Tips:

- lang variable contains all the words that zEditor uses. If you want something else different, just change the value. Example: I want to change the Smilies text button into an icon button. I change the value to <img src='https://2img.net/i/fa/i/smiles/icon_biggrin.png' title='Emo' />
- To make reply and pm button go to the left on phpbb3 and invision, put this in css
Code:
.pbutton{float:left}
- WIP (work in process) version will be in work in process folder. Only use it, if you want new features and don't care about bugs.
  Bài viết hay nhất16
Well let me think about it. I'm planning to integrate a simple image uploader like the imgur uploader that we have here. I've never used filepicker before but I think imgur is better as an imgage uploading service.
  Bài viết hay nhất17
Thank you. imgur uploader also good.
  Bài viết hay nhất18
Help me to remove the imageshack uploder, i want insert the img url link option.

LIke this:
[zEditor] zEditor 1.7.1 [English] - Page 2 Url10
  Bài viết hay nhất19
sivastar wrote:Help me to remove the imageshack uploder, i want insert the img url link option.

LIke this:
[zEditor] zEditor 1.7.1 [English] - Page 2 Url10
Hi, I just committed a new update so maybe Saturday/Sunday afternoon If I have time, I'll add that in.
  Bài viết hay nhất20
Zero wrote:
Hi, I just committed a new update so maybe Saturday/Sunday afternoon If I have time, I'll add that in.

Thank you sir.
  Bài viết hay nhất21
Does it support new reply notification?
  Bài viết hay nhất22
ashik4u wrote:Does it support new reply notification?
Not sure. I haven't tested that yet.
  Bài viết hay nhất23
It really looks amazing. Thanks for it and for making it english version.
  Bài viết hay nhất24
thank you
  Bài viết hay nhất25
Xin chào ..abdoa rằng công việc tốt
Bạn có thể giúp tôi áp dụng công việc này trong mẫu của tôi cho những người không Fahmy-mẫu
Đây là mẫu của tôi: viewtopic_body


viewtopic_body:

Code:



[center]<script type="text/javascript">
    //<![CDATA[
    var multiquote_img_off = '{JS_MULTIQUOTE_IMG_OFF}',
        multiquote_img_on = '{JS_MULTIQUOTE_IMG_ON}';

    var multiquote_off = '<i class="fa fa-plus-circle" aria-hidden="true"></i><span class="hide">عن قصاصات</span>',
        multiquote_on = '<i class="fa fa-minus-circle" aria-hidden="true"></i><span class="hide">إزالة قصاصات</span>';

    var hiddenMsgLabel = {
        visible: '{JS_HIDE_HIDDEN_MESSAGE}',
        hidden: '{JS_SHOW_HIDDEN_MESSAGE}'
    };

    var toggleMultiQuote = function(obj) {
        var toggle = (obj.innerHTML === multiquote_on);
        obj.innerHTML = toggle ? multiquote_off : multiquote_on;
        my_setcookie(obj.id.slice(2), toggle ? '' : '1', true);
        return false;
    };

    var showHiddenMessage = function(id) {
        var regId = parseInt(id, 10);
        if (isNaN(regId)) {
            regId = 0;
        }

        if (regId > 0) {
            $('.post--' + id).toggle(0, function() {
                if ($(this).is(":visible")) {
                    $('#hidden-title--' + id).html(hiddenMsgLabel.visible);
                } else {
                    $('#hidden-title--' + id).html(hiddenMsgLabel.hidden);
                }
            });
        }
    };

    $(function() {
        var cookie,
            obj;
        cookies = document.cookie.split('; ');
        for (i = 0, j = cookies.length; i < j; ++i) {
            if (cookies[i].substring(0, 7) === 'post_mq') {
                cookie = cookies[i].split('=');
                if (cookie[1] === '1' && (obj = document.getElementById("zz" + cookie[0]))) {
                    obj.innerHTML = multiquote_on;
                }
            }
        }
    });

    //]]>
</script>
<nav class="breadcrumb">
    <ul id="navstrip" class="clearfix" itemscope itemtype="http://data-vocabulary.org/Breadcrumb">
        <li class="begin"><a href="{U_INDEX}" itemprop="url"><span itemprop="title">{L_INDEX}</span></a></li>
        {NAV_CAT_DESC}
    </ul>
</nav>
<div class="borderwrap clearfix">
    <nav class="pagination topic-options left">
        <!-- BEGIN topicpagination -->
        {PAGINATION}
        <!-- END topicpagination -->
    </nav>
    <div class="posting-options topic-options right">
        <!-- BEGIN switch_user_authpost -->
        <a class="btn large" href="{U_POST_NEW_TOPIC}" accesskey="n" rel="nofollow"><i class="fa fa-plus fa-lg" aria-hidden="true"></i><span>انشاء موضوع جديد</span></a>
        <!-- END switch_user_authpost -->
        <!-- BEGIN switch_user_authreply -->
        <a class="btn large" href="{U_POST_REPLY_TOPIC}" accesskey="n" rel="nofollow"><i class="fa fa-reply-all fa-lg" aria-hidden="true"></i><span>اضافة رد جديد</span></a>
        <!-- END switch_user_authreply -->
    </div>
</div>
{POLL_DISPLAY}
<article id="viewtopic" class="borderwrap">
    <div class="maintitle">
        <h1>{TOPIC_TITLE}</h1>
        <div id="topicmenu-options" class="popmenubutton">
            <!-- BEGIN switch_plus_menu -->
            <script type="text/javascript">
                //<![CDATA[
                var url_favourite = '{U_FAVOURITE_JS_PLUS_MENU}';
                var url_newposts = '{U_NEWPOSTS_JS_PLUS_MENU}';
                var url_egosearch = '{U_EGOSEARCH_JS_PLUS_MENU}';
                var url_unanswered = '{U_UNANSWERED_JS_PLUS_MENU}';
                var url_watchsearch = '{U_WATCHSEARCH_JS_PLUS_MENU}';
                var url_tellfriend = '{U_TELLFRIEND_JS_PLUS_MENU}';
                insert_plus_menu_new('f{FORUM_ID}&amp;t={TOPIC_ID}', '{JS_SESSION_ID}', {JS_AUTH_FAVOURITES}, '{JS_WATCH_TOPIC}');
                //]]>
            </script>
            <!-- END switch_plus_menu -->
        </div>
    </div>
    <div class="maincontent">
        <!-- BEGIN postrow -->
        <!-- BEGIN hidden -->
        <div class="postdetails {postrow.hidden.ROW_CLASS}" colspan="2" align="center">{postrow.hidden.MESSAGE}</div>
        <!-- END hidden -->
        <!-- BEGIN first_post_br -->
        <hr id="first-post-br" />
        <!-- END first_post_br -->
        <!-- BEGIN displayed -->
        <section id="p{postrow.displayed.U_POST_ID}" class="post post--{postrow.displayed.U_POST_ID}" style="{postrow.displayed.DISPLAYABLE_STATE}">
            <div style="width: 1px;" id="{postrow.displayed.U_POST_ID}"></div>
            <div class="post-header clearfix">
                <span class="post-date">
                    <i class="fa fa-clock-o" aria-hidden="true"></i>&nbsp;{postrow.displayed.POST_DATE_NEW}
                </span>
                <span class="thanks-post hide" {postrow.displayed.THANK_BGCOLOR}>
                    &nbsp;<i class="fa fa-star" aria-hidden="true"></i>&nbsp;افضل المواضيع
                </span>
                <a class="post-count right" data-id="p{postrow.displayed.U_POST_ID}" href="#{postrow.displayed.U_POST_ID}"><i class="fa fa-hashtag" aria-hidden="true"></i>{postrow.displayed.COUNT_POSTS}</a>
            </div>
            <div class="postprofile floated" id="profile{postrow.displayed.U_POST_ID}">
                <div class="postdetails clearfix">
                    <div class="author-avatar{postrow.displayed.ONLINE_IMG_NEW} left">
                        {postrow.displayed.POSTER_AVATAR}
                    </div>
                    <div class="author-details">
                        <div class="author-name"><a href="javascript:void(0);" {postrow.displayed.ONCLICK}>{postrow.displayed.POSTER_NAME_INV}&nbsp;<i class="fa fa-angle-down" aria-hidden="true"></i></a></div>
                        <div class="author-rank">{postrow.displayed.RANK_IMAGE}</div>
                        <div class="author-links">
                            {postrow.displayed.PROFILE_IMG}
                            <!-- BEGIN user_logged_in -->
                            <!-- BEGIN switch_user_pm -->
                            &nbsp;{postrow.displayed.PM_IMG}
                            <!-- END switch_user_pm -->
                            <!-- BEGIN switch_user_email -->
                            &nbsp;{postrow.displayed.EMAIL_IMG}
                            <!-- END switch_user_email -->
                            <!-- BEGIN switch_contact_row -->
                            <!-- BEGIN contact_field -->
                            &nbsp;{postrow.displayed.user_logged_in.switch_contact_row.contact_field.CONTENT}
                            <!-- END contact_field -->
                            <!-- END switch_contact_row -->
                            <!-- BEGIN switch_user_posts -->
                            &nbsp;{postrow.displayed.USER_POSTS_IMG}
                            <!-- END switch_user_posts -->
                            <!-- END user_logged_in -->
                        </div>
                    </div>
                </div>
                <div id="pm{postrow.displayed.U_POST_ID}" class="author-stat floated" style="display: none;">
                    <!-- BEGIN profile_field -->
                    <div class="field-label">{postrow.displayed.profile_field.LABEL}<span class="field-content">{postrow.displayed.profile_field.CONTENT}</span></div>
                    <!-- END profile_field -->
                </div>
            </div>
            <div class="post-entry">
                <div class="post-contents">{postrow.displayed.MESSAGE}</div>
                <!-- BEGIN switch_attachments -->
                <dl class="attachbox">
                    <dt>{postrow.displayed.switch_attachments.L_ATTACHMENTS}</dt>
                    <dd>
                        <!-- BEGIN switch_post_attachments -->
                        <dl class="file">
                            <dt>
                                <img src="{postrow.displayed.switch_attachments.switch_post_attachments.U_IMG}" alt="" />
                                <!-- BEGIN switch_dl_att -->
                                <a class="postlink" href="{postrow.displayed.switch_attachments.switch_post_attachments.switch_dl_att.U_ATTACHMENT}">{postrow.displayed.switch_attachments.switch_post_attachments.switch_dl_att.ATTACHMENT}</a> {postrow.displayed.switch_attachments.switch_post_attachments.switch_dl_att.ATTACHMENT_DEL}
                                <!-- END switch_dl_att -->
                                <!-- BEGIN switch_no_dl_att -->
                                {postrow.displayed.switch_attachments.switch_post_attachments.switch_no_dl_att.ATTACHMENT} {postrow.displayed.switch_attachments.switch_post_attachments.switch_no_dl_att.ATTACHMENT_DEL}
                                <!-- END switch_no_dl_att -->
                            </dt>
                            <!-- BEGIN switch_no_comment -->
                            <dd>
                                <em>{postrow.displayed.switch_attachments.switch_post_attachments.switch_no_comment.ATTACHMENT_COMMENT}</em>
                            </dd>
                            <!-- END switch_no_comment -->
                            <!-- BEGIN switch_no_dl_att -->
                            <dd>
                                <em><strong>{postrow.displayed.switch_attachments.switch_post_attachments.switch_no_dl_att.TEXT_NO_DL}</strong></em>
                            </dd>
                            <!-- END switch_no_dl_att -->
                            <dd>({postrow.displayed.switch_attachments.switch_post_attachments.FILE_SIZE}) {postrow.displayed.switch_attachments.switch_post_attachments.NB_DL}</dd>
                        </dl>
                        <!-- END switch_post_attachments -->
                    </dd>
                </dl>
                <!-- END switch_attachments -->
                <!-- BEGIN switch_signature -->
                <div id="sig{postrow.displayed.U_POST_ID}" class="signature_div">{postrow.displayed.SIGNATURE_NEW}</div>
                <!-- END switch_signature -->
                <div class="clear"></div>
            </div>
            <div class="post-footer clearfix">
                <!-- zzVotePlus by Zzbaivong - devs.forumvi.com -->
                <div class="vote_zzvote left">
                    <!-- BEGIN switch_vote_active -->
                    <a class="vote_plus" href="<!-- BEGIN switch_vote -->{postrow.displayed.switch_vote_active.switch_vote.U_VOTE_PLUS}<!-- END switch_vote -->">+<span class="vote_time" data-vote="<!-- BEGIN switch_bar -->{postrow.displayed.switch_vote_active.L_VOTE_TITLE}<!-- END switch_bar --><!-- BEGIN switch_no_bar -->{postrow.displayed.switch_vote_active.L_VOTE_TITLE}<!-- END switch_no_bar -->">1</span></a>
                    <!-- END switch_vote_active -->
                </div>
                <div class="post-action right">
                    {postrow.displayed.THANK_IMG}
                    <a href="?thank={postrow.displayed.U_POST_ID}" class="thanks post-btn"><i class="fa fa-thumbs-up" aria-hidden="true"></i><span class="hide">شكرا</span></a> {postrow.displayed.MULTIQUOTE_IMG}
                    <a id="zzpost_mq{TOPIC_ID}_{postrow.displayed.U_POST_ID}" onclick="toggleMultiQuote(this);" href="javascript:void(0);" class="multiquote post-btn"><i class="fa fa-plus-circle" aria-hidden="true"></i><span class="hide">اقتباس متعدد</span></a> {postrow.displayed.QUOTE_IMG}
                    <a href="/post?p={postrow.displayed.U_POST_ID}&amp;mode=quote" class="quote post-btn"><i class="fa fa-quote-right" aria-hidden="true"></i><span class="hide">اقتباس</span></a> {postrow.displayed.EDIT_IMG}
                    <a href="/post?p={postrow.displayed.U_POST_ID}&amp;mode=editpost" class="edit post-btn"><i class="fa fa-pencil" aria-hidden="true"></i><span class="hide">تعديل</span></a> {postrow.displayed.DELETE_IMG}
                    <a href="/post?p={postrow.displayed.U_POST_ID}&amp;mode=delete" class="delete post-btn"><i class="fa fa-times" aria-hidden="true"></i><span class="hide">حذف</span></a>
                    <span class="misc-icons right">
                        {postrow.displayed.IP_IMG}
                        {postrow.displayed.REPORT_IMG_NEW}
                    </span>
                </div>
            </div>
        </section>
        <!-- closing tag post -->
        <!-- END displayed -->
        <!-- END postrow -->
    </div>
    <div class="module inner clearfix">
        <div class="search-footer-box left">
            <form method="get" action="{S_SEARCHBOX_ACTION}">
                <fieldset>
                    <input type="search" name="search_keywords" id="search_keywords" size="20" value="" placeholder="البحث في هذا القسم" /> &nbsp;
                    <input class="button fa" style="display: none;" type="submit" value="" />
                    <input type="hidden" value="{SEARCH_WHERE}" name="search_where" />
                    <input type="hidden" value="{SEARCH_TOPIC}" name="search_topic" />
                    <input type="hidden" value="posts" name="show_results" />
                </fieldset>
            </form>
        </div>
        <nav class="next-prev right">
            <a href="{U_VIEW_OLDER_TOPIC}" class="btn"><i class="fa fa-hand-o-left" aria-hidden="true"></i><span class="hide">الموضوع السابق</span></a>
            <a href="{U_VIEW_NEWER_TOPIC}" class="btn"><span class="hide">الموضوع التالى</span><i class="fa fa-hand-o-right" aria-hidden="true"></i></a>
        </nav>
    </div>
</article>
<div class="borderwrap clearfix">
    <nav class="pagination topic-options left">
        <!-- BEGIN topicpagination -->
        {PAGINATION}
        <!-- END topicpagination -->
    </nav>
    <div class="posting-options topic-options right">
        <!-- BEGIN switch_user_authpost -->
        <a class="btn large" href="{U_POST_NEW_TOPIC}" accesskey="n" rel="nofollow"><i class="fa fa-plus fa-lg" aria-hidden="true"></i><span>انشاء موضوع جديد</span></a>
        <!-- END switch_user_authpost -->
        <!-- BEGIN switch_user_authreply -->
        <a class="btn large" href="{U_POST_REPLY_TOPIC}" accesskey="n" rel="nofollow"><i class="fa fa-reply-all fa-lg" aria-hidden="true"></i><span>اضافة رد جديد</span></a>
        <!-- END switch_user_authreply -->
    </div>
</div>
<div class="borderwrap module clearfix">
    <div class="left mod-controls">
        <input type="hidden" name="t" value="{TOPIC_ID}" />
        <!-- <input type="hidden" name="sid" value="{S_SID}" /> -->
        <input type="hidden" name="{SECURE_ID_NAME}" value="{SECURE_ID_VALUE}" /> {S_TOPIC_ADMIN}
    </div>
    <div class="right">
        {S_AUTH_LIST}
    </div>
</div>
<!-- BEGIN switch_forum_rules -->
<div class="borderwrap module" id="forum_rules">
    <div class="maintitle">
        <h3>{L_FORUM_RULES}</h3>
    </div>
    <table>
        <tr>
            <!-- BEGIN switch_forum_rule_image -->
            <td class="logo">
                <img src="{RULE_IMG_URL}" alt="" />
            </td>
            <!-- END switch_forum_rule_image -->
            <td class="rules post-entry">
                {RULE_MSG}
            </td>
        </tr>
    </table>
</div>
<!-- END switch_forum_rules -->
<!-- BEGIN promot_trafic -->
<aside class="borderwrap">
    <div class="maintitle clearfix">
        <h3>{PROMOT_TRAFIC_TITLE}</h3>
        <div class="contract" id="bptrafic" onclick="toggleCategory('ptrafic');">
            &nbsp;&nbsp;&nbsp;
        </div>
    </div>
    <div id="ptrafic" class="maincontent">
        <!-- BEGIN link -->
        »&nbsp;<a href="{promot_trafic.link.U_HREF}" target="_blank" title="{promot_trafic.link.TITLE}">{promot_trafic.link.TITLE}</a>
        <br />
        <!-- END link -->
    </div>
</aside>
<!-- END promot_trafic -->
<!-- BEGIN switch_user_logged_in -->
<a name="quickreply"></a>
{QUICK_REPLY_FORM}
<!-- END switch_user_logged_in -->
<!-- BEGIN switch_image_resize -->
<script type="text/javascript">
    //<![CDATA[
    $(resize_images({
        'selector': '.postbody .post-entry',
        'max_width': {switch_image_resize.IMG_RESIZE_WIDTH},
        'max_height': {switch_image_resize.IMG_RESIZE_HEIGHT}
    }));
    //]]>
</script>
<!-- END switch_image_resize -->
<script src="//cdn.rawgit.com/baivong/bubcloud/master/public/1.0.5/bubcloud.topic.js" type="text/javascript"></script>[/center]





  Bài viết hay nhất26
You cannot reply to topics in this forum