[MODDB] Anti all uppercase letters

A place for MOD Authors to post and receive feedback on MODs still in development. No MODs within this forum should be used within a live environment!
Scam Warning
mtrs
Registered User
Posts: 2049
Joined: Sat Sep 22, 2007 2:39 pm

Re: [BETA] Anti all uppercase letters (0.1.1)

Post by mtrs » Sun Nov 30, 2008 11:35 am

Ciao121 wrote:I have 2 problems with this useful mod:

1) If I have a bbcode like this i.e. [Youtube] the mod change it to [youtube] and it doesn't work anymore. (I know I can changhe the bbcode but maybe I also have to change it in all posted messages). Maybe the rule is to shave all bbcode written in small?
This is because of message text correction function, it's not perfect and just only a replacement to deny ALL UPPERCASE TEXT.
If [Youtube] tags is important for ALL CAPS posting users, they should preview message and see corrected text and correct those tags accordingly. Alternatively, you can use a simple correction function, which corrects ALL or %80 UPPERCASE message text to all lowercase.
Open
includes/functions_lowercase.php
Find

Code: Select all

$string = remove_shouting_utf8($string);
Replace with

Code: Select all

//$string = remove_shouting_utf8($string);
$string = utf8_strtolower($string);
Ciao121 wrote:2) If a user post all caps but uses emoticons, since emoticons codes are for the major par small letters, the pecentage is low and the sistem doesn't correct the text:
ie: HI ALL THIS IS MY POST :mrgreen: :mrgreen: :mrgreen: :mrgreen:

The post is:

Code: Select all

HI ALL THIS IS MY POST  :mrgreen:  :mrgreen:  :mrgreen:  :mrgreen: 
This is because of ALL UPPERCASE detection setting, message text is controlled for only T and E sample letters, if %80 of them uppercase, correction or prevention function triggered. You may decrease %80 value to %50
Open
includes/functions_lowercase.php
Find

Code: Select all

(substr_count($string, 'E') > ( 3 * substr_count($string, 'e')) && substr_count($string, 'T') > ( 3 * substr_count($string, 't')))
Replace with

Code: Select all

(substr_count($string, 'E') > ( 1 * substr_count($string, 'e')) && substr_count($string, 'T') > ( 1 * substr_count($string, 't')))
I abandoned all of my mods.

Brnky
Registered User
Posts: 1
Joined: Sun Nov 30, 2008 11:35 am
Contact:

Re: [BETA] Anti all uppercase letters (0.1.1)

Post by Brnky » Sun Nov 30, 2008 11:43 am

working!! thanks

Richazey
Registered User
Posts: 823
Joined: Mon Oct 27, 2008 9:03 pm

Re: [BETA] Anti all uppercase letters (0.1.1)

Post by Richazey » Tue Dec 23, 2008 3:21 pm

Installed it everything looks to be fine on the acp but i know two posts that are in full capitals and it hanst changed them?

mtrs
Registered User
Posts: 2049
Joined: Sat Sep 22, 2007 2:39 pm

Re: [BETA] Anti all uppercase letters (0.1.1)

Post by mtrs » Tue Dec 23, 2008 3:34 pm

parkstee wrote:Installed it everything looks to be fine on the acp but i know two posts that are in full capitals and it hanst changed them?
That's because of the all-caps detection function. Only T and E letters are counted and compared with t and e letter numberss, thus %80 threshold tested. This is a methodical ignorence. In next versions, I am considering to improve all Caps state detection function.
I abandoned all of my mods.

Richazey
Registered User
Posts: 823
Joined: Mon Oct 27, 2008 9:03 pm

Re: [BETA] Anti all uppercase letters (0.1.1)

Post by Richazey » Tue Dec 23, 2008 3:40 pm

Im confused I thought it was a mod that stopped posts being in all capitals?

mtrs
Registered User
Posts: 2049
Joined: Sat Sep 22, 2007 2:39 pm

Re: [BETA] Anti all uppercase letters (0.1.1)

Post by mtrs » Tue Dec 23, 2008 3:49 pm

parkstee wrote:Im confused I thought it was a mod that stopped posts being in all capitals?
It does.
What I meant above is, if there are only %80-99 capitals. %80 all capital occurance test is not perfect.

Can you post the all capitals text that wasn't detected?
I abandoned all of my mods.

Richazey
Registered User
Posts: 823
Joined: Mon Oct 27, 2008 9:03 pm

Re: [BETA] Anti all uppercase letters (0.1.1)

Post by Richazey » Tue Dec 23, 2008 4:37 pm

here is the message
MERRY CHRISTMAS EVERY ONE

A BIG MERRY CHRISTMAS TO MHJ HOPE YOU HAVE A GOOD ONE LOVE AND MAY BE ILL SEE YOU OUT TO GET YOU A DRINK,

IF NOT ILL TAKE YOU OUT FOR ONE ANY WANY ? ? ?

Deano x x x x x x x

mtrs
Registered User
Posts: 2049
Joined: Sat Sep 22, 2007 2:39 pm

Re: [BETA] Anti all uppercase letters (0.1.1)

Post by mtrs » Tue Dec 23, 2008 4:54 pm

