4en3rgY Romania
Unelte de moderare 2z8bv910
Welcome To 4EN3RGY Romania
Register now to gain access to all of our features. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more. If you already have an account, login here - otherwise create an account for free today!

4en3rgY Romania


Nu sunteti conectat. Conectați-vă sau înregistrați-vă

Unelte de moderare

Vezi subiectul anterior Vezi subiectul urmator In jos  Mesaj [Pagina 1 din 1]

1Unelte de moderare Empty Unelte de moderare Mar 20 Iun 2017, 13:05

Vizitator

avatarVizitator

Cod:
/**
 * Title        : Forumotion tools for moderation
 * Version      : 1.0.2
 * Author        : Zeus
 * Author URI    : http://help.forumgratuit.ro
 * License      : GNU - General Public License v3.0
 * Documentation : https://github.com/zeusmaximus/Moderation-tools-for-Forumotion/
 */
if (typeof zModConfig === 'undefined') var zModConfig = [{
    icon: "https://i.servimg.com/u/f58/11/80/17/98/chat-110.png",
    loadCss: true, // true or false
    css_source: "https://cdn.rawgit.com/zeusmaximus/Moderation-tools-for-Forumotion/e46f560/style.css",
    fontAwesome: true // true or false
}];

if (typeof zModTabels === 'undefined') var zModTabels = [{
        type: "zalert",
        body_start: '[table class="zmod_box zalert"][tr][td style="padding-right: 10px;" width="60px;"][icon="fa fa-exclamation-circle"][/icon][div]',
        body_end: "[/div][/td][/tr][/table]\n\n"
    },
    {
        type: "zsuccess",
        body_start: '[table class="zmod_box zsuccess"][tr][td style="padding-right: 10px;" width="60px;"][icon="fa fa-check"][/icon][div]',
        body_end: "[/div][/td][/tr][/table]\n\n"
    },
    {
        type: "zdefault",
        body_start: '[table class="zmod_box zdefault"][tr][td style="padding-right: 10px;" width="60px;"][icon="fa fa-rocket"][/icon][div]',
        body_end: "[/div][/td][/tr][/table]\n\n"
    },
    {
        type: "zwarning",
        body_start: '[table class="zmod_box zwarning"][tr][td style="padding-right: 10px;" width="60px;"][icon="fa fa-exclamation-triangle"][/icon][div]',
        body_end: "[/div][/td][/tr][/table]\n\n"
    },
    {
        type: "zinfo",
        body_start: '[table class="zmod_box zinfo"][tr][td style="padding-right: 10px;" width="60px;"][icon="fa fa-info"][/icon][div]',
        body_end: "[/div][/td][/tr][/table]\n\n"
    }
];

if (typeof zModMessages === 'undefined') var zModMessages = [{
        name: "Subiect Inchis",
        message: '[b]Buna ziua[/b] \nAvand in vedere ca in ultimele 2 saptamani autorul nu a mai aratat interes pentru acesta problema, topicul va fi inchis si trimis in cos. Daca problema nu a fost rezolvata, va invitam sa deschideti un nou topic, in sectiunea corespunzatoare si avind un titlu explicit.',
        group_id: 0,
        type: "zalert"
    },
    {
        name: "Subiect Rezolvat",
        message: '[b]Buna ziua[/b] \nAvand in vedere ca acest subiect a fost marcat ca fiind "rezolvat", acesta va fi inchis si trimis in arhiva.',
        group_id: 0,
        type: "zsuccess"
    },
    {
        name: "Problema imposibila",
        message: '[b]Buna ziua[/b] \nNe pare rau, dar acest lucru nu este posibil momentan pe Forumgratuit.',
        group_id: 0,
        type: "zdefault"
    },
    {
        name: "Warning dublu post",
        message: '[b]Buna ziua[/b] \nVa rugam sa readuceti in atentie intrebarea dumneavoastra doar daca au trecut cel putin 24 de ore fara sa primiti un raspuns. Pentru actualizarea mesajului anterior puteti folosi butonul "Editeaza".',
        group_id: 0,
        type: "zwarning"
    },
    {
        name: "Informare utilizator",
        message: '[b]Buna ziua[/b] \nInformarea adusa utilizatorului...',
        group_id: 0,
        type: "zinfo"
    },
    {
        name: "Cerere respinsa",
        message: '[b]Buna ziua[/b] \nNe pare rau dar nu ati respectat modelul de cerere! Pentru ca cererea dvs. sa poata fi solutionata trebuie sa respectati modelul',
        group_id: 1,
        type: "zalert"
    },
    {                                                       
        name: "Cerere Rezolvata",
        message: '[b]Buna ziua[/b] \nAvand in vedere ca acesta cerere a fost marcata ca fiind "rezolvata", aceasta va fi inchisa si trimisa in arhiva.',
        group_id: 1,
        type: "zsuccess"
    },
    {                                                       
        name: "Perioada minima",
        message: '[b]Buna ziua[/b] \nNe pare rau dar perioada minima de la ultima cerere respinsa este de 3 zile. Va rugam sa reveniti peste 3 zile cu o noua cerere!',
        group_id: 1,
        type: "zalert"
    },

];

