Closed (won't fix)
Project:
Drupal.org CVS applications
Component:
new project application
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
8 Apr 2010 at 12:00 UTC
Updated:
18 Apr 2019 at 20:43 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
lucuhb commentedHere is the module I developped in attached file.
Comment #2
avpadernoHello, and thanks for applying for a CVS account. I am adding the review tags, and some volunteers will review your code, pointing out what needs to be changed.
As per http://drupal.org/cvs-application/requirements, the motivation message should be expanded to contain more details about the features of the proposed module, and it should include also a comparison with the existing solutions.
Comment #3
lucuhb commentedThe node_to_odt module allows users to create an odt version of a node to being exported in a file in accordance with the standard format openDocument.
The module can export to odt node with HTML content body (with images, tables, lists...), cck text fields (HTML or simple text), cck matrix field, cck imceimage.
This module uses odtPHP library (http://www.odtphp.com/). The version of this module uses the odtphp-1.0.1 version of odtPHP library.
This module makes reasonable checks on access permissions. A user cannot export a node unless they can use the input format of that node, and unless they have
permission to view nodes and have the 'export node to odt' permission. The module could also
Users have possibility to choose which fields to export in the openDocument. This module could also use the checkall module (http://drupal.org/project/checkall) to select/unselect all fields.
This module is tested with checkall 6.x-2.4 version.
I didn't find existing solution for this. I only found some modules to export node in HTML format as http://drupal.org/project/node_export, but not to export in odt format.
Comment #4
lucuhb commentedNew version to correct the display of images.
When somebody will review my module ?
Comment #5
avpadernoI will make a review tomorrow morning (which means not before 10 hours from now).
Comment #6
avpadernoThe code can be better written, and optimized. Also, the comment is probably not correct (or it's not correct the code following that comment).
In general, avoid using extra spaces where not necessary.
The code is not updated with the latest development in Drupal; see
hook_node_type().Comment #7
avpadernorequire_once()should be replaced with a call tomodule_load_include().error_log()).The code is probably using the wrong indentation (it should be 2 spaces), and the reported code can be better formatted (there is no reason to write a single string per line).
node_load(), and it uses the properties of the node object without to verify if the user has access to the node (in example, the node could be unpublished, and the user should not see the content (which means not even the title) of that node. This could be a security issue.Comment #8
lucuhb commentedthank you for reviewing the code. I will put a new version when I will correct the code.
Comment #9
lucuhb commentedfor point 2. : how can I optimized this ? should I put all in one line ?
for point 5 : When you talk about Strings, are they only part with t() ? If yes, I don't see some String not in sentence case. If no, where are other string ?
Comment #10
avpadernoThe first argument of
t()must be a literal string; differently, the script that extracts the string to translate to create the translation template will not be able to extract the string, which would not be translatable (if not in the case another module uses the same exact string, but it's rather difficult it happens, when the string is dynamically changed).Comment #11
abompard commentedI'd like to bring to your attention a project of mine : XHTML2ODT : http://gitorious.org/xhtml2odt
It's an XSLT-based conversion from (X)HTML to ODT XML that I've used on already two ODT export plugins : one for Dotclear (blog engine in PHP) and one for Trac (project manager in Python). Since this Drupal export plugin seems to be a similar case, you'll probably be interested.
All the conversion is done in XSLT, in a very generic way, but it's still possible to customize it. A template ODT file is used for styling. The only thing to implement is the integration with the application you want to build an export plugin for, in our case Drupal.
I'd be very happy to help you with it should you choose to use my project, but unfortunately I don't know Drupal. So you'll have to do the Drupal specific bits, but I can handle the basic XHTML to ODT XML conversion.
It's even possible to do Drupal-specific conversions in the XSL if needed (for example to convert known CSS classes to equivalent formatting).
I hope I'll be able to help you.
Comment #12
avpadernoComment #13
lucuhb commentedsorry, I did'nt found enough time to revise the module.
Comment #14
avpadernoComment #15
joachim commentedInteresting module. I'm wondering whether it could be made to build on top of http://drupal.org/project/nd, by treating the doc export as another type of node display.
@lucuhb: would you mind if I take this code forward, giving you credit for your work obviously.
Comment #16
lucuhb commentedok, you can use this code in your project but as you see in the messages before, code needs work to be good !
Comment #17
avpaderno