Deano x x x x x x x
This part is not all capital letters.
Your text is nearly all capital letters, the detection function I mentioned only considers T and E occurances to calculate at least %80 all capital letters..
I abandoned all of my mods.

Richazey
Registered User
Posts: 823
Joined: Mon Oct 27, 2008 9:03 pm

Re: [BETA] Anti all uppercase letters (0.1.1)

Post by Richazey » Tue Dec 23, 2008 4:57 pm

ok so what about this post then??
I AM NOT SURE WE CAN AFFORD PROMOTION WITH EXTRA TRAVELLING, INCREASED PLAYER'S WAGES ETC.
IN ANY CASE THIS MANAGER WON'T CUT IT AT A HIGHER LEVEL. HE SEEMS TO BE AS BLIND AS MOST OF THE OFFICIALS WE GET. HE CONSISTANTLY PICKS A CERTAIN MIDFIELDER WHO I HAVE NOT SEEN HAVE A GOOD GAME YET - HE CAN'T TACKLE, CAN'T DISTRIBUTE AND GIVES THE BALL AWAY ON A REGULAR BASIS. I AM STILL ANGRY AT G M'S TREATMENT OF DEAN SIDEBOTTOM. THE MAN IS TOTALLY BIASED TOWARDS PLAYERS FROM HIS OLD CLUBS - HE DIDN'T GET ANYWHERE WITH THEM BEFORE SO WHY DOES HE THINK HE WILL NOW ??

mtrs
Registered User
Posts: 2049
Joined: Sat Sep 22, 2007 2:39 pm

Re: [BETA] Anti all uppercase letters (0.1.1)

Post by mtrs » Tue Dec 23, 2008 5:12 pm

parkstee wrote:ok so what about this post then??
I AM NOT SURE WE CAN AFFORD PROMOTION WITH EXTRA TRAVELLING, INCREASED PLAYER'S WAGES ETC.
IN ANY CASE THIS MANAGER WON'T CUT IT AT A HIGHER LEVEL. HE SEEMS TO BE AS BLIND AS MOST OF THE OFFICIALS WE GET. HE CONSISTANTLY PICKS A CERTAIN MIDFIELDER WHO I HAVE NOT SEEN HAVE A GOOD GAME YET - HE CAN'T TACKLE, CAN'T DISTRIBUTE AND GIVES THE BALL AWAY ON A REGULAR BASIS. I AM STILL ANGRY AT G M'S TREATMENT OF DEAN SIDEBOTTOM. THE MAN IS TOTALLY BIASED TOWARDS PLAYERS FROM HIS OLD CLUBS - HE DIDN'T GET ANYWHERE WITH THEM BEFORE SO WHY DOES HE THINK HE WILL NOW ??
This is detected and corrected as follows
I am not sure we can afford promotion with extra travelling, increased player's wages etc.
In any case this manager won't cut it at a higher level. He seems to be as blind as most of the officials we get. He consistantly picks a certain midfielder who i have not seen have a good game yet - he can't tackle, can't distribute and gives the ball away on a regular basis. I am still angry at g m's treatment of dean sidebottom. The man is totally biased towards players from his old clubs - he didn't get anywhere with them before so why does he think he will now ??
You need to enable the mod at ACP.
I abandoned all of my mods.

Richazey
Registered User
Posts: 823
Joined: Mon Oct 27, 2008 9:03 pm

Re: [BETA] Anti all uppercase letters (0.1.1)

Post by Richazey » Tue Dec 23, 2008 5:13 pm

Hi it is enabled in the acp but no change?

mtrs
Registered User
Posts: 2049
Joined: Sat Sep 22, 2007 2:39 pm

Re: [BETA] Anti all uppercase letters (0.1.1)

Post by mtrs » Tue Dec 23, 2008 5:15 pm

There two permissions, which affect as well.
User shouldn't ignore all uppercase with permission
Also, there is post count limit, that should be big enough.
I abandoned all of my mods.

Richazey
Registered User
Posts: 823
Joined: Mon Oct 27, 2008 9:03 pm

Re: [BETA] Anti all uppercase letters (0.1.1)

Post by Richazey » Tue Dec 23, 2008 5:20 pm

In the ACP>general>post settings in have everything ticked as yes and 100 posts what else do i need to check?

acemi
Registered User
Posts: 40
Joined: Sun Dec 25, 2005 8:51 pm
Location: Istanbul
Contact:

Re: [BETA] Anti all uppercase letters (0.1.1)

Post by acemi » Sun Feb 15, 2009 2:34 pm

Great mod! Thanks

I would love to see a future version of this mod that allows a list of user controlled exceptions or additional rules.
e.g. Capital letter after line break,
all small letters ".com",
all caps "TL".

Great as it is though. It forces users to pay attention to their posts or have them stripped down. The feature requests above are more for the readers who may be put off by too many small letters/ capitals.

User avatar
karbiko
Registered User
Posts: 78
Joined: Thu Jul 24, 2008 8:47 pm
Location: La Palma, Canary Islands, Spain

Re: [BETA] Anti all uppercase letters (0.1.1)

Post by karbiko » Mon Feb 16, 2009 12:33 am

Does it works after editing one post?

I've tried, but it doesn't, but in posting moment it worked fine.

Locked

Return to “[3.0.x] MODs in Development”