Good art is a taste, good design is an opinion.


Come as guest, stay as family.
Board Index

Come as guest, stay as family.


You are not connected. Please login or register

Foto

[Javascript] Move topic popup [Moderator panel improvement]



View previous topic View next topic Go down Message [Page 1 of 1]

1
Offline

  Shadow

Shadow
Administrator
Administrator

[Javascript] Move topic popup [Moderator panel improvement] Alerte10

Tutorial: Move topic popup [Moderator panel improvement]

With this script, you can easily move the topic with a click on the move button without page refresh. The default button for move icon looks like [Javascript] Move topic popup [Moderator panel improvement] Topic_move1
Credit goes to @Hancki

--> Tutorials, tips and tricks <--
Move topic popup [Moderator panel improvement]



- Javascript
Placement:In the topics.
Don't forget to click your move button twice!
Code:
[panda=js]    jQuery(function() {
        jQuery('a[href*="/modcp?mode=move&"]').click(function() {
            jQuery(this).hide();
            var imgMove = jQuery(this).find('img').attr('src');
            jQuery(this).after('<a href="#openModal"><img src="' + imgMove + '"</a>');
            t = "jQuery(this).closest('form').remove()";
            jQuery(this).after('<div id="openModal" class="modalDialog"> <div> <a href="#close" title="Close" class="close">X</a> <h2>Move Topic</h2><br/><br/> <form action="/modcp?tid=' + jQuery('input[name="tid"]:eq(0)').val() + '" method=post style=text-align:center;font-size:12px>Move to: <select name=new_forum id=movetopic>' + jQuery('select[name="selected_id"]:eq(0)').html() + '</select><br><br><input name=move_leave_shadow type=checkbox> Leave shadow topic in old forum?<br><br><input type=hidden name=mode value=move><input type=hidden name=t value="' + jQuery('input[name="t"]:eq(0)').val() + '"><input class=button2 type=submit name=confirm value=Yes> <input class=button2 type=submit name=cancel value=No onclick="' + t + ';return false"><br><br></form> </div> </div> <style> .modalDialog { position: fixed; font-family: Arial, Helvetica, sans-serif; top: 0; right: 0; bottom: 0; left: 0; background: rgba(0,0,0,0.8); z-index: 99999; opacity:0; -webkit-transition: opacity 400ms ease-in; -moz-transition: opacity 400ms ease-in; transition: opacity 400ms ease-in; pointer-events: none; } .modalDialog:target { opacity:1; pointer-events: auto; } .modalDialog > div { width: 400px; position: relative; margin: 10% auto; padding: 5px 20px 13px 20px; border-radius: 10px; background: #fff; background: -moz-linear-gradient(#fff, #999); background: -webkit-linear-gradient(#fff, #999); background: -o-linear-gradient(#fff, #999); } .close { background: #606061; color: #FFFFFF; line-height: 25px; position: absolute; right: -12px; text-align: center; top: -10px; width: 24px; text-decoration: none; font-weight: bold; -webkit-border-radius: 12px; -moz-border-radius: 12px; border-radius: 12px; -moz-box-shadow: 1px 1px 3px #000; -webkit-box-shadow: 1px 1px 3px #000; box-shadow: 1px 1px 3px #000; } .close:hover { background: #00d9ff; } #openModal {color:black!important;} #openModal h2 {font-size: 20px !important;text-align:center; font-weight: bold;}</style>');
            return false;
        });
    });


- Preview
[Javascript] Move topic popup [Moderator panel improvement] MoidYgz




©️ PunBB Design


[Javascript] Move topic popup [Moderator panel improvement] Act_bottom If you have any questions related to this topic create a topic with the following title:
Move topic popup [Moderator panel improvement]

Powered by PunBB
Currently 0 users have thanked Shadow for this post:

2
Offline

  Udarsha45

Udarsha45
Punbb Rookie
Punbb Rookie
thanks

Powered by PunBB
Currently 0 users have thanked Udarsha45 for this post:

