Simple Machines Community Forum

Customizing SMF => Modifications and Packages => Topic started by: ethankcvds on September 08, 2009, 11:53:09 PM

Title: Word Count Limits
Post by: ethankcvds on September 08, 2009, 11:53:09 PM
Link to Mod (https://custom.simplemachines.org/mods/index.php?mod=2117)

Original Mod Author: Arantor (http://www.simplemachines.org/community/index.php?action=profile;u=53626) 

As requested in http://www.simplemachines.org/community/index.php?topic=332053.0 (http://www.simplemachines.org/community/index.php?topic=332053.0)

This allows the admin to set a minimum and/or maximum number of words to be present in a post before allowing it to be accepted, e.g. minimum of 20 words in the post.

* allows both individual minimum and maximum, and 'off' limits - 0 = no limit, up to 10000 on either limit (you can set a maximum of 10,000 words for example)
* discounts numbers entirely
* treats punctuation (except ') as word breaking, e.g. two-worded is treated as two words
* considers words as 3 characters or more
* configurable on a per board level

HTML and BBcode is not considered.


Version history:
1.4 RC - 05 June 2019
Removed 1.1 support
Added 2.1 RC 2 support
Quoted posts no longer included in word count total

1.3b - 11 June 2011
Added 2.0 support
Removed 2.0 RC5 support.

1.3a - 13 February 2011
Added 2.0 RC5 support
Removed 2.0 RC4 support.

1.3 - November 2010
Added 2.0 RC4 support
Removed 2.0 RC3 support.
Added Turkish Translations

1.2 - 9 March 2010
Added 2.0 RC3 support
Removed 2.0 RC 1.2 and 2.0 RC2 support.
Added Russian Translations

1.1 - 1 November 2009
Provided compatibility for older PHP/PCRE combinations
Added 2.0 RC2 support

1.0 - August 31, 2009
First public release

Beta - August 28, 2009
Beta release
Title: Re: Word Count Limits
Post by: cme1st2302 on September 08, 2009, 11:59:01 PM
Very cool mod Arantor!!!  This will come in handy!!

Chris
Title: Re: Word Count Limits
Post by: Blinker on September 09, 2009, 05:31:51 AM
Another triumph mate...well done. Keep up the great work.
Title: Re: Word Count Limits
Post by: digit on September 09, 2009, 12:48:03 PM
Yes.  This is good.  REAL good.  Is there any possibility of setting the number of  characters too?  8)  Keep up the great work.
Title: Re: Word Count Limits
Post by: ოկtђ on September 09, 2009, 12:58:14 PM
This is  good really
Title: Re: Word Count Limits
Post by: Arantor on September 09, 2009, 02:08:39 PM
Well... global maximum of character count is already possible; it's a setting in Post Settings, adding a minimum character count wouldn't be impossible - but would likely be the scope of a separate mod to this.
Title: Re: Word Count Limits
Post by: alex30 on September 11, 2009, 04:58:13 PM
Great mod Arantor!

What if people have many boards. Can this mod be updated with option that will allow to modify all boards at once?
Title: Re: Word Count Limits
Post by: Arantor on September 11, 2009, 05:04:22 PM
I suppose it could be but generally you wouldn't apply the same figures to all boards - at least that's not what I thought.

It's easy enough SQL though, and I'm not sure where to put it without giving it its very own page in the admin panel.
Title: Re: Word Count Limits
Post by: SimonSays on September 16, 2009, 12:57:34 PM
Quote from: Arantor on September 11, 2009, 05:04:22 PM
I suppose it could be but generally you wouldn't apply the same figures to all boards - at least that's not what I thought.

It's easy enough SQL though, and I'm not sure where to put it without giving it its very own page in the admin panel.
Allowing a word-limit to be applied to all boards would make sense, which could then be tweaked on a per-board basis. On my site, we have 50+ boards, which makes setting the limit individually tedious. I'd prefer that it could be set all at once.

The appropriate place, it seems to me, for such a setting would be in the "Manage Boards --> Settings" menu (ala, www.foo.com/index.php?action=manageboards;sa=settings)

Thanks for the cool mod.
Title: Re: Word Count Limits
Post by: Arantor on September 16, 2009, 03:43:07 PM
It would make sense, but at the same time which takes priority, global or board specific? How do you override at board level, given that you can set a 'no limit' option too at board level?

The only way I can see of doing that is adding a tick box in each board to override the global value.

To be honest I'm not sure I'm going to add this in; I've said elsewhere that I'm not making any more mods, massive enhancement to one mod (which, being honest, this is a fair enhancement) isn't something I personally have much time or energy for.

You can set a default however with SQL:
UPDATE smf_boards SET min_words = 1, max_words = 50

Change smf_ to suit your database prefix, set the defaults to values that suit you and you can instantly have a default set right there for all boards.
Title: Re: Word Count Limits
Post by: Jeep29 on October 12, 2009, 03:28:38 AM
This is a very good mod !

It is possible to assign it to a group rather than a board


Ps : sorry for my very bad english
Title: Re: Word Count Limits
Post by: Arantor on October 12, 2009, 04:19:46 AM
Quote from: Jeep29 on October 12, 2009, 03:28:38 AM
It is possible to assign it to a group rather than a board

Not without a complete rewrite, not really.
Title: Re: Word Count Limits
Post by: javierjp on October 16, 2009, 05:35:41 PM
First at all, great job man!  :)

I installed in a clean smf 1.1.10 installation, set the minimum to 3 and the maximum to 6 (for testing proposes)  but Not worked for me :(

All i get its "there are no enought words in this post" no matter if i write 1, 10 or 30 words, i get the error always! , smf totally ignore both limits.

The only way i found for write a post its using 0 as minimum.

Any idea for solve this?
thanks in advance



Title: Re: Word Count Limits
Post by: Arantor on October 16, 2009, 05:37:16 PM
What words are you using and is there anything in the error log?
Title: Re: Word Count Limits
Post by: javierjp on October 16, 2009, 06:12:40 PM
Error log:

2: Compilation failed: PCRE does not support \L, \l, \N, \P, \p, \U, \u, or \X at offset 1
File: W:\www\smf10\Sources\Post.php
Line: 2468


Im testing in local mode in my own PC, not in a live enviroment.
Title: Re: Word Count Limits
Post by: Arantor on October 16, 2009, 06:23:33 PM
What version of PHP are you using? That is the result of an older PHP build normally.

Anyway, it's clear that I need to figure out another way of doing this.
Title: Re: Word Count Limits
Post by: javierjp on October 16, 2009, 07:23:32 PM
php 4.3.6 in local mode.
Title: Re: Word Count Limits
Post by: Arantor on October 16, 2009, 07:26:37 PM
Yes, that will definitely cause that. I would note that even 4.4 series is now almost 2 years old, and 4.3 is much older.
Title: Re: Word Count Limits
Post by: javierjp on October 16, 2009, 07:58:01 PM
Thanks for all man  ;)
I will forget about local mode and try in my live enviroment (php5)

grettings
Javierjp
Title: Re: Word Count Limits
Post by: Arantor on October 16, 2009, 08:02:15 PM
Let me know how that goes. Meantime I'll see if I can find a better solution.
Title: Re: Word Count Limits
Post by: Kimmie on November 06, 2009, 08:25:07 PM
this is a great mod (I used the 1.X version when I had that and I am glad to see there is a 2.0 version out :) ).

