Code Lab
Would you like to react to this message? Create an account in a few clicks or log in to continue.
Search
Display results as :
Advanced Search
Latest topics
dasaasfagaegadfgsgsgs gssfgsfSat Sep 01, 2018 2:56 pmBetaTester
dasaasfagaegadfgsgsgs gssfgsfTue Mar 27, 2018 5:35 amBetaTester
dasaasfagaegadfgsgsgs gssfgsfTue Mar 27, 2018 5:35 amBetaTester
dasdadadad adssadadad asdsadadadadTue Mar 27, 2018 5:29 amBetaTester
dasdadadad adssadadad asdsadadadadTue Feb 27, 2018 1:33 pmAdmin
pruebassssssssTue Feb 27, 2018 9:42 amAdmin
probando probandoSun Feb 11, 2018 4:13 amBetaTester
[test] test ok ok ok ok Sat Dec 23, 2017 7:14 pmBetaTester
Probando :)Sat Mar 04, 2017 7:09 amBetaTester

Go down
BetaTester
BetaTester
Mensajes : 96
Puntos : 178
Reputación : 68
Fecha de inscripción : 2016-09-08

[demo]   ok test test Empty [demo] ok test test

Mon Oct 31, 2016 7:23 pm
Message reputation : 100% (2 votes)
Admin wrote:sdad dassdada dasdasda dadasd dasdasd

Smile
BetaTester
BetaTester
Mensajes : 96
Puntos : 178
Reputación : 68
Fecha de inscripción : 2016-09-08

[demo]   ok test test Empty Re: [demo] ok test test

Mon Oct 31, 2016 7:24 pm
Message reputation : 50% (2 votes)
Hi, i made this code, is a "all in one" you can do all without change the current page, works in all version.

1.- First, crate a new javascript file in your administration panel in all pages.
2.- In your security, you must be allow external forms

[demo]   ok test test Captur25

3.- You can change all:
1 is true and 0 is false
Code:

config: {
        reply: 1,
        edit: 1,
        quote: 1,
        delete: 1,
        preview: 1,
        beroreunload: 1,
        placeholder: 1,
        letters: 5, //words before reply
        time: 3000,
        speed: 400, //speed of scroll animation
        color_a: 'linear-gradient(to bottom, #ffff88 0%,#ffff88 100%)',
        color_b: 'linear-gradient(to bottom, #ffaf4b 0%,#ff920a 100%)',
        color_c: 'linear-gradient(to bottom, #87e0fd 0%,#53cbf1 40%,#05abe0 100%)',
        color_d: 'linear-gradient(to bottom, #ff3019 0%,#cf0404 100%)',
        color_e: 'linear-gradient(to bottom, #d2ff52 0%,#91e842 100%)'
    },

Code:

