The forum of the forums
Welcome to the Official Support Forum of Forumotion!

To take full advantage of everything offered by our forum, please log in if you are already a member, or join our community if you've not yet.



Create a free forum like this one.

Custom Banned Screen How to change the word in another language.

View previous topic View next topic Go down

In progress Custom Banned Screen How to change the word in another language.

Post by smurfavr on June 23rd 2015, 11:47 pm

How to change the word in another language.
http://help.forumotion.com/t139302-custom-ban-screen



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'];
var a="",namee = "", reason = "",days = "",given = "",exspires = "",comment = "";
    var lognmsg,usrsname,element; 
    if (document.getElementById('wrap')){
        element = '#wrap';
        usrsname =  $('#profile-advanced-right .module').eq(0).find('.h3').text();
        lognmsg = $('.page-title').next('p').text();}//phpbb3
   
    else if ($('.bodylinewidth').length){
        element = '.bodylinewidth';
        usrsname =  $('.catLeft .module-title').eq(0).text();
            lognmsg = $('.forumline table:contains(You have been banned)').text();} //phpbb2
   
    else if ($('.pun').length){
        element = '.pun';
        usrsname =  $('#profile-advanced-right .module').eq(0).find('.h3').text();
        lognmsg = $('.message').text();}  //punbb
   
    else if (document.getElementById('ipbwrapper')){
        element = '#ipbwrapper';
        usrsname =  $('#profile-advanced-right .module').eq(0).find('h3').text();
        lognmsg = $('.msg').text();}; //invision


function getimage() {return limages[Math.floor(Math.random() * limages.length)];};
   


            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">Банни този потребител<h3><table><tbody><tr><td>За колко дни да е бана:</td><td><input id="hdays" type="text"></td></tr><tr><td>Причина за бан: </td><td><input id="treason" type="text"></td></tr><tr><td>Бан коментар:</td><td><input id="tcomment"type="text"></td></tr></tbody></table><div id="tbanbutton" ><input value="Бан" type="button">  <span id="banstatus"></div></div>');
                        };
              if(lognmsg.match('banned')){
            a =  lognmsg;
            namee = a.match(/usn-(.*?)-usn/,'$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>');
            $(element).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></div></center>');
            };
            if($('strong:contains(This member is banned)').length==1||$('strong:contains(This member is already banned)').length==1){
                            var obpro,tmiban;
                            if($('strong:contains(This member is banned)').length==1){tmiban='strong:contains(This member is banned)'; obpro = $('strong:contains(This member is banned)').html(); }
                                if($('strong:contains(This member is already banned)').length==1){tmiban='strong:contains(This member is already banned)'; obpro = $('strong:contains(This member is already banned)').html();}
            obpro = obpro.replace(/<\/a>(.*)/,'</a><br><span id="hidebanbox">$1</span>');
            $(tmiban).html(obpro);
              var a="",namee = "", reason = "",days = "",given = "",exspires = "",comment = "";
            if($('#hidebanbox').length==1){
            a =  $('#hidebanbox').text();
            namee = a.match(/usn-(.*?)-usn/,'$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>, беше <b>баннат</b> от <b>този форум </b>за следното:</span><br><span>Причина: <b>'+reason[1]+'</b></span><br><span>Баннат на: <b>'+given[1]+'</b></span><br><span>Продължителност на бана: <b>'+days[1]+' Дни.</b></span><br><span>Изтичане на бана: <b>'+exspires[1]+'</b></span><br><span>Коментар: <b>'+comment[1]+'</b></span></center></div>');
            };
            };
                            $('#tcomment').keyup(function(){
            var uname = usrsname.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 = 'usn-'+uname+'-usn 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 = usrsname.replace(/ \(online\)/,'');
            var days = $('#hdays').val();
            var reason = $('#treason').val();
            var comment = $('#tcomment').val();
            var uid = location.pathname.replace('/u','');
var exp1 = new Date();
var exp2 = new Date();
exp2.setDate(exp2.getDate()+parseInt(days));
            var day  = exp1.getDate();
            var month = exp1.getMonth() + 1;           
            var year =  exp1.getFullYear();
            var day2  = exp2.getDate();
            var month2 = exp2.getMonth() + 1;           
            var year2 =  exp2.getFullYear();
            var givn =month+'/'+day+'/'+year;
            var exp = month2+'/'+day2+'/'+year2;
  if (days ==""){ days ='Forever';exp='Never';};
            var thelist = 'usn-'+uname+'-usn 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: days,
            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..');
            };
            });
            });
            });


Last edited by smurfavr on June 24th 2015, 11:48 am; edited 1 time in total

