Closed (won't fix)
Project:
Drupal.org security advisory coverage applications
Component:
module
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
1 Jul 2012 at 02:11 UTC
Updated:
30 Dec 2012 at 21:44 UTC
The mergedocx module allows you merge a node with a Microsoft Word 2007 (or later) template file . The template file with Mail merge fields serve as data placeholders and Drupal node as data source .
It may be helpful when you need fill node content into complex format Word file.
Project page : http://drupal.org/sandbox/changvn/1666360
Git repository : git clone --branch 6.x-1.x changvn@git.drupal.org:sandbox/changvn/1666360.git mergedocx
It's for Drupal 6
Comments
Comment #1
Timusan commentedHey Changvn
Thank you for your module proposal.
I found a few things incorrect with your code.
Let me start with Drupal coding standards.
It is always a good idea to run an automated review of your code before posting a review request.
That way you can find and fix the errors beforehand and speed up the reviewing process.
I've setup an automatic review that you can find here: http://ventral.org/pareview/httpgitdrupalorgsandboxchangvn1666360git
Some points that the PAReview catched:
//and the sentence. Also end them with a ful stop (.)Then a few things about your GIT repository
And finally my manual testing report...I'm afraid I did not get very far.
I successfully installed the module on a clean Drupal 6 tree and noticed I received a new link in the top of my admin menu called "Merge DocX". It links to
mergedocx/download, but I get a 404 not found error.It is not clear to me what I should do now, or if I need to set another setting for this to work.
The only settings that I found tells me where the template files are uploaded, and that directory is fine.
Did you test your module on a clean Drupal 6 (6.26, latest in my case) installation before posting?
Cheers
T
Comment #2
Timusan commentedComment #3
Timusan commentedComment #4
changvn commentedThank Timusan
I'm very glad to see your review.
I did update GIT repository and source code to fix incorrect things.
About "Merge DocX" display on the top of your admin menu , link to mergedocx/download , it's my mistake , this link is just Menu call back , it shouldn't appear on admin menu.
"It is not clear to me what I should do ..." , of course you must do following configurations to see how this module work :
-See "How to Create a Mail Merge Template" on YouTube http://www.youtube.com/watch?v=6ITjHpxoTkI
- How to name your merge field : you must name your merge field match the name of field of the content type which you wish to use as data source for this merge field
- Go to your content type manage page, for each content type you need
- Configure for "Label and template file" at Merge Docx Settings region
- For example
label1 | template_file1.docx
lable2 | template_file2.docx
where lable1 and lable2 will be showed on node in a link format to download
word file, template_file1.docx and template_file2.docx are Microsoft Word (DOCX)
files, which you have created and uploaded above
Please review update code
Thank in advance
Comment #5
changvn commentedComment #6
changvn commentedComment #7
cvangysel commentedManual review of your module:
- You're inconsistent in the syntax-use of the declaration of your arrays:
vs.
The second way is the most common way and also how the code conventions say it should be done.
- You are calling exit() in a menu-callback: mergedocx_mergefield. Not really good practice.
- Some new lines can really improve readability a lot; you might also want to add a description in the docblock of your really heavy functions.
Comment #8
cvangysel commentedComment #9
klausiClosing due to lack of activity. Feel free to reopen if you are still working on this application.