Is there any way I can change the message that people see so that it tells them what the actual "minimum" is instead of just saying "There are not enough words in this post. ". Already have people pming me asking and its rather annoying..lol. In addition, someone sees that, it may deter them from posting all together because they wont want to have to sit there and play with it just to see how many words they have to have before they can post it.

I would also like to personalise that message a little more.


Thanks :)
Title: Re: Word Count Limits
Post by: ethankcvds on November 06, 2009, 10:08:54 PM
Quote from: Kimmie on November 06, 2009, 08:25:07 PM
this is a great mod (I used the 1.X version when I had that and I am glad to see there is a 2.0 version out :) ).

Is there any way I can change the message that people see so that it tells them what the actual "minimum" is instead of just saying "There are not enough words in this post. ". Already have people pming me asking and its rather annoying..lol. In addition, someone sees that, it may deter them from posting all together because they wont want to have to sit there and play with it just to see how many words they have to have before they can post it.

I would also like to personalise that message a little more.


Thanks :)

If all you're boards have the same Minimum number of words you'll want to edit
Errors.language.php

$txt['error_post_too_few_words'] = 'There are not enough words in this post.';
Title: Re: Word Count Limits
Post by: Kimmie on November 13, 2009, 04:02:55 PM
Quote from: ethankcvds on November 06, 2009, 10:08:54 PM
Quote from: Kimmie on November 06, 2009, 08:25:07 PM
this is a great mod (I used the 1.X version when I had that and I am glad to see there is a 2.0 version out :) ).

