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.

Is it possible to change the ban error message?

View previous topic View next topic Go down

Solved Is it possible to change the ban error message?

Post by Thor2 on March 21st 2014, 9:51 am

Well I was just curious if you could change what is displayed on the ban message. It there a way? one of my staff users said I should change the IP ban message to "Game Over"- something amusing like that.

thanks.


Last edited by Yuri31 on March 22nd 2014, 10:27 am; edited 1 time in total

Thor2
Forumember

Male Posts : 59
Reputation : 1
Language : English and French

http://pwcnews.html-5.me/pwc/forum/index.php

Back to top Go down

Solved Re: Is it possible to change the ban error message?

Post by Pizza Boi on March 21st 2014, 9:55 am

Hi Very Happy

I'm not so hot with Javascript but you might be able to rewrite the code found here.

Regards,
Pizza Boi

Pizza Boi
Hyperactive

Male Posts : 2016
Reputation : 160
Language : French
Location : Pizza Hut!

http://redlustempire.forumtl.com/

Back to top Go down

Solved Re: Is it possible to change the ban error message?

Post by Thor2 on March 21st 2014, 9:56 am

@Pizza Boi- Thanks for replying so fast. Is it possible to rewrite your coding with Phpbb3?

Thanks!


Smile

Thor2
Forumember

Male Posts : 59
Reputation : 1
Language : English and French

http://pwcnews.html-5.me/pwc/forum/index.php

Back to top Go down

Solved Re: Is it possible to change the ban error message?

Post by Pizza Boi on March 21st 2014, 10:37 am

Hi Very Happy

Sorry, but this is the best I can do :/....

Add this in Javascript and tick it in: "In all pages"

Code:
$(function() {
if (window.location.href.indexOf('/login') > 0) {
$('.panel p').after('<div><span class="derp" style="font-size:18px; line-height:1.4em;margin-bottom:1em;">You are banned!</span></div>')
}
});

You can replace the style there. Be careful, don't delete class="derp" as we will use that in the CSS.

Add this code in the CSS:

Code:
.panel p {
font-size: 0px;
}

That will delete the original message and if you think that it is not aligned properly on the top, add this:

Code:
margin-top: #px;

Regards,
Pizza Boi

Pizza Boi
Hyperactive

Male Posts : 2016
Reputation : 160
Language : French
Location : Pizza Hut!

http://redlustempire.forumtl.com/

Back to top Go down

Solved Re: Is it possible to change the ban error message?

Post by Thor2 on March 21st 2014, 10:44 am

In this page, you can modify templates and change your forum look.
Modified templates are written in green.
(unpublished templates are shown red) To use the default template again, delete your template by clicking ondelete.

Only templates ofphpbb2 or PunBB versionswill be affected.

Thor2
Forumember

Male Posts : 59
Reputation : 1
Language : English and French

http://pwcnews.html-5.me/pwc/forum/index.php

Back to top Go down

Solved Re: Is it possible to change the ban error message?

Post by Pizza Boi on March 21st 2014, 10:48 am

Hi Very Happy

Huh? That's weird because it worked for me.



By any chance, where did you attempt to put the codes since there is no need for template editing.

Regards,
Pizza Boi

Pizza Boi
Hyperactive

Male Posts : 2016
Reputation : 160
Language : French
Location : Pizza Hut!

http://redlustempire.forumtl.com/

Back to top Go down

Solved Re: Is it possible to change the ban error message?

Post by Thor2 on March 21st 2014, 10:50 am

Ah I know what the problem is. I was looking at the wrong coding place. lol.


Alright lets see if it works.

Thanks again! Smile

Thor2
Forumember

Male Posts : 59
Reputation : 1
Language : English and French

http://pwcnews.html-5.me/pwc/forum/index.php

Back to top Go down

Solved Re: Is it possible to change the ban error message?

Post by Pizza Boi on March 21st 2014, 10:53 am

Hi Very Happy

Just posted here so you wouldn't get cased for Double Posting x_x ...

Anyway, please just reply if it works Smile.