console.log('//-----Written by Chalo ------- Open Source 2014-2016 -----//');
console.log('//------------ http://www.opensourcephpbb3.com ------------//');
console.log('//--------------------- Version: 1.4 ----------------------//');
console.log('//Reply, preview, quote, delete and more, without reload  //');
var os = {
    config: {
        reply: 1,
        edit: 1,
        quote: 1,
        delete: 1,
        preview: 1,
        beroreunload: 1,
        placeholder: 1,
        letters: 5,
        time: 3000,
        speed: 400,
        color_a: 'linear-gradient(to bottom, #ffff88 0%,#ffff88 100%)',
        color_b: 'linear-gradient(to bottom, #ffaf4b 0%,#ff920a 100%)',
        color_c: 'linear-gradient(to bottom, #87e0fd 0%,#53cbf1 40%,#05abe0 100%)',
        color_d: 'linear-gradient(to bottom, #ff3019 0%,#cf0404 100%)',
        color_e: 'linear-gradient(to bottom, #d2ff52 0%,#91e842 100%)'
    },
    lang: {
        success_reply: 'Your message has been entered successfully',
        flood: 'Flood control is active on this forum, please wait 10 second(s) before replying or posting',
        newpost: 'A new message has been posted',
        error_reply: 'Try again',
        reply_words: 'You must write ',
        reply_btn_send: 'Send data...',
        notice_default: 'No predefined text',
        no_message: 'There is nothing written in the editor',
        no_subject: 'You must specify a subject for your message.',
        pm_error_a: 'You must specify a username to whom to send this message.',
        pm_error_b: 'This or these user(s) do not exist',
        pm_error_c: 'You cannot make another post so soon after your last',
        pm_success: 'Your message has been sent',
        placeholder: 'write something here...',
        edit_subject_placeholder: 'The length of the title for this topic must be ranging between 10 and 255 characters',
        delete_main: 'Do you want delete the post #',
        delete_yes: 'Delete',
        delete_cancel: 'Cancel',
        edit_mode: 'Editing post #',
        quote_mode: 'Quoting post #',
        loading: 'Loading...',
        save: 'Save',
        notice_wait: 'Please be patient, sending data to the server'
    },
    previewHTML: '<div id="preview_content"><a id="close" style="float:right;cursor:pointer;" onclick="os.close(\'preview\')"><img src="http://2img.net/i/fa/prosilver/icon_post_delete.gif"></a></div>',
    delete_style: '#confirm_content { color: #fff; margin-bottom: 7px; padding-bottom: 5px; font-size: 30px}#confirm >a { display: inline-block; padding: 4px 12px; margin-bottom: 0; font-size: 12px; line-height: 20px; color: #333; text-align: center; text-shadow: 0 1px 1px rgba(255, 255, 255, 0.75); vertical-align: middle; cursor: pointer; text-decoration: none!important;}#yes { color: #fff!important; text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); background-color: #5bb75b; background-image: linear-gradient(to bottom, #62c462, #51a351)!important; background-repeat: repeat-x; border-color: #51a351 #51a351 #387038; border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25)!important;}#cancel { margin-left: 5px; color: #fff!important; background: linear-gradient(to bottom, #db5530 5%, #db1f1f 100%)!important; background-color: #db5530; text-shadow: 0 1px 0 #854629;}',
    init: function () {
        os.isTheme = /\/t\d+/g.test(window.location.pathname), os.isPost = /\/post\?f=(\d+)&mode=(newtopic)/.test(window.location.href), os.isEditPost = /\/post\?p=(\d+)&mode=(editpost)/.test(window.location.href), os.isMP = /\/privmsg\?mode=(post|reply|edit)/.test(window.location.href), os.phpbb2 = os.getEl('.bodylinewidth').length, os.phpbb3 = os.getEl('#phpbb'), os.invision = os.getEl('#ipbwrapper'), os.punbb = os.getEl('#pun-intro'), os.subject = os.isTheme && os.getEl('h1')[0].textContent, os.body = os.getEl('body'), os.form = os.getEl('forms').post, os.b_r = os.form.post, os.b_r_v = os.form.post.value, os.textarea = os.form.message, os.action = os.form.action, os.group = os.getEl('.sceditor-group')[0], os.b_p = os.form.preview, os.b_p_v = os.b_p.value, os.url = os.isTheme ? '/post?t=' + os.form.t.value + '&mode=reply' : os.isPost && document.location.href, os.sceditor = $(os.textarea).sceditor('instance'), os.content = os.punbb ? '.entry-content' : os.phpbb3 ? '.content' : os.invision ? '.post-entry' : os.phpbb2 && '.postbody', os.a = os.getEl('a'), 1 == os.config.placeholder && (os.getEl('.sceditor-grip', os.form)[0].previousElementSibling.placeholder = os.lang.placeholder), os.buttons(os.a), os.beforeunload()
    },
    buttons: function (e) {
        var o, s = 'os.get(this, \'quote\');return false',
            t = 'os.set_delete(this);return false',
            n = 'os.get(this,\'edit\');return false',
            r = 'os.post(this, \'preview\');return false',
            l = os.isMP ? 'os.post(this, \'mp\');return false' : 'os.post(this, \'reply\');return false';
        for (o = 0; o < e.length; o++) 1 == os.config.quote && /(?!\&(mode)\=)(quote)/.test(e[o].href) && e[o].setAttribute('onclick', s), 1 == os.config.delete && /(?!\&(mode)\=)(delete)/.test(e[o].href) && e[o].setAttribute('onclick', t), 1 == os.config.edit && /(?!\&(mode)\=)(edit)/.test(e[o].href) && e[o].setAttribute('onclick', n);
        1 == os.config.preview && os.b_p.setAttribute('onclick', r), 1 == os.config.reply && os.b_r.setAttribute('onclick', l)
    },
    get: function (e, o) {
        os.url_universal = 'undefined' != typeof e.href ? e.href : e;
        var s, t, n, r, l, i, a, c, d, p = os.url_universal.match(/(?!\/post\?p=(\w+)\&mode=)(editpost|quote)|viewtopic/)[0],
            f = os.post_number(os.url_universal);
        os.XML('', os.url_universal, function (u) {
            switch (d = u.responseXML, p) {
            case 'editpost':
                os.sceditor.updateOriginal(), s = d.forms.post.message.value, i = os.getEl('.post--' + f), t = os.cr_el('input'), t.className = 'inputbox medium edit_subject', t.placeholder = os.lang.edit_subject_placeholder, t.name = 'subject', t.style = 'display:table;margin:0 auto;width: 99%;margin-bottom: 5px', t.value = d.forms.post.subject.value, !os.getEl('.edit_subject').length && os.group.parentNode.insertBefore(t, os.group), os.edit_subject = os.getEl('.edit_subject')[0], i.length && (i[0].style.border = '1px solid orange!important'), os.sceditor.val(s), os.b_r.setAttribute('onclick', 'os.post(this, \'edit\');return false'), os.encode_edit = os.serialize(d.forms.post), os.url_edit = e.href, os.edit_number = f, os.b_r.value = os.lang.save, os.notice(os.lang.edit_mode + f, os.config.color_b, 'false'), os.scroll(os.form, os.config.speed);
                break;
            case 'quote':
                os.sceditor.updateOriginal(), os.scroll(os.form, os.config.speed), s = d.forms.post.message.value, n = os.sceditor.val(), os.sceditor.val(n + s), os.notice(os.lang.quote_mode + f, os.config.color_a, 'false');
                break;
            case 'viewtopic':
                l = os.getEl('.post--' + f, d)[0], l.style.display = 'none', l.className += ' new_ajax_post', r = os.getEl('.post--' + f)[0], 'reply' == o && (os.buttons(os.getEl('a', l)), os.set_post(l)), 'edit' == o && (a = os.getEl(os.content, l), c = a[0].innerHTML, os.getEl(os.content, r)[0].innerHTML = c, os.b_r.setAttribute('onclick', 'os.post(this, \'reply\');return false'), os.fadeIn(r, 500), os.scroll(r, os.config.speed)), os.sceditor.val(''), os.notice(os.lang.success_reply, os.config.color_e, 'true')
            }
        })
    },
    post: function (e, o) {
        var s, t, n, r, l, i, a, c, d, p, f, u, g, j, m, b, v, y, h, v;
        os.sceditor.updateOriginal(), clearInterval(s), d = 'edit' == o && encodeURIComponent(os.sceditor.val()), y = 'edit' == o && encodeURIComponent(os.edit_subject.value), os.url_post = 'delete' == o ? e.href : os.form.action, os.uritexto = 'reply' == o || 'mp' == o ? os.serialize(os.form) + '&post=1&prevent_post=1' : 'preview' == o ? os.serialize(os.form) + '&preview=Preview' : 'delete' == o ? '&confirm=1' : '&subject=' + y + '&message=' + d + '&mode=editpost&p=' + os.edit_number + '&notify=on&&post=1&prevent_post=1', a = os.getEl('.new_ajax_post'), a.length && a[0].classList.remove('new_ajax_post'), h = os.sceditor.val(), h.length > 0 && h.match(/\w{2,}\b/g).length >= os.config.letters || 'delete' == o ? (os.isPost || os.isMP) && os.form.subject && os.form.subject.value.length >= 10 || 'preview' == o || os.isEditPost || os.isTheme ? ('delete' != o && (e.value = 'preview' == o ? os.lang.loading : os.lang.reply_btn_send, 'preview' == o ? os.b_p.style = 'color:#fff;background:' + os.config.color_d : os.b_r.style = 'color:#fff;background:' + os.config.color_d), os.XML(os.uritexto, os.url_post, function (e) {
            l = e.responseXML, i = os.getEl(os.phpbb2 ? '#page-body' : '#main', l), p = os.getEl('.postbody', l)[0], s = i.innerHTML.indexOf(os.lang.success_reply), t = i.innerHTML.indexOf(os.lang.flood), c = i.innerHTML.indexOf(os.lang.newpost), j = i.innerHTML.indexOf(os.lang.pm_error_b), m = i.innerHTML.indexOf(os.lang.pm_error_c), b = i.innerHTML.indexOf(os.lang.pm_success), v = i.innerHTML.indexOf(os.lang.pm_error_a), /mp/.test(o) ? v > 0 ? (os.notice(os.lang.pm_error_a, os.config.color_c, 'true'), os.refresh(os.b_r, os.b_r_v)) : j > 0 ? (os.notice(os.lang.pm_error_b, os.config.color_c, 'true'), os.refresh(os.b_r, os.b_r_v)) : m > 0 ? (os.notice(os.lang.pm_error_c, os.config.color_c, 'true'), os.refresh(os.b_r, os.b_r_v)) : b > 0 && (os.sceditor.val(''), os.refresh(os.b_r, os.b_r_v), setTimeout(function () {
                document.location.href = '/privmsg?folder=inbox'
            }, 2e3)) : /(reply|edit)/.test(o) ? (os.viewtopic(l), n = os.view_url, os.b_r.style = 'color:#fff;background:' + os.config.color_d, t > 0 ? (os.notice(os.lang.flood, os.config.color_b, 'true'), os.refresh(os.b_r, os.b_r_v)) : c > 0 ? (os.notice(os.lang.newpost, os.config.color_b, 'true'), os.refresh(os.b_r, os.b_r_v)) : 0 > s ? (os.notice(os.lang.error_reply, '', 'true'), os.refresh(os.b_r, os.b_r_v)) : os.isTheme ? ('undefined' != typeof n && os.get(n, o), 'edit' == o && os.edit_subject.remove(), os.notice(os.lang.notice_wait, os.config.color_c, 'true'), os.refresh(os.b_r, os.b_r_v)) : (os.overlay(os.lang.loading), os.sceditor.val(''), setTimeout(function () {
                document.location.href = n
            }, 2e3), os.refresh(os.b_r, os.b_r_v))) : /preview/.test(o) ? (os.create_preview(), f = os.getEl('#preview_content'), f.appendChild(p), os.fadeIn(p, 500), os.b_p.value = os.b_p_v, os.b_p.style = '') : /delete/.test(o) && (r = os.getEl('.post--' + os.post_number(os.url_post)), g = os.getEl('#confirm_wrap'), u = os.getEl('#overlay'), r.length && (os.phpbb2 ? (os.fadeOut(r[0].nextElementSibling, 500), os.fadeOut(r[0], 500)) : os.fadeOut(r[0], 500)), g && g.remove(), u && u.remove())
        })) : (os.notice(os.lang.no_subject, os.config.color_d, 'true'), os.refresh(os.b_r, os.b_r_v), os.b_r.style = '') : (v = h.length > 0 ? os.config.letters - h.match(/\w{2,}\b/g).length : 5, os.notice(os.lang.reply_words + v + ' word' + (v > 1 ? 's' : ''), os.config.color_d, 'true'), 'reply' == o ? os.refresh(os.b_r, os.b_r_v) : os.refresh(os.b_p, os.b_p_v))
    },
    refresh: function (e, o) {
        e.value = o, e.style = ''
    },
    overlay: function (e) {
        var o = os.cr_el('div');
        o.style = 'font-family:arial;display:block;position:fixed;top:0;left:0;min-height:101%;width:100%;background-color:rgba(0, 0, 0, .4);z-index:999;color:#fff;font-size: 45px; text-align: center; line-height: 13', o.id = 'overlay', 'undefined' != typeof e && (o.textContent = e), os.body.appendChild(o)
    },
    create_preview: function () {
        var e = os.cr_el('div');
        e.style = 'background:#fff;left:15%;position:fixed;top:10%;width:70%;height:65%;overflow:auto;z-index:999;box-shadow:10px 10px 40px black;border-radius:3px;font-size:1.2em;padding:10px;font-family:Arial;text-shadow:0 1px 1px white;color:#666;', e.id = 'preview_content', e.innerHTML = os.previewHTML, os.overlay(), os.body.appendChild(e)
    },
    set_delete: function (e) {
        var o, s, t;
        s = os.cr_el('div'), t = os.cr_el('style'), s.innerHTML = '<div id="confirm_content">' + os.lang.delete_main + os.post_number(e.href) + '?</div><div id="confirm"><a id="yes" class="yes" href="' + e.href + '" onclick="os.post(this,\'delete\');return false">' + os.lang.delete_yes + '</a><a id="cancel" onclick="os.close(\'delete\')">' + os.lang.delete_cancel + '</a></div>', s.id = 'confirm_wrap', s.style = 'font-family:arial;display: inline-block; vertical-align: top; width: auto; text-align: center; z-index: 9999; padding: 7px 13px; position: fixed; top: 35%; left: 30%', os.overlay(), os.body.appendChild(s), t.innerHTML = os.delete_style, t.type = 'text/css', t.id = 'd_style', !os.getEl('#d_style') && os.getEl('head').appendChild(t), o = os.getEl('#yes')
    },
    set_post: function (e) {
        var o = os.punbb ? os.getEl('.topic')[0] : os.phpbb2 ? os.getEl('.catBottom')[0].parentNode.previousElementSibling : os.phpbb3 ? os.getEl('*bottomtitle')[0].previousElementSibling : os.invision && os.getEl('.topic-footer')[0].previousElementSibling;
        os.punbb ? o.appendChild(e) : o.parentNode.insertBefore(e, o.nextSibling), os.scroll(e, os.config.speed), os.fadeIn(e, 500)
    },
    XML: function (e, o, s) {
        var t;
        t = window.XMLHttpRequest ? new XMLHttpRequest : window.ActiveXObject && new ActiveXObject('Microsoft.XMLHTTP'), 'undefined' != typeof e ? t.open('POST', o) : t.open('GET', o, !0), t.responseType = 'document', t.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded'), t.send('undefined' != typeof e ? e : ''), t.onreadystatechange = function () {
            4 == this.readyState && 200 == this.status && s(this)
        }
    },
    serialize: function (e) {
        var o, s, t, n, r = [];
        if ('object' == typeof e && 'FORM' == e.nodeName)
            for (n = e.elements.length, s = 0; n > s; s++)
                if (o = e.elements[s], o.name && !o.disabled && 'file' != o.type && 'reset' != o.type && 'submit' != o.type && 'button' != o.type)
                    if ('select-multiple' == o.type)
                        for (t = e.elements[s].options.length - 1; t >= 0; t--) o.options[t].selected && (r[r.length] = encodeURIComponent(o.name) + '=' + encodeURIComponent(o.options[t].value));
                    else('checkbox' != o.type && 'radio' != o.type || o.checked) && (r[r.length] = encodeURIComponent(o.name) + '=' + encodeURIComponent(o.value));
        return r.join('&').replace(/%20/g, '+')
    },
    notice: function (e, o, s) {
        var t, n, r, l, i;
        i = os.getEl('.notice_reply'), n = os.group, r = n.parentNode, t = i.length ? i[0] : os.cr_el('DIV'), l = 'height:20px;line-height: 1.5;border-radius: 3px; text-shadow: 0 1px rgba(255, 255, 255, 0.46);text-align:center', !i.length && (t.classList.add('notice_reply'), t.setAttribute('style', l), r.insertBefore(t, n)), t.style.display = 'block', t.innerHTML = 'undefined' == typeof e ? os.lang.notice_default : e, t.style.background = 'undefined' == typeof o || '' == o ? os.config.color_a : o, 'false' != s && setTimeout(function () {
            'block' == t.style.display && (t.style.display = 'none')
        }, os.config.time)
    },
    fadeIn: function (e, o) {
        var s, t;
        e && (e.style.opacity = 0, e.style.filter = 'alpha(opacity=0)', e.style.display = '', e.style.visibility = 'visible', o ? (s = 0, t = setInterval(function () {
            s += 50 / o, s >= 1 && (clearInterval(t), s = 1), e.style.opacity = s, e.style.filter = 'alpha(opacity=' + 100 * s + ')'
        }, 50)) : (e.style.opacity = 1, e.style.filter = 'alpha(opacity=1)'))
    },
    fadeOut: function (e, o) {
        if (e)
            if (o) var s = 1,
                t = setInterval(function () {
                    s -= 50 / o, s > 0 || (clearInterval(t), s = 0, e.style.display = 'none', e.style.visibility = 'hidden'), e.style.opacity = s, e.style.filter = 'alpha(opacity=' + 100 * s + ')'
                }, 50);
            else e.style.opacity = 0, e.style.filter = 'alpha(opacity=0)', e.style.display = 'none', e.style.visibility = 'hidden'
    },
    close: function (e) {
        var o = os.getEl('delete' == e ? '#confirm_wrap' : '#preview_content'),
            s = os.getEl('#overlay');
        o.remove(), s.remove()
    },
    scroll: function (e, o, s, t) {
        o = o || 500, t = t || window;
        var n = t.scrollTop || window.pageYOffset;
        if ('number' == typeof e) var r = parseInt(e);
        else var r = os.getTop(e, n);
        var l = Date.now(),
            i = window.requestAnimationFrame || window.mozRequestAnimationFrame || window.webkitRequestAnimationFrame || function (e) {
                window.setTimeout(e, 15)
            },
            a = function () {
                var c = Date.now() - l;
                t !== window ? t.scrollTop = os.position(n, r, c, o) : window.scroll(0, os.position(n, r, c, o)), c > o ? 'function' == typeof s && s(e) : i(a)
            };
        a()
    },
    beforeunload: function () {
        var e = os.sceditor;
        e && (window.onbeforeunload = function () {
            return e.val().length ? 'ok' : void 0
        })
    },
    easeInOutCubic: function (e) {
        return .5 > e ? 4 * e * e * e : (e - 1) * (2 * e - 2) * (2 * e - 2) + 1
    },
    position: function (e, o, s, t) {
        return s > t ? o : e + (o - e) * os.easeInOutCubic(s / t)
    },
    getTop: function (e, o) {
        return 'HTML' === e.nodeName ? -o : e.getBoundingClientRect().top + o
    },
    viewtopic: function (e) {
        var o, s = os.getEl('a', e);
        for (o = 0; o < s.length; o++) /\/viewtopic/g.test(s[o].href) && (os.view_url = s[o].href)
    },
    post_number: function (e) {
        return e.match(/viewtopic/) ? e.match(/(\w+)$/g)[0] : e.match(/[\p\=](\w+)(?=\&)/)[1]
    },
    cr_el: function (e, o) {
        var s = document.createElement(e);
        if (o) {
            for (var t in o) 'style' != t && (s[t] = o[t]);
            o.style && this.style(s, o.style)
        }
        return s
    },
  getEl: function (o, e) {
        e = 'undefined' != typeof e ? e : document; switch (o.charAt(0).match(/\W/) ? o.charAt(0) : o) { case '#': return e.getElementById(o.substr(1)); case '.': return e.getElementsByClassName(o.substr(1)); case '*': return e.getElementsByName(o.substr(1)); case 'body': return e.body; case 'head': return e.head; case 'forms': return e.forms; default: return e.getElementsByTagName(o) }
    }
};
$(function () {
    $(function () {
        (document.getElementById('logout') && /\/t\d+/g.test(window.location.pathname) || /\/post/.test(window.location.pathname) || /\/privmsg\?mode=(post|reply|edit)/.test(window.location.href)) && os.init()
    })
});

Please see my demo:

BetaTester
BetaTester
Mensajes : 96
Puntos : 178
Reputación : 68
Fecha de inscripción : 2016-09-08

[demo]   ok test test Empty Re: [demo] ok test test

Mon Oct 31, 2016 7:27 pm
Message reputation : 100% (2 votes)
BetaTester wrote:
Admin wrote:sdad dassdada dasdasda dadasd dasdasd

ok
BetaTester
BetaTester
Mensajes : 96
Puntos : 178
Reputación : 68
Fecha de inscripción : 2016-09-08

[demo]   ok test test Empty Re: [demo] ok test test

Mon Oct 31, 2016 7:28 pm
Message reputation : 100% (2 votes)
19:28:14 ok ok
Admin
Admin
Admin
Mensajes : 616
Puntos : 849
Reputación : 170
Fecha de inscripción : 2016-05-15
https://codelab.forumotion.com

[demo]   ok test test Empty Re: [demo] ok test test

Mon Oct 31, 2016 9:18 pm
Message reputation : 100% (1 vote)
21:18:1021:18:14
avatar
chalo
Mensajes : 59
Puntos : 129
Reputación : 68
Fecha de inscripción : 2016-10-31

[demo]   ok test test Empty Re: [demo] ok test test

Mon Oct 31, 2016 9:19 pm
Message reputation : 100% (1 vote)
Admin wrote:21:18:1021:18:14
avatar
chalo
Mensajes : 59
Puntos : 129
Reputación : 68
Fecha de inscripción : 2016-10-31

[demo]   ok test test Empty Re: [demo] ok test test

Mon Oct 31, 2016 9:19 pm
Message reputation : 100% (1 vote)
Admin wrote:21:18:1021:18:14

Smile
avatar
chalo
Mensajes : 59
Puntos : 129
Reputación : 68
Fecha de inscripción : 2016-10-31

[demo]   ok test test Empty Re: [demo] ok test test

Mon Oct 31, 2016 10:25 pm
Message reputation : 100% (1 vote)
: Very Happy Very Happy :d

ok ok ok ok ok
avatar
chalo
Mensajes : 59
Puntos : 129
Reputación : 68
Fecha de inscripción : 2016-10-31

[demo]   ok test test Empty Re: [demo] ok test test

Mon Oct 31, 2016 10:31 pm
Message reputation : 100% (1 vote)
[demo]   ok test test Giphy
avatar
chalo
Mensajes : 59
Puntos : 129
Reputación : 68
Fecha de inscripción : 2016-10-31

[demo]   ok test test Empty Re: [demo] ok test test

Mon Oct 31, 2016 10:31 pm
Message reputation : 100% (1 vote)
chalo wrote:
Admin wrote:21:18:1021:18:14

Smile
avatar
chalo
Mensajes : 59
Puntos : 129
Reputación : 68
Fecha de inscripción : 2016-10-31

[demo]   ok test test Empty Re: [demo] ok test test

Mon Oct 31, 2016 10:38 pm
Message reputation : 100% (1 vote)
okok ok oko ko ko kok kok okok ok o

okokok
Admin
Admin
Admin
Mensajes : 616
Puntos : 849
Reputación : 170
Fecha de inscripción : 2016-05-15
https://codelab.forumotion.com

[demo]   ok test test Empty Re: [demo] ok test test

Tue Nov 01, 2016 11:39 am
Message reputation : 100% (1 vote)
chalo wrote:okok ok oko ko ko kok kok okok ok o

okokok
Admin
Admin
Admin
Mensajes : 616
Puntos : 849
Reputación : 170
Fecha de inscripción : 2016-05-15
https://codelab.forumotion.com

[demo]   ok test test Empty Re: [demo] ok test test

Tue Nov 01, 2016 1:15 pm
Message reputation : 100% (1 vote)
BetaTester wrote:
Admin wrote:sdad dassdada dasdasda dadasd dasdasd

test

Smile


Last edited by Admin on Tue Nov 01, 2016 7:57 pm; edited 1 time in total
avatar
chalo
Mensajes : 59
Puntos : 129
Reputación : 68
Fecha de inscripción : 2016-10-31

[demo]   ok test test Empty Re: [demo] ok test test

Tue Nov 01, 2016 3:06 pm
Message reputation : 100% (1 vote)
15:06:5615:06:5615:06:5615:06:5615:06:57
Admin
Admin
Admin
Mensajes : 616
Puntos : 849
Reputación : 170
Fecha de inscripción : 2016-05-15
https://codelab.forumotion.com

[demo]   ok test test Empty Re: [demo] ok test test

Tue Nov 01, 2016 7:49 pm
19:49:4919:49:4919:49:4919:49:49
Admin
Admin
Admin
Mensajes : 616
Puntos : 849
Reputación : 170
Fecha de inscripción : 2016-05-15
https://codelab.forumotion.com

[demo]   ok test test Empty Re: [demo] ok test test

Tue Nov 01, 2016 7:56 pm
19:56:1319:56:1319:56:1319:56:1319:56:14
Admin
Admin
Admin
Mensajes : 616
Puntos : 849
Reputación : 170
Fecha de inscripción : 2016-05-15
https://codelab.forumotion.com

[demo]   ok test test Empty Re: [demo] ok test test

Tue Nov 01, 2016 7:57 pm
19:57:2519:57:2519:57:2519:57:2619:57:26
Admin
Admin
Admin
Mensajes : 616
Puntos : 849
Reputación : 170
Fecha de inscripción : 2016-05-15
https://codelab.forumotion.com