Is there any way I can change the message that people see so that it tells them what the actual "minimum" is instead of just saying "There are not enough words in this post. ". Already have people pming me asking and its rather annoying..lol. In addition, someone sees that, it may deter them from posting all together because they wont want to have to sit there and play with it just to see how many words they have to have before they can post it.

I would also like to personalise that message a little more.


Thanks :)

If all you're boards have the same Minimum number of words you'll want to edit
Errors.language.php

$txt['error_post_too_few_words'] = 'There are not enough words in this post.';

Errors.LANGUAGE.php?

I see an Errors.English.Php in the Defaults themes languages folder and an Errors.php in the sources directory and an Errors.template.php in the default themes main directory but cant seem to find that file. Its not listed when I parse the mod either. Where is that file at?
Title: Re: Word Count Limits
Post by: Arantor on November 13, 2009, 04:04:31 PM
There are multiple files of Errors, one per language. If you use English as your forum's language, the file would be Errors.english.php. Similarly if it were, say, French, it would be Errors.french.php.

In this case the edit would be to Errors.english.php.
Title: Re: Word Count Limits
Post by: Kimmie on November 13, 2009, 11:30:01 PM
Quote from: Arantor on November 13, 2009, 04:04:31 PM
There are multiple files of Errors, one per language. If you use English as your forum's language, the file would be Errors.english.php. Similarly if it were, say, French, it would be Errors.french.php.

In this case the edit would be to Errors.english.php.

so then what they "meant" to say was

Quoteyou'll want to edit Errors.language.php, where "language" is the language you use on your site

8) lol. Yeah, I finally figured out which file it was after I edited them all and looked for that specific text.
Title: Re: Word Count Limits
Post by: Arantor on November 14, 2009, 09:09:58 AM
Pretty much. Unfortunately it's one of the more typical short-hand forms, though the preferred version is Errors.{language}.php as it makes it more visible that something different is in the middle part.
Title: Re: Word Count Limits
Post by: Kimmie on November 24, 2009, 01:39:45 AM
is it a bug with the mod, that words have to be atleast 3 "characters" long or was that intentional? :)

If its a bug, can we get a fix? If it was intentional, is there a way to change it?


Example: My limit is set to 3 words minimum and NO maximum count. I made a post earlier tonight that said "Great Post WJ!!!" and it told me that it wasnt enough words. As soon as I typed out her screenname (willjess) it let me post it.
Title: Re: Word Count Limits
Post by: Arantor on November 24, 2009, 01:44:53 AM
When I originally wrote it, yes it was intentional.

What would you change it to?
Title: Re: Word Count Limits
Post by: Kimmie on November 26, 2009, 11:34:09 AM
Quote from: Arantor on November 24, 2009, 01:44:53 AM
When I originally wrote it, yes it was intentional.

What would you change it to?


well I would actually turn it off as there will be times when one of those 3 words may be the word "I" or "a" (one character words) or the word ""or", or "as", or "if" (or in my example, mine was that persons initials), etc etc, because right now it doesnt matter how many you set the word count limit to, those words are never included in the count because they are not enough characters. Its a real hassle for folks specially when alot dont understand how the limit feature works.. and I dont have time to sit there and explain it to everyone that complains.. (and believe me when I tell you "alot" complain...lol.


The mod overall is a good mod because it allows you to control spam. Just needs a bit "tweaked" is all :)
Title: Re: Word Count Limits
Post by: Arantor on November 26, 2009, 12:58:05 PM
Unfortunately it isn't as simple as that. In computing terms you have to be able to define some kind of rule that it can work to.

It would be possible to have words of 3 letters or more, plus allowing things like I or a plus or/as/if/of/to, but before any such thing can happen it would have to be defined more rigidly what the rules for counting a 'word' as are.
Title: Re: Word Count Limits
Post by: ttuu on November 26, 2009, 01:57:35 PM
i have this error:

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
file: Post.php
line: 1662

the line 1662 for this fike is:

" , __FILE__, __LINE__);
Title: Re: Word Count Limits
Post by: Arantor on November 26, 2009, 02:17:45 PM
Can we have a few lines before it too please?
Title: Re: Word Count Limits
Post by: ttuu on November 26, 2009, 02:42:41 PM
1653-1676 lines:

if (isset($_POST['calendar']) && !isset($_REQUEST['deleteevent']) && $func['htmltrim']($_POST['evtitle']) === '')
$post_errors[] = 'no_event';
// You are not!
if (isset($_POST['message']) && strtolower($_POST['message']) == 'i am the administrator.' && !$user_info['is_admin'])
fatal_error('Knave! Masquerader! Charlatan!', false);

// Now, let's check the post for being too short/tall
$query = db_query("
SELECT min_words, max_words FROM {$db_prefix}boards WHERE ID_BOARD = {$board_info['id']}
", __FILE__, __LINE__);

if(mysql_num_rows($query) == 1) {
list($min_words, $max_words) = mysql_fetch_row($query);
if($min_words > 0 || $max_words > 0) {
$count = wordcount( $func['htmltrim'](strip_tags(parse_bbc($_POST['message'], false))) ); // convert everything to HTML then scrap it to get only content
if($min_words != 0 && $count < $min_words) {
$post_errors[] = 'post_too_few_words';
} elseif($max_words != 0 && $count > $max_words) {
$post_errors[] = 'post_too_many_words';
}
}
}

mysql_free_result($query);



Title: Re: Word Count Limits
Post by: Arantor on November 26, 2009, 02:52:25 PM
Huh.

What were you doing at the time of getting that error?
Title: Re: Word Count Limits
Post by: ttuu on November 26, 2009, 02:55:23 PM
i sendit message with attachment.
Title: Re: Word Count Limits
Post by: Arantor on November 26, 2009, 03:05:23 PM
Hmm.

Do you use any of the pretty URLs type mods?
Title: Re: Word Count Limits
Post by: ttuu on November 26, 2009, 03:14:43 PM
no/
Title: Re: Word Count Limits
Post by: ethankcvds on November 26, 2009, 05:21:46 PM
Go into phpmyadmin and make sure the tables exist. If they do. Do you have any other mods installed? If so can you post them?
Title: Re: Word Count Limits
Post by: Kimmie on December 01, 2009, 05:51:55 PM
Quote from: Arantor on November 26, 2009, 12:58:05 PM
Unfortunately it isn't as simple as that. In computing terms you have to be able to define some kind of rule that it can work to.

It would be possible to have words of 3 letters or more, plus allowing things like I or a plus or/as/if/of/to, but before any such thing can happen it would have to be defined more rigidly what the rules for counting a 'word' as are.


guessin that means I will have to live with it right?  lol
Title: Re: Word Count Limits
Post by: Arantor on December 01, 2009, 05:56:50 PM
No, that means if you can figure out very specifically what you want, we can try and come up with rules.

What 1 and 2 letter words should be considered as allowed?
Title: Re: Word Count Limits
Post by: Bugo on February 07, 2010, 08:09:31 AM
Russian language files (see attachments)
Title: Re: Word Count Limits
Post by: XxDrAg0nxX on March 25, 2010, 11:54:04 AM
Quote from: Arantor on December 01, 2009, 05:56:50 PM
No, that means if you can figure out very specifically what you want, we can try and come up with rules.

What 1 and 2 letter words should be considered as allowed?

Was the 2 word allowed updated yet? I also find a lot complain that these proper words are not counted..

I
WE
IF
ME
US
IN
OF
ON
OR
OK
OX
PC
PM
A
AM
AN
AD
AK
AN
SO
DO
GO
HE
HI
HA
JK
LA
BE
NO
ME
Title: Re: Word Count Limits
Post by: Arantor on March 25, 2010, 07:39:12 PM
I never updated it for that since noone before now ever bothered to answer the question. I subsequently gave the mod away, but wouldn't be that hard to do.
Title: Re: Word Count Limits
Post by: ethankcvds on May 13, 2010, 04:47:38 PM
I'll be adding that as soon as I find time to do so. Which I don't know when that might be.
Title: Re: Word Count Limits
Post by: gisfreak on August 24, 2010, 03:24:23 AM
applied on SMF 1.1.11

result in

QuoteExecute Modification     ./Sources/ManageBoards.php     Test failed

any clue ?
Title: Re: Word Count Limits
Post by: ethankcvds on August 24, 2010, 04:23:31 PM
Quote from: gisfreak on August 24, 2010, 03:24:23 AM
applied on SMF 1.1.11

result in

QuoteExecute Modification     ./Sources/ManageBoards.php     Test failed

any clue ?

Are you trying to install or uninstall? Have any other mods installed that edited the ManageBoards.php file? Have you tried to apply the necessary edits yourself to install or uninstall the mod?
Title: Re: Word Count Limits
Post by: gisfreak on August 26, 2010, 08:32:19 AM
i want to install it on my forum, custom themes  ::)