Regards,
Pizza Boi

Pizza Boi
Hyperactive

Male Posts : 2016
Reputation : 160
Language : French
Location : Pizza Hut!

http://redlustempire.forumtl.com/

Back to top Go down

Solved Re: Is it possible to change the ban error message?

Post by Thor2 on March 21st 2014, 10:56 am

So I tried it, but all it says is Critical Information.:/

Thor2
Forumember

Male Posts : 59
Reputation : 1
Language : English and French

http://pwcnews.html-5.me/pwc/forum/index.php

Back to top Go down

Solved Re: Is it possible to change the ban error message?

Post by Pizza Boi on March 21st 2014, 11:03 am

Hi Very Happy

Can you please screenshot it? Also, provide your forum URL please.

Regards,
Pizza Boi

Pizza Boi
Hyperactive

Male Posts : 2016
Reputation : 160
Language : French
Location : Pizza Hut!

http://redlustempire.forumtl.com/

Back to top Go down

Solved Re: Is it possible to change the ban error message?

Post by Thor2 on March 21st 2014, 11:53 am

Okay. Link to site-http://thelandsofthewolves3.forumotion.com/



Thor2
Forumember

Male Posts : 59
Reputation : 1
Language : English and French

http://pwcnews.html-5.me/pwc/forum/index.php

Back to top Go down

Solved Re: Is it possible to change the ban error message?

Post by Pizza Boi on March 21st 2014, 11:56 am

Hi Very Happy

Please provide me an admin test account. I can't do this as a guest, sorry and it'll be faster that way since I'll be manipulating your forum from 2 browsers and 2 accounts so there are 4 things I need from you at the moment.

1. Admin test account
2. Test account
3. The code you used for Javascript
4. The code you used for CSS

Regards,
Pizza Boi

Pizza Boi
Hyperactive

Male Posts : 2016
Reputation : 160
Language : French
Location : Pizza Hut!

http://redlustempire.forumtl.com/

Back to top Go down

Solved Re: Is it possible to change the ban error message?

Post by Thor2 on March 21st 2014, 12:03 pm

you can create an account. I do not have any junk emails. Now the I agree message is messaged up on the registration thing. Great. bwi

Thor2
Forumember

Male Posts : 59
Reputation : 1
Language : English and French

http://pwcnews.html-5.me/pwc/forum/index.php

Back to top Go down

Solved Re: Is it possible to change the ban error message?

Post by Pizza Boi on March 21st 2014, 12:08 pm

Hi Very Happy

Can you please make Pizza Boi an admin for awhile please? I'll remove it once I'm done, thank you Smile.

Regards,
Pizza Boi

Pizza Boi
Hyperactive

Male Posts : 2016
Reputation : 160
Language : French
Location : Pizza Hut!

http://redlustempire.forumtl.com/

Back to top Go down

Solved Re: Is it possible to change the ban error message?

Post by Thor2 on March 21st 2014, 12:09 pm

Okay done.

Thor2
Forumember

Male Posts : 59
Reputation : 1
Language : English and French

http://pwcnews.html-5.me/pwc/forum/index.php

Back to top Go down

Solved Re: Is it possible to change the ban error message?

Post by Pizza Boi on March 21st 2014, 12:52 pm

Hi Very Happy

LOL. I cannot believe eating hamburger would give me this idea xD. I'm so sorry for the first codes, I didn't realize I generalized it too much, lol.

Add this in CSS instead please Smile

Code:
#main-content > div > div > div > span.derp {
font-size: 10px !important;
}

#main-content > div > div > p {
font-size: 0px;
}

#main-content a.cgu-buttons {
padding: 13px 45px;
font-size: 12px;
margin: 10px;
}

And then add this in Javascript with the same settings Smile.

Code:
$(function() {
if (window.location.href.indexOf('/login') > 0) {
$('#main-content > div > div > p').after('<div><span class="derp" style="font-size:10px; line-height:1.4em;margin-bottom:1em;">You are banned!</span></div>')
}
});

Regards,
Pizza Boi