[demo]   ok test test Empty Re: [demo] ok test test

Tue Nov 01, 2016 7:59 pm
Message reputation : 100% (1 vote)
19:59:4419:59:4419:59:4419:59:4519:59:4519:59:45
Admin
Admin
Admin
Mensajes : 616
Puntos : 849
Reputación : 170
Fecha de inscripción : 2016-05-15
https://codelab.forumotion.com

[demo]   ok test test Empty Re: [demo] ok test test

Tue Nov 01, 2016 8:01 pm
Message reputation : 100% (1 vote)
20:01:0220:01:0220:01:0320:01:0320:01:03
Admin
Admin
Admin
Mensajes : 616
Puntos : 849
Reputación : 170
Fecha de inscripción : 2016-05-15
https://codelab.forumotion.com

[demo]   ok test test Empty Re: [demo] ok test test

Tue Nov 01, 2016 8:02 pm
Message reputation : 100% (1 vote)
[ok]20:01:5920:01:5920:02:0020:02:0020:02:00[/ok]


Last edited by Admin on Sun Nov 06, 2016 4:53 pm; edited 1 time in total
Admin
Admin
Admin
Mensajes : 616
Puntos : 849
Reputación : 170
Fecha de inscripción : 2016-05-15
https://codelab.forumotion.com

[demo]   ok test test Empty Re: [demo] ok test test

Tue Nov 01, 2016 8:17 pm
Message reputation : 100% (1 vote)
Admin wrote:19:59:4419:59:4419:59:4419:59:4519:59:4519:59:45
Admin
Admin
Admin
Mensajes : 616
Puntos : 849
Reputación : 170
Fecha de inscripción : 2016-05-15
https://codelab.forumotion.com

[demo]   ok test test Empty Re: [demo] ok test test

Tue Nov 01, 2016 8:21 pm
Message reputation : 100% (1 vote)
BetaTester wrote:Hi, i made this code, is a "all in one" you can do all without change the current page, works in all version.

1.- First, crate a new javascript file in your administration panel in all pages.
2.- In your security, you must be allow external forms

[demo]   ok test test Captur25

3.- You can change all:
1 is true and 0 is false
Code:

config: {
        reply: 1,
        edit: 1,
        quote: 1,
        delete: 1,
        preview: 1,
        beroreunload: 1,
        placeholder: 1,
        letters: 5, //words before reply
        time: 3000,
        speed: 400, //speed of scroll animation
        color_a: 'linear-gradient(to bottom, #ffff88 0%,#ffff88 100%)',
        color_b: 'linear-gradient(to bottom, #ffaf4b 0%,#ff920a 100%)',
        color_c: 'linear-gradient(to bottom, #87e0fd 0%,#53cbf1 40%,#05abe0 100%)',
        color_d: 'linear-gradient(to bottom, #ff3019 0%,#cf0404 100%)',
        color_e: 'linear-gradient(to bottom, #d2ff52 0%,#91e842 100%)'
    },

Code:

