CVS edit link for bobodrone

Readspeaker docReader module
- cck formatter module that extends filefield.

I would like to contribute the "Readspeaker docReader" module that provide an additional output link that goto the service "Readspeaker docReader" from Voicecorp. ReadSpeaker docReader is an online software service that allows users to listen to the text of a document while reading. The module can be customized with settings that changes language of the spoken voice, a custom icon/image, enter customizer id (required by Readspeaker to work). To use the service you will need an account at Readspeaker. To read more about Readspeaker click here: http://www.readspeaker.com/content/readspeaker-docreader.

I have build this module to provide this functionality for the Swedish dyslexia association that faces all their information to people with dyslexia and reading disabilities. Now the visitors can hear the PDF-text spoken while they read the text on screen. The administers just upload an pdf file and there you have the extended link.

There is no existing module providing this functionality.
I belive that this can contribute to the world of accessibility on the web!

Images of the module:
* http://www.imgjoe.com/x/docreaderexa.png (Example page)
* http://www.imgjoe.com/x/docreaderset.png (Settings page)

About me
My name is Fredric Bergström, 35 years old. I've been working with Drupal for about 2 years. I'm employed as a web developer since 2009 at the drupalshop NodeOne in Gothenburg/Stockholm, Sweden. Besides my programming I play my medieval string instrument Hurdy-gurdy as well as playing the keyboard in the Drupal hard rock band "Kitten Killers".

Comments

bobodrone’s picture

StatusFileSize
new4.38 KB

Here is the module docReader to be reviewed.

bobodrone’s picture

Status: Postponed (maintainer needs more info) » Needs review

Forgot to change to status after uploading the module. sorry.

avpaderno’s picture

Status: Needs review » Needs work
Issue tags: +Module review

Hello, and thanks for applying for a CVS account. I am adding the review tags, and some volunteers will review the code, pointing out what it needs to be changed.

As per requirements, the motivation message should be expanded to contain more features of the proposed project. For themes, it should include also a screenshot of the theme, and (when possible) a link to a working demo site using the proposed theme; for modules, it should include also a comparison with the existing solutions.

bobodrone’s picture

Status: Needs work » Needs review

Here is my continuous motivation:

There is no module that give this funcionality with this simplicity today on drupal.org. The service provided by Voicecorp is brand new.

My module is well indeed just a cck formatter module that extends filefield with an additional link but in addition to how easy it is to use it, ie just upload a file and then click the provided link, it uses an easy settings page to provide the kind of link needed to the service that does all the reading, ie Voicecorps docreader webbased software.

Comparison to other similar module
There is an another module called webReader that also is reading text from a web page. It to is using a service provided by the same company Voicecorp, but it is a completely different service that works in a completely different way. Two different things!

This module, webreader, it is first of all just reading body text from your Drupal site and does not read the content inside (pdf) files and second it is a completely different service from the company voicecorp.

My contribution docReader is, as I stated, an completely different service from the same company and it uses an another way of dealing with spoken text.
In the first module, webreader, it uses an embeded flashplayer controlled with a javascript and uses their service on your own webpage.
In my module you are linked to their server to be able to use their document reading technology and along with my link you have the abillity to send some parameters as: spoken language and your customer id to verify your account.

Features:
* Provide a link to the service a voicecorp that opens a document reader software.
* Settings of choice are: spoken language, custmer id.
* Works with nodes and views.

How does it work?
The way it works is just like this:
1. It uses filefield to upload an file (pdf, doc etc) to your web site
2. You have to choose the "docReader files" formatter in the Display settings page for either Teaser och full page. It also works in views.
3. Then it prints, in addition to the normal file link, a formatted link pointing to voicecorp with all the parameters needed to use their service; customer id, spoken language etc.
4. Just click the files normal link to download the file or click my additional link to have the document reader reading the text for you.

I hope that this longer explanation is what you expected from me, otherwise tell me what you need from me.

Best regards
/ Fredric Bergström (bobodrone), NodeOne Sweden

avpaderno’s picture

Thank you for your reply.

bobodrone’s picture

StatusFileSize
new21 KB

Hi!

I did some minor changes:
I forgot a couple of CVS ID TAGS in .css and .js file. Now they exist.
Also renamed "READ ME" into README.txt.

To make it easy to track changes I have put my code up on GitHub just for now. I will move it into Drupal.org as soon I get an account. Sooner the better... :)

pcambra’s picture

Hi bobodrone, I've reviewed the code and there are some things that you may want to take a look.

There is an image attached to the module, you have to be really sure that this image is GPL because is not allowed to upload non-gpl licence content to a module or theme in drupal.org.
You should remove git metainformation as well (.git folder)
In the info file you should remove version as the packager of drupal.org will do that for you automatically, you can check the .info guidelines here: http://drupal.org/node/231036
It's great that you included a informative README.txt but I think that the $Id should be with // instead of #
You have the js inside a folder, and also the image, but css is in the same folder of module files, maybe you could create a css folder to store that.
In the module file you are using hook_init, this is called very often, maybe you can call the heavy call to module include and drupal_add_css under some flow conditions (only when a node is displayed in full node format? I don't know).
Also, you can take in consideration to take out the settings form from the module to a separate admin.inc file through hook_menu.
What is the purpose of docreader_language_list? I think it should be documented, only there are those language supported? why are the languages in non-ISO format? i.e. 'es_es' should be 'es'
Thanks!

bobodrone’s picture

StatusFileSize
new4.2 KB

Hi pcambra!

I am really happy for your comments on my module since this is my first attempt to go public with one of my own modules.
I have done some of the changes that you suggested with some minor differences to your remarks.

* The image better be GPL since the company that provide the service gave me the image and they seams happy that I do this module.
They have agreed on that.
* I, by misstake, just tar:ed the whole folder with .git content. i have fixed that now.
* I have removed the version from the .info file.
* I have however changed the # $Id to /* $Id */ according to the article at http://drupal.org/node/546 **even that it said # $Id is valid** (under section about text files as README etc)
* I moved the css inside a folder called css
* I have put a comment about docreader_language_list on top of that (it has to do with the service that need a combination of both the country and language)

At this stage I cannot see how I could avoid loading the module at all times since it could/should be loading at both node-teaser, full node or a view. If someone could give me a hand here that would be very much appreciated!

I also did not, at this stage, moved the settings to an another admin.inc file. Although I can really see the benefits of separate files in the future.

Again I am very happy for all the support and help with this!
Thanx!

/ BoboDrone (aka Psycho Wiskers in da Kitten Killerz) :)

