Needs review
Project:
Graphviz Filter
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
21 Apr 2010 at 01:46 UTC
Updated:
3 Dec 2010 at 10:21 UTC
Jump to comment: Most recent file
Comments
Comment #1
infojunkieThanks for this patch. There is, however, a better way to integrate new formats that does not need hacking into the Graphviz Filter module.
To do this, you need to implement
hook_graphviz_formatsandhook_graphviz_render. Check out graphviz_formats.module for an example. The idea is to declare a new render format 'canviz' that accepts a specific set of Graphviz output formats (e.g., png, eps, svg). Yourhook_graphviz_renderhook is then called with the file to embed in Canviz.Comment #2
eMPee584 commentedBut this is wrong, canviz IS an output format. It's either png or canviz. I chose against implementing into the formats module because canviz should imho be integrated into the core filter as it is by far the most useful output format for display on websites.
Did you try the patch?
Comment #3
infojunkieI noticed that you are already using the hooks mentioned above - sorry for speaking too soon.
However, I still think it should be packaged in its own module, or in the graphviz_formats module. The core filter should not be burdened with downloading Javascript files and similar tasks. I will just transfer that code elsewhere.
Thanks again for a great patch!
Comment #4
sethcohn commented+1 to the idea of a new module for this... due to the dependency on (even more) non-includable code.
Leave 'core' as it with the existing dependance on getting graphviz itself and the pear code.
Comment #5
eMPee584 commentedWell imho the canviz output format is soo useful that it should be used where ever possible, and if it is in graphviz_formats module it just means increasing the loaded module count.. but anyways.
Here's finally the revised patch that puts the canviz stuff into graphviz_formats module. The graphviz_filter-coding-style-fixes.patch from initial posting is mandatory for it to cleanly apply. Oh, and btw i tested it before with my http://drupal.org/project/graphviz_styles module and yes, it still works (although i have to update that one.) ;-)
Comment #6
eMPee584 commentedbump?
Comment #7
bakr commentedI cannot apply the patch,
when is it going to be integrated into a released dev version?
Great Works!