YES i have many many mod installed,but i cant remember which one of the previous mod that modified manageboard  :P

oke, i will try to edit it manually  ???
Title: Re: Word Count Limits
Post by: Sefket on October 28, 2010, 01:06:47 PM
I have this mod on my site, and everyone hates it(One of my administrators installed it). I'm trying to uninstall it, but I get this error:


Execute Modification    ./Sources/ManageBoards.php    Test failed

I have a custom theme also.

1.1.11 version boarads
Title: Re: Word Count Limits
Post by: ethankcvds on October 28, 2010, 04:10:05 PM
Quote from: Sefket on October 28, 2010, 01:06:47 PM
I have this mod on my site, and everyone hates it(One of my administrators installed it). I'm trying to uninstall it, but I get this error:


Execute Modification    ./Sources/ManageBoards.php    Test failed

I have a custom theme also.

1.1.11 version boarads

You will have to manually uninstall the code changes in /Sources/ManageBoards.php. Follow the Manual Install instructions found on this http://custom.simplemachines.org/mods/index.php?mod=2117 for your version of SMF by removing the code that is listed in Add After: and Add Before:. Then uninstall it from the package manger while disregarding Execute Modification    ./Sources/ManageBoards.php    Test failed error. Or you could take the harder approach by uninstalling mods that were installed after this mod uninstall this mod  and reinstall those mods.
Title: Re: Word Count Limits
Post by: gisfreak on November 08, 2010, 11:20:49 AM
i just applied the mod this night

and since manageboards.php is failed, then i do manual edit on it, but i stuck on

search :

'permission_mode' => 'normal',

add after :


'min_words' => 0,
'max_words' => 0,


i cant find it in my manageboards.php file  :o

only find this that contain string "permission_mode" :

// With permission_enable_by_board disabled you can set some predefined permissions.
if (empty($modSettings['permission_enable_by_board']))
{
$boardOptions['permission_mode'] = (int) $_POST['permission_mode'];
$boardOptions['inherit_permissions'] = false;
}

what should i do ? need help here  :)

NOTE : manageboards.php attached, please take a look on it

