![]() |
exempt admin/mods from max characters in posts?
well...after much searching I haven't been able to find this
I have some team members that make very large posts with important information so I have to have my max characters at like 30,000 how would one be able to set that lower and make admin and mods exempt from that? vb version 2.2.x thanks for your help in advance |
1 Attachment(s)
I believe this will do it for you. You might have to tinker a bit and I haven't tested it.
|
yea...I had already tried that but it didn't work
I am thinking it needs to look something like PHP Code:
|
any other ideas?
I thank you for your help |
PHP Code:
|
thank you but is this gonna work?
Quote:
|
Just use what amy has in her file but change the first line to what I have.
|
okay...this is what I have in those two files now:
Quote:
does it need the }else{ before the eval? we'll sneak up on this booger yet :) |
I just realized the problem with my code. The "Or"s need to be "And"s.
Amy |
I tried it with "and" in place of the "or" and still doesn't allow team members to by-pass the limit
just a recap on what has been tried: first tried this: Quote:
Quote:
Quote:
any other ideas? |
okay...well...thanks for trying
|
I think the else was important. What you have at the end there is that only admins and mods get checked for long posts.
|
those were the suggestions I was given but I agree with you.
still hoping for a working solution. |
Found it. The else isn't the problem. The code I have in the text file is fine. The problem is that there is a javascript in the newreply, editpost, and newthread templates.
Remove this code from them (or something similar in each. I am only looking at newreply) Code:
if (postmaxchars != 0) { message = "\nThe maximum permitted length is $postmaxchars characters."; } |
won't that disable the limit for everyone?
|
If you use this code you posted, it will still work for everyone else, but they won't be informed of their error 'till after their post hits the server.
Code:
if (strlen($message)>$postmaxchars and $postmaxchars!=0 and ($bbuserinfo[usergroupid]!=6) and ($bbuserinfo[usergroupid]!=5) and ($bbuserinfo[usergroupid]!=7)) { |
If you really wanted you could create a separte newreply, newthread, editpost template for admins and mods that have the limit removed and then leave the javascript in for everybody else.
However, as the check is done on the server, it's really a matter of personal choice. I don't have a problem with users posting long posts; so this isn't an issue for me. You know where the code is and you know what your options are - you'll just have to decide what is best for you. Amy |
WetWired,
that code has alreay been tried and it limits the usergroups that are listed in it to the character limit instead of exempting them |
No, it doesn't Drives Fast. They are exampted with that code on the server side. The reason it wasn't working was because the javascript was throwing the error before it ever got to the server.
You can't just throw any old code at your board and expect results. You need to start to understand how things work if you want to change the base functionality. Amy |
I am sorry but there is no such java script in my newthread nor newreply so the code mentioned does in fact prevent admins and mods from bypassing the limit. I looked for all of those words together and individually and did not find anything that looked anything like what you posted as the solution.
perhaps you are looking at a different version of vbulletin than I have If I understood how vbulletin worked I wouldn't be asking for help on this. If you no longer wish to help...then don't....but please do not insult me for no reason. The fact that I am asking for help is evidence enough that I do not know how to do this myself. thank you anyway.....I give up |
All times are GMT. The time now is 03:36 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|