Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Once I enable the module and save a content type I get the error
Notice: Undefined variable: file in readability_analyzer() (line 113 of modules/all/readability/readability.module).
Comments
Comment #1
jimi CreditAttribution: jimi commented# Download the TextStatistics.php class at http://code.google.com/p/php-text-statistics (or copy the code from http://code.google.com/p/php-text-statistics/source/browse/trunk/TextSta...) - you should have a file path of "php-text-statistics/TextStatistics.php" when done.
# Create a directory called "php-text-statistics" under the Readability module directory and upload the php-text-statistic package file into it.
Comment #2
SocialNicheGuru CreditAttribution: SocialNicheGuru commentedDoes it integrate with library module?
Comment #3
mgiffordYou want this code here don't you?
https://github.com/DaveChild/Text-Statistics
Comment #4
SocialNicheGuru CreditAttribution: SocialNicheGuru commentedworks. thanks
#3 is the right code
Comment #5
mgiffordThe project page definitely needs an update https://drupal.org/project/readability
Comment #6
bradweikel CreditAttribution: bradweikel commentedI can't seem to get this working at all. What should the library file structure actually look like?
I've got /sites/all/libraries/php-text-statistics/... and I've tried putting the files from github in that folder directly as well as in various subfolders. What's the magic structure?
Comment #7
LeT CreditAttribution: LeT commentedThe version on https://github.com/DaveChild/Text-Statistics doesn't seem to work (missing an end php tag %> and something else) but the version at http://code.google.com/p/php-text-statistics/source/browse/trunk/TextSta... works for me.
The file can be placed either in the libraries folder or the readability module folder once you have the right code. Only the TextStatistics.php is needed:
/sites/all/modules/readability/php-text-statistics/TextStatistics.php
or
/sites/all/libraries/php-text-statistics/TextStatistics.php
Comment #8
Francis47 CreditAttribution: Francis47 commentedI can confirm that the DaveChild version does not work.
https://code.google.com/p/php-text-statistics/source/browse/trunk/TextSt... reports: "SVN hosting has been permanently disabled".
So thats no good either.
However I found this working example.
https://raw.githubusercontent.com/alexstolz/wikimeter/master/TextStatist...
Comment #9
imperator_99 CreditAttribution: imperator_99 commented#8 from @Francis47 worked for me too after spending quite a while trying to figure this out. Project page definitely needs an update.