Link to the mod (https://custom.simplemachines.org/index.php?mod=1528)
SMFPacks.com Minimun Characters or Words Mod v1.1.2 - NIBOGO
Mod to set a minimum amount of words or characters per message.
Support topic (http://www.simplemachines.org/community/index.php?topic=234634.0) | Link to Mod (http://custom.simplemachines.org/mods/index.php?mod=1528) | My Mods (http://custom.simplemachines.org/mods/index.php?action=search;author=126412) | Website (https://www.smfpacks.com/) | Donate (https://www.smfpacks.com/donate.php)
Author:
- NIBOGO
Features:
o Minimun Characters per Post.
o Minimun Words per Post.
o Settings of this mod in: Admin Panel --> Forum --> Topic Settings
o You can ignore the minimun character or words for post created by admins [Enable/Disable Option]
o SMF 2.1 and 2.0 ONLYLanguages:
o Supports Languages
- English/English-utf8
- Spanish/Spanish-utf8
Compatibility:
- 2.1
- 2.0
Changelog:1.1.3 - 23 May 2024o Upgraded for SMF 2.1
o Hooks for easier installation.
1.1.2 - 29 July 2011o Updated SMF 2.0 and 1.1.14
1.1 - 13 Feb 2010o Some Code Improvements. (Now the mod is two times faster)
o Added Option to Doesn't Count Chars and Words between [quote] BBCode.
1.0 - 22 November 2008o Based on RyanJones Code (http://www.simplemachines.org/community/index.php?topic=73654.msg504821#msg504821) with some modifications by NIBOGO
o Initial Release
Installed without any problems. I have 18 other mods installed on my SMF2 Beta 4 test site. Nice mod and work NIBOGO!
how about minimum character for topic length? is this mod can do it?
Good works. Thanks =)
turkish
Admin.{language}.php
//Minimun Characters or Words Mod
$txt['minWordLen'] = 'En az yazılması gereken kelime';
$txt['minwords_mod'] = 'kelime';
$txt['minChar'] = 'En az girilecek karakter sayısı';
$txt['minchars_mod'] = 'karakter';
$txt['minmod_zero'] = 'Degeri 0 girerseniz deaktif olur.';
Errors.{language}.php
$txt['error_minWordLen'] = 'Hata!Mesajınız da en az (' . $modSettings['minWordLen'] . ' kelime gerekmektedir.).';
$txt['error_minChar'] = 'Hata!Mesajınız da en az (' . $modSettings['minChar'] . ' karakter gerekmektedir.).';
Modifications.turkish.php
Quote
//Minimun Characters or Words Mod
$txt['minWordLen'] = 'En az yazılması gereken kelime';
$txt['minwords_mod'] = 'kelime';
$txt['minChar'] = 'En az girilecek karakter sayısı';
$txt['minchars_mod'] = 'karakter';
$txt['minmod_zero'] = 'Degeri 0 girerseniz deaktif olur.';
$txt['minAdminLen'] = 'Kelime ve Karakter Engelleme modifikasyonu';
$txt['error_minWordLen'] = 'Hata!Mesajınız da en az (' . $modSettings['minWordLen'] . ' kelime gerekmektedir.).';
$txt['error_minChar'] = 'Hata!Mesajınız da en az (' . $modSettings['minChar'] . ' karakter gerekmektedir.).';
Quote from: fords8 on December 05, 2008, 08:22:55 PM
Installed without any problems. I have 18 other mods installed on my SMF2 Beta 4 test site. Nice mod and work NIBOGO!
Glad you like ;)
Quote from: qubbah on December 06, 2008, 01:02:24 PM
how about minimum character for topic length? is this mod can do it?
What do you mean?? set a minimun amount of characters to create new topics and post?? This mod can do it
Quote from: NIBOGO on December 05, 2008, 03:31:53 PM
o Support for SMF 2.0 ONLY
Any chances to see this mod on 1.1.7? The old one doesn't work anymore..
Quote from: softcore on December 08, 2008, 01:28:15 AM
Quote from: NIBOGO on December 05, 2008, 03:31:53 PM
o Support for SMF 2.0 ONLY
Any chances to see this mod on 1.1.7? The old one doesn't work anymore..
I'd love that too!
it prevents my users to stop saying "K" in a post, one POST!
Quote from: qubbah on December 06, 2008, 01:02:24 PM
how about minimum character for topic length? is this mod can do it?
What do you mean?? set a minimun amount of characters to create new topics and post?? This mod can do it
[/quote]
i mean can we set the maximum character in topic? coz some of my user make the topic name very long.
Quote from: softcore on December 08, 2008, 01:28:15 AM
Quote from: NIBOGO on December 05, 2008, 03:31:53 PM
o Support for SMF 2.0 ONLY
Any chances to see this mod on 1.1.7? The old one doesn't work anymore..
http://custom.simplemachines.org/mods/index.php?mod=290
Try the manual edit because works great
Quote from: Nfanthr33 on December 08, 2008, 02:36:49 AM
Quote from: softcore on December 08, 2008, 01:28:15 AM
Quote from: NIBOGO on December 05, 2008, 03:31:53 PM
o Support for SMF 2.0 ONLY
Any chances to see this mod on 1.1.7? The old one doesn't work anymore..
I'd love that too!
it prevents my users to stop saying "K" in a post, one POST!
Glad you like ;)
Quote from: qubbah on December 08, 2008, 07:28:16 AM
Quote from: qubbah on December 06, 2008, 01:02:24 PM
how about minimum character for topic length? is this mod can do it?
What do you mean?? set a minimun amount of characters to create new topics and post?? This mod can do it
i mean can we set the maximum character in topic? coz some of my user make the topic name very long.
[/quote]
Not , this mod cant do that
Modifications.serbian_latin-utf8
//Minimun Characters or Words Mod
$txt['minWordLen'] = 'Minimalno reci po poruci';
$txt['minwords_mod'] = 'reci';
$txt['minChar'] = 'Minimum karaktera po poruci';
$txt['minchars_mod'] = 'karaktera';
$txt['minmod_zero'] = '0 da nemam minimuma.';
$txt['error_minWordLen'] = 'Poruka ne sadrzi minimum reci koliko bi trebalo (' . $modSettings['minWordLen'] . ' reci).';
$txt['error_minChar'] = 'Poruka ne sadrzi minimum karaktera koliko bi trebalo (' . $modSettings['minChar'] . ' karaktera).';
Quote from: ravac on December 09, 2008, 05:54:54 AM
Modifications.serbian_latin-utf8
//Minimun Characters or Words Mod
$txt['minWordLen'] = 'Minimalno reci po poruci';
$txt['minwords_mod'] = 'reci';
$txt['minChar'] = 'Minimum karaktera po poruci';
$txt['minchars_mod'] = 'karaktera';
$txt['minmod_zero'] = '0 da nemam minimuma.';
$txt['error_minWordLen'] = 'Poruka ne sadrzi minimum reci koliko bi trebalo (' . $modSettings['minWordLen'] . ' reci).';
$txt['error_minChar'] = 'Poruka ne sadrzi minimum karaktera koliko bi trebalo (' . $modSettings['minChar'] . ' karaktera).';
Thanks Men ^^
I like the idea of this mod but what would be really useful I think would be to have it so you need a minimum for the post to be counted.
This will prevent people from making a run for a post count membergroup but still allow shorter posts which sometimes are appropriate.
Is this possible with this or is there a mod available that adds this functionality for v2 ?
couple of errors here NIBOGO...
8: Undefined index: minChar
Apply Filter: Only show the errors from this file
File: /home/****/Themes/default/languages/Modifications.english.php
Line: 520
8: Undefined index: minWordLen
Apply Filter: Only show the errors from this file
File: /home/***/Themes/default/languages/Modifications.english.php
Line: 519
Thanks smokey i will check that ;)
lol that is good NIBOGO.. here is a list of the mods i have, maybe something got crossed..
1. Super Admin 1.5 [ Apply Mod ]
2. Aeva ~ Auto-Embed Video & Audio 5.1.36 [ Uninstall ]
3. Avatar On Board 2.1 [ Uninstall ]
4. Manage Membergroups Permission 1 [ Uninstall ]
5. Ad Managment 2.3.4 [ Uninstall ]
6. Admin Notepad 1.0 [ Uninstall ]
7. AllCaps Notifier 1.0 [ Uninstall ]
8. Banned members avatar 0.1 [ Uninstall ]
9. Attachments In Message 1.2.0 [ Uninstall ]
10. BBC [you] 1.2 [ Uninstall ]
11. BK-SMF Sub-Board 1.5 [ Uninstall ]
12. Custom_Greeting_Depending_on_Time 0.9 [ Uninstall ]
13. EmailValidator 1.0 [ Uninstall ]
14. Custom Fields On Memberlist 1.0 [ Uninstall ]
15. Improved Webmaster Email Settings 1.0 [ Uninstall ]
16. Downloads System 1.1.5 [ Uninstall ]
17. Floating Bar Mod 1.0 [ Uninstall ]
18. Google Member Map 1.0 beta 4 [ Uninstall ]
19. Excellent Smileys 1.0 [ Uninstall ]
20. MoodBobels 2.2 [ Uninstall ]
21. Add IP2Location to Track IP 1.2 [ Uninstall ]
22. Member Color Link 3.0.5a [ Uninstall ]
23. nneonneo's AJAX ShoutBox 1.22 [ Uninstall ]
24. Memberlist_Xrevolution 1.2 [ Uninstall ]
25. Order Custom Profile Fields 1.01 [ Uninstall ]
26. Minimun Characters or Words Mod 1.0 [ Uninstall ]
27. More Spiders 1.2 [ Uninstall ]
28. PortaMx v0.95.1 0.951 [ Uninstall ]
29. script.js Jump Fix 1.0 [ Uninstall ]
30. Order Stickied Topics 1.01 [ Uninstall ]
31. PM to New Members 1.0 [ Uninstall ]
32. Treasury 2.32 [ Apply Mod ]
33. Profil Moderator Managment 1.0.0 [ Uninstall ]
34. Recent Topics On Board Index 1.01 [ Uninstall ]
35. Related Topics 1.3.1 [ Uninstall ]
36. Advanced Reputation System 1.5.2 [ Uninstall ]
37. RSS Feeder 1.0.0 [ Uninstall ]
38. Save PM as HTML 1.0.6 [ Uninstall ]
39. SMF Media Gallery 1.5.2 [ Uninstall ]
40. SMF Arcade 2.5 Beta 2.2 Public [ Uninstall ]
41. SMF Staff Page 1.6 [ Uninstall ]
42. Social Bookmarks for SMF 2 1.1 [ Uninstall ]
43. Stars And Badges 2.1 [ Uninstall ]
44. Who_Xrevolution 1.1 [ Uninstall ]
45. The Rules 1.2 [ Uninstall ]
46. Users Online Today 1.5.4 [ Uninstall ]
47. View Email Permission For SMF 2.0 Beta 4
i really do like the idea behind the mod.. congrats lol.. ;)
German translation:
Errors:
$txt['error_minWordLen'] = 'Die Nachricht erfüllt nicht die Mindestanzahl an Wörtern! (' . $modSettings['minWordLen'] . ' words).';
$txt['error_minChar'] = 'Die Nachricht erfüllt nicht die Mindestanzahl an Zeichen! (' . $modSettings['minChar'] . ' characters).';
Admin:
//Minimun Zeichen oder Wörter Mod
$txt['minWordLen'] = 'Mindestanzahl an Wörtern im Post:';
$txt['minwords_mod'] = 'words';
$txt['minChar'] = 'Mindestanzahl an Zeichen im Post:';
$txt['minchars_mod'] = 'characters';
$txt['minmod_zero'] = '0 für kein Minimum.';
I'll hope, that this will help you ;)
Regards
Thanks , the translations are always useful :)
No problem, but I dont know, if I have to use the characters "ö" and "ü" or the HTML characters^^ ... But its like PHP so i decided to use the HTML ... is that right?^^
Quote from: Mythos94 on January 29, 2009, 03:56:30 PM
No problem, but I dont know, if I have to use the characters "ö" and "ü" or the HTML characters^^ ... But its like PHP so i decided to use the HTML ... is that right?^^
HTML characters are used on php so we need that characters , thanks ;)
Added Support for SMF 2.0 RC1
this mod sounds great! any chance of getting it for 1.1.8 please?
Quote from: Harvester on March 27, 2009, 11:29:11 PM
this mod sounds great! any chance of getting it for 1.1.8 please?
Taked of the first post:
o SMF 2.0 ONLY
If you want the SMF 1.1.X version you should try this mod:
http://custom.simplemachines.org/mods/index.php?mod=290
Just update the package to SMF 1.1.8
Nice mod, but it would be nicer if it checked for quoted text too. I mean, many people use to quote someone's post and after that they only write a couple of words, or a smiley.
That feature is in my to-do list, I have a lot of work with other mods
very nice mod, thanks
works perfectly :)
Quote from: johncccccc on April 26, 2009, 06:33:44 PM
very nice mod, thanks
works perfectly :)
Glad you like it
yep, very nice, stops those spammers posting single worded threads, waste of a post lol..
thanks again nice mod
Tried to manually edit this so it would work on the theme we use.
The edit was made yet the mod isn't working as it should.
2.0 RC1-1
Installed on 2 RC 1.2 and am no getting the following error:
==>906: $txt['error_minChar'] = 'The message does not meet the minimum character requirements (' . $modSettings['minChar'] . ' characters).';
: Undefined index: minChar
File: /web/cache/lang_index+Modifications_english_default.php
Line: 906
Please advise. Thx
BUMP
Quote from: TheListener on July 02, 2009, 06:36:46 PM
Tried to manually edit this so it would work on the theme we use.
The edit was made yet the mod isn't working as it should.
2.0 RC1-1
BUMP
Works great, tested in my localhost on a fresh install of SMF so the mod works great ;)
Try to re-install the mod and set the admin settings for this mod
Quote from: NIBOGO on August 04, 2009, 03:18:03 PM
Works great, tested in my localhost on a fresh install of SMF so the mod works great ;)
Try to re-install the mod and set the admin settings for this mod
2 RC 1.2?
Quote from: NIBOGO on August 04, 2009, 03:18:03 PM
Works great, tested in my localhost on a fresh install of SMF so the mod works great ;)
Try to re-install the mod and set the admin settings for this mod
No difference.
BUMP
NIBOGO que bueno que hablas español!
Tengo este problema, en mi log de errores siempre me bota esto :
http://www.lanuevacuadra.com/index.php?pretty;board=humor-y-curiosidades;topic=aprendiendo-los-tipos-de-%27modelos-economicos%27-con-distante.msg22185&topicseen
8: Undefined index: minWordLen
Archivo: lanuevacuadra.com/cache/lang_Modifications_english_silentwave_20rc1.php
Línea: 191
Siempre la misma linea la 191, esta contiene esto
$txt['error_minWordLen'] = 'El mensaje no tiene la cantidad minima de palabras requeridas: (' . $modSettings['minWordLen'] . ' palabras).';
Alguna idea de que puede estar mal? :-\
Nice Mod
Here to include the German
$txt['minWordLen'] = 'Min. Wörter pro Beitrag';
$txt['minwords_mod'] = 'Wörter';
$txt['minChar'] = 'Min. Zeichen pro Beitrag';
$txt['minchars_mod'] = 'Zeichen';
$txt['minmod_zero'] = '0 für kein Min. setzen.';
$txt['minAdminLen'] = 'Min. Wörter oder Zeichen bei Admins ignorieren';
$txt['error_minWordLen'] = 'Die Nachricht hat zu wenige Wörter. (min. bitte ' . $modSettings['minWordLen'] . ' Wörter eingeben.)';
$txt['error_minChar'] = 'Die Nachricht hat zu wenige Zeichen. (min. bitte ' . $modSettings['minChar'] . ' Zeichen eingeben.)';
Apply Filter: Only show the errors of this type Type of error: Undefined
Apply Filter: Only show the error messages of this URL http://www.parascifi.info/index.php?action=admin;area=postsettings;sa=topics
Apply Filter: Only show the errors with the same message
8: Undefined index: minChar
Apply Filter: Only show the errors from this file
/Themes/default/languages/Modifications.english.php
Line: 602
Attachment supplied
Hi,
I just want to say that this mod works for SMF 2.0 RC2, too.
Take this post as a kind of request, because when I tried to install the package, it said the package was not compatible with 2.0RC2. I emulated the version to RC1 but it said the same thing. At last I found the manual copy/past instructions (from install.xml) and installed it manually; the package worked without requiring any modifications.
In short, it would be great for RC2 users if you put 2.0 RC2 as compatible version to the package-info.
In this week I will work on this package but with some improvements, currently I'm pretty busy but this weekend I'll finish the new version of this mod and the Social Groups v1.6 ;)
Will this ever be updated to rc2, I'd love to use this on my general discussion forum!
Quote from: Kcmartz on February 11, 2010, 01:59:47 PM
Will this ever be updated to rc2, I'd love to use this on my general discussion forum!
With more than 1000 posts you should know that posting things like "I need it for RC2" or "Will this be updated to RC2" will not make the mod authors to update it soon just because you need it or want it. If you need it so bad you should code your own mod otherwise be patient.
Changelog:
1.1 - 13 Feb 2010
o Some Code Improvements. (Now the mod is two times faster)
o Added Option to Doesn't Count Chars and Words between [quote] BBCode.
o Added Support for SMF 2.0 RC2.
Are you Spanish? Please include support for spanish_es and spanish_es-utf8. I use that locale. Thanks. It is easy modify the lang file.
Nice modification.
Thank you for SMF 2.0 RC2
Quote from: shakaran on February 13, 2010, 04:32:00 PM
Are you Spanish? Please include support for spanish_es and spanish_es-utf8. I use that locale. Thanks. It is easy modify the lang file.
Yes, I'm
Quote from: MaXiForum.cz on February 13, 2010, 04:49:58 PM
Nice modification.
Thank you for SMF 2.0 RC2
Glad you like it
Quote from: NIBOGO on February 11, 2010, 02:09:40 PM
Quote from: Kcmartz on February 11, 2010, 01:59:47 PM
Will this ever be updated to rc2, I'd love to use this on my general discussion forum!
With more than 1000 posts you should know that posting things like "I need it for RC2" or "Will this be updated to RC2" will not make the mod authors to update it soon just because you need it or want it. If you need it so bad you should code your own mod otherwise be patient.
Quote from: NIBOGO on February 13, 2010, 02:04:11 PM
Changelog:
1.1 - 13 Feb 2010
o Some Code Improvements. (Now the mod is two times faster)
o Added Option to Doesn't Count Chars and Words between [quote] BBCode.
o Added Support for SMF 2.0 RC2.
LMAO
Thanks for upgrading, it's working fine on my SMF 2.0 RC 2! :)
Quote from: NIBOGO on February 11, 2010, 02:09:40 PM
Quote from: Kcmartz on February 11, 2010, 01:59:47 PM
Will this ever be updated to rc2, I'd love to use this on my general discussion forum!
With more than 1000 posts you should know that posting things like "I need it for RC2" or "Will this be updated to RC2" will not make the mod authors to update it soon just because you need it or want it. If you need it so bad you should code your own mod otherwise be patient.
The thing is I am busy with school and don't have time to learn the SMF code and it's language (PHP and XML for the mods)
Quote from: Sakae on February 14, 2010, 06:27:26 PM
Quote from: NIBOGO on February 11, 2010, 02:09:40 PM
Quote from: Kcmartz on February 11, 2010, 01:59:47 PM
Will this ever be updated to rc2, I'd love to use this on my general discussion forum!
With more than 1000 posts you should know that posting things like "I need it for RC2" or "Will this be updated to RC2" will not make the mod authors to update it soon just because you need it or want it. If you need it so bad you should code your own mod otherwise be patient.
Quote from: NIBOGO on February 13, 2010, 02:04:11 PM
Changelog:
1.1 - 13 Feb 2010
o Some Code Improvements. (Now the mod is two times faster)
o Added Option to Doesn't Count Chars and Words between [quote] BBCode.
o Added Support for SMF 2.0 RC2.
LMAO
Thanks for upgrading, it's working fine on my SMF 2.0 RC 2! :)
Glad you like it and btw the Kc posts didn't make of I upgrade it as you can see I was updating my mods yesterday. (and I'm finishing the new version of the SMF Topic Prefix Mod).
Quote from: Kcmartz on February 14, 2010, 08:03:40 PM
Quote from: NIBOGO on February 11, 2010, 02:09:40 PM
Quote from: Kcmartz on February 11, 2010, 01:59:47 PM
Will this ever be updated to rc2, I'd love to use this on my general discussion forum!
With more than 1000 posts you should know that posting things like "I need it for RC2" or "Will this be updated to RC2" will not make the mod authors to update it soon just because you need it or want it. If you need it so bad you should code your own mod otherwise be patient.
The thing is I am busy with school and don't have time to learn the SMF code and it's language (PHP and XML for the mods)
But even knowing that you are busy with the school you should know that:
"posting things like "I need it for RC2" or "Will this be updated to RC2" will not make the mod authors to update it soon just because you need it or want it. If you need it so bad you should code your own mod otherwise be patient."
In the future you have two options be patient or code ;)
Works on 2.0 RC3 but just need to emulate the version number to 2.0 RC2 to install. :)
Please compatible with smf1.1.11
Quote from: pointalk on May 09, 2010, 02:59:51 AM
Please compatible with smf1.1.11
Please read the topic or use the search function before ask things that has been rejected before:
http://www.simplemachines.org/community/index.php?topic=278666.msg1994847#msg1994847
thank you for this mod its very helpful
Quote from: minos on July 08, 2010, 05:55:28 PM
thank you for this mod its very helpful
Glad you like it! :)
Remember that any donation (http://www.smfpacks.com/donate.php) is more than welcome!
Nice, I think I will use this. I had to different mods before doing these both things.
Mod updated for SMF 2.0 FInal
Hey bud I was wondering if you can tell me how I can remove limitations for certain post-count membergroups as in like disable the minimum number of characters to members who reached atleast 100 posts. Can this be done? I would be really grateful if you can guide through in order to achieve this..
Hi Nibogo,
Could you help me debug why I see in my error center the below words:
"
http://www.mydomain.yyy/index.php?action=admin;area=logs;sa=errorlog;desc
8: Undefined index: minChar
File: /home/xxx /yyy /Themes/default/languages/index.vietnamese-utf8.php (eval?)
Line: 203
"
thank you
I wonder if it would be possible to have word count minimums set by each board, and not a single global setting?
I'd like to use this for a role-playing forum, to force our roleplayers to meet a minimum word count when RPing (about 100 words) without having to check every post, but we also want people to have to ability to make shorter posts in non-roleplay areas.
Is this a possibility?
I was able to add the ability to remove both specific member groups and specific boards from the set limitations.
I was able to add this to the Admin settings, but because of a problem with integers (and probably because of my lack of php knowledge) I was only able to make the settings remove a single member, and a single board from the limitations.
Code Changes From Scratch
./Themes/default/languages/Modifications.english.php
?>
//Minimun Characters or Words Mod
$txt['minWordLen'] = 'Minimum words per post';
$txt['minwords_mod'] = 'words';
$txt['minChar'] = 'Minimum characters per post';
$txt['minchars_mod'] = 'characters';
$txt['minmod_zero'] = '0 for no minimum.';
$txt['minAdminLen'] = 'Ignore the minimun characters or words of Admins';
$txt['minCountQuote'] = 'Count the Words and Characters Between [QUOTE] BBCode';
$txt['error_minWordLen'] = 'The message does not meet the minimum word requirements (' . $modSettings['minWordLen'] . ' words).';
$txt['error_minChar'] = 'The message does not meet the minimum character requirements (' . $modSettings['minChar'] . ' characters).';
./Sources/ManagePosts.php
// All, next/prev...
array('int', 'enableAllMessages', 'postinput' => $txt['manageposts_posts'], 'subtext' => $txt['enableAllMessages_zero']),
array('check', 'disableCustomPerPage'),
array('check', 'enablePreviousNext'),
// All, next/prev...
array('int', 'enableAllMessages', 'postinput' => $txt['manageposts_posts'], 'subtext' => $txt['enableAllMessages_zero']),
array('check', 'disableCustomPerPage'),
array('check', 'enablePreviousNext'),
'',
array('int', 'minWordLen', 'postinput' => $txt['minwords_mod'], 'subtext' => $txt['minmod_zero']),
array('int', 'minChar', 'postinput' => $txt['minchars_mod'], 'subtext' => $txt['minmod_zero']),
array('check', 'minAdminLen'),
array('check', 'minCountQuote'),
./Sources/Post.php
// Check the subject and message.
if (!isset($_POST['subject']) || $smcFunc['htmltrim']($smcFunc['htmlspecialchars']($_POST['subject'])) === '')
$post_errors[] = 'no_subject';
if (!isset($_POST['message']) || $smcFunc['htmltrim']($smcFunc['htmlspecialchars']($_POST['message']), ENT_QUOTES) === '')
$post_errors[] = 'no_message';
elseif (!empty($modSettings['max_messageLength']) && $smcFunc['strlen']($_POST['message']) > $modSettings['max_messageLength'])
$post_errors[] = 'long_message';
// Check if the message is to short, and if that is acceptable
if (in_array($context['current_board'], array(1, 2, 3)))
{
}
else
{
if (in_array($user_info['groups'], array(1, 2, 3)))
{
}
else
{
if (!empty($modSettings['minWordLen']) && (empty($modSettings['minAdminLen']) || (!empty($modSettings['minAdminLen']) && !$context['user']['is_admin'])))
{
$message = $_POST['message'];
if (empty($modSettings['minCountQuote']))
$message = trim(preg_replace('~\n?\[quote.*?\].+?\[/quote\]\n?~is', '', $message));
preg_match_all('/\S+/', $message, $matches);
if ((count($matches[0]) < (int)$modSettings['minWordLen']))
$post_errors[] = 'minWordLen';
}
if (!empty($modSettings['minChar']) && (empty($modSettings['minAdminLen']) || (!empty($modSettings['minAdminLen']) && !$context['user']['is_admin'])))
{
$message = $_POST['message'];
if (empty($modSettings['minCountQuote']))
$message = trim(preg_replace('~\n?\[quote.*?\].+?\[/quote\]\n?~is', '', $message));
if (($smcFunc['strlen']($message) < (int)$modSettings['minChar']))
$post_errors[] = 'minChar';
}
}
}
// Check the subject and message.
if (!isset($_POST['subject']) || $smcFunc['htmltrim']($smcFunc['htmlspecialchars']($_POST['subject'])) === '')
$post_errors[] = 'no_subject';
if (!isset($_POST['message']) || $smcFunc['htmltrim']($smcFunc['htmlspecialchars']($_POST['message']), ENT_QUOTES) === '')
$post_errors[] = 'no_message';
elseif (!empty($modSettings['max_messageLength']) && $smcFunc['strlen']($_POST['message']) > $modSettings['max_messageLength'])
$post_errors[] = 'long_message';
In the above code you see this:
if (in_array($context['current_board'], array(1, 2, 3)))
{
}
else
{
if (in_array($user_info['groups'], array(1, 2, 3)))
The 1, 2, 3 in both of those arrays are the Id's of the boards, and the id's of the member groups.
For example, in my forum, the first array is array(20, 21, 27)
This makes it so that people can type any message size they want in the spam boards (boards 20, 21, and 27)
And my second array, looks like this array(12)
This makes it so that the member group who's id is 12 (in the case of my forum, people with more than 500 posts) are allowed to post any message size anywhere on the forum.
I have working code that adds these settings to the admin panel, but like I said, It only allowes you to add 1 board and 1 member group the the exclusion list.
If anyone want's that code, just ask.
Oh my gosh, that is so wonderful! Thank you so so much =D
My RP form and I really appreciate the coding work, it will make things so much easier!
This is so very exciting
Glad I could help!
Honestly, I'm just overjoyed that I am finally getting good enough at php to be of help to people... This was my first php mod where I modified calls to other files. So I'm getting better ;D
On a side note, I don't THINK it will make a difference, but I was looking over the code again, and found a single space that shouldn't have been there. I edited it, and everything should be fine.
Also, for anyone else, if you use this, remember to remove the 1, 2, 3 from an array if you arn't using it... Don't want to give permissions where they arn't due ;)
Great mod - good work.
Is there any way we're able to also set a minimum character limit for titles (subject title), too?
Sorry staff but I do hate people who take the p**s.
brettuk I see you have removed the link to your site from the signature section here, unless Specsavers have failed me the following still hasn't been rectified.
Quote from: br360 on December 19, 2018, 07:07:15 PM
Quote from: brettuk on December 19, 2018, 04:19:57 AM
Sorry, I recently re-designed the footer and forgot about these links, I'll get those added.
When is this going to happen? I like your forum and hope it does well, so I am trying to be as respectful as I can. That being said though; you removed the SMF copyright once before and presumably put it back when you were told then to add it back if you wanted support.
The few times I have been to your forum over the last few months, I have never seen the copyright for simple portal nor have I seen one for the paid SMF tricks theme you are using- so this is not a new thing based on recent file changes.
I will give you the benifit of the doubt that you actually paid for the theme, but I'm not as sure you paid extra for copyright removal (or if that's even an option with SMF Tricks)
Like I said; I do like your forum and hope it does well. But for someone that seems to have put in as much time and effort into it as you have, it would be nice if you would show respect to the people that spent their time and effort creating something that has helped you enhance your site like it has
Not to mention what I pointed out in another thread - he messed up the credits page ::).
This mod still works for 2.017 could it be updated to include Global moderators been excluded from the restrictions like admins.
Thanks to
@KittyGalore, I bring you the updated version:
Changelog:1.1.3 - 23 May 2024o Upgraded for SMF 2.1
o Hooks for easier installation.
First thanks for this great mod, one question can I apply minimum characters for a specific board?
Quote from: clubkadettspain on May 27, 2024, 03:37:40 AMFirst thanks for this great mod, one question can I apply minimum characters for a specific board?
No