3
Offline

  Ethen

Ethen
Punbb Rookie
Punbb Rookie
Very nice code Smile thanks

Powered by PunBB
Currently 0 users have thanked Ethen for this post:

4
Offline

  Michael_vx

Michael_vx
Punbb Junior
Punbb Junior
Shadow wrote:[link="/t601-javascript-move-topic-popup-moderator-panel-improvement#3496"]

[Javascript] Move topic popup [Moderator panel improvement] Alerte10

Tutorial: Move topic popup [Moderator panel improvement]

With this script, you can easily move the topic with a click on the move button without page refresh. The default button for move icon looks like [Javascript] Move topic popup [Moderator panel improvement] Topic_move1
Credit goes to @Hancki

--> Tutorials, tips and tricks <--
Move topic popup [Moderator panel improvement]



- Javascript
Placement:In the topics.
Don't forget to click your move button twice!
Code:
[panda=js]    jQuery(function() {
        jQuery('a[href*="/modcp?mode=move&"]').click(function() {
            jQuery(this).hide();
            var imgMove = jQuery(this).find('img').attr('src');
            jQuery(this).after('<a href="#openModal"><img src="' + imgMove + '"</a>');
            t = "jQuery(this).closest('form').remove()";
            jQuery(this).after('<div id="openModal" class="modalDialog"> <div> <a href="#close" title="Close" class="close">X</a> <h2>Move Topic</h2><br/><br/> <form action="/modcp?tid=' + jQuery('input[name="tid"]:eq(0)').val() + '" method=post style=text-align:center;font-size:12px>Move to: <select name=new_forum id=movetopic>' + jQuery('select[name="selected_id"]:eq(0)').html() + '</select><br><br><input name=move_leave_shadow type=checkbox> Leave shadow topic in old forum?<br><br><input type=hidden name=mode value=move><input type=hidden name=t value="' + jQuery('input[name="t"]:eq(0)').val() + '"><input class=button2 type=submit name=confirm value=Yes> <input class=button2 type=submit name=cancel value=No onclick="' + t + ';return false"><br><br></form> </div> </div> <style> .modalDialog { position: fixed; font-family: Arial, Helvetica, sans-serif; top: 0; right: 0; bottom: 0; left: 0; background: rgba(0,0,0,0.8); z-index: 99999; opacity:0; -webkit-transition: opacity 400ms ease-in; -moz-transition: opacity 400ms ease-in; transition: opacity 400ms ease-in; pointer-events: none; } .modalDialog:target { opacity:1; pointer-events: auto; } .modalDialog > div { width: 400px; position: relative; margin: 10% auto; padding: 5px 20px 13px 20px; border-radius: 10px; background: #fff; background: -moz-linear-gradient(#fff, #999); background: -webkit-linear-gradient(#fff, #999); background: -o-linear-gradient(#fff, #999); } .close { background: #606061; color: #FFFFFF; line-height: 25px; position: absolute; right: -12px; text-align: center; top: -10px; width: 24px; text-decoration: none; font-weight: bold; -webkit-border-radius: 12px; -moz-border-radius: 12px; border-radius: 12px; -moz-box-shadow: 1px 1px 3px #000; -webkit-box-shadow: 1px 1px 3px #000; box-shadow: 1px 1px 3px #000; } .close:hover { background: #00d9ff; } #openModal {color:black!important;} #openModal h2 {font-size: 20px !important;text-align:center; font-weight: bold;}</style>');
            return false;
        });
    });


- Preview
[Javascript] Move topic popup [Moderator panel improvement] MoidYgz




©️ PunBB Design


[Javascript] Move topic popup [Moderator panel improvement] Act_bottom If you have any questions related to this topic create a topic with the following title:
Move topic popup [Moderator panel improvement]

great thanks so much and will be super great if you help me to make Yes and no buttons little biger Very Happy
thanks again

Powered by PunBB
Currently 0 users have thanked Michael_vx for this post:

5
Offline

  Michael_vx

Michael_vx
Punbb Junior
Punbb Junior
Shadow wrote:[link="/t601-javascript-move-topic-popup-moderator-panel-improvement#3496"]

[Javascript] Move topic popup [Moderator panel improvement] Alerte10

Tutorial: Move topic popup [Moderator panel improvement]

With this script, you can easily move the topic with a click on the move button without page refresh. The default button for move icon looks like [Javascript] Move topic popup [Moderator panel improvement] Topic_move1
Credit goes to @Hancki

--> Tutorials, tips and tricks <--
Move topic popup [Moderator panel improvement]



- Javascript
Placement:In the topics.
Don't forget to click your move button twice!
Code:
[panda=js]    jQuery(function() {
        jQuery('a[href*="/modcp?mode=move&"]').click(function() {
            jQuery(this).hide();
            var imgMove = jQuery(this).find('img').attr('src');
            jQuery(this).after('<a href="#openModal"><img src="' + imgMove + '"</a>');
            t = "jQuery(this).closest('form').remove()";
            jQuery(this).after('<div id="openModal" class="modalDialog"> <div> <a href="#close" title="Close" class="close">X</a> <h2>Move Topic</h2><br/><br/> <form action="/modcp?tid=' + jQuery('input[name="tid"]:eq(0)').val() + '" method=post style=text-align:center;font-size:12px>Move to: <select name=new_forum id=movetopic>' + jQuery('select[name="selected_id"]:eq(0)').html() + '</select><br><br><input name=move_leave_shadow type=checkbox> Leave shadow topic in old forum?<br><br><input type=hidden name=mode value=move><input type=hidden name=t value="' + jQuery('input[name="t"]:eq(0)').val() + '"><input class=button2 type=submit name=confirm value=Yes> <input class=button2 type=submit name=cancel value=No onclick="' + t + ';return false"><br><br></form> </div> </div> <style> .modalDialog { position: fixed; font-family: Arial, Helvetica, sans-serif; top: 0; right: 0; bottom: 0; left: 0; background: rgba(0,0,0,0.8); z-index: 99999; opacity:0; -webkit-transition: opacity 400ms ease-in; -moz-transition: opacity 400ms ease-in; transition: opacity 400ms ease-in; pointer-events: none; } .modalDialog:target { opacity:1; pointer-events: auto; } .modalDialog > div { width: 400px; position: relative; margin: 10% auto; padding: 5px 20px 13px 20px; border-radius: 10px; background: #fff; background: -moz-linear-gradient(#fff, #999); background: -webkit-linear-gradient(#fff, #999); background: -o-linear-gradient(#fff, #999); } .close { background: #606061; color: #FFFFFF; line-height: 25px; position: absolute; right: -12px; text-align: center; top: -10px; width: 24px; text-decoration: none; font-weight: bold; -webkit-border-radius: 12px; -moz-border-radius: 12px; border-radius: 12px; -moz-box-shadow: 1px 1px 3px #000; -webkit-box-shadow: 1px 1px 3px #000; box-shadow: 1px 1px 3px #000; } .close:hover { background: #00d9ff; } #openModal {color:black!important;} #openModal h2 {font-size: 20px !important;text-align:center; font-weight: bold;}</style>');
            return false;
        });
    });


- Preview
[Javascript] Move topic popup [Moderator panel improvement] MoidYgz




©️ PunBB Design


[Javascript] Move topic popup [Moderator panel improvement] Act_bottom If you have any questions related to this topic create a topic with the following title:
Move topic popup [Moderator panel improvement]

great thanks so much and will be super great if you help me to make Yes and no buttons little biger Very Happy
thanks again

Powered by PunBB
Currently 0 users have thanked Michael_vx for this post:

6
Offline

  Sponsored content



Powered by PunBB
Currently 0 users have thanked Sponsored content for this post:

View previous topic View next topic Back to top Message [Page 1 of 1]


Topic URL's

URL
BBcode
HTML

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