Edit: Sorry Sad... I believe this bit will provide some future problems :/ ...

Code:
#main-content > div > div > p {
font-size: 0px;
}

I do not know the specific selectors for the message in "Information" for Log In because it shows the same selectors for registering, and posting :/ ... I'm really sorry :/ ...


Pizza Boi
Hyperactive

Male Posts : 2016
Reputation : 160
Language : French
Location : Pizza Hut!

http://redlustempire.forumtl.com/

Back to top Go down

Solved Re: Is it possible to change the ban error message?

Post by Ange Tuteur on March 21st 2014, 5:02 pm

Hello,

I do not really remember what the IP banned error message is, but you could do something like :
Code:
$(function() {
  var banMSG = 'Game over';
  $('.panel p:contains(You have been banned)').text(banMSG)
});

.panel p:contains(You have been banned) checks a panels p element for the string 'You have been banned', we then rewrite its textual content.

Ange Tuteur
Forumaster

Male Posts : 13021
Reputation : 2683
Language : EN10, FR5
Location : Pennsylvania

http://fmdesign.forumotion.com

Back to top Go down

Solved Re: Is it possible to change the ban error message?

Post by Pizza Boi on March 22nd 2014, 8:16 am

@Ange Tuteur wrote:Hello,

I do not really remember what the IP banned error message is, but you could do something like :
Code:
$(function() {
  var banMSG = 'Game over';
  $('.panel p:contains(You have been banned)').text(banMSG)
});

.panel p:contains(You have been banned) checks a panels p element for the string 'You have been banned', we then rewrite its textual content.
Hi Very Happy

@OP: This code works perfectly. I've tried it and then it doesn't change the ones that was a problem for my code Sad... I suck so much -.-

Anyway, change You have been banned to You have been banned from this forum.

Regards,
Pizza Boi

Pizza Boi
Hyperactive

Male Posts : 2016
Reputation : 160
Language : French
Location : Pizza Hut!

http://redlustempire.forumtl.com/

Back to top Go down

Solved Re: Is it possible to change the ban error message?

Post by Thor2 on March 22nd 2014, 9:56 am

Where do I add this code now?

Thor2
Forumember

Male Posts : 59
Reputation : 1
Language : English and French

http://pwcnews.html-5.me/pwc/forum/index.php

Back to top Go down

Solved Re: Is it possible to change the ban error message?

Post by Pizza Boi on March 22nd 2014, 10:08 am

Yuri31 wrote:Where do I add this code now?

Hi Very Happy

ACP < Modules < Javascript Management < Create a new javascript < Tick it in "All pages" and name it ban message < Paste the code < Save

Remember: Change "You have been banned" to "You have been banned from this forum." and you can change "Game Over" to any text you want.

Regards,
Pizza Boi

Pizza Boi
Hyperactive

Male Posts : 2016
Reputation : 160
Language : French
Location : Pizza Hut!

http://redlustempire.forumtl.com/

Back to top Go down

Solved Re: Is it possible to change the ban error message?

Post by Thor2 on March 22nd 2014, 10:25 am

FINALLY! Thank you guys both so much! Very helpful!!! Very HappyVery HappyVery Happy

Thor2
Forumember

Male Posts : 59
Reputation : 1
Language : English and French

http://pwcnews.html-5.me/pwc/forum/index.php

Back to top Go down

Solved Re: Is it possible to change the ban error message?

Post by Pizza Boi on March 22nd 2014, 10:26 am

Hi Very Happy

Thanks Ange the most here Wink . I suck too much at JS Sad .

The pizza's here! That'd be 2.99$ Wink .

No problem~

Regards,
Pizza Boi

Pizza Boi
Hyperactive

Male Posts : 2016
Reputation : 160
Language : French
Location : Pizza Hut!

http://redlustempire.forumtl.com/

Back to top Go down

Solved Re: Is it possible to change the ban error message?

Post by Jophy on March 22nd 2014, 4:04 pm

Solved

Jophy
ForumGuru

Male Posts : 17924
Reputation : 835
Language : English
Location : Somewhere

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