smurfavr
Active Poster

Male Posts : 1425
Reputation : 13
Language : Bulgarian

http://smurfa.bulgarianforum.net/

Back to top Go down

In progress Re: Custom Banned Screen How to change the word in another language.

Post by Ange Tuteur on June 24th 2015, 10:59 am

Hi @smurfavr,

Find the following part in the script :
Code:
has been <b>banned</b> from <b>This Forum</b> for the following:</span>


Ange Tuteur
Forumaster

Male Posts : 13028
Reputation : 2704
Language : EN10, FR5
Location : Pennsylvania

http://fmdesign.forumotion.com

Back to top Go down

In progress Re: Custom Banned Screen How to change the word in another language.

Post by smurfavr on June 24th 2015, 11:37 am

Thank you Ange Tuteur.
Why ban when user appears reason which has no related words like these.
How to fix this?
usn-koko76 -usn rsn-СМУРФА-rsn givn-6/24/2015-givn dys-2-dys exp-6/26/2015-exp com-ХАХА-com

smurfavr
Active Poster

Male Posts : 1425
Reputation : 13
Language : Bulgarian

http://smurfa.bulgarianforum.net/

Back to top Go down

In progress Re: Custom Banned Screen How to change the word in another language.

Post by Ange Tuteur on June 24th 2015, 12:17 pm

I believe that's used by the script to identify certain portions of text for insertion into the ban message. In short; removing that would most likely cause the script to not function properly.

Ange Tuteur
Forumaster

Male Posts : 13028
Reputation : 2704
Language : EN10, FR5
Location : Pennsylvania

http://fmdesign.forumotion.com

Back to top Go down

In progress Re: Custom Banned Screen How to change the word in another language.

Post by smurfavr on June 24th 2015, 12:23 pm

1. Can you replace these WORDS WITH OTHER THAT ARE understandably?

2. Why ban a user did not show a picture.

smurfavr
Active Poster

Male Posts : 1425
Reputation : 13
Language : Bulgarian

http://smurfa.bulgarianforum.net/

Back to top Go down

In progress Re: Custom Banned Screen How to change the word in another language.

Post by smurfavr on June 27th 2015, 11:31 am

Up

smurfavr
Active Poster

Male Posts : 1425
Reputation : 13
Language : Bulgarian

http://smurfa.bulgarianforum.net/

Back to top Go down

In progress Re: Custom Banned Screen How to change the word in another language.

Post by smurfavr on July 3rd 2015, 12:27 pm

Up

smurfavr
Active Poster

Male Posts : 1425
Reputation : 13
Language : Bulgarian

http://smurfa.bulgarianforum.net/

Back to top Go down

In progress Re: Custom Banned Screen How to change the word in another language.

Post by smurfavr on July 5th 2015, 10:57 am

Up

smurfavr
Active Poster

Male Posts : 1425
Reputation : 13
Language : Bulgarian

http://smurfa.bulgarianforum.net/

Back to top Go down

In progress Re: Custom Banned Screen How to change the word in another language.

Post by smurfavr on July 8th 2015, 2:29 pm

Up

smurfavr
Active Poster

Male Posts : 1425
Reputation : 13
Language : Bulgarian

http://smurfa.bulgarianforum.net/

Back to top Go down

In progress Re: Custom Banned Screen How to change the word in another language.

Post by brandon_g on July 8th 2015, 3:26 pm

Hello,


I believe this script was written by @_Twisted_Mods_ , so he would be your best bet to figure out what to do what your asking.


-Brandon

brandon_g
Support Moderator
Support Moderator

Male Posts : 5362
Reputation : 489
Language : English
Location : USA

http://broadcastingduo.forumotion.com/

Back to top Go down

In progress Re: Custom Banned Screen How to change the word in another language.

Post by smurfavr on July 9th 2015, 7:37 pm

He does not want to tell you how to fix it.

smurfavr
Active Poster

Male Posts : 1425
Reputation : 13
Language : Bulgarian

http://smurfa.bulgarianforum.net/

Back to top Go down

In progress Re: Custom Banned Screen How to change the word in another language.

Post by APE on July 10th 2015, 12:11 am

@smurfavr wrote:He does not want to tell you how to fix it.

How do you know he don't want to help fix this for you ? he has not been on that much to say he will not help you.





APE
Manager
Manager

Male Posts : 8648
Reputation : 762
Language : fluent in dork / mumbojumbo & English haha
Location : STUCK IN FORUMOTIONS SERVERS HELP ME !!!!!!

http://chatworld.forumotion.co.uk/