console.log('//-----Written by Chalo ------- Open Source 2014-2016 -----//');
console.log('//------------ http://www.opensourcephpbb3.com ------------//');
console.log('//--------------------- Version: 1.4 ----------------------//');
console.log('//Reply, preview, quote, delete and more, without reload  //');
var os = {
    config: {
        reply: 1,
        edit: 1,
        quote: 1,
        delete: 1,
        preview: 1,
        beroreunload: 1,
        placeholder: 1,
        letters: 5,
        time: 3000,
        speed: 400,
        color_a: 'linear-gradient(to bottom, #ffff88 0%,#ffff88 100%)',
        color_b: 'linear-gradient(to bottom, #ffaf4b 0%,#ff920a 100%)',
        color_c: 'linear-gradient(to bottom, #87e0fd 0%,#53cbf1 40%,#05abe0 100%)',
        color_d: 'linear-gradient(to bottom, #ff3019 0%,#cf0404 100%)',
        color_e: 'linear-gradient(to bottom, #d2ff52 0%,#91e842 100%)'
    },
    lang: {
        success_reply: 'Your message has been entered successfully',
        flood: 'Flood control is active on this forum, please wait 10 second(s) before replying or posting',
        newpost: 'A new message has been posted',
        error_reply: 'Try again',
        reply_words: 'You must write ',
        reply_btn_send: 'Send data...',
        notice_default: 'No predefined text',
        no_message: 'There is nothing written in the editor',
        no_subject: 'You must specify a subject for your message.',
        pm_error_a: 'You must specify a username to whom to send this message.',
        pm_error_b: 'This or these user(s) do not exist',
        pm_error_c: 'You cannot make another post so soon after your last',
        pm_success: 'Your message has been sent',
        placeholder: 'write something here...',
        edit_subject_placeholder: 'The length of the title for this topic must be ranging between 10 and 255 characters',
        delete_main: 'Do you want delete the post #',
        delete_yes: 'Delete',
        delete_cancel: 'Cancel',
        edit_mode: 'Editing post #',
        quote_mode: 'Quoting post #',
        loading: 'Loading...',
        save: 'Save',
        notice_wait: 'Please be patient, sending data to the server'
    },
    previewHTML: '<div id="preview_content"><a id="close" style="float:right;cursor:pointer;" onclick="os.close(\'preview\')"><img src="http://2img.net/i/fa/prosilver/icon_post_delete.gif"></a></div>',
    delete_style: '#confirm_content { color: #fff; margin-bottom: 7px; padding-bottom: 5px; font-size: 30px}#confirm >a { display: inline-block; padding: 4px 12px; margin-bottom: 0; font-size: 12px; line-height: 20px; color: #333; text-align: center; text-shadow: 0 1px 1px rgba(255, 255, 255, 0.75); vertical-align: middle; cursor: pointer; text-decoration: none!important;}#yes { color: #fff!important; text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); background-color: #5bb75b; background-image: linear-gradient(to bottom, #62c462, #51a351)!important; background-repeat: repeat-x; border-color: #51a351 #51a351 #387038; border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25)!important;}#cancel { margin-left: 5px; color: #fff!important; background: linear-gradient(to bottom, #db5530 5%, #db1f1f 100%)!important; background-color: #db5530; text-shadow: 0 1px 0 #854629;}',
    init: function () {
        os.isTheme = /\/t\d+/g.test(window.location.pathname), os.isPost = /\/post\?f=(\d+)&mode=(newtopic)/.test(window.location.href), os.isEditPost = /\/post\?p=(\d+)&mode=(editpost)/.test(window.location.href), os.isMP = /\/privmsg\?mode=(post|reply|edit)/.test(window.location.href), os.phpbb2 = os.getEl('.bodylinewidth').length, os.phpbb3 = os.getEl('#phpbb'), os.invision = os.getEl('#ipbwrapper'), os.punbb = os.getEl('#pun-intro'), os.subject = os.isTheme && os.getEl('h1')[0].textContent, os.body = os.getEl('body'), os.form = os.getEl('forms').post, os.b_r = os.form.post, os.b_r_v = os.form.post.value, os.textarea = os.form.message, os.action = os.form.action, os.group = os.getEl('.sceditor-group')[0], os.b_p = os.form.preview, os.b_p_v = os.b_p.value, os.url = os.isTheme ? '/post?t=' + os.form.t.value + '&mode=reply' : os.isPost && document.location.href, os.sceditor = $(os.textarea).sceditor('instance'), os.content = os.punbb ? '.entry-content' : os.phpbb3 ? '.content' : os.invision ? '.post-entry' : os.phpbb2 && '.postbody', os.a = os.getEl('a'), 1 == os.config.placeholder && (os.getEl('.sceditor-grip', os.form)[0].previousElementSibling.placeholder = os.lang.placeholder), os.buttons(os.a), os.beforeunload()
    },
    buttons: function (e) {
        var o, s = 'os.get(this, \'quote\');return false',
            t = 'os.set_delete(this);return false',
            n = 'os.get(this,\'edit\');return false',
            r = 'os.post(this, \'preview\');return false',
            l = os.isMP ? 'os.post(this, \'mp\');return false' : 'os.post(this, \'reply\');return false';
        for (o = 0; o < e.length; o++) 1 == os.config.quote && /(?!\&(mode)\=)(quote)/.test(e[o].href) && e[o].setAttribute('onclick', s), 1 == os.config.delete && /(?!\&(mode)\=)(delete)/.test(e[o].href) && e[o].setAttribute('onclick', t), 1 == os.config.edit && /(?!\&(mode)\=)(edit)/.test(e[o].href) && e[o].setAttribute('onclick', n);
        1 == os.config.preview && os.b_p.setAttribute('onclick', r), 1 == os.config.reply && os.b_r.setAttribute('onclick', l)
    },
    get: function (e, o) {
        os.url_universal = 'undefined' != typeof e.href ? e.href : e;
        var s, t, n, r, l, i, a, c, d, p = os.url_universal.match(/(?!\/post\?p=(\w+)\&mode=)(editpost|quote)|viewtopic/)[0],
            f = os.post_number(os.url_universal);
        os.XML('', os.url_universal, function (u) {
            switch (d = u.responseXML, p) {
            case 'editpost':
                os.sceditor.updateOriginal(), s = d.forms.post.message.value, i = os.getEl('.post--' + f), t = os.cr_el('input'), t.className = 'inputbox medium edit_subject', t.placeholder = os.lang.edit_subject_placeholder, t.name = 'subject', t.style = 'display:table;margin:0 auto;width: 99%;margin-bottom: 5px', t.value = d.forms.post.subject.value, !os.getEl('.edit_subject').length && os.group.parentNode.insertBefore(t, os.group), os.edit_subject = os.getEl('.edit_subject')[0], i.length && (i[0].style.border = '1px solid orange!important'), os.sceditor.val(s), os.b_r.setAttribute('onclick', 'os.post(this, \'edit\');return false'), os.encode_edit = os.serialize(d.forms.post), os.url_edit = e.href, os.edit_number = f, os.b_r.value = os.lang.save, os.notice(os.lang.edit_mode + f, os.config.color_b, 'false'), os.scroll(os.form, os.config.speed);
                break;
            case 'quote':
                os.sceditor.updateOriginal(), os.scroll(os.form, os.config.speed), s = d.forms.post.message.value, n = os.sceditor.val(), os.sceditor.val(n + s), os.notice(os.lang.quote_mode + f, os.config.color_a, 'false');
                break;
            case 'viewtopic':
                l = os.getEl('.post--' + f, d)[0], l.style.display = 'none', l.className += ' new_ajax_post', r = os.getEl('.post--' + f)[0], 'reply' == o && (os.buttons(os.getEl('a', l)), os.set_post(l)), 'edit' == o && (a = os.getEl(os.content, l), c = a[0].innerHTML, os.getEl(os.content, r)[0].innerHTML = c, os.b_r.setAttribute('onclick', 'os.post(this, \'reply\');return false'), os.fadeIn(r, 500), os.scroll(r, os.config.speed)), os.sceditor.val(''), os.notice(os.lang.success_reply, os.config.color_e, 'true')
            }
        })
    },
    post: function (e, o) {
        var s, t, n, r, l, i, a, c, d, p, f, u, g, j, m, b, v, y, h, v;
        os.sceditor.updateOriginal(), clearInterval(s), d = 'edit' == o && encodeURIComponent(os.sceditor.val()), y = 'edit' == o && encodeURIComponent(os.edit_subject.value), os.url_post = 'delete' == o ? e.href : os.form.action, os.uritexto = 'reply' == o || 'mp' == o ? os.serialize(os.form) + '&post=1&prevent_post=1' : 'preview' == o ? os.serialize(os.form) + '&preview=Preview' : 'delete' == o ? '&confirm=1' : '&subject=' + y + '&message=' + d + '&mode=editpost&p=' + os.edit_number + '&notify=on&&post=1&prevent_post=1', a = os.getEl('.new_ajax_post'), a.length && a[0].classList.remove('new_ajax_post'), h = os.sceditor.val(), h.length > 0 && h.match(/\w{2,}\b/g).length >= os.config.letters || 'delete' == o ? (os.isPost || os.isMP) && os.form.subject && os.form.subject.value.length >= 10 || 'preview' == o || os.isEditPost || os.isTheme ? ('delete' != o && (e.value = 'preview' == o ? os.lang.loading : os.lang.reply_btn_send, 'preview' == o ? os.b_p.style = 'color:#fff;background:' + os.config.color_d : os.b_r.style = 'color:#fff;background:' + os.config.color_d), os.XML(os.uritexto, os.url_post, function (e) {
            l = e.responseXML, i = os.getEl(os.phpbb2 ? '#page-body' : '#main', l), p = os.getEl('.postbody', l)[0], s = i.innerHTML.indexOf(os.lang.success_reply), t = i.innerHTML.indexOf(os.lang.flood), c = i.innerHTML.indexOf(os.lang.newpost), j = i.innerHTML.indexOf(os.lang.pm_error_b), m = i.innerHTML.indexOf(os.lang.pm_error_c), b = i.innerHTML.indexOf(os.lang.pm_success), v = i.innerHTML.indexOf(os.lang.pm_error_a), /mp/.test(o) ? v > 0 ? (os.notice(os.lang.pm_error_a, os.config.color_c, 'true'), os.refresh(os.b_r, os.b_r_v)) : j > 0 ? (os.notice(os.lang.pm_error_b, os.config.color_c, 'true'), os.refresh(os.b_r, os.b_r_v)) : m > 0 ? (os.notice(os.lang.pm_error_c, os.config.color_c, 'true'), os.refresh(os.b_r, os.b_r_v)) : b > 0 && (os.sceditor.val(''), os.refresh(os.b_r, os.b_r_v), setTimeout(function () {
                document.location.href = '/privmsg?folder=inbox'
            }, 2e3)) : /(reply|edit)/.test(o) ? (os.viewtopic(l), n = os.view_url, os.b_r.style = 'color:#fff;background:' + os.config.color_d, t > 0 ? (os.notice(os.lang.flood, os.config.color_b, 'true'), os.refresh(os.b_r, os.b_r_v)) : c > 0 ? (os.notice(os.lang.newpost, os.config.color_b, 'true'), os.refresh(os.b_r, os.b_r_v)) : 0 > s ? (os.notice(os.lang.error_reply, '', 'true'), os.refresh(os.b_r, os.b_r_v)) : os.isTheme ? ('undefined' != typeof n && os.get(n, o), 'edit' == o && os.edit_subject.remove(), os.notice(os.lang.notice_wait, os.config.color_c, 'true'), os.refresh(os.b_r, os.b_r_v)) : (os.overlay(os.lang.loading), os.sceditor.val(''), setTimeout(function () {
                document.location.href = n
            }, 2e3), os.refresh(os.b_r, os.b_r_v))) : /preview/.test(o) ? (os.create_preview(), f = os.getEl('#preview_content'), f.appendChild(p), os.fadeIn(p, 500), os.b_p.value = os.b_p_v, os.b_p.style = '') : /delete/.test(o) && (r = os.getEl('.post--' + os.post_number(os.url_post)), g = os.getEl('#confirm_wrap'), u = os.getEl('#overlay'), r.length && (os.phpbb2 ? (os.fadeOut(r[0].nextElementSibling, 500), os.fadeOut(r[0], 500)) : os.fadeOut(r[0], 500)), g && g.remove(), u && u.remove())
        })) : (os.notice(os.lang.no_subject, os.config.color_d, 'true'), os.refresh(os.b_r, os.b_r_v), os.b_r.style = '') : (v = h.length > 0 ? os.config.letters - h.match(/\w{2,}\b/g).length : 5, os.notice(os.lang.reply_words + v + ' word' + (v > 1 ? 's' : ''), os.config.color_d, 'true'), 'reply' == o ? os.refresh(os.b_r, os.b_r_v) : os.refresh(os.b_p, os.b_p_v))
    },
    refresh: function (e, o) {
        e.value = o, e.style = ''
    },
    overlay: function (e) {
        var o = os.cr_el('div');
        o.style = 'font-family:arial;display:block;position:fixed;top:0;left:0;min-height:101%;width:100%;background-color:rgba(0, 0, 0, .4);z-index:999;color:#fff;font-size: 45px; text-align: center; line-height: 13', o.id = 'overlay', 'undefined' != typeof e && (o.textContent = e), os.body.appendChild(o)
    },
    create_preview: function () {
        var e = os.cr_el('div');
        e.style = 'background:#fff;left:15%;position:fixed;top:10%;width:70%;height:65%;overflow:auto;z-index:999;box-shadow:10px 10px 40px black;border-radius:3px;font-size:1.2em;padding:10px;font-family:Arial;text-shadow:0 1px 1px white;color:#666;', e.id = 'preview_content', e.innerHTML = os.previewHTML, os.overlay(), os.body.appendChild(e)
    },
    set_delete: function (e) {
        var o, s, t;
        s = os.cr_el('div'), t = os.cr_el('style'), s.innerHTML = '<div id="confirm_content">' + os.lang.delete_main + os.post_number(e.href) + '?</div><div id="confirm"><a id="yes" class="yes" href="' + e.href + '" onclick="os.post(this,\'delete\');return false">' + os.lang.delete_yes + '</a><a id="cancel" onclick="os.close(\'delete\')">' + os.lang.delete_cancel + '</a></div>', s.id = 'confirm_wrap', s.style = 'font-family:arial;display: inline-block; vertical-align: top; width: auto; text-align: center; z-index: 9999; padding: 7px 13px; position: fixed; top: 35%; left: 30%', os.overlay(), os.body.appendChild(s), t.innerHTML = os.delete_style, t.type = 'text/css', t.id = 'd_style', !os.getEl('#d_style') && os.getEl('head').appendChild(t), o = os.getEl('#yes')
    },
    set_post: function (e) {
        var o = os.punbb ? os.getEl('.topic')[0] : os.phpbb2 ? os.getEl('.catBottom')[0].parentNode.previousElementSibling : os.phpbb3 ? os.getEl('*bottomtitle')[0].previousElementSibling : os.invision && os.getEl('.topic-footer')[0].previousElementSibling;
        os.punbb ? o.appendChild(e) : o.parentNode.insertBefore(e, o.nextSibling), os.scroll(e, os.config.speed), os.fadeIn(e, 500)
    },
    XML: function (e, o, s) {
        var t;
        t = window.XMLHttpRequest ? new XMLHttpRequest : window.ActiveXObject && new ActiveXObject('Microsoft.XMLHTTP'), 'undefined' != typeof e ? t.open('POST', o) : t.open('GET', o, !0), t.responseType = 'document', t.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded'), t.send('undefined' != typeof e ? e : ''), t.onreadystatechange = function () {
            4 == this.readyState && 200 == this.status && s(this)
        }
    },
    serialize: function (e) {
        var o, s, t, n, r = [];
        if ('object' == typeof e && 'FORM' == e.nodeName)
            for (n = e.elements.length, s = 0; n > s; s++)
                if (o = e.elements[s], o.name && !o.disabled && 'file' != o.type && 'reset' != o.type && 'submit' != o.type && 'button' != o.type)
                    if ('select-multiple' == o.type)
                        for (t = e.elements[s].options.length - 1; t >= 0; t--) o.options[t].selected && (r[r.length] = encodeURIComponent(o.name) + '=' + encodeURIComponent(o.options[t].value));
                    else('checkbox' != o.type && 'radio' != o.type || o.checked) && (r[r.length] = encodeURIComponent(o.name) + '=' + encodeURIComponent(o.value));
        return r.join('&').replace(/%20/g, '+')
    },
    notice: function (e, o, s) {
        var t, n, r, l, i;
        i = os.getEl('.notice_reply'), n = os.group, r = n.parentNode, t = i.length ? i[0] : os.cr_el('DIV'), l = 'height:20px;line-height: 1.5;border-radius: 3px; text-shadow: 0 1px rgba(255, 255, 255, 0.46);text-align:center', !i.length && (t.classList.add('notice_reply'), t.setAttribute('style', l), r.insertBefore(t, n)), t.style.display = 'block', t.innerHTML = 'undefined' == typeof e ? os.lang.notice_default : e, t.style.background = 'undefined' == typeof o || '' == o ? os.config.color_a : o, 'false' != s && setTimeout(function () {
            'block' == t.style.display && (t.style.display = 'none')
        }, os.config.time)
    },
    fadeIn: function (e, o) {
        var s, t;
        e && (e.style.opacity = 0, e.style.filter = 'alpha(opacity=0)', e.style.display = '', e.style.visibility = 'visible', o ? (s = 0, t = setInterval(function () {
            s += 50 / o, s >= 1 && (clearInterval(t), s = 1), e.style.opacity = s, e.style.filter = 'alpha(opacity=' + 100 * s + ')'
        }, 50)) : (e.style.opacity = 1, e.style.filter = 'alpha(opacity=1)'))
    },
    fadeOut: function (e, o) {
        if (e)
            if (o) var s = 1,
                t = setInterval(function () {
                    s -= 50 / o, s > 0 || (clearInterval(t), s = 0, e.style.display = 'none', e.style.visibility = 'hidden'), e.style.opacity = s, e.style.filter = 'alpha(opacity=' + 100 * s + ')'
                }, 50);
            else e.style.opacity = 0, e.style.filter = 'alpha(opacity=0)', e.style.display = 'none', e.style.visibility = 'hidden'
    },
    close: function (e) {
        var o = os.getEl('delete' == e ? '#confirm_wrap' : '#preview_content'),
            s = os.getEl('#overlay');
        o.remove(), s.remove()
    },
    scroll: function (e, o, s, t) {
        o = o || 500, t = t || window;
        var n = t.scrollTop || window.pageYOffset;
        if ('number' == typeof e) var r = parseInt(e);
        else var r = os.getTop(e, n);
        var l = Date.now(),
            i = window.requestAnimationFrame || window.mozRequestAnimationFrame || window.webkitRequestAnimationFrame || function (e) {
                window.setTimeout(e, 15)
            },
            a = function () {
                var c = Date.now() - l;
                t !== window ? t.scrollTop = os.position(n, r, c, o) : window.scroll(0, os.position(n, r, c, o)), c > o ? 'function' == typeof s && s(e) : i(a)
            };
        a()
    },
    beforeunload: function () {
        var e = os.sceditor;
        e && (window.onbeforeunload = function () {
            return e.val().length ? 'ok' : void 0
        })
    },
    easeInOutCubic: function (e) {
        return .5 > e ? 4 * e * e * e : (e - 1) * (2 * e - 2) * (2 * e - 2) + 1
    },
    position: function (e, o, s, t) {
        return s > t ? o : e + (o - e) * os.easeInOutCubic(s / t)
    },
    getTop: function (e, o) {
        return 'HTML' === e.nodeName ? -o : e.getBoundingClientRect().top + o
    },
    viewtopic: function (e) {
        var o, s = os.getEl('a', e);
        for (o = 0; o < s.length; o++) /\/viewtopic/g.test(s[o].href) && (os.view_url = s[o].href)
    },
    post_number: function (e) {
        return e.match(/viewtopic/) ? e.match(/(\w+)$/g)[0] : e.match(/[\p\=](\w+)(?=\&)/)[1]
    },
    cr_el: function (e, o) {
        var s = document.createElement(e);
        if (o) {
            for (var t in o) 'style' != t && (s[t] = o[t]);
            o.style && this.style(s, o.style)
        }
        return s
    },
  getEl: function (o, e) {
        e = 'undefined' != typeof e ? e : document; switch (o.charAt(0).match(/\W/) ? o.charAt(0) : o) { case '#': return e.getElementById(o.substr(1)); case '.': return e.getElementsByClassName(o.substr(1)); case '*': return e.getElementsByName(o.substr(1)); case 'body': return e.body; case 'head': return e.head; case 'forms': return e.forms; default: return e.getElementsByTagName(o) }
    }
};
$(function () {
    $(function () {
        (document.getElementById('logout') && /\/t\d+/g.test(window.location.pathname) || /\/post/.test(window.location.pathname) || /\/privmsg\?mode=(post|reply|edit)/.test(window.location.href)) && os.init()
    })
});

