AllCaps Blocker (ex-AllCaps Notifier)
by X3mE (http://www.simplemachines.org/community/index.php?action=profile;u=154415), version 2.0
Link to Mod (http://custom.simplemachines.org/mods/index.php?mod=1518) | Demo Website (http://x3me.iz.rs/) | Support Topic (http://www.simplemachines.org/community/index.php?topic=278149.0)
Description
This mod will tweak the editor box (works also with the WYSIWYG Quick Reply mod for SMF 2) to show a warning once the user enters a few uppercase letters in a row (called ALL CAPS). The warning may be shown only once per page load, or every time the "limit" is breached, as determined in the Admin Control Panel.
It can also prevent the user from posting, if the ALLCAPS text remains in those boxes.
Screenshot
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fi20.photobucket.com%2Falbums%2Fb242%2Fx3me88%2FNoname-6.jpg&hash=c3fc9678a0ba9f3cb2b0b8ec39a615dc3190cb18)
Live Demo: http://x3me.iz.rs/index.php?board=5.0
Changelog
* Version 2.0 (10. 04. 2009.)
- Changed name to AllCaps Blocker
- Works with Unicode characters
- Improved detection - skips spaces and punctuation marks
- Added a possibility to set the number of successtive chars to be considered writing in ALLCAPS in the ACP (default: 6)
- Added a possibility to warn always, not just the first time
- It is now possible to prevent posting if ALLCAPS text remains (off by default)
- Checks also the Post Subject box now
- Works with AJAX inline edits now
- Works with default Quick Reply in SMF 2 now
-
Removed compatibility for SMF 1.1.x* Version 1.0 (20. 11. 2008.)
- Initial version for SMF 2.0 Beta 4 and 1.1.7
Notes
For SMF 2.x, install AllCaps_Blocker_v2.0_SMF_2.x.zip, or AllCaps_Blocker_v2.0_SMF_2.x-WYSIWYG.zip if you have WYSIWYG Quick Reply installed.
If you wish to install it on 1.1.x, the old 1.0 version is still available. There are 2 versions of the installation file - one for SMF 1.1.x, and one for SMF 1.1.x with Enhanced Quick Reply installed. If you wish to uninstall Enhanced Quick Reply, you will have to uninstall AllCaps Notifier first.
Please post all your support questions and comments in the support thread (http://www.simplemachines.org/community/index.php?topic=278149.0). You can also use the Issue Tracker (http://x3me.iz.rs/index.php?project=4) on the Demo Website (http://x3me.iz.rs/).
Languages
Languages included:
- English (english, english-utf8)
- Serbian (serbian, serbian-utf8, serbian-utf8-lat, serbian_latin-utf8)
To translate it to your own language, add the translation for
$txt['ALL_CAPS_NOTIFIER'] = 'It appears that you are trying to write using ALLCAPS.\n\nPlease be aware this is against forum rules.';
$txt['allcaps_mods_cat'] = 'AllCaps Settings';
$txt['allcaps_number_of_chars'] = 'Number of successive uppercase chars to be considered writing in AllCaps (spaces and punctiation chars are not counted):';
$txt['allcaps_prevent_posting'] = 'Prevent posting if AllCaps text remains in the post text/subject?';
$txt['allcaps_show_more_than_once'] = 'Show the warning multiple times (if not checked the warning will only be shown the first time)?';
$txt['allcaps_settings_title'] = 'AllCaps Settings';
$txt['allcaps_prevented_warning'] = 'Your text or subject contains ALLCAPS text, therefore you cannot post.\n\nPlease correct it and try again.';
in the appropriate Modifications.language.php file. You are welcome to post your translations in the support topic (http://url=http://www.simplemachines.org/community/index.php?topic=278149.0).
Donations
If you like this mod, please donate to support its further development. Any amount would be highly appreciated. Thank you.
(https://www.paypal.com/en_US/i/btn/btn_donateCC_LG_global.gif) (https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=2EV33MU7KLM5A&lc=GB&item_name=SMF%20modifications&item_number=smf¤cy_code=EUR&bn=PP%2dDonationsBF%3abtn_donateCC_LG_global%2egif%3aNonHosted)
Installed it, but doesn't seem to work. Is there a setting in the admin panel?
Nevermind I didn't type enough caps for it to work. Thats pretty cool
excellent
only one little suggestion, message of warning disappear if you press ok or continue to write will be very good is message will appear again if user continue to write in uppercase , and not only 1 time but all time that user continue write in that way
by the way thx
Very good idea but only for english language
I install the
AllCaps_Notifier_v1.0_SMF_1.1.x.zip
BUT work only in english writing .
My forum is in greek language and if i write in greek the mod dont work ......
Great mod you have there...i am wondering if you can also create the mod that changes locked caps to small letter..
thanks..(or maybe show me if it is already here)
Quote from: edi67 on December 03, 2008, 04:12:52 AM
only one little suggestion, message of warning disappear if you press ok or continue to write will be very good is message will appear again if user continue to write in uppercase , and not only 1 time but all time that user continue write in that way
by the way thx
Well, showing it all the time can be very annoying for users, but there might be an option for that in the next version.
Quote from: kizer on December 03, 2008, 01:07:22 AM
Nevermind I didn't type enough caps for it to work. Thats pretty cool
I didn't have enough free time to play around, but in the next version there will surely be a possibility to set the number of uppercase letters to trigger this alert (now you'd had to do it manually). :)
Quote from: villasg on December 03, 2008, 04:52:30 AM
Very good idea but only for english language
I install the
AllCaps_Notifier_v1.0_SMF_1.1.x.zip
BUT work only in english writing .
My forum is in greek language and if i write in greek the mod dont work ......
Use this mod: http://custom.simplemachines.org/mods/index.php?mod=615
Or add the greek translation to the file Modification.greek-or-smthing.php in your languages folder, add the following line:
$txt['ALL_CAPS_NOTIFIER'] = 'Type the alert text here';
I'd be happy to include in the next version it if you post here the exact file name and translation.
Quote from: sam_milla on December 03, 2008, 04:57:44 AM
Great mod you have there...i am wondering if you can also create the mod that changes locked caps to small letter..
thanks..(or maybe show me if it is already here)
No, I don't think something like that exists, but it is a nice idea for a new mod :)
Hi before install the mod i have make the translation readi in modification_1.xml
<file name="$languagedir/Modifications.greek-utf8.php" error="skip">
<operation>
<search position="end" />
<add><![CDATA[
$txt['ALL_CAPS_NOTIFIER'] = 'Βλέπω ότι προσπαθείτε να γράψετε μόνο με κεφαλαία .\n\nΠαρακαλώ σημειώστε ότι αυτό είναι ενάντια στους κανόνες του φόρουμ.';
]]></add>
</operation>
</file>
My problem is the mod DONT recognize the greek cap letters ( my forum is utf-8 ) .
Quote from: X3mE on December 03, 2008, 05:58:25 AM
Use this mod: http://custom.simplemachines.org/mods/index.php?mod=615
Or add the greek translation to the file Modification.greek-or-smthing.php in your languages folder, add the following line:
$txt['ALL_CAPS_NOTIFIER'] = 'Type the alert text here';
I'd be happy to include in the next version it if you post here the exact file name and translation.
I install the Load Standard Language 102
And after the mod .
have again the same results .
IF i write in greek ( caps ) the mod dont work
Hm, that's true :S... I'll try to find a way to do this and update the mod. Thanks for the translation btw.
Ok thanks my friend
Quote from: X3mE on December 03, 2008, 05:53:31 AM
Quote from: edi67 on December 03, 2008, 04:12:52 AM
only one little suggestion, message of warning disappear if you press ok or continue to write will be very good is message will appear again if user continue to write in uppercase , and not only 1 time but all time that user continue write in that way
by the way thx
Well, showing it all the time can be very annoying for users, but there might be an option for that in the next version.
Its supposed to be annoying for users typing in all caps.
Yes, I agree, but whoever wants to do it on purpose is not likely to stop even after an alert after every x characters :)
This should only be a warning, and also there are cases when AllCaps is necessary, like abbreviations, etc. And then it could be annoying to non-rude users.
But, as I said, there will probably be a setting for that as well. ;)
question before i install the mod (it looks great but might be better if it will only stop CAPS on the "subject"). if someone posted a url with a capital letters included (file name example is www.mysite.com/MYFILENAMEINCAPS.JPG << will the warning pop up too? because i know some server are very strict with caps and small letter file names - including ours :/
Quote from: pinoypetfinder on December 04, 2008, 12:09:29 AM
if it will only stop CAPS on the "subject".
I'll implement this in the next version.
Quote from: pinoypetfinder on December 04, 2008, 12:09:29 AM
if someone posted a url with a capital letters included (file name example is www.mysite.com/MYFILENAMEINCAPS.JPG << will the warning pop up too? because i know some server are very strict with caps and small letter file names - including ours :/
It only works while typing, on the onKeyPress JavaScript event. To make it work while copy/pasting, it would have to use the onChange event and scan the entire text after every change, which isn't very practical.
Anyway, I tried to make it work with all Unicode characters, but I just can't find a solution in JavaScript, not even the toUpperCase/toLowerCase methods work with Unicode characters... I'll see if I could find a workaround somehow...
sounds great, will look forward to it. thank you :)
I think is very hard to work in another strings
Like my Greek utf-8
:(
hi again. i installed this mod. the warning message pop up, but after clicking okay, and continue typing in caps again, it didn't re-appear. and when i click the submit button, the message got posted - in all caps ;(
can u also add on your next update if its possible to stop the message from being posted if it has all caps?
Yes, it's intended to act like that, to only warn, and only do it once. There will be an option in the admin panel to warn multiple times. I suppose I could also add an option to prevent posting, thanks for the suggestion :).
Polish:
//All-caps
$txt['ALL_CAPS_NOTIFIER'] = 'Próbujesz pisać używając samych dużych liter! Miej świadomość, że jest to wbrew zasadom tutaj panującym.';
Thanks :)
Hi
Any news for Greek UTF8 ? :)
Quote from: X3mE on December 08, 2008, 05:21:33 AM
Yes, it's intended to act like that, to only warn, and only do it once. There will be an option in the admin panel to warn multiple times. I suppose I could also add an option to prevent posting, thanks for the suggestion :).
thank you! will look forward to that :)
If you want a spanish translate this is:
Parece que usted está tratando de escribir utilizando MAYÚSCULAS. \n\nPor favor tenga en cuenta que está en contra de las normas de este foro.
I try to find a utf-8 character for translate.
Maliante
Thanks.
I'm afraid that UTF-8 check cannot be done in Java Script, at least I couldn't figure out a way so far, after a lot of research... :/
Quote from: X3mE on December 04, 2008, 06:36:29 AM
Quote from: pinoypetfinder on December 04, 2008, 12:09:29 AM
if it will only stop CAPS on the "subject".
I'll implement this in the next version.
If you change your references from $settings['theme_url'] to $settings['default_theme_url'] it will work for all themes.
Also could you tell me where the subject text box is created (i looked in GenericControls.template.php) that way I can implement your mod to check for caps in the subject box also.
Thank you.
For which version of SMF?
Btw, just checked - it's 2.0 RC1 compatible.
2.0 beta 4
Ok, I think I managed to get it to work with Unicode characters. I've tested with Serbian Cyrillic and Latin letters, and it worked. Please test with some other Unicode chars and post feedback. So far the new version is under heavy development, and you can test here: http://x3me.iz.rs/index.php?board=5.0
There will also be preventing all caps in the subject box, settings in the ACP, etc. Feel free to post more suggestions.
Is there a manual install guide?
Offtopic:
bem ti engleski :D
Just open the modification (for 2.0 RC1)/modification_1 (for 1.1.8) XML file and follow the instructions :)
Useful link: http://docs.simplemachines.org/index.php?topic=402
Done, Tnx
Hvala matori ;)
Ok, new version is out, and very improved:
- Changed name to AllCaps Blocker
- Works with Unicode characters
- Improved detection - skips spaces and punctuation marks
- Added a possibility to set the number of successtive chars to be considered writing in ALLCAPS in the ACP (default: 6)
- Added a possibility to warn always, not just the first time
- It is now possible to prevent posting if ALLCAPS text remains (off by default)
- Checks also the Post Subject box now
- Works with AJAX inline edits now
- Works with default Quick Reply in SMF 2 now
- Removed compatibility for SMF 1.1.x
Bravo X3 nice update but i have one problem the installation of mod stop at 2é line of modificaiton in Display.template.php, strangelly the mod must make 4 modification of Display.template but stop at the first look screenshot, seems that mod have something wrong in code
i using the package for WY Quick Reply
i checked all part of my Display.template and code to replace is same with your, i can't understand the reason that mod stop there.
That's strange... I'll have a look. Thanks ;)
Quote from: X3mE on April 10, 2009, 08:00:30 PM
That's strange... I'll have a look. Thanks ;)
well i found error i not have this code:
echo '
<input type="submit" name="post" value="', $txt['post'], '" onclick="submitThisOnce(this);" accesskey="s" tabindex="2" />
but i have this:
echo '
<input type="submit" name="post" value="', $txt['post'], '" onclick="return submitThisOnce(this);" accesskey="s" tabindex="2" />
i dont know if mine or your is correct, but now seemt working everything ok.
thx ;)
You're right, I'll fix this and reupload. Thanks ;)
@All using the WYSIWYG version
I've just uploaded a fixed version, also fixing an error which might cause the quick reply not to work for some members.
One little bug to noticed.
For every guest browsing forum and viewing topics, i have these 2 errors:
8: Undefined variable: showMultipleTimes
8: Undefined variable: numberOfOccurences
File: /home/crazyzone/data/www/crazyzone.biz/Themes/default/GenericControls.template.php (main sub template - eval?)
Riga: 1209
may be u can try to fix this problem :) thx for mod
Thanks, I'll look into it. :)
Quote from: edi67 on April 12, 2009, 06:00:04 PM
One little bug to noticed.
For every guest browsing forum and viewing topics, i have these 2 errors:
8: Undefined variable: showMultipleTimes
8: Undefined variable: numberOfOccurences
File: /home/crazyzone/data/www/crazyzone.biz/Themes/default/GenericControls.template.php (main sub template - eval?)
Riga: 1209
may be u can try to fix this problem :) thx for mod
nothing again for this problem? my log is always full for these
Sorry, I've been very busy. I'm aware of it and will try to fix it as soon as possible.
Getting the following errors:
8: Undefined variable: numberOfOccurences
File: /Themes/default/Display.template.php
Line: 929
and
8: Undefined variable: showMultipleTimes
File: /Themes/default/Display.template.php
Line: 929
==>929: <textarea class="editor" name="message" rows="12" style="width: 94%; margin-bottom: 10px;" tabindex="7" onkeypress="captureKeys(event, \'' . $txt['ALL_CAPS_NOTIFIER'] . '\', ' . $numberOfOccurences . ', ' . $showMultipleTimes . ', \'qmtext\');">%body%</textarea><br />
Please advise. Thx
I've installed the mod and it works.
But can not set up to prevent the writing if stay a great character because there is no settings in the admin panel.
I added text to the file Modifications.language.php file and do not appear.
Version forum is a 1.1.10.
Thanks in advance for help. (https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fwww.vukovisadunava.com%2FSmileys%2Fmojismajliji%2Fhi.gif&hash=ef19eda143b10350e9ceadbed44712eccddfdff0)
Italian Translation - Translated by Francesco Foresta aka Jason Bleinel:
$txt['ALL_CAPS_NOTIFIER'] = 'Sembra che stai provando a scrivere tutto in maiuscolo.\n\nRicordati che vai contro le regole del forum.';
$txt['allcaps_mods_cat'] = 'Impostazioni AllCaps';
$txt['allcaps_number_of_chars'] = 'Numero di caratteri maiuscoli consecutivi da considerare scrivendo in maiuscolo (gli spazi e la punteggiatura non vengono considerati):';
$txt['allcaps_prevent_posting'] = 'Vietare di postare se il testo in maiuscolo rimane nel testo/oggetto?';
$txt['allcaps_show_more_than_once'] = 'Mostrare un avviso varie volte (se non selezionato un avviso viene mostrato solo la prima volta)?';
$txt['allcaps_settings_title'] = 'Impostazioni AllCaps';
$txt['allcaps_prevented_warning'] = 'Il tuo testo/oggetto contiene del testo tutto in maiuscolo, quindi non puoi postare.\n\nCorreggi e prova di nuovo.';
Quote from: edi67 on May 18, 2009, 09:31:56 AM
Quote from: edi67 on April 12, 2009, 06:00:04 PM
One little bug to noticed.
For every guest browsing forum and viewing topics, i have these 2 errors:
8: Undefined variable: showMultipleTimes
8: Undefined variable: numberOfOccurences
File: /home/crazyzone/data/www/crazyzone.biz/Themes/default/GenericControls.template.php (main sub template - eval?)
Riga: 1209
may be u can try to fix this problem :) thx for mod
nothing again for this problem? my log is always full for these
Great mode, just that I have loads of errors like above.
I wish X3mE can spare little time to check this out.
Hey, great tool!
I have a German translation for you, rather informal style though.
$txt['ALL_CAPS_NOTIFIER'] = 'Anscheinend klemmt deine Capslock-Taste.\n\nAchte bitte drauf, nicht nur
in Großbuchstaben zu posten.';$txt['allcaps_mods_cat'] = 'AllCaps Settings';$txt
['allcaps_number_of_chars'] = 'Anzahl aufeinanderfolgender Großbuchstaben die als Caps-Spam betrachtet
werden (ohne Leerzeichen und Punktuation):';$txt['allcaps_prevent_posting'] = 'Posten bei
vermeindlichem Caps-Spam verbieten?';$txt['allcaps_show_more_than_once'] = 'Warnung mehrfach zeigen
(ohne Häkchen wird die Warnung nur beim ersten Mal angezeigt)?';$txt['allcaps_settings_title'] =
'AllCaps Einstellungen';$txt['allcaps_prevented_warning'] = 'Dein Text enthält zu viele Großbuchstaben,
deswegen kannst du leider nicht posten.\n\nBitte schreib ihn um und versuch es erneut.';
Furthermore I have a stupid question: where can I actually change the settings of this Mod? Is it somewhere in the Admin Interface?
Does not work in 2.0 RC2, and throw an error when installing.
Would be nice if this was updated for SMF2 RC2 (and then RC3).
Hi, exist any possibilitie of make the 2.0 with compatibility for SMF 1.1.x too?
Pls try and make this MOD compatible with SMF 2.0 RC3
I converted an unofficial version for 2.0 RC3 only. I make no guarantees.
please, can somewhere convert the last version to smf 1.1.11??
i can do an spanish translation, something interesed?
ah ok well sad thats not working with 1.1.11 would be rly cool =P
Any fix for "8: Undefined variable: showMultipleTimes"?
I've just used the parser and installed it on SMF 2.0 RC3 without issues. Nice mod.
Thanks!
Its working no SMF rc3 with the unoficial version.
How can I prevent caps for post and subject? (now is only for subject or quickreply)
Another question please: When someon try to reply on a topic created with CAPS, before install this mod, can not send message.
Its possible to send messages only on topics already created with caps?
I offer you in Turkish translation
// AllCapsBlocker_translation_ by SirtLanVadisi
$txt['ALL_CAPS_NOTIFIER'] = 'Capslock-tuşunuz açık.\n\n Lütfen yanıt yazarken sadece büyük harfleri kullanmayınız.';
$txt['allcaps_mods_cat'] = 'Caps Lock Ayarları';
$txt['allcaps_number_of_chars'] = 'Hangi sayı ardışı büyük harfde ( boşluk veya noktalama işaretleri olmadan) Spam olarak kabul edilsin:';
$txt['allcaps_prevent_posting'] = 'Yanıtlarda büyük harflerle yazılan harfler yasaklansın?';
$txt['allcaps_show_more_than_once'] = 'Uyarı tekrarlansınmı (Noktalamada uyarı sadece bir kere uyarılır)?';
$txt['allcaps_settings_title'] ='AllCaps Ayarları';
$txt['allcaps_prevented_warning'] = 'Yazdığınız metinde fazla büyük harfler bulunuyor, bu sebebden dolayı yanıt yazamassınız .\n\nLütfen yazmak istediğiniz yanıtığınızı değiştiriniz ve yenileğiniz.';
// AllCapsBlocker_translation_ by SirtLanVadisi
Any chance to make this work on 2.0 RC5 ?
Wouldn't mind this also updating myself.
I would attempt to try the parsing but got confused near the end..lol
Hello!
When the expected mod for the 2.0 version of the script?
Is there an alternative to this mode to 2.0.4?
Hi guys,
I installed the mod under smf 1.1.19.
Could someone tell me where in the Admin panel can I set the options for the mod? I looked all over and could not find it.
Thanks.
Quote from: pikeman on May 29, 2013, 07:39:09 AM
Is there an alternative to this mode to 2.0.4?
Emulate it to 2.0.4
Quote from: dand on December 16, 2013, 04:22:39 AM
Hi guys,
I installed the mod under smf 1.1.19.
Could someone tell me where in the Admin panel can I set the options for the mod? I looked all over and could not find it.
Thanks.
Not provided
Does it work on 1.1.21?
Still can't find the settings.
Quote
* Version 2.0 (10. 04. 2009.)
- Changed name to AllCaps Blocker
- Works with Unicode characters
- Improved detection - skips spaces and punctuation marks
- Added a possibility to set the number of successtive chars to be considered writing in ALLCAPS in the ACP (default: 6)
- Added a possibility to warn always, not just the first time
- It is now possible to prevent posting if ALLCAPS text remains (off by default)
- Checks also the Post Subject box now
- Works with AJAX inline edits now
- Works with default Quick Reply in SMF 2 now
- Removed compatibility for SMF 1.1.x
see red text above.
You need to upgrade to 2.0.11, since 1.1.x is at end of life and will likely soon not work at all, as hosts upgrade to modern versions of php
Here is the French translation:
$txt['ALL_CAPS_NOTIFIER'] = 'Il semble que vous tentiez d'écrire en n'utilisant que des majuscules.\n\nVeuillez noter que c'est contraire aux règles du forum.';
$txt['allcaps_mods_cat'] = 'Réglages de AllCaps';
$txt['allcaps_number_of_chars'] = 'Nombre de caractères majuscules successifs pour considérer que le texte n'est écrit qu'en majuscules (Les espaces et signes de ponstuation ne sont pas comptés):';
$txt['allcaps_prevent_posting'] = 'Empêcher l'envoi si le texte demeure en majuscules dans le message/sujet ?';
$txt['allcaps_show_more_than_once'] = 'Afficher l'avertissement plusieurs fois (si non coché l'avertissement ne sera affiché que la première fois)?';
$txt['allcaps_settings_title'] = 'Réglages de AllCaps';
$txt['allcaps_prevented_warning'] = 'Votre texte ou sujet contient du texte en majuscules, c'est pourquoi vous ne pouvez pas poster.\n\nCorrigez-le et essayez à nouveau.';
Tried to install this in 2.0.15, with emulation for 2.0 RC1 and no dice.
Is there a chance that this Mod might get an update?
I really like the idea of blocking all caps-posts, would safe the mods time and aggravation...