Back to top Go down

In progress Re: Custom Banned Screen How to change the word in another language.

Post by smurfavr on July 10th 2015, 12:18 pm

@APE wrote:
@smurfavr wrote:He does not want to tell you how to fix it.

How do you know he don't want to help fix this for you ? he has not been on that much to say he will not help you.

I wrote to him a week ago ls help.

smurfavr
Active Poster

Male Posts : 1425
Reputation : 13
Language : Bulgarian

http://smurfa.bulgarianforum.net/

Back to top Go down

In progress Re: Custom Banned Screen How to change the word in another language.

Post by smurfavr on July 12th 2015, 1:47 am

up

smurfavr
Active Poster

Male Posts : 1425
Reputation : 13
Language : Bulgarian

http://smurfa.bulgarianforum.net/

Back to top Go down

In progress Re: Custom Banned Screen How to change the word in another language.

Post by brandon_g on July 12th 2015, 5:45 pm

Where did you write to him at?


Remember to mark your topic when a solution is found.

brandon_g
Support Moderator
Support Moderator

Male Posts : 5362
Reputation : 489
Language : English
Location : USA

http://broadcastingduo.forumotion.com/

Back to top Go down

In progress Re: Custom Banned Screen How to change the word in another language.

Post by smurfavr on July 16th 2015, 1:22 am

up

smurfavr
Active Poster

Male Posts : 1425
Reputation : 13
Language : Bulgarian

http://smurfa.bulgarianforum.net/

Back to top Go down

In progress Re: Custom Banned Screen How to change the word in another language.

Post by brandon_g on July 16th 2015, 2:35 pm

@brandon_g wrote:Where did you write to him at?


Was just asking because, when you contacted him maybe he was busy and didn't have time to assist you with the code, I would just be patient or maybe someone else can help modify the code. I would just be patient until that time. You got the script from liquidcodes right?


-Brandon

brandon_g
Support Moderator
Support Moderator

Male Posts : 5362
Reputation : 489
Language : English
Location : USA

http://broadcastingduo.forumotion.com/

Back to top Go down

In progress Re: Custom Banned Screen How to change the word in another language.

Post by smurfavr on July 16th 2015, 9:39 pm

yes

smurfavr
Active Poster

Male Posts : 1425
Reputation : 13
Language : Bulgarian

http://smurfa.bulgarianforum.net/

Back to top Go down

In progress Re: Custom Banned Screen How to change the word in another language.

Post by smurfavr on July 24th 2015, 5:06 pm

Up

smurfavr
Active Poster

Male Posts : 1425
Reputation : 13
Language : Bulgarian

http://smurfa.bulgarianforum.net/

Back to top Go down

In progress Re: Custom Banned Screen How to change the word in another language.

Post by smurfavr on August 12th 2015, 12:58 pm

Up

smurfavr
Active Poster

Male Posts : 1425
Reputation : 13
Language : Bulgarian

http://smurfa.bulgarianforum.net/

Back to top Go down

In progress Re: Custom Banned Screen How to change the word in another language.

Post by smurfavr on August 14th 2015, 8:31 pm

Code should be fine because when you use does not appear that the option of switching from a mobile version in a classic version of the forum.

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'];
var a="",namee = "", reason = "",days = "",given = "",exspires = "",comment = "";
    var lognmsg,usrsname,element; 
    if (document.getElementById('wrap')){
        element = '#wrap';
        usrsname =  $('#profile-advanced-right .module').eq(0).find('.h3').text();
        lognmsg = $('.page-title').next('p').text();}//phpbb3
   
    else if ($('.bodylinewidth').length){
        element = '.bodylinewidth';
        usrsname =  $('.catLeft .module-title').eq(0).text();
            lognmsg = $('.forumline table:contains(You have been banned)').text();} //phpbb2
   
    else if ($('.pun').length){
        element = '.pun';
        usrsname =  $('#profile-advanced-right .module').eq(0).find('.h3').text();
        lognmsg = $('.message').text();}  //punbb
   
    else if (document.getElementById('ipbwrapper')){
        element = '#ipbwrapper';
        usrsname =  $('#profile-advanced-right .module').eq(0).find('h3').text();
        lognmsg = $('.msg').text();}; //invision