pcambra’s picture

Status: Needs review » Needs work

Great unplugged performance in drupalcon! :D, the show in foobar was remarkable too!

Didn't know about # in readme files, sorry about that.

In hook_init you can check if is a node what you're displaying but you're right, people can use it in views or templates as well (maybe with some crazy node_load somewhere) so unless there is a cck event/hook for loading fields and check for the docreader there, I don't know neither.
It's only the module_load_include call in hook_init what could hit performance as is called on every page load, bear in mind hook_init docs http://api.drupal.org/api/function/hook_init/6 specifically the phrase "This hook is not run on cached pages - though CSS or JS added this way will be present on a cached page."
Are you sure that the module_load_include there is required?

bobodrone’s picture

StatusFileSize
new4.13 KB

Hi!

Yeah - it was a great DrupalCon and it was nice to stand on stage for a change since we all are developing full time otherwise... :)

I have been thinking why I put the modul_load_include there and couldnt find a good reason. I tryed to take it away and it worked fine! It probably has to to with the fact that i sneaked at imagefield(or maybe some else formatter module) on how they did it and there was an check for if filefield even were installed and in that hook_init this call was made. It shouldnt be there i think. I dont think I need to call any functions inside filefield_formatter.inc...

Now it works and it is out of the equation.

/ bobodrone

pcambra’s picture

Status: Needs work » Needs review

Great!
Then looks fine for me, make sure you pass it through coder module before commiting to get rid of possible coding standard issues http://drupal.org/project/coder

bobodrone’s picture

Status: Needs review » Reviewed & tested by the community

a bit unsure if I should change status myself.
If anyone else need to review and test before creation of account plz do so and switch back to needs review.

avpaderno’s picture

Status: Reviewed & tested by the community » Needs review

Who is applying for a CVS application cannot change the status to reviewed and tested, in the same way who wrote the patch for a bug report cannot set that status. :-)

bobodrone’s picture

hi.

I suspected that but wanted to be sure.
im pretty new to how your issue queues are working and did not do it of disrespect.
/ BoboDrone

pcambra’s picture

It would be great to have someone to take a second look to the module, kiamlaluno what should be the way to proceed in general? one person review is good enough?

avpaderno’s picture

Status: Needs review » Needs work
  • The points reported in this review are not in order or importance / relevance.
  • Most of the times I report the code that present an issue. In such cases, the same error can be present in other parts of the code; the fact I don't report the same issue more than once doesn't mean the same issue is not present in different places.
  • Not all the reported points are application blockers; some of the points I report are simple suggestions to who applies for a CVS account. For a list of what is considered a blocker for the application approval, see CVS applications review, what to expect. Keep in mind the list is still under construction, and can be changed to adapt it to what has been found out during code review, or to make the list clearer to who applies for a CVS account.
  1. The module doesn't implement hook_uninstall() to remove the Drupal variables it defines.
    Keep in mind that deleting Drupal variables using a query that matches any Drupal variable with a name that starts with the module name would remove also the Drupal variables of other modules.
  2. In English, every adjectives derived from proper nouns are written capitalized (Italian cars, English muffins), which is the same rule that applies for proper nouns ( Italian, British English, American English). I found a string that uses british english.
bobodrone’s picture

Status: Needs work » Needs review
StatusFileSize
new4.21 KB

Hi!

I added the uninstall function inside a .install file and changed the spelling corrections needed.

best regards
/ bobodrone

pcambra’s picture

Status: Needs review » Reviewed & tested by the community

I think we can put this in RTBC as the suggestions were implemented :)

zzolo’s picture

Status: Reviewed & tested by the community » Fixed

@bobodrone, thanks for the application and the desire to give back! Also, the Kitten Killers are awesome! I am approving, but please note the following things when you do go to actually release the module.

  1. JS has coding standards too.
  2. You should utilize Drupal.behaviors, not $(document).ready().
  3. Putting your settings in an admin.inc is a good practice.
  4. You should figure out a way to try to translate the Drupal language settings to the docReader settings, so that language does not need to be managed in multiple places.
  5. Using the hook_init() is usually not a good idea as there are many pages you will not need this CSS. You should be able to utilize a preprocess function to add it (I think).

Please read the following resources to make sure you know how to use CVS and the specifics to the Drupal CVS infrastructure, as well as how to be a good module maintainer on Drupal.org. The Drupal community is very large and dynamic; we welcome you as a module maintainer and hope that you embrace and challenge the Drupal community and continue to contribute.

--
@pcambra and @kiamlaluno, thanks for reviewing!

Status: Fixed » Closed (fixed)
Issue tags: -Module review

Automatically closed -- issue fixed for 2 weeks with no activity.

avpaderno’s picture

Component: Miscellaneous » new project application
Issue summary: View changes
avpaderno’s picture

Status: Closed (fixed) » Fixed

I am giving credits to the users who participated in this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.