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.

Login fail

View previous topic View next topic Go down

Login fail

Post by leon.javor on February 13th 2015, 12:00 am

I want thet when somebody get ban i put some pitcure and when somebody log in fail pitchure is there ..how i can do it  :wouhou:

leon.javor
New Member

Posts : 7
Reputation : 1
Language : Croatian

Back to top Go down

Re: Login fail

Post by brandon_g on February 13th 2015, 12:16 am

Hi,

Do you mean a custom banned screen?


Remember to mark your topic when a solution is found.

brandon_g
Support Moderator
Support Moderator

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

http://broadcastingduo.forumotion.com/

Back to top Go down

Re: Login fail

Post by Agent Ward on February 13th 2015, 3:00 am

Currently impossible as far as I know. There is a thread in the forum suggestion thing here that you can support by casting your vote of 'yes' which will allow you to create a custom ban screen, thus enabling you to show this 'custom picture' of yours to any user that gets banned.

Agent Ward
Forumember

Male Posts : 38
Reputation : 2
Language : English.
Location : California.

http://spamheaven.cakeforum.biz/

Back to top Go down

Re: Login fail

Post by Eugeo Igvalt on February 13th 2015, 5:15 am

@leon.javor wrote:I want thet when somebody get ban i put some pitcure and when somebody log in fail pitchure is there ..how i can do it  :wouhou:

Try this: http://liquidcode.forumotion.com/t67-custom-banned-screen-2-0

Eugeo Igvalt
Forumember

Male Posts : 287
Reputation : 17
Language : EN, SPA
Location : Puerto Rico

http://www.NewbForums.com

Back to top Go down

Re: Login fail

Post by _Twisted_Mods_ on February 13th 2015, 5:17 am

This isn't really a connection problem so im going to move it to Scripts (Coding) Problems

_Twisted_Mods_
Helper
Helper

Male Posts : 2032
Reputation : 302
Language : English
Location : Ms

http://liquidcode.forumotion.com

Back to top Go down

Re: Login fail

Post by _Twisted_Mods_ on February 13th 2015, 5:24 am

the url provided above is a link to my forum with you and that code is for phpbb3 ..here is the one you will need for phpbb2







Go to Administration Panel > Modules > JavaScript codes management
make sure JavaScript management is turned on if not turn it on and save
then create a new script.
Title: Your choice
Placement: In All Pages
Paste the code below and submit :
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($('table:contains(You have been banned)')){
    a =  $('table:contains(You have been banned)').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>');
    $('table:contains(You have been banned)').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><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></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">  &nbsp;<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 = $('.catLeft .module-title').eq(0).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..');
    };
    });
    });
    });

limages is a list of the random images that will show .. remove or add to the list as you wish... if you dont want to display a image just use .. http://illiweb.com/fa/empty.gif as the image

each image is wrapped in ' ' and separated with a comma,

_Twisted_Mods_
Helper
Helper

Male Posts : 2032
Reputation : 302
Language : English
Location : Ms

http://liquidcode.forumotion.com

Back to top Go down

Re: Login fail

Post by leon.javor on February 13th 2015, 10:12 am

i put code and it dont work :/

leon.javor
New Member

Posts : 7
Reputation : 1
Language : Croatian

Back to top Go down

Re: Login fail

Post by leon.javor on February 13th 2015, 10:15 am

@brandon_g wrote:Hi,

Do you mean a custom banned screen?
yes

leon.javor
New Member

Posts : 7
Reputation : 1
Language : Croatian

Back to top Go down

Re: Login fail

Post by _Twisted_Mods_ on February 13th 2015, 10:33 am

can you provide me with your forum url so i can see if theirs any errors with maybe one of your other script because this script works i tested it multiple times

_Twisted_Mods_
Helper
Helper

Male Posts : 2032
Reputation : 302
Language : English
Location : Ms

http://liquidcode.forumotion.com

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