Ajax Document Viewer module, allows to provide a document viewer for the uploaded documents in the drupal.
To view the document, the user no need to download the document into his machine. Using ajax document viewer the documents of type pdf, doc, xls and many more can be seen online.
This is very helpful if we need to show any documents which are available for read only but not for download. I checked in drupal.org various proejcts, but did not find this type of module.
So i have built a drupal module which integrates with ajax document viewer a 3rd party service and does this job.
More information about installing, using is available in module README.txt file
Project: http://drupal.org/sandbox/asifnoor/1315690
GIT Repository details: git clone --branch master asifnoor@git.drupal.org:sandbox/asifnoor/1315690.git ajax_document_viewer
Version: Drupal 7
Reviews of other projects
http://drupal.org/node/1413866#comment-5503222
http://drupal.org/node/1405296#comment-5498190
http://drupal.org/node/1408104#comment-5511998
http://drupal.org/node/1290088#comment-5498146
http://drupal.org/node/1409668#comment-5498068
| Comment | File | Size | Author |
|---|---|---|---|
| #30 | drupalcs-result.txt | 812 bytes | klausi |
| #3 | ajaxdocumentviewer_reviwer.diff | 4.98 KB | nmudgal |
Comments
Comment #1
penyaskitoHi Mohammad,
Thanks for your contribution!
I have found some issues that you should review for getting the project approved:
Please, mark this issue as 'Needs review' once this issues are fixed.
Thanks again for your contribution!
Comment #2
asifnoor commentedHello,
Thanks a lot for the review. All the mentioned points are completed.
1. created a branch with the name 7.x-1.x
2. Issues reported by coder modules are fixed.
3. README file is modified to meet documentation standards.
4. The function names are changed and added module name in front of the function name to avoid any accidental overriding of that function.
5. The project page is updated with detail requirements.
6. This module will work with both public and private URLs.
Comment #3
nmudgal commentedHi asifnoor,
Review of master branch:
Coder review
Some suggestions :
Please find the attached patch file.
Comment #4
asifnoor commentedHello nmudgal,
Thanks for the review.
Regarding this point
Ajax Document viewer service doesn't allow the hexa decimal color code with '#' in the URL, hence # was excluded and mentioned in the description.
All the other mentioned points are completed.
Thanks,
Asif
Comment #5
asifnoor commentedChanging status
Comment #6
klausiReview of the 7.x-1.x branch:
This automated report was generated with PAReview.sh, your friendly project application review script. Please report any bugs to klausi.
manual review:
Comment #7
asifnoor commentedRequested changes are completed.
Comment #8
doitDave commentedHi,
automatic review ends up in only one more issue:
Review of the 7.x-1.x branch:
This automated report was generated with PAReview.sh, your friendly project application review script. Go and review some other project applications, so we can get back to yours sooner.
Manual review:
Looks almost ok for me.
Comment #9
asifnoor commentedHi,
1. Changed the README file to meet documentation guidelines.
Ran the coder module again and did not find any issues.
2. Also cleaned up the master branch as per step5 of http://drupal.org/node/1127732
Looking forward for git access. Very much excited :)
Thanks,
Asif
Comment #10
asifnoor commentedChanging status.
Comment #11
doitDave commentedSome more issues show after installing the most recent review tools:
Automated review (Please keep in mind that this is primarily a high level check that does not replace but, after all, eases the review process. There is no guarantee that no other issues could show up in a more in-depth manual follow-up review.)
Review of the 7.x-1.x branch:
This automated report was generated with PAReview.sh, your friendly project application review script. Go and review some other project applications, so we can get back to yours sooner.
hth, dave
Comment #12
asifnoor commentedHello doitdave,
Thanks for the new review module. However i am unable to install this module and check, so i have made changes as per your comments. Hope there are not any more. Also ran coder, parview.sh by @klausi and did not find any issues there as well.
also, as you can see, there is manual review done already by others and i am willing to make changes if anything else found. Please check and let me know know if everything is correct or not.
Thanks,
Asif
Comment #13
patrickd commentedYou can check your module online: http://ventral.org/pareview :)
Comment #14
barnettech commentedI ran parview.sh and found a few errors: mostly due to one thing in your doxygen documentation. If you put a space after your summary and or description in your doxygen comments most of these errors will go away. If you look at http://drupal.org/node/1354 it shows how to properly space your doxygen comments. Doxygen documentation is generated by a computer and to parse the documentation the spacing and everything else has to be laid out just right ...
Comment #15
asifnoor commentedCorrected them and ran online version of parview.sh. Shows 0 errors.
Comment #16
barnettech commentedI read through your javascript which isn't long and just notice one minor thing:
CamelCasing
Unlike the variables and functions defined in Drupal's PHP, multi-word variables and functions in JavaScript should be lowerCamelCased. The first letter of each variable or function should be lowercase, while the first letter of subsequent words should be capitalized. There should be no underscores between the words.
You have a js variables which doesn't use the camel casing:
var div_id = "#document-viewer-" + fid;Comment #17
barnettech commentedI just installed your module, got a free key from the external site. Then plugged in the api key and hit save taking the other values as defaults and receive the following error:
Color should be in Hexa decimal values only
the toolbar color is the problem and you have it default to: EE000
It looks to me like you meant the default to have one more zero to be EE0000 .... when I plug in the xtra zero it saves without an error.
Comment #18
barnettech commentedOk so I have my api key and followed your readme and I'm not sure how to proceed based on the directions. Do I somehow get an account at http://www.ajaxdocumentviewer.com/ and upload my docs there and then construct my links in drupal like so: http://connect.ajaxdocumentviewer.com?key=&document=&viewerheight=&viewerwidth=
I think the readme needs to be updated. I am unable to figure out what to do next. I think users will give up after 15 minutes. I don't have time to figure out what to do, but I that leads me to suggest that you add to your README.txt file with more complete info on how to setup this module from start to finish, so a user can be up and running within 15 minutes.
Comment #19
barnettech commentedOk I dug a little deeper and saw that if I put the link on the page
<a href='http://connect.ajaxdocumentviewer.com?key=<key>&document=http://www.irs.gov/pub/irs-pdf/fw4.pdf&viewerheight=768&viewerwidth=1024'>test</a>the link will open the document on the http://connect1.ajaxdocumentviewer.com/ site. This worked with your module installed. But then I went and tested it without your module installed on another drupal site. It also worked! So I'm not sure what this module does then, since it worked with and without your module installed. I'm sure I'm missing something. I see you implement hook_field_formatter_view so maybe this modifies cck in some way so a link will be outputted with a link structured automatically like:
<a href='http://connect.ajaxdocumentviewer.com?key=<key>&document=http://www.irs.gov/pub/irs-pdf/fw4.pdf&viewerheight=768&viewerwidth=1024'>test</a>Anyhow an end Drupal user wont have any idea what to do to get this working. I don't have any more time to dive deeper. I'll just wait for the README to get updated -- that is my recommendation.
Cheers,
Barnettech
Comment #20
asifnoor commentedThanks @barnettech for reviewing my module and giving a valuable feedback.
was on vacation during christmas and new year,. will make the required changes and get back to you in a day or two.
Thanks,
Asif
Comment #21
asifnoor commentedHello @barnettech, Please find below update.
Regarding Comment #16 : Java script variables have been renamed using CamelCase accordingly.
Comment #17 : Toolbar color default value has been fixed.
Comment #18 : ReadMe has been updated.
Comment #19 : What the module does?
The module actually provides three different displays for file type fields.
- Ajax document new window view
- Ajax document inline view
- Ajax document lightbox view
The module has a settings page, where various attributes can be fixed for the ajaxdocument viewer.
Comment #22
dave reidThe _ajaxdocumentviewer_get_url() function immediately screams that it is possibly vulnerable to XSS because it injects raw variables into the URL and the result of _ajaxdocumentviewer_get_url() is never run through check_url() in theme_ajax_document_view_inline(). The other calls are run through l() which applies check_plain().
Note that $file_url is output without being escaped first. The variables ajaxdocumentviewer_viewer_height and ajaxdocumentviewer_viewer_width are also the same, although it does look like these are validated, it is still a best practice to escape them. Make sure to review the handbook page on handling text in a secure fashion on how to fix this vulnerability properly.
Comment #23
asifnoor commentedApplied check_url and check_plain functions to avoid xss attacks.
Comment #24
asifnoor commentedIncreasing priority of the task as per review bonus guidelines :)
Comment #25
patrickd commentedIssue priority should only be raised by having no review after x weeks. (See review workflow)
If you want to get "high priority" by review bonus you have to tag your issue with "PAReview: review bonus" instead.
Comment #26
asifnoor commentedah okay.. was not aware of it earlier. Thanks for the information.
Comment #27
drupaledmonk commentedDid a manual review and tested the module...works just fine!!
Comment #28
klausiNo reviews listed in the issue summary, so removing review bonus tag. See #1410826: [META] Review bonus
Comment #29
asifnoor commentedAdded links of reviews of other project as per guidelines.
Comment #30
klausiReview of the 7.x-1.x branch:
This automated report was generated with PAReview.sh, your friendly project application review script. You can also use the online version to check your project. Get a review bonus and we will come back to your application sooner.
manual review:
But that are just minor issues, so ...
Thanks for your contribution, asifnoor! Welcome to the community of project contributors on drupal.org.
I've granted you the git vetted user role which will let you promote this to a full project and also create new projects as either sandbox or "full" projects depending on which you feel is best.
Thanks, also, for your patience with the review process. Anyone is welcome to participate in the review process. Please consider reviewing other projects that are pending review. I encourage you to learn more about that process and join the group of reviewers.
As you continue to work on your module, keep in mind: Commit messages - providing history and credit and Release naming conventions.
Comment #32
l4facc commentedJust can't this to work, already got a free key and everything seems to be ok and I always get a the message: "loading" and it doesn't load.
Explain explain how to use it, already read the readme file and no conclusion. I installed the module, got a free key, made a new file field and choose Ajax document lightbox view. What am I doing wrong?
please check:
http://connect.ajaxdocumentviewer.com/?key=K80068113112012144134&documen...
or
http://learn4fun.no-ip.org/node/49 and click in the pdf file
Thanks for helping!
Comment #32.0
l4facc commentedAdding review of other projects information
Comment #33
avpaderno