nickvergessen/phpbb-tool-trimmessage

This tool contains a class, that is able to trim a message from the phpbb message_parser to a maximum length without breaking the bbcodes/smilies and links.

1.3.1 2015-04-17 16:41 UTC

This package is auto-updated.

Last update: 2024-11-17 19:24:16 UTC


README

This tool contains a class, that is able to trim a message from the phpbb message_parser to a maximum length without breaking the bbcodes/smilies and links.

How to use

  1. Add nickvergessen/phpbb-tool-trimmessage as a composer dependency to your extension

  2. Use the code:

     $object = new \Nickvergessen\TrimMessage\TrimMessage($message, $bbcode_uid, $length);
     // Ready to get parsed:
     echo $object->message();
    

How to run tests

We use Travis-CI as a continous intergtation server and phpunit for our unit testing. See more information on the phpBB development wiki.

Build Status

  1. php composer.phar install --dev
  2. vendor/bin/phpunit

Requirements

  • This tool requires php 5.3.3 or above. When you include this tool in your MOD, put a note about the php-version in the author notes.
  • This tool does not require a specific database.

License

GNU Public License