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.
Installs: 8 643
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 2
Forks: 2
Open Issues: 0
Requires
- php: >=5.3.3
Requires (Dev)
- phpunit/phpunit: 4.1.*
This package is auto-updated.
Last update: 2024-12-17 19:29:46 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
-
Add
nickvergessen/phpbb-tool-trimmessage
as a composer dependency to your extension -
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.
php composer.phar install --dev
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.