if (typeof zModGroups === 'undefined') var zModGroups = [{
        id: 0,
        name: 'Forum de support'
    },
    {
        id: 1,
        name: 'Graphic Design'
    }
];

$(function() {

    if (zModConfig[0].fontAwesome === true) $('<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css" />').appendTo("head");

    if (zModConfig[0].loadCss === true) $('<link rel="stylesheet" type="text/css" href="'+ zModConfig[0].css_source +'" />').appendTo("head");

    $('<style type="text/css">.sceditor-button-staff div {background: url(' + zModConfig[0].icon + ') !important;}</style>').appendTo("head");

    var list = "";

    $('.zmod_box td').each(function() {
        this.innerHTML = this.innerHTML.replace(/\[icon\="?(.*?)"?\](.*?)\[\/icon\]/g, "<div><i class=\"$1\ icon-message\">$2</i></div>")
            .replace(/\[div\](.*?)\[\/div\]/g, "<div>$1</div>");
    });

    $(window).load(function() {
        function zModGetTable(type, body) {
            var str = "";
            for (var y = 0; y < zModTabels.length; y++) str += (zModTabels[y].type === type) ? (body === "start") ? zModTabels[y].body_start : zModTabels[y].body_end : "";
            return str;
        }

        function zModGetModMessageByGroupId(f, g) {
            var str = "",
                c = 0;
            for (var z = 0; z < zModMessages.length; z++) {
                if (zModMessages[z].group_id == f) {
                    str += "<li class='mod_editor_message group_" + zModMessages[z].group_id + "' id='group_" + z + "_" + zModMessages[z].group_id + "'><a style='cursor: pointer'>" + zModMessages[z].name + "</a></li>\n";
                    if (g === 0) zModInsertToSCEditor('#group_' + z + '_' + zModMessages[z].group_id + ' a', zModMessages[z].message, zModMessages[z].type);
                    c++;
                }
            }
            if (g === 1) str = c;

            return str;
        }

        function zModInsertToSCEditor(e, t, i) {
            $(e).live("click", function(e) {
                $("#text_editor_textarea").sceditor("instance").insertText(zModGetTable(i, "start") + t, zModGetTable(i, "end"));
            });
        }

        function zModToggleSCEditor(o, i) {
            $(o).live("click", function(o) {
                $(i).toggle();
            });
        }

        for (var x = 0; x < zModGroups.length; x++) {
            if (zModGetModMessageByGroupId(zModGroups[x].id, 1) > 0) {
                list += "<li class='mod_editor_section' id='list_" + zModGroups[x].id + "'><a style='cursor: pointer'>" + zModGroups[x].name + " (" + zModGetModMessageByGroupId(zModGroups[x].id, 1) + ")</a></li>" + zModGetModMessageByGroupId(zModGroups[x].id, 0);
                zModToggleSCEditor("#list_" + zModGroups[x].id + " a", ".group_" + zModGroups[x].id + "");
            }
        }

        zModToggleSCEditor('.sceditor-button.sceditor-button-staff', '.mod_box');

        $("textarea, .sceditor-button").click(function() {
            $(".mod_box").hide();
        });

        $(".sceditor-button-source").click(function() {
            $(".sceditor-button-staff").removeClass("disabled");
        });

        if(_userdata.user_level > 0) $(".sceditor-group:last-child").before('<div class="sceditor-group"><a class="sceditor-button sceditor-button-staff" title="Mesaje de moderare"><div unselectable="on">Mesaje de moderare</div></a><div class="mod_box" style="display: none;"><ul class="mod_groups" id="mod_box_i">' + list + '<li class="copyright_e"> 4EN3RGY.COM</li></div></div></div>');
       
    });

});

2Unelte de moderare Empty Re: Unelte de moderare Vin 23 Iun 2017, 23:51

Lucifer

avatarMembru

Bine ca postezi doar codul o poză pentru cei ce nu știu

Vezi subiectul anterior Vezi subiectul urmator Sus  Mesaj [Pagina 1 din 1]

Permisiunile acestui forum:
Nu puteti raspunde la subiectele acestui forum

 

Copyright @ 2010-2024 by 4en3rgY ~> All rights reserved.