Please see my demo:

Admin
Admin
Admin
Mensajes : 616
Puntos : 849
Reputación : 170
Fecha de inscripción : 2016-05-15
https://codelab.forumotion.com

[demo]   ok test test Empty Re: [demo] ok test test

Sun Nov 06, 2016 5:50 pm
Message reputation : 100% (1 vote)
n in hendrerit erat. Etiam massa diam, tempus quis efficitur id, interdum et nulla. Quisque id pretium urna. Integer vulputate risus arcu, a dignissim massa condimentum placerat. Proin in tincidunt est, ut placerat nisl. Aliquam euismod dolor nec metus congue rhoncus. Duis at neque ut orci convallis pulvinar et eget dolor. Phasellus quis venenatis magna. Praesent commodo, lacus et interdum rutrum, diam magna pharetra lectus, vitae eleifend lorem orci eget massa. Quisque at purus ac elit tempor lobortis nec ut velit. Nam fringilla lacus vitae nisi vulputate efficitur.

Integer iaculis quam vel metus fermentum, non elementum libero pharetra. Praesent eu lorem turpis. Aliquam erat lacus, consectetur nec ullamcorper feugiat, facilisis vitae nibh. Nunc imperdiet at neque eu dictum. Aliquam varius egestas est convallis rutrum. Aenean dictum massa purus, vel luctus nisl porta sed. Suspendisse volutpat diam ac nisl rutrum maximus. Nullam sollicitudin suscipit fringilla. Sed non gravida erat. Pellentesque dignissim lorem sit amet fringilla luctus. Aenean vulputate pharetra mauris, eu molestie nisi condimentum sed. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Aenean dictum ornare ipsum. Nam vitae dolor mattis, scelerisque velit a, sagittis diam. Nulla diam justo, venenatis vulputate lacinia eu, vulputate quis tortor. Morbi felis massa, lobortis quis bibendum gravida, lobortis vitae dolor.