Title: Re: Word Count Limits
Post by: ethankcvds on November 09, 2010, 10:55:33 AM
Search for:
$context['board'] = array(

after:
'url' => '',

add:
'permission_mode' => 'normal',
'min_words' => 0,
'max_words' => 0,
Title: Re: Word Count Limits
Post by: gisfreak on November 10, 2010, 02:44:35 AM
ahaaaa, thanx mate  ;D
Title: Re: Word Count Limits
Post by: ethankcvds on June 12, 2011, 12:01:56 AM
I'm planning after next week to start adding features. Also just letting those who need support with this mod know that I am subscribed to this topic.

ethankcvds
Title: Re: Word Count Limits
Post by: Sefket on November 22, 2011, 10:34:04 PM
I have a question. I want to know if its possible if I can apply this mod to just certain forums that I wanted and not globally. And if that's possible, which version do I download for 1.1.15? Also, any way to keep people from quoting responses without adding their own text as well?(can this be applied with this mod?)
Title: Re: Word Count Limits
Post by: ethankcvds on November 22, 2011, 10:59:10 PM
Quote from: Sefket on November 22, 2011, 10:34:04 PM
I have a question. I want to know if its possible if I can apply this mod to just certain forums that I wanted and not globally.

You can apply the word limits on a board to board basis.

Quote from: Sefket on November 22, 2011, 10:34:04 PMAnd if that's possible, which version do I download for 1.1.15?

Any of the versions up for download will work on 1.1.15.



Quote from: Sefket on November 22, 2011, 10:34:04 PMAlso, any way to keep people from quoting responses without adding their own text as well?(can this be applied with this mod?)

It would require a bit of editing to exclude anything that is inside quote tags.
Title: Re: Word Count Limits
Post by: Sefket on November 26, 2011, 02:30:42 PM

An Error Has Occurred!
The package you tried to upload either is not a valid package or has become corrupted.

SMF 1.1.15
Title: Re: Word Count Limits
Post by: ethankcvds on November 26, 2011, 02:48:27 PM
Quote from: Sefket on November 26, 2011, 02:30:42 PM

An Error Has Occurred!
The package you tried to upload either is not a valid package or has become corrupted.

SMF 1.1.15

I would have said corrupted download, but I just tested the archive myself and it seems to be the archive. So I've repackaged it in a different archive format.
Title: Re: Word Count Limits
Post by: Sefket on November 26, 2011, 04:55:20 PM
There we go, that worked. Only thing that I want to do is make it so people can't just quote the post and click "Reply".(Basically I don't want that as a flaw).
Title: Re: Word Count Limits
Post by: Sefket on November 26, 2011, 07:45:10 PM
I got this:

1.    Execute Code    install11.php    
2.    Execute Modification    ./Themes/default/ManageBoards.template.php    Test successful
3.    Execute Modification    ./Sources/ManageBoards.php    Test failed
4.    Execute Modification    ./Sources/Subs-Boards.php    Test successful
5.    Execute Modification    ./Sources/Post.php    Test successful
6.    Execute Modification    ./Themes/default/languages/Modifications.english.php    Test successful
7.    Execute Modification    ./Themes/default/languages/Errors.english.php    Test successful
8.    Execute Modification    ./Themes/default/languages/Modifications.english-utf8.php    Skipping file
9.    Execute Modification    ./Themes/default/languages/Errors.english-utf8.php    Skipping file
10.    Execute Modification    ./Themes/default/languages/Modifications.english_british.php    Skipping file
11.    Execute Modification    ./Themes/default/languages/Errors.english_british.php    Skipping file
12.    Execute Modification    ./Themes/default/languages/Modifications.english_british-utf8.php    Skipping file
13.    Execute Modification    ./Themes/default/languages/Errors.english_british-utf8.php    Skipping file
14.    Execute Modification    ./Themes/default/languages/Modifications.russian.php    Skipping file
15.    Execute Modification    ./Themes/default/languages/Errors.russian.php    Skipping file
16.    Execute Modification    ./Themes/default/languages/Modifications.russian-utf8.php    Skipping file
17.    Execute Modification    ./Themes/default/languages/Errors.russian-utf8.php    Skipping file
18.    Execute Modification    ./Themes/default/languages/Modifications.turkish.php    Skipping file
19.    Execute Modification    ./Themes/default/languages/Errors.turkish.php    Skipping file
20.    Execute Modification    ./Themes/default/languages/Modifications.turkish-utf8.php    Skipping file
21.    Execute Modification    ./Themes/default/languages/Errors.turkish-utf8.php    Skipping file

Title: Re: Word Count Limits
Post by: ethankcvds on November 26, 2011, 08:03:57 PM
Quote from: Sefket on November 26, 2011, 07:45:10 PM
I got this:

1.    Execute Code    install11.php   
2.    Execute Modification    ./Themes/default/ManageBoards.template.php    Test successful
3.    Execute Modification    ./Sources/ManageBoards.php    Test failed
4.    Execute Modification    ./Sources/Subs-Boards.php    Test successful
5.    Execute Modification    ./Sources/Post.php    Test successful
6.    Execute Modification    ./Themes/default/languages/Modifications.english.php    Test successful
7.    Execute Modification    ./Themes/default/languages/Errors.english.php    Test successful
8.    Execute Modification    ./Themes/default/languages/Modifications.english-utf8.php    Skipping file
9.    Execute Modification    ./Themes/default/languages/Errors.english-utf8.php    Skipping file
10.    Execute Modification    ./Themes/default/languages/Modifications.english_british.php    Skipping file
11.    Execute Modification    ./Themes/default/languages/Errors.english_british.php    Skipping file
12.    Execute Modification    ./Themes/default/languages/Modifications.english_british-utf8.php    Skipping file
13.    Execute Modification    ./Themes/default/languages/Errors.english_british-utf8.php    Skipping file
14.    Execute Modification    ./Themes/default/languages/Modifications.russian.php    Skipping file
15.    Execute Modification    ./Themes/default/languages/Errors.russian.php    Skipping file
16.    Execute Modification    ./Themes/default/languages/Modifications.russian-utf8.php    Skipping file
17.    Execute Modification    ./Themes/default/languages/Errors.russian-utf8.php    Skipping file
18.    Execute Modification    ./Themes/default/languages/Modifications.turkish.php    Skipping file
19.    Execute Modification    ./Themes/default/languages/Errors.turkish.php    Skipping file
20.    Execute Modification    ./Themes/default/languages/Modifications.turkish-utf8.php    Skipping file
21.    Execute Modification    ./Themes/default/languages/Errors.turkish-utf8.php    Skipping file

You'll have to manually edit ManageBoards.php. If you don't feel safe editing the file let me know.

Here is the edit you have to make:
QuoteFind:
$context['board'] = array(
            'is_new' => true,
            'id' => 0,
            'name' => $txt['mboards_new_board_name'],
            'description' => '',
            'count_posts' => 1,
            'theme' => 0,
            'override_theme' => 0,
            'category' => (int) $_REQUEST['cat'],
            'no_children' => true,
            'is_redirect' => 0,
            'count_clicks' => 0,
            'target' => '',
            'url' => '',
        );


Quoteadd after('url' => '',):
'min_words' => 0,
'max_words' => 0,
Title: Re: Word Count Limits
Post by: Sefket on November 26, 2011, 08:32:43 PM
So uh, should I just manually edit instead of installing the package?
Title: Re: Word Count Limits
Post by: ethankcvds on November 26, 2011, 08:36:38 PM
Quote from: Sefket on November 26, 2011, 08:32:43 PM
So uh, should I just manually edit instead of installing the package?

You just need to manually edit that one part of the file. Then after you've made that edit you can use the package manager to install the mod whilst ignoring the error about the failed test.
Title: Re: Word Count Limits
Post by: Sefket on November 26, 2011, 08:40:30 PM
So it'd be this:

{
// Some things that need to be setup for a new board.
$curBoard = array(
'memberGroups' => array(0, -1),
'category' => (int) $_REQUEST['cat']
);
$context['board_order'] = array();
$context['board'] = array(
'is_new' => true,
'id' => 0,
'name' => $txt['mboards_new_board_name'],
'description' => '',
'count_posts' => 1,
'theme' => 0,
'override_theme' => 0,
'category' => (int) $_REQUEST['cat'],
'no_children' => true,
'is_redirect' => 0,
'count_clicks' => 0,
'target' => '',
'url' => '',
);
'min_words' => 0,
         'max_words' => 0,
}
else
{
// Just some easy shortcuts.
$curBoard = &$boards[$_REQUEST['boardid']];
$context['board'] = $boards[$_REQUEST['boardid']];
$context['board']['name'] = htmlspecialchars($context['board']['name']);
$context['board']['description'] = htmlspecialchars($context['board']['description']);
$context['board']['no_children'] = empty($boards[$_REQUEST['boardid']]['tree']['children']);
$context['board']['sort_method'] = $curBoard['sort_method'];
$context['board']['sort_order'] = $curBoard['sort_order'];
}
Title: Re: Word Count Limits
Post by: ethankcvds on November 26, 2011, 08:45:45 PM
Quote from: Sefket on November 26, 2011, 08:40:30 PM
So it'd be this:

{
      // Some things that need to be setup for a new board.
      $curBoard = array(
         'memberGroups' => array(0, -1),
         'category' => (int) $_REQUEST['cat']
      );
      $context['board_order'] = array();
      $context['board'] = array(
         'is_new' => true,
         'id' => 0,
         'name' => $txt['mboards_new_board_name'],
         'description' => '',
         'count_posts' => 1,
         'theme' => 0,
         'override_theme' => 0,
         'category' => (int) $_REQUEST['cat'],
         'no_children' => true,
         'is_redirect' => 0,
         'count_clicks' => 0,
         'target' => '',
         'url' => '',
      );
      'min_words' => 0,
         'max_words' => 0,
   }
   else
   {
      // Just some easy shortcuts.
      $curBoard = &$boards[$_REQUEST['boardid']];
      $context['board'] = $boards[$_REQUEST['boardid']];
      $context['board']['name'] = htmlspecialchars($context['board']['name']);
      $context['board']['description'] = htmlspecialchars($context['board']['description']);
      $context['board']['no_children'] = empty($boards[$_REQUEST['boardid']]['tree']['children']);
      $context['board']['sort_method'] = $curBoard['sort_method'];
      $context['board']['sort_order'] = $curBoard['sort_order'];
   }


Close
{
      // Some things that need to be setup for a new board.
      $curBoard = array(
         'memberGroups' => array(0, -1),
         'category' => (int) $_REQUEST['cat']
      );
      $context['board_order'] = array();
      $context['board'] = array(
         'is_new' => true,
         'id' => 0,
         'name' => $txt['mboards_new_board_name'],
         'description' => '',
         'count_posts' => 1,
         'theme' => 0,
         'override_theme' => 0,
         'category' => (int) $_REQUEST['cat'],
         'no_children' => true,
         'is_redirect' => 0,
         'count_clicks' => 0,
         'target' => '',
         'url' => '',
         'min_words' => 0,
          'max_words' => 0,
      );
   }
   else
   {
      // Just some easy shortcuts.
      $curBoard = &$boards[$_REQUEST['boardid']];
      $context['board'] = $boards[$_REQUEST['boardid']];
      $context['board']['name'] = htmlspecialchars($context['board']['name']);
      $context['board']['description'] = htmlspecialchars($context['board']['description']);
      $context['board']['no_children'] = empty($boards[$_REQUEST['boardid']]['tree']['children']);
      $context['board']['sort_method'] = $curBoard['sort_method'];
      $context['board']['sort_order'] = $curBoard['sort_order'];
   }
Title: Re: Word Count Limits
Post by: Sefket on November 26, 2011, 08:57:24 PM
Worked, thank you. Do you know how to code it so it doesn't let people quote someones reply and not put text in their post?
Title: Re: Word Count Limits
Post by: ethankcvds on November 26, 2011, 08:59:36 PM
Quote from: Sefket on November 26, 2011, 08:57:24 PM
Worked, thank you. Do you know how to code it so it doesn't let people quote someones reply and not put text in their post?

I've got it somewhat working I just need to fix a few small issues.
Title: Re: Word Count Limits
Post by: Sefket on November 26, 2011, 09:08:49 PM
Glad to hear. If I knew how to code, I wouldn't brag you, haha. This is a great modification. Can't wait for you to finish coding that part :) .
Title: Re: Word Count Limits
Post by: pikeman on December 28, 2011, 06:26:02 PM
Great mod!
Title: Re: Word Count Limits
Post by: TheoOule on May 22, 2019, 09:44:41 PM
Is there any chance that the Word Limit mod package could be updated for the current release?
Title: Re: Word Count Limits
Post by: dougiefresh on May 22, 2019, 09:55:43 PM
Very unlikely that ethankcvds (https://www.simplemachines.org/community/index.php?action=profile;u=170621) will do so, as he was last active on the forum on December 30, 2013.  And lack of a license in the mod packaging is treated as no license to do anything with the package by the SMF team.

UPDATE:  Just tried installing this mod on SMF 2.0.15.  Looks like it installs just fine, even without using version emulation....
Title: Re: Word Count Limits
Post by: Shambles on May 23, 2019, 02:42:54 AM
Quote from: TheoOule
... updated for the current release?

What release would that be?
Title: Re: Word Count Limits
Post by: ethankcvds on May 23, 2019, 10:37:34 AM
It should install fine on future versions of 2.0.x the only problem is other mods and potential updates for security issues. For 2.1.x I need to edit somethings to make it work.
Title: Re: Word Count Limits
Post by: ethankcvds on June 05, 2019, 10:16:22 AM
Quick update:


Version 1.4 RC(hopefully released soon!) change log:
Dropped support for SMF 1.1
Added support for SMF 2.1 RC2
Quoted posts no longer included in word  count total.