Welcome Guest [Log In] [Register]
We hope you enjoy your visit.

You're currently viewing our forum as a guest. This means you are limited to certain areas of the board and there are some features you can't use. If you join our community, you'll be able to access member-only sections, and use many member-only features such as customizing your profile, sending personal messages, and voting in polls. Registration is simple, fast, and completely free.


Join our community!


If you're already a member please log in to your account to access all of our features:

Username:   Password:
Multiquote (on) Multiquote (off)
Add Reply
bbcode
Topic Started: May 15 2014, 03:56 PM (266 Views)
sdwe96
Member Avatar
Member
[ *  * ]
When using
Code:
 
[size=whatever]
is there a code that can limit how big the size number can be? Sometimes members make the text so big one letter fills the screen.
Edited by sdwe96, May 15 2014, 03:58 PM.
Offline Profile Quote Post Goto Top
 
Nemomon
Member Avatar
My dad's a soldier blue I'll be a soldier too
[ *  *  *  *  *  *  * ]
SIZE BBCode has limits as far as I know.

But the BIG BBCode doesn't. But You can disable it via Your Admin CP --> Preferences --> BBCodes.
Offline Profile Quote Post Goto Top
 
sdwe96
Member Avatar
Member
[ *  * ]
The people who do it use the size tag and they put a huge number in. I would hate to disable it because of a few jerks.
Offline Profile Quote Post Goto Top
 
Cory
Member Avatar
Member
[ *  *  *  *  *  *  *  *  * ]
Admin CP Posted Image Themes Posted Image Board Template Posted Image Below the Board
Code:
 
<script type="text/javascript">
$('button[name="post_submit"]').click(function (e) {
var maxSize = 20;
if ($('#c_post-text').val().indexOf('[/size]') !== -1) {
var size = parseInt($('#c_post-text').val().split('[size=')[1].split(']')[0], 10);
if (size > maxSize) {
e.returnValue = e.preventDefault && e.preventDefault() ? false : false;
alert('The size BBCode tag must have a value of ' + maxSize + ' or less');
}
}
});
</script>
Change the 20 to the maximum size in pixels you wish to allow for the size BBCode tag.
Offline Profile Quote Post Goto Top
 
1 user reading this topic (1 Guest and 0 Anonymous)
« Previous Topic · ZetaBoards - Theme & Code Support · Next Topic »
Add Reply