function getimage() {return limages[Math.floor(Math.random() * limages.length)];};
   


            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">Банни този потребител<h3><table><tbody><tr><td>За колко дни да е бана:</td><td><input id="hdays" type="text"></td></tr><tr><td>Причина за бан: </td><td><input id="treason" type="text"></td></tr><tr><td>Бан коментар:</td><td><input id="tcomment"type="text"></td></tr></tbody></table><div id="tbanbutton" ><input value="Бан" type="button">  <span id="banstatus"></div></div>');
                        };
              if(lognmsg.match('banned')){
            a =  lognmsg;
            namee = a.match(/usn-(.*?)-usn/,'$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>');
            $(element).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></div></center>');
            };
            if($('strong:contains(This member is banned)').length==1||$('strong:contains(This member is already banned)').length==1){
                            var obpro,tmiban;
                            if($('strong:contains(This member is banned)').length==1){tmiban='strong:contains(This member is banned)'; obpro = $('strong:contains(This member is banned)').html(); }
                                if($('strong:contains(This member is already banned)').length==1){tmiban='strong:contains(This member is already banned)'; obpro = $('strong:contains(This member is already banned)').html();}
            obpro = obpro.replace(/<\/a>(.*)/,'</a><br><span id="hidebanbox">$1</span>');
            $(tmiban).html(obpro);
              var a="",namee = "", reason = "",days = "",given = "",exspires = "",comment = "";
            if($('#hidebanbox').length==1){
            a =  $('#hidebanbox').text();
            namee = a.match(/usn-(.*?)-usn/,'$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>, беше <b>баннат</b> от <b>този форум </b>за следното:</span><br><span>Причина: <b>'+reason[1]+'</b></span><br><span>Баннат на: <b>'+given[1]+'</b></span><br><span>Продължителност на бана: <b>'+days[1]+' Дни.</b></span><br><span>Изтичане на бана: <b>'+exspires[1]+'</b></span><br><span>Коментар: <b>'+comment[1]+'</b></span></center></div>');
            };
            };
                            $('#tcomment').keyup(function(){
            var uname = usrsname.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 = 'usn-'+uname+'-usn 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 = usrsname.replace(/ \(online\)/,'');
            var days = $('#hdays').val();
            var reason = $('#treason').val();
            var comment = $('#tcomment').val();
            var uid = location.pathname.replace('/u','');
var exp1 = new Date();
var exp2 = new Date();
exp2.setDate(exp2.getDate()+parseInt(days));
            var day  = exp1.getDate();
            var month = exp1.getMonth() + 1;           
            var year =  exp1.getFullYear();
            var day2  = exp2.getDate();
            var month2 = exp2.getMonth() + 1;           
            var year2 =  exp2.getFullYear();
            var givn =month+'/'+day+'/'+year;
            var exp = month2+'/'+day2+'/'+year2;
  if (days ==""){ days ='Forever';exp='Never';};
            var thelist = 'usn-'+uname+'-usn 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: days,
            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..');
            };
            });
            });
            });

smurfavr
Active Poster

Male Posts : 1425
Reputation : 13
Language : Bulgarian

http://smurfa.bulgarianforum.net/

Back to top Go down

In progress Re: Custom Banned Screen How to change the word in another language.

Post by brandon_g on August 14th 2015, 8:38 pm

Sorry, I am not 100% sure if I understood. Are you saying it works properly on the mobile version, but not on classic version?


-Brandon


Remember to mark your topic when a solution is found.

brandon_g
Support Moderator
Support Moderator

Male Posts : 5362
Reputation : 489
Language : English
Location : USA

http://broadcastingduo.forumotion.com/

Back to top Go down

In progress Re: Custom Banned Screen How to change the word in another language.

Post by smurfavr on August 14th 2015, 8:42 pm

When the used code is not visible arrow from which switches to classic version of the forum.

smurfavr
Active Poster

Male Posts : 1425
Reputation : 13
Language : Bulgarian

http://smurfa.bulgarianforum.net/

Back to top Go down

In progress Re: Custom Banned Screen How to change the word in another language.

Post by brandon_g on August 14th 2015, 8:51 pm

Oh you mean it makes it to hard to switch between classic and mobile versions. Now I understand, when that happens, you can use the steps I told you about in your other thread to force your browser into classic mode.


-Brandon


Remember to mark your topic when a solution is found.

brandon_g
Support Moderator
Support Moderator

Male Posts : 5362
Reputation : 489
Language : English
Location : USA

http://broadcastingduo.forumotion.com/

Back to top Go down

In progress Re: Custom Banned Screen How to change the word in another language.

Post by smurfavr on August 14th 2015, 8:53 pm

Yes, I know. I say it to other users who do not know.

smurfavr
Active Poster

Male Posts : 1425
Reputation : 13
Language : Bulgarian

http://smurfa.bulgarianforum.net/

Back to top Go down

View previous topic View next topic Back to top


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