Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Asgaros

    (@asgaros)

    Hello @keiramarcos,

    this is not possible yet but I will add more hooks or filters to the code so this can be done with a custom function. Those hooks or filters will be available in the upcoming release.

    I will provide an example code for the function as soon as I have implemented it.

    Thread Starter keiramarcos

    (@keiramarcos)

    Thanks!

    Plugin Author Asgaros

    (@asgaros)

    Hello @keiramarcos,

    I added a patch for this to the latest development-version of the plugin. It adds two more filters to the code. You can find the changeset here:
    https://github.com/Asgaros/asgaros-forum/commit/427a5a2cdbcea34e008d80520572ce7a98a378df

    It will be also included in the upcoming v1.2.4 release of the plugin.

    After the release of the new version you can add this code to your themes functions.php-file to specify a maximum amount of characters (not words!) for a post before it gets inserted to the database:

    function asgarosforum_custom_content($content) {
    	return mb_substr($content, 0, 9999, 'UTF-8');
    }
    add_filter('asgarosforum_filter_content_before_insert', 'asgarosforum_custom_content');

    Dont forget to change the value 9999 to your favored amount of characters to limitate the amount of characters in newly added/edited posts.

    Greetings,
    Thomas

    • This reply was modified 8 years, 1 month ago by Asgaros. Reason: Typos
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Word Count Maximum’ is closed to new replies.