Phasellus ac lobortis turpis. Vestibulum gravida blandit diam, sit amet pellentesque ipsum sollicitudin eu. Donec eget velit auctor, cursus risus mattis, congue nulla. In pretium scelerisque sagittis. Proin cursus mauris sed tellus vehicula finibus. Nullam non eleifend nunc. Vivamus ultricies accumsan tempus. Nunc eu nunc sed lectus imperdiet vulputate et eget ligula. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Proin ac felis magna. Cras auctor lacus sagittis feugiat ornare. Maecenas iaculis facilisis arcu, id placerat tellus tempor et. Interdum et malesuada fames ac ante ipsum primis in faucibus. Vivamus finibus, arcu eget placerat fermentum, turpis eros vestibulum nunc, sed ullamcorper est lorem nec ex. Quisque ullamcorper libero quis purus porta, a dignissim sapien ornare.

Nam odio sem, imperdiet sit amet elit sit amet, consectetur rhoncus mauris. Suspendisse ac iaculis ante, quis placerat justo. Pellentesque varius tristique est, vel tristique turpis. Donec viverra magna id magna sodales, vel rhoncus turpis hendrerit. Suspendisse venenatis at enim non auctor. Donec non odio laoreet, aliquet dolor vel, tempus nunc. Phasellus feugiat nunc et augue sodales, a imperdiet lectus sollicitudin. Nullam tempus commodo tortor eu interdum. Suspendisse ut nunc porttitor, egestas erat in, eleifend neque. In quam augue, lacinia id sollicitudin et, suscipit in dui. Quisque pulvinar sed magna quis luctus. Sed euismod dui id tortor dignissim ultricies.
Admin
Admin
Admin
Mensajes : 616
Puntos : 849
Reputación : 170
Fecha de inscripción : 2016-05-15
https://codelab.forumotion.com

[demo]   ok test test Empty Re: [demo] ok test test

Sun Nov 06, 2016 7:06 pm
Message reputation : 100% (1 vote)
[alert]19:05:5619:05:5619:05:5619:05:5619:05:57[/alert]
Admin
Admin
Admin
Mensajes : 616
Puntos : 849
Reputación : 170
Fecha de inscripción : 2016-05-15
https://codelab.forumotion.com

[demo]   ok test test Empty Re: [demo] ok test test

Sun Nov 06, 2016 11:17 pm
Message reputation : 100% (1 vote)
[tip]Integer iaculis quam vel metus fermentum, non elementum libero pharetra. Praesent eu lorem turpis. Aliquam erat lacus, consectetur nec ullamcorper feugiat, facilisis vitae nibh. Nunc imperdiet at neque eu dictum. Aliquam varius egestas est convallis rutrum. Aenean dictum massa purus, vel luctus nisl porta sed. Suspendisse volutpat diam ac nisl rutrum maximus. Nullam sollicitudin suscipit fringilla. Sed non gravida erat. Pellentesque dignissim lorem sit amet fringilla luctus. Aenean vulputate pharetra mauris, eu molestie nisi condimentum sed. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Aenean dictum ornare ipsum. Nam vitae dolor mattis, scelerisque velit a, sagittis diam. Nulla diam justo, venenatis vulputate lacinia eu, vulputate quis tortor. Morbi felis massa, lobortis quis bibendum gravida, lobortis vitae dolor.[/tip]
Sponsored content

[demo]   ok test test Empty Re: [demo] ok test test

Back to top
Permissions in this forum:
You cannot reply to topics in this forum