NIMBUZZ TOOLS FORUM-2016
Kєяλℓλ-ßυzZ ►☻◄ ƒøяυλ⁄(-2016

✽✽✽✽✽✽✽✽✽✽✽✽ нι gυєѕт ✽✽✽✽✽✽✽✽✽✽✽✽✽✽

♚♚♚♚ωєℓ¢σмє тσ ♚kєяαℓα♕ßυzz♚ zσηє♚♚♚♚

ρℓєαѕє яєgιѕтєя тσ gєт ƒυℓℓ α¢¢єѕѕ αη∂ ∂σωηℓσα∂ ѕтυƒƒ . σηℓү яεgιsтεяε∂ мεмвεя αℓℓσωε∂ vιεω sρεcιαℓ zσηε αη∂ ∂σωηℓσα∂ sтυғғ.

тнαηк уσυ

вαℓυ кяιsнηα !
Top posters
330 Posts - 28%
272 Posts - 23%
127 Posts - 11%
107 Posts - 9%
69 Posts - 6%
54 Posts - 5%
53 Posts - 4%
53 Posts - 4%
51 Posts - 4%
Top posting users this week
1 Post - 100%
Top posting users this month
6 Posts - 75%
1 Post - 13%
1 Post - 13%

Share
View previous topicGo downView next topic
avatar
KßZ ►☻◄ ƒøяυλ⁄(-αđмιиιѕтяαтσя
KßZ ►☻◄ ƒøяυλ⁄(-αđмιиιѕтяαтσя
Male
BALU KRISHNA
AGE : 29
POSTS : 330
REPUTATION : 47
KBZ TEAM POINTS : 923
JOIN DATE : 2013-12-04
BIRTHDAY : 1988-05-15
LOCATION : India , kerala
View user profilehttp://kbzteam.forums1.net

Javascript: Forum Custom banned screen

on Thu Dec 10, 2015 11:54 am
Message reputation : 100% (1 vote)


Tutorial: Custom banned screen

With this you can customize the banned screen which will be shown to the banned user.




--> Tutorials, tips and tricks <--
Custom banned screen ( Punbb )



- Javascript
Placement In all pages

Code:
       $(function(){
        var limages = ['http://www.rifenews.com/wp-content/uploads/2014/12/20141213_548c52a7a4c55.png','http://cdn.meme.am/instances/57622676.jpg','http://wordpressinaction.com/files/2014/06/ip.jpg','http://silverhawkarmy.files.wordpress.com/2010/10/banhammer_forecast.gif','http://istillgotoschool.files.wordpress.com/2014/04/you_shall_not_pass_road_sign_by_replicantcomplex-d5terv3.png?w=519','http://www.winsonyeung.com/wp-content/uploads/2012/10/banned.png'];
              function getimage() {
           return limages[Math.floor(Math.random() * limages.length)];
        };
           var namee = "", reason = "",days = "",given = "",exspires = "",comment = "";
        if($('.message').text().match('banned')){
        a =   $('.message').text();
        namee = a.match(/un-(.*?)-un/,'$1');
        reason = a.match(/rsn-(.*?)-rsn/,'$1');
        days = a.match(/dys-(.*?)-dys/,'$1');
        given = a.match(/givn-(.*?)-givn/,'$1');
        exspires = a.match(/exp-(.*?)-exp/,'$1');
        comment = a.match(/com-(.*?)-com/,'$1');
        $('head').append('<style>#banstuff { padding: 20px;margin-top: 10px;width: 600px;display: inline-block;border-radius: 10px; border: 1px solid black;box-shadow: 0px 30px 30px rgba(0, 0, 0, 0.3) inset, 0px -30px 30px rgba(255, 255, 255, 0.3) inset;}#banned img { max-height: 250px;border-radius: 10px;margin-top:10px;margin-bottom:10px;}#banned {width:80%;position: relative;color: #000 !important;font-size: 18px;background-color: #FFA500;border-radius: 50px; padding-bottom: 30px;box-shadow: 0px 50px 50px rgba(0, 0, 0, 0.3) inset, 0px -50px 50px rgba(255, 255, 255, 0.3) inset; border: 3px solid darkkhaki;}</style>');
        $('#main-content').html('<center><div id="banned"><img id="bannedimg" src="'+getimage()+'"><br><span>Hello <b>'+namee[1]+'</b>, you have been <b>banned</b> from <b>This Forum</b> for the following:</span><br><div id="banstuff"><span>Reason: <b>'+reason[1]+'</b></span><br><br><span>Ban Given: <b>'+given[1]+'</b></span><br><br><span>Ban Length: <b>'+days[1]+' Days.</b></span><br><br><span>Ban Expires: <b>'+exspires[1]+'</b></span><br><br><span>Comments: <b>'+comment[1]+'</b></span><span style="position:absolute;right:30px;bottom:10px;font-size:10px;color:rgba(0,0,0,0.3)!important;">Design & code by: <a style="color:rgba(0,0,0,0.3)!important;" "="" href="http://liquidcode.forumotion.com/">© Liquid Code</a></span></div></center>');
        };
        });
        $(function(){
         if($('strong:contains(This member is banned)').length==1){
        var obpro = $('strong:contains(This member is banned)').html();
        obpro = obpro.replace(/<\/a>(.*)/,'</a><br><span id="hidebanbox">$1</span>');
        $('strong:contains(This member is banned)').html(obpro);
           var namee = "", reason = "",days = "",given = "",exspires = "",comment = "";
        if($('#hidebanbox').length==1){
        a =   $('#hidebanbox').text();
        namee = a.match(/un-(.*)-un/,'$1');
        reason = a.match(/rsn-(.*)-rsn/,'$1');
        days = a.match(/dys-(.*)-dys/,'$1');
        given = a.match(/givn-(.*)-givn/,'$1');
        exspires = a.match(/exp-(.*)-exp/,'$1');
        comment = a.match(/com-(.*)-com/,'$1');
         $('head').append('<style>#hidebanbox{display:none;}#banstuff { padding: 20px;margin-top: 10px;width: 600px;display: inline-block;border-radius: 10px; border: 1px solid black;color:#000;background-color: #FFA500;box-shadow: 0px 30px 30px rgba(0, 0, 0, 0.3) inset, 0px -30px 30px rgba(255, 255, 255, 0.3) inset;}</style>');
        $('#hidebanbox').before('<divid="bannedbox"><center><div id="banstuff"><span><b>'+namee[1]+'</b>, has been <b>banned</b> from <b>This Forum</b> for the following:</span><br><span>Reason: <b>'+reason[1]+'</b></span><br><span>Ban Given: <b>'+given[1]+'</b></span><br><span>Ban Length: <b>'+days[1]+' Days.</b></span><br><span>Ban Expires: <b>'+exspires[1]+'</b></span><br><span>Comments: <b>'+comment[1]+'</b></span><span style="position:absolute;right:30px;bottom:10px;font-size:10px;color:rgba(0,0,0,0.3)!important;">Design & code by: <a style="color:rgba(0,0,0,0.3)!important;" "="" href="http://liquidcode.forumotion.com/">© Liquid Code</a></span></center></div>');
        };
         };
         if($('a[href*="mode=ban"]').length==1){
         $('head').append('<style>#tbanbutton {float:right;margin-top: -25px;}#banstatus {width: 200px;display: inline-block;}#tbanbutton input{color:#fff;background-color: rgba(255,0,0,01);font-weight: bold;border:1px solid grey;border-radius: 3px; box-shadow: 0px 5px 6px rgba(255, 255, 255, 0.5) inset, 0px -5px 6px rgba(0, 0, 0, 0.5) inset;}#banbox {color:#555;border-radius: 3px; background-color: #eee;box-shadow: 5px 5px 6px rgba(255, 255, 255, 0.5) inset, -5px -5px 6px rgba(0, 0, 0, 0.2) inset;padding: 10px;}.bantitle{border-bottom:1px solid black;color:black;}</style>');
    $('a[href*="mode=ban"]').css('display','none');
         };
         $('a[href*="mode=ban"]').parent().after('<div id="banbox"><h3 class="bantitle">Ban This User<h3><table><tbody><tr><td>Ban for how many days:</td><td><input id="hdays" type="text"></td></tr><tr><td>Reason for ban: </td><td><input id="treason" type="text"></td></tr><tr><td>Ban Comments:</td><td><input id="tcomment"type="text"></td></tr></tbody></table><div id="tbanbutton" ><input value="Ban User" type="button">   <span id="banstatus">Idle...</div></div>');
        $('#tcomment').keyup(function(){
         var uname = $('#profile-advanced-right .module').eq(0).find('.h3').text().replace(/ \(online\)/,'');
        var days = $('#hdays').val();
        var reason = $('#treason').val();
        var uid = location.pathname.replace('/u','');
        var day  = (new Date).getDate();  
        var month = (new Date).getMonth() + 1;              
        var year =  (new Date).getFullYear();
        var givn =month+'/'+day+'/'+year;
        var exp = month+'/'+(day+parseInt(days))+'/'+year;
         var thelist = 'un-'+uname+'-un rsn-'+reason+'-rsn givn-'+givn+'-givn dys-'+days+'-dys exp-'+exp+'-exp com--com';
        var hh = thelist.split('');
         $('#tcomment').attr('maxlength',255-hh.length);
        });
        $('#tbanbutton').click(function(){
        $('#banstatus').text('Banning User...');
         var uname = $('#profile-advanced-right .module').eq(0).find('.h3').text().replace(/ \(online\)/,'');
        var days = $('#hdays').val();
        var reason = $('#treason').val();
        var comment = $('#tcomment').val();
        var uid = location.pathname.replace('/u','');
        var day  = (new Date).getDate();  
        var month = (new Date).getMonth() + 1;              
        var year =  (new Date).getFullYear();
        var givn =month+'/'+day+'/'+year;
        var exp = month+'/'+(day+parseInt(days))+'/'+year;
         var thelist = 'un-'+uname+'-un rsn-'+reason+'-rsn givn-'+givn+'-givn dys-'+days+'-dys exp-'+exp+'-exp com-'+comment+'-com';

        jQuery.post('/modcp?tid='+document.getElementById('logout').href.replace(/.*tid=(.*?)&.*/,'$1'), {
         ban_user_date: 1,
         ban_user_reason:thelist,
         confirm:1,
         mode: 'ban',
         user_id: uid
        },function(data,status){
         if(data.match('This member has been banned')){
         $('#banstatus').text('User Banned..');
        location.reload();
         }else{
         $('#banstatus').text('Failed To Ban User..');
         };
        });
        });
        });


- Preview




  • Forum Creator :  balu♥krishna

    *  How do I change my settings?
    *  How do I add a signature to my post?
    *  How do I show an image below my username?
    *  How do I change my rank?
    *  How do I post a topic in a forum?
    *  Can I post Images?

    IF YOU HAVE ANY DOUBTS LIKE THIS THEN [You must be registered and logged in to see this link.]
    OR ADD ME ON [You must be registered and logged in to see this link.]
    CHEERZ...
    [You must be registered and logged in to see this link.]


avatar
KßZ ►☻◄ ƒøяυλ⁄(-мємвєя
KßZ ►☻◄ ƒøяυλ⁄(-мємвєя
Male
hussain
AGE : 26
POSTS : 10
REPUTATION : 3
KBZ TEAM POINTS : 23
JOIN DATE : 2015-04-25
BIRTHDAY : 1990-12-25
LOCATION : saudi arabia
View user profilehttp://www.hussain-software.officialforum.net

Re: Javascript: Forum Custom banned screen

on Thu Dec 10, 2015 4:58 pm
avatar
KßZ ►☻◄ ƒøяυλ⁄(-мємвєя
KßZ ►☻◄ ƒøяυλ⁄(-мємвєя
Babar
POSTS : 1
REPUTATION : 1
KBZ TEAM POINTS : 1
JOIN DATE : 2015-09-09
View user profile

Re: Javascript: Forum Custom banned screen

on Sun Dec 13, 2015 6:44 am
koi new nokia ka room flodae bna do yar bena mem k flod krna hai
Sponsored content

Re: Javascript: Forum Custom banned screen

View previous topicBack to topView next topic
Permissions in this forum:
You cannot reply to topics in this forum