Astuces Forumactif
Vous souhaitez réagir à ce message ? Créez un compte en quelques clics ou connectez-vous pour continuer.
Membres connectés récemment
Voir tous les membres
Le Deal du moment : -39%
Pack Home Cinéma Magnat Monitor : Ampli DENON ...
Voir le deal
1190 €

[TOUTES VERSIONS] Afficher les outils de modération via la liste des sujets

Voir le sujet précédent Voir le sujet suivant Aller en bas

Milouze14
Milouze14
Fondateur

https://www.milouze14.com

MessageMilouze14 Mar 21 Juil 2015 - 4:23

coucou ,

l'astuce proposée vient du support anglais :
http://help.forumotion.com/t141645-application-actions-of-moderation#964572

Par conséquent, je laisse le sujet visible  hinhin


Elle consiste au survol du sujet dans la liste des sujets d'afficher un petit bouton qui affichera une petite fenêtre qui vous permettra de
Renommer le titre directement
Verrouiller le sujet
Déplacer le sujet
Envoyer à la corbeille
Supprimer le sujet


J'ai quelque peu modifier le script en l'adaptant pour la version Française et pour combler tout çà j'ai aussi ajouter des transitions :



Aperçu:
[TOUTES VERSIONS] Afficher les outils de modération via la liste des sujets 0129

Puis au clic:
[TOUTES VERSIONS] Afficher les outils de modération via la liste des sujets 0218


Pour les versions Phpbb2,Phpbb3,Punbb,Invision et EDGE


Modules/HTML JAVASCRIPT/Gestion des codes Javascript/Créer un nouveau Javascript
Mettre un titre explicite.
Cocher sur Les sous forums

Déposez ceci:

Code:

