Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: string_truncate in PHP String plugin #4

Closed
sebastienheraud opened this issue Nov 7, 2016 · 3 comments
Closed

Feature Request: string_truncate in PHP String plugin #4

sebastienheraud opened this issue Nov 7, 2016 · 3 comments

Comments

@sebastienheraud
Copy link
Member

Would it be possible to add to core PHP String plugin string_truncate feature? It is useful because it lets you shorten text by word rather than by character.
I've implemented this feature by adding || v == 'string_truncate' and copying and renaming substr_count in edit.php
Then in php_string.php file I added:
case 'string_truncate':
$value=JHTML::_('string.truncate', $value, $arg1 );
break;
Thanks
Anjo

initial report: Octopoos/SEBLOD#242

@sebastienheraud
Copy link
Member Author

Hi,

The new version (1.5.0) of the PHP String plug-in includes a truncate function.
It doesn't use the Joomla method but still takes the number of characters as length (same as string.truncate), and cut at the previous word.
https://demo.seblod.com/seblod-plugins/php-string/truncate
The next version will support number of words as length.

Regards,

@celius
Copy link

celius commented Mar 6, 2019

Installed and tried it, got this error: "0 - Call to undefined method JCckDevHelper::truncate()"

@sebastienheraud
Copy link
Member Author

Hi,

Please make sure to upgrade to SEBLOD 3.17.3 (or +)

Saba

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants