WordPress.org

Ready to get started?Download WordPress

Forums

Adding comment capability to JavaDoc or NDoc repository (6 posts)

  1. JoannesVermorel
    Member
    Posted 9 years ago #

    [Posted by a WordPress newbie]

    JavaDoc (or NDoc) generates (X)HTML documentation based on the source code comments. My objective is to give the website visitor the possibility to add a comment for each documentation page (an (X)HTML file in practice).

    Rather than re-inventing the wheel and writing an N-th PHP custom blog system, I was thinking of achieving this through WordPress because it is said to be customizable.

    I have no idea if such a plugin would fit the hooks provided by WordPress. Feedback on such a project would be greatly appreciated.

    Joannes

  2. skippy
    Member
    Posted 9 years ago #

    Are you trying to feed JavaDoc-generated output into WordPress posts (or Pages), to which people could then comment? Or are you trying to accomplish something different?

  3. JoannesVermorel
    Member
    Posted 9 years ago #

    Sorry for the ambiguities. Yes, as you suggest, I am trying to feed JavaDoc outputs (a set of files) into WordPress items[1]; enabling the people to comment each JavaDoc file.

    [1] I am saying 'items' because I don't know what would be the most adapted WordPress component to achieve that.

  4. skippy
    Member
    Posted 9 years ago #

    How often will these be modified?

    You could manually (or programmatically) import the JavaDoc data into WordPress as needed, then the JavaDoc data would be saved in the WordPress database as regular posts (or pages; whichever you choose to use shouldn't make substantial difference right now).

    You could also conceivably include the JavaDoc stuff into template files for posts or pages. See here and here for working examples of something similar. Obviously you'd need to do some extra work, but it would be a cool use of the template facilities.

  5. JoannesVermorel
    Member
    Posted 9 years ago #

    I consider that the JavaDoc files maybe updated frequently (every day for example). Also, even for small java library, having a hundred doc pages is not uncommon.

    In this repect, a (naive) script idea would be to
    - get the name JavaDoc file name from the url
    - get the underlying JavaDoc file
    - update every link it contains with some regex wizardry
    - append whatever comments are attached to this file
    - send the result to the visitor

    I don't know if this scheme fits the WP templates.

  6. JoannesVermorel
    Member
    Posted 9 years ago #

    I finally managed to implement a plugin called CTDOC to achieve those features. A sample is available online for a software documentation of a SF.net project.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.