/***
         * Application: Actions of moderation.
         * Description: This application shows a shortcut menu for the moderation in the list of topics.
         * Version: 1.03182014-jq1.9.1 - (Dodekatheon / 2) + (Hermes = Zeus + Maia)
         * Made and Optimizations by JScript - 2014/03/18
         * View more in: http://ajuda.forumeiros.com
         * Copyright (c) 2013 JScript <jscriptbrasil at live dot com>
         * This work is free. You can redistribute it and/or modify it
         * under the terms of the WTFPL, Version 2
         */
        /***
        * System Defined Variables - Do not edit if you don't know!
        ***/
        var oMTConfig = {
            sErrorMsg: '',
            oTopicTitle: {},
            sTopicHref: '',
            iTopicID: 0,
            sTopicTitle: '',
            sContent:
                '<a title="Actions de modération" class="ipsModMenu" href="#"> </a>',
            sMenu:
                '<ul style="display: none; position: absolute; z-index: 9999;" class="ipbmenu_content" id="topic_mod_menucontent">' +
                    '<li style="z-index: 10000;"><a title="Renommer le sujet" href="" id="t_rename" onclick="_rename_Topic();return false;" style="z-index: 10000;">Renommer le sujet</a></li>' +
                  
                    '<li style="z-index: 10000;"><a title="Verrouiller le sujet" href="" id="t_lock" style="z-index: 10000;">Verrouiller</a></li>' +
                    '<li style="z-index: 10000;"><a title="Déplacer le sujet" href="" id="t_move" style="z-index: 10000;">Déplacer</a></li>' +
                    '<li style="z-index: 10000;"><a title="Envoyer à la corbeille" href="" id="t_hide" style="z-index: 10000;">Envoyer a la corbeille</a></li>' +
                    '<li style="z-index: 10000;"><a title="Supprimer le sujet" href="" id="t_delete" style="z-index: 10000;">Supprimer </a></li>' +
                '</ul>',
            sCSS:
                '<style>' +
                /*'#rename-topic {' +
                    'display: block;' +
                '}' +*/
                '.statused tr:hover > .tcr .ipsModMenu, ' +
          '.forum-block-inner:hover > .forum-lastpost .ipsModMenu, ' +
                    '.forumline tr td:hover > .postdetails .ipsModMenu, ' +
                    'ul.topiclist.topics.bg_none dl.icon:hover > .lastpost .ipsModMenu, '+
                    'table.ipbtable tbody tr:hover > td.row1.lastaction .ipsModMenu{' +
                    'visibility: visible;' +
                '}' +
    'a.ipsModMenu.menu_active{' +
    'background:transparent !important;' +
    '}'+
    '.ipsModMenu {' +
                    'background: url("https://i.servimg.com/u/f18/11/26/21/37/gear10.png") no-repeat scroll 0 0 rgba(0, 0, 0, 0);' +
                    'display: inline-block;' +
                    'height: 20px;' +
                    'margin: 0 8px;' +
                    'text-indent: -2000em;' +
                    'vertical-align: middle;' +
                    'width: 20px;' +
                    'float: right;' +
                    'visibility: hidden;' +
                    /*'margin-top: -6px;' +*/
                '}' +
               '.ipbmenu_content
    {' +
     'font-size: 12px;' +
    'padding: 5px !important;' +
    'z-index: 2000;' +
    'background-color: #F7F9FB;' +
    'border: 1px solid #D5DDE5;' +
    'box-shadow: 2px 2px 5px #333;' +
    '}' +
                '.ipbmenu_content li:first-child {' +
                    'padding-top: 0;' +
                '}' +
                '.ipbmenu_content li {' +
                    'border-bottom: 1px solid #D5DDE5;' +
                    'list-style-type: none !important;' +
                '}' +
                '.ipbmenu_content a {' +
    'display: block;' +
    'padding: 6px 10px;' +
    'text-align: left;' +
    'text-decoration: none !important;' +
    'transition: all 0.5s ease-in;' +
                '}' +
                '.ipbmenu_content a:hover {' +
    'color:#B24926;' +
    'background: none repeat scroll 0 0 #D5DDE5; ' +
                '}' +
                '.cancel {' +
     'color: #AD2930;' +
     'font-size: 0.9em;' +
     'font-weight: bold;' +
    'text-decoration: none ;' +
    'transition: all 0.5s ease-in;' +
                '}' +
    '.cancel:hover
    {' +
    'color: #B24926;' +
    'text-decoration: none !important;' +
    '}' +
     '.input_text {' +
    'background: none repeat scroll 0 0 #ccc !important;' +
      'color:#B24926;'+
    'padding: 4px !important;' +
    'border-radius:5px;' +
     'font: 13px !important;' +
    'transition: all 0.5s ease-in;' +
                '}' +
    '#rename-topic
    {' +
    'color: #AD2930 !important;' +
    'cursor: pointer;' +
    'border:none !important;' +
    'background:transparent !important;' +
    'padding: 4px 10px !important;' +
    'min-width: 0 !important;' +
    'font: 13px !important ;' +
    '}' +
    ' input#rt_submit.button2
    {' +
    'color: #AD2930 !important;' +
    'cursor: pointer;' +
    'border:none !important;' +
    'background:transparent !important;' +
    'background-image:none !important; ' +
    'padding: 4px 10px !important;' +
    'min-width: 0 !important;' +
    'font: 13px !important ;' +
    '}' +
    '.input_text:focus {' +
    'border: none !important;' +
    'box-shadow: 2px 2px 5px #333;' +
                '}' +
                '#ipsGlobalNotification {' +
                    'font-weight: bold;' +
                    'left: 50%;' +
                    'margin-left: -250px;' +
                    'position: fixed;' +
                    'text-align: center;' +
                    'top: 20px;' +
                    'z-index: 10000;' +
                '}' +
                '.popupWrapper {' +
                    'background-color: rgba(70, 70, 70, 0.6);' +
                    'border-radius: 4px 4px 4px 4px;' +
                    'box-shadow: 0 12px 25px rgba(0, 0, 0, 0.7);' +
                    'padding: 4px;' +
                '}' +
                '.popupInner {' +
                    'background: none repeat scroll 0 0 #FFFFFF;' +
                    'box-shadow: 0 0 3px rgba(0, 0, 0, 0.4);' +
                    'overflow-x: hidden;' +
                    'overflow-y: auto;' +
                    'width: 500px;' +
                '}' +
                '.ipsPad {' +
                    'padding: 9px;' +
                '}' +
                '</style>',
            sTarget: '',
            sSearch: '',
            sExpression0: '',
            sExpression1: ''
        };
        /***
        * User Definition Variables
        ***/
        oMTConfig.sErrorMsg = 'Attention! \ n\ n Une erreur est survenue lors de l\'édition du titre, attendez 10 secondes et essayez à nouveau!';
        oMTConfig.sSavingMsg = 'Mise à jour du titre du sujet attente ...';
        oMTConfig.sDoneMsg = 'Le titre du sujet a été mis à jour!';

        window.onload = function() { //jQuery(function () {
            if (_userdata.user_level >= 1) {
                /* Forum versions! */
                var phpBB2 = jQuery('.bodyline');
                var phpBB3 = jQuery('#wrap');
                var punbb = jQuery('#pun-intro');
                var invision = jQuery('#ipbwrapper');
                var edge = jQuery('#fa_edge');

                if (phpBB2.length) {
                    oMTConfig.sTarget = '.forumline td.row3Right span.postdetails';
                    oMTConfig.sExpression0 = 'oClicked.parent().parent().parent().find("td a.topictitle");';
                    oMTConfig.sExpression1 = 'jQuery("#page-body .forumline .postbody:first", data).parents("tr:eq(1)").attr("id").split("p")[1];'
                } else if(phpBB3.length) {
                    oMTConfig.sTarget = 'ul.topiclist.topics.bg_none dd.lastpost > span';
                    oMTConfig.sExpression0 = 'oClicked.parent().parents("dl.icon").find("dd.dterm a.topictitle");';
                    oMTConfig.sExpression1 = 'jQuery("#main-content .post:first", data).attr("id").split("p")[1];';
                } else if(punbb.length) {
                    oMTConfig.sTarget = '.statused td.tcr';
                    oMTConfig.sExpression0 = 'oClicked.parents("tr").find(".tcl.tdtopics a.topictitle");';
                    oMTConfig.sExpression1 = 'jQuery(".posthead:first", data).attr("id").split("p")[1];';
                } else if(invision.length) {
                    oMTConfig.sTarget = 'table.ipbtable tbody td.row1.lastaction';
                    oMTConfig.sExpression0 = 'oClicked.parents("tr").find("td a.topictitle");';
                    oMTConfig.sExpression1 = 'jQuery("#main-content .borderwrap .post:first", data).attr("id").split("p")[1];';
                }else if(edge.length) {
                    oMTConfig.sTarget = '.forum-category .forum-block-inner .forum-lastpost ';
                    oMTConfig.sExpression0 = 'oClicked.parent().parent().parent().find("a.topictitle");';
                    oMTConfig.sExpression1 ='jQuery("#main-content .post:first", data).attr("id").split("p")[1];';
                };

                jQuery(oMTConfig.sCSS).insertBefore('body');
                jQuery('body').append(oMTConfig.sMenu);
                jQuery(oMTConfig.sTarget).append(oMTConfig.sContent);

                jQuery('a.ipsModMenu').click(function () {
                    var oClicked = jQuery(this);
                    var oTarget = jQuery('#topic_mod_menucontent');

                    if (oTarget[0].style.display == 'none') {
                        oClicked.addClass('menu_active');

                        oMTConfig.oTopicTitle = eval(oMTConfig.sExpression0);
                        oMTConfig.sTopicHref = oMTConfig.oTopicTitle.attr('href');
                        oMTConfig.iTopicID = oMTConfig.sTopicHref.substring(2, oMTConfig.sTopicHref.indexOf("-")); // .split(/[\/t-]/)[2]; <- More fast???
                        oMTConfig.sTopicTitle = oMTConfig.oTopicTitle.text();

                        var TID = jQuery('input[name="tid"]').val();
                      

                        jQuery('#t_lock').attr('href', '/modcp?mode=lock&t=' + oMTConfig.iTopicID  + '&tid=' + TID);
                        jQuery('#t_move').attr('href', '/modcp?mode=move&t=' + oMTConfig.iTopicID  + '&tid=' + TID);
                        jQuery('#t_hide').attr('href', '/modcp?mode=trash&t=' + oMTConfig.iTopicID  + '&tid=' + TID);
                        jQuery('#t_delete').attr('href', '/modcp?mode=delete&t=' + oMTConfig.iTopicID  + '&tid=' + TID);

                        oTarget
                            .css({
                                'left': (oClicked.offset().left + oClicked.outerWidth()) - oTarget.outerWidth(),
                                'top': oClicked.offset().top + oClicked.outerHeight()
                            })
                            .fadeIn(400);

                        jQuery(document).mousedown(function() {
                            if(!oTarget.is(":hover")) {
                                jQuery(document).unbind('mousedown');
                                oClicked.removeClass('menu_active');
                                oTarget.fadeOut(400);
                            }
                        });

                    } else {
                        oClicked.removeClass('menu_active');
                        oTarget.fadeOut(400);
                    }
                    return false;
                });
            }
        }; // });

        function _rename_Topic() {
            oMTConfig.oTopicTitle.hide();
            var sHtml =
                '<span id="rename-topic">' +
                 '<input type="text" maxlength="150" size="50" class="input_text" value="' + oMTConfig.sTopicTitle + '" id="rt_input" style="width: 56%; margin-right: 4px;">' +
                    '<input type="submit" id="rt_submit" class="button2" value="Enregistrer" onclick="_rt_commit()" style="margin-right: 4px;">' +
                    '<a title="Annuler" class="cancel" id="rt_cancel" href="#" onclick="jQuery(\'#rename-topic\').remove();oMTConfig.oTopicTitle.show();return false;">Annuler</a>' +
              '</span>';
            oMTConfig.oTopicTitle.before(sHtml);

            jQuery('#rt_input').keydown(function (e){
                if(e.keyCode == 13 && jQuery('#rt_input').val() !== ''){
                    _rt_commit();
                }
            });
        }

        function _rt_commit() {
            var iPostID = 0, user_Msg = '';
            var sNewTitle = jQuery('#rt_input').val();
            if (sNewTitle == '') return false;

            jQuery('body').append('<div id="ipsGlobalNotification"><div class="popupWrapper"><div class="popupInner"><div class="ipsPad">' + oMTConfig.sSavingMsg + '</div></div></div></div>');
            jQuery('#rename-topic').css('opacity', '0.4');

            jQuery.get(oMTConfig.sTopicHref, function(data) {
                iPostID = eval(oMTConfig.sExpression1);
            }).done(function(){
                jQuery.get("/post?p=" + iPostID + "&mode=editpost", function(data) {
                    user_Msg = jQuery(data).find('#text_editor_textarea[name="message"]').val();
                }).done(function(){
                    jQuery.post("/post?p=" + iPostID + "&mode=editpost", {
                        subject: sNewTitle,
                        message: user_Msg,
                        edit_reason: '',
                        attach_sig: '1',
                        notify: "0",
                        post: 1
                    }).done(function(){
                        jQuery('#ipsGlobalNotification').remove();
                        jQuery('#rename-topic').remove();
                        oMTConfig.oTopicTitle.show().text(sNewTitle);
                        jQuery('body').append('<div id="ipsGlobalNotification"><div class="popupWrapper"><div class="popupInner"><div class="ipsPad">' + oMTConfig.sDoneMsg + '</div></div></div></div>');
                        setTimeout(function() {
                            jQuery('#ipsGlobalNotification').remove();
                        }, 4000);
                    }).fail(function(){
                        jQuery('#ipsGlobalNotification').remove();
                        oMTConfig.oTopicTitle.show();
                        alert(oMTConfig.sErrorMsg);
                    });
                }).fail(function(){
                    jQuery('#ipsGlobalNotification').remove();
                    oMTConfig.oTopicTitle.show();
                    alert(oMTConfig.sErrorMsg);
                });
            }).fail(function(){
                jQuery('#ipsGlobalNotification').remove();
                oMTConfig.oTopicTitle.show();
                alert(oMTConfig.sErrorMsg);
            });
        }


Pour la version ModernBB

Code:
/***
         * Application: Actions of moderation.
         * Description: This application shows a shortcut menu for the moderation in the list of topics.
         * Version: 1.03182014-jq1.9.1 - (Dodekatheon / 2) + (Hermes = Zeus + Maia)
         * Made and Optimizations by JScript - 2014/03/18
         * View more in: http://ajuda.forumeiros.com
         * Copyright (c) 2013 JScript <jscriptbrasil at live dot com>
         * This work is free. You can redistribute it and/or modify it
         * under the terms of the WTFPL, Version 2
         */
        /***
        * System Defined Variables - Do not edit if you don't know!
        ***/
        var oMTConfig = {
            sErrorMsg: '',
            oTopicTitle: {},
            sTopicHref: '',
            iTopicID: 0,
            sTopicTitle: '',
            sContent:
                '<a title="Actions de modération" class="ipsModMenu" href="#">&nbsp;</a>',
            sMenu:
                '<ul style="display: none; position: absolute; z-index: 9999;" class="ipbmenu_content" id="topic_mod_menucontent">' +
                    '<li style="z-index: 10000;"><a title="Renommer le sujet" href="" id="t_rename" onclick="_rename_Topic();return false;" style="z-index: 10000;">Renommer le sujet</a></li>' +
                  
                    '<li style="z-index: 10000;"><a title="Verrouiller le sujet" href="" id="t_lock" style="z-index: 10000;">Verrouiller</a></li>' +
                    '<li style="z-index: 10000;"><a title="Déplacer le sujet" href="" id="t_move" style="z-index: 10000;">Déplacer</a></li>' +
                    '<li style="z-index: 10000;"><a title="Envoyer à la corbeille" href="" id="t_hide" style="z-index: 10000;">Envoyer a la corbeille</a></li>' +
                    '<li style="z-index: 10000;"><a title="Supprimer le sujet" href="" id="t_delete" style="z-index: 10000;">Supprimer </a></li>' +
                '</ul>',
            sCSS:
                '<style>' +
                /*'#rename-topic {' +
                    'display: block;' +
                '}' +*/
                '.statused tr:hover > .tcr .ipsModMenu, ' +
                    '.forumline tr td:hover > .postdetails .ipsModMenu, ' +
                    'ul.topiclist.topics.bg_none dl.icon:hover > .lastpost .ipsModMenu, '+
                    'table.ipbtable tbody tr:hover > td.row1.lastaction .ipsModMenu{' +
                    'visibility: visible;' +
                '}' +
    'a.ipsModMenu.menu_active{' +
    'background:transparent !important;' +
    '}'+
    '.ipsModMenu {' +
                    'background: url("https://i.servimg.com/u/f18/11/26/21/37/gear10.png") no-repeat scroll 0 0 rgba(0, 0, 0, 0);' +
                    'display: inline-block;' +
                    'height: 20px;' +
                    'margin: 0 8px;' +
                    'text-indent: -2000em;' +
                    'vertical-align: middle;' +
                    'width: 20px;' +
                    'float: right;' +
                    'visibility: hidden;' +
                    /*'margin-top: -6px;' +*/
                '}' +
               '.ipbmenu_content
    {' +
     'font-size: 12px;' +
    'padding: 5px !important;' +
    'z-index: 2000;' +
    'background-color: #F7F9FB;' +
    'border: 1px solid #D5DDE5;' +
    'box-shadow: 2px 2px 5px #333;' +
    '}' +
                '.ipbmenu_content li:first-child {' +
                    'padding-top: 0;' +
                '}' +
                '.ipbmenu_content li {' +
                    'border-bottom: 1px solid #D5DDE5;' +
                    'list-style-type: none !important;' +
                '}' +
                '.ipbmenu_content a {' +
    'display: block;' +
    'padding: 6px 10px;' +
    'text-align: left;' +
    'text-decoration: none !important;' +
    'transition: all 0.5s ease-in;' +
                '}' +
                '.ipbmenu_content a:hover {' +
    'color:#B24926;' +
    'background: none repeat scroll 0 0 #D5DDE5; ' +
                '}' +
                '.cancel {' +
     'color: #AD2930;' +
     'font-size: 0.9em;' +
     'font-weight: bold;' +
    'text-decoration: none ;' +
    'transition: all 0.5s ease-in;' +
                '}' +
    '.cancel:hover
    {' +
    'color: #B24926;' +
    'text-decoration: none !important;' +
    '}' +
     '.input_text {' +
    'background: none repeat scroll 0 0 #ccc !important;' +
      'color:#B24926;'+
    'padding: 4px !important;' +
    'border-radius:5px;' +
     'font: 13px !important;' +
    'transition: all 0.5s ease-in;' +
                '}' +
    '#rename-topic
    {' +
    'color: #AD2930 !important;' +
    'cursor: pointer;' +
    'border:none !important;' +
    'background:transparent !important;' +
    'padding: 4px 10px !important;' +
    'min-width: 0 !important;' +
    'font: 13px !important ;' +
    '}' +
    ' input#rt_submit.button2
    {' +
    'color: #AD2930 !important;' +
    'cursor: pointer;' +
    'border:none !important;' +
    'background:transparent !important;' +
    'background-image:none !important; ' +
    'padding: 4px 10px !important;' +
    'min-width: 0 !important;' +
    'font: 13px !important ;' +
    '}' +
    '.input_text:focus {' +
    'border: none !important;' +
    'box-shadow: 2px 2px 5px #333;' +
                '}' +
                '#ipsGlobalNotification {' +
                    'font-weight: bold;' +
                    'left: 50%;' +
                    'margin-left: -250px;' +
                    'position: fixed;' +
                    'text-align: center;' +
                    'top: 20px;' +
                    'z-index: 10000;' +
                '}' +
                '.popupWrapper {' +
                    'background-color: rgba(70, 70, 70, 0.6);' +
                    'border-radius: 4px 4px 4px 4px;' +
                    'box-shadow: 0 12px 25px rgba(0, 0, 0, 0.7);' +
                    'padding: 4px;' +
                '}' +
                '.popupInner {' +
                    'background: none repeat scroll 0 0 #FFFFFF;' +
                    'box-shadow: 0 0 3px rgba(0, 0, 0, 0.4);' +
                    'overflow-x: hidden;' +
                    'overflow-y: auto;' +
                    'width: 500px;' +
                '}' +
                '.ipsPad {' +
                    'padding: 9px;' +
                '}' +
                '</style>',
            sTarget: '',
            sSearch: '',
            sExpression0: '',
            sExpression1: ''
        };
        /***
        * User Definition Variables
        ***/
        oMTConfig.sErrorMsg = 'Attention! \ n\ n Une erreur est survenue lors de l\'édition du titre, attendez 10 secondes et essayez à nouveau!';
        oMTConfig.sSavingMsg = 'Mise à jour du titre du sujet attente ...';
        oMTConfig.sDoneMsg = 'Le titre du sujet a été mis à jour!';

        window.onload = function() { //jQuery(function () {
            if (_userdata.user_level >= 1) {
                /* Forum versions! */
                var phpBB2 = jQuery('.bodyline');
                var phpBB3 = jQuery('#wrap');
                var punbb = jQuery('#pun-intro');
                var invision = jQuery('#ipbwrapper');

                if (phpBB2.length) {
                    oMTConfig.sTarget = '.forumline td.row3Right span.postdetails';
                    oMTConfig.sExpression0 = 'oClicked.parent().parent().parent().find("td a.topictitle");';
                    oMTConfig.sExpression1 = 'jQuery("#page-body .forumline .postbody:first", data).parents("tr:eq(1)").attr("id").split("p")[1];'
                } else if(phpBB3.length) {
                  oMTConfig.sTarget = 'ul.topiclist.topics.bg_none dd.lastpost > span:not(.lastpost-avatar)';
                    oMTConfig.sExpression0 = 'oClicked.parent().parents("dl.icon").find("dd.dterm a.topictitle");';
                    oMTConfig.sExpression1 = 'jQuery("#main-content .post:first", data).attr("id").split("p")[1];';
                } else if(punbb.length) {
                    oMTConfig.sTarget = '.statused td.tcr';
                    oMTConfig.sExpression0 = 'oClicked.parents("tr").find(".tcl.tdtopics a.topictitle");';
                    oMTConfig.sExpression1 = 'jQuery(".posthead:first", data).attr("id").split("p")[1];';
                } else if(invision.length) {
                    oMTConfig.sTarget = 'table.ipbtable tbody td.row1.lastaction';
                    oMTConfig.sExpression0 = 'oClicked.parents("tr").find("td a.topictitle");';
                    oMTConfig.sExpression1 = 'jQuery("#main-content .borderwrap .post:first", data).attr("id").split("p")[1];';
                };

                jQuery(oMTConfig.sCSS).insertBefore('body');
                jQuery('body').append(oMTConfig.sMenu);
                jQuery(oMTConfig.sTarget).append(oMTConfig.sContent);

                jQuery('a.ipsModMenu').click(function () {
                    var oClicked = jQuery(this);
                    var oTarget = jQuery('#topic_mod_menucontent');

                    if (oTarget[0].style.display == 'none') {
                        oClicked.addClass('menu_active');

                        oMTConfig.oTopicTitle = eval(oMTConfig.sExpression0);
                        oMTConfig.sTopicHref = oMTConfig.oTopicTitle.attr('href');
                        oMTConfig.iTopicID = oMTConfig.sTopicHref.substring(2, oMTConfig.sTopicHref.indexOf("-")); // .split(/[\/t-]/)[2]; <- More fast???
                        oMTConfig.sTopicTitle = oMTConfig.oTopicTitle.text();

                        var TID = jQuery('input[name="tid"]').val();

                        jQuery('#t_lock').attr('href', '/modcp?mode=lock&t=' + oMTConfig.iTopicID  + '&tid=' + TID);
                        jQuery('#t_move').attr('href', '/modcp?mode=move&t=' + oMTConfig.iTopicID  + '&tid=' + TID);
                        jQuery('#t_hide').attr('href', '/modcp?mode=trash&t=' + oMTConfig.iTopicID  + '&tid=' + TID);
                        jQuery('#t_delete').attr('href', '/modcp?mode=delete&t=' + oMTConfig.iTopicID  + '&tid=' + TID);

                        oTarget
                            .css({
                                'left': (oClicked.offset().left + oClicked.outerWidth()) - oTarget.outerWidth(),
                                'top': oClicked.offset().top + oClicked.outerHeight()
                            })
                            .fadeIn(400);

                        jQuery(document).mousedown(function() {
                            if(!oTarget.is(":hover")) {
                                jQuery(document).unbind('mousedown');
                                oClicked.removeClass('menu_active');
                                oTarget.fadeOut(400);
                            }
                        });

                    } else {
                        oClicked.removeClass('menu_active');
                        oTarget.fadeOut(400);
                    }
                    return false;
                });
            }
        }; // });

        function _rename_Topic() {
            oMTConfig.oTopicTitle.hide();
            var sHtml =
                '<span id="rename-topic">' +
                 '<input type="text" maxlength="150" size="50" class="input_text" value="' + oMTConfig.sTopicTitle + '" id="rt_input" style="width: 56%; margin-right: 4px;">' +
                    '<input type="submit" id="rt_submit" class="button2" value="Enregistrer" onclick="_rt_commit()" style="margin-right: 4px;">' +
                    '<a title="Annuler" class="cancel" id="rt_cancel" href="#" onclick="jQuery(\'#rename-topic\').remove();oMTConfig.oTopicTitle.show();return false;">Annuler</a>' +
              '</span>';
            oMTConfig.oTopicTitle.before(sHtml);

            jQuery('#rt_input').keydown(function (e){
                if(e.keyCode == 13 && jQuery('#rt_input').val() !== ''){
                    _rt_commit();
                }
            });
        }

        function _rt_commit() {
            var iPostID = 0, user_Msg = '';
            var sNewTitle = jQuery('#rt_input').val();
            if (sNewTitle == '') return false;

            jQuery('body').append('<div id="ipsGlobalNotification"><div class="popupWrapper"><div class="popupInner"><div class="ipsPad">' + oMTConfig.sSavingMsg + '</div></div></div></div>');
            jQuery('#rename-topic').css('opacity', '0.4');

            jQuery.get(oMTConfig.sTopicHref, function(data) {
                iPostID = eval(oMTConfig.sExpression1);
            }).done(function(){
                jQuery.get("/post?p=" + iPostID + "&mode=editpost", function(data) {
                    user_Msg = jQuery(data).find('#text_editor_textarea[name="message"]').val();
                }).done(function(){
                    jQuery.post("/post?p=" + iPostID + "&mode=editpost", {
                        subject: sNewTitle,
                        message: user_Msg,
                        edit_reason: '',
                        attach_sig: '1',
                        notify: "0",
                        post: 1
                    }).done(function(){
                        jQuery('#ipsGlobalNotification').remove();
                        jQuery('#rename-topic').remove();
                        oMTConfig.oTopicTitle.show().text(sNewTitle);
                        jQuery('body').append('<div id="ipsGlobalNotification"><div class="popupWrapper"><div class="popupInner"><div class="ipsPad">' + oMTConfig.sDoneMsg + '</div></div></div></div>');
                        setTimeout(function() {
                            jQuery('#ipsGlobalNotification').remove();
                        }, 4000);
                    }).fail(function(){
                        jQuery('#ipsGlobalNotification').remove();
                        oMTConfig.oTopicTitle.show();
                        alert(oMTConfig.sErrorMsg);
                    });
                }).fail(function(){
                    jQuery('#ipsGlobalNotification').remove();
                    oMTConfig.oTopicTitle.show();
                    alert(oMTConfig.sErrorMsg);
                });
            }).fail(function(){
                jQuery('#ipsGlobalNotification').remove();
                oMTConfig.oTopicTitle.show();
                alert(oMTConfig.sErrorMsg);
            });
        }
Pensez a cliquer sur le bouton  Valid







Dernière édition par Milouze14 le Lun 29 Nov 2021 - 16:30, édité 8 fois
Anonymous
Invité
Invité

MessageInvité Mar 21 Juil 2015 - 16:46

Merci pour ce script super
Milouze14
Milouze14
Fondateur

https://www.milouze14.com

MessageMilouze14 Mar 6 Oct 2015 - 16:40

coucou , pour les membres ayant déposé ce script , merci de corriger celui-ci
en supprimant ceci:
Code:
oMTConfig.sInfo +

Cette modification supprimera le bug sur l'affichage de "undefined" en bas de page à gauche hinhin .
avatar
SuperSpaceCab
Milouzien

http://www.ets2-mods-forum.com/

MessageSuperSpaceCab Ven 7 Oct 2016 - 16:10

Cette option est clairement indispensable, merci beaucoup !
Neptunia
Neptunia
Milouzien

https://www.galaxie-series.net/

MessageNeptunia Mar 20 Fév 2018 - 22:56

Merci ;)
ribelle
ribelle
Milouzien

https://www.dolceribelle.com/

Messageribelle Jeu 22 Fév 2018 - 15:39

Merci Phil  clin oeil
MathisB
MathisB
Milouzien

http://www.dixily.fr

MessageMathisB Dim 28 Oct 2018 - 21:43

Splash
Splash
Milouzien

https://lesforums.caforum.fr

MessageSplash Mar 30 Oct 2018 - 16:47

Hi,

Quand il est inscrit 'Toutes versions" on est d'accord pour dire que la version Edge n'est pas comprise ?
J'ai tenté les 2 scripts et ils ne fonctionnent pas
Lilas
Lilas
Milouzien

http://lefofodemacopine.forumactif.com

MessageLilas Dim 11 Nov 2018 - 22:57

Très utile Milouze.
De + les icônes sont de la couleur secondaire du fofo... schut
 
Coucou Splash !
super
Milouze14
Milouze14
Fondateur

https://www.milouze14.com

MessageMilouze14 Lun 15 Avr 2019 - 9:14

@Splash

Splash a écrit:Hi,

Quand il est inscrit 'Toutes versions" on est d'accord pour dire que la version Edge n'est pas comprise ?
J'ai tenté les 2 scripts et ils ne fonctionnent pas


Hello Fred,
je viens de mettre à jour le script afin que la version EDGE soit aussi prise en compte.

Jean22
Jean22
Milouzien

https://amicalementfrison.forumactif.org/

MessageJean22 Mer 17 Avr 2019 - 8:16

Je viens de coller cette fonction ... c'est génial !

Merci ... encore, Phil ! super
Splash
Splash
Milouzien

https://lesforums.caforum.fr

MessageSplash Mer 17 Avr 2019 - 10:09

Milouze14 a écrit:@Splash

Splash a écrit:Hi,

Quand il est inscrit 'Toutes versions" on est d'accord pour dire que la version Edge n'est pas comprise ?
J'ai tenté les 2 scripts et ils ne fonctionnent pas


Hello Fred,
je viens de mettre à jour le script afin que la version EDGE soit aussi prise en compte.

Merci
Dommage que la modification des titres des sujets directement depuis la liste des sujets comporte quelques bugs
chrisnvidia
chrisnvidia
Milouzien

https://sos-pc.forumactif.org/

Messagechrisnvidia Dim 15 Sep 2019 - 18:22

Splash
Splash
Milouzien

https://lesforums.caforum.fr

MessageSplash Dim 15 Sep 2019 - 18:31

@chrisnvidia

Pour EDGE il faut utiliser cette astuce > Clique
Milouze14
Milouze14
Fondateur

https://www.milouze14.com

MessageMilouze14 Dim 15 Sep 2019 - 19:16

Splash a écrit:@chrisnvidia

Pour EDGE il faut utiliser cette astuce > Clique

Cette astuce est valable pour EDGE aussi Fred clin oeil
Splash
Splash
Milouzien

https://lesforums.caforum.fr

MessageSplash Dim 15 Sep 2019 - 19:47

Milouze14 a écrit:
Splash a écrit:@chrisnvidia

Pour EDGE il faut utiliser cette astuce > Clique

Cette astuce est valable pour EDGE aussi Fred clin oeil
OK, sur mon forum je n'ai pas du tout ce script là
Milouze14
Milouze14
Fondateur

https://www.milouze14.com

MessageMilouze14 Dim 15 Sep 2019 - 19:53

Ben,
il me semble l'avoir mise à jour , il faut tester Fred.
Splash
Splash
Milouzien

https://lesforums.caforum.fr

MessageSplash Dim 15 Sep 2019 - 20:08

Tout est OK sur le forum

Voir :
Contenu sponsorisé

MessageContenu sponsorisé

Voir le sujet précédent Voir le sujet suivant Revenir en haut

Créer un compte ou se connecter pour répondre

Vous devez être membre pour répondre.

S'enregistrer

Rejoignez notre communauté ! C'est facile !


S'enregistrer

Connexion

Vous êtes déjà membre ? Aucun soucis, cliquez ici pour vous connecter.


Connexion

 
Permission de ce forum:
Vous ne pouvez pas répondre aux sujets dans ce forum