| 1 | = PHPDocumentor plugin for Trac = |
| 2 | |
| 3 | == Description == |
| 4 | |
| 5 | Integrates [http://www.phpdoc.org phpdocumentor] documentation into Trac. |
| 6 | |
| 7 | Started as a simple copy of the DoxygenPlugin |
| 8 | |
| 9 | The phpdoc plugin provides a new main navigation tab (named PHPDoc by default), which will present the doxygen index page. |
| 10 | |
| 11 | Configuring the PHPDoc plugin should be easy if you have only one PHPDoc generated documentation to wrap, and a bit more involved if you have many --but the goal is to have a great deal of flexibility, in the latter case. |
| 12 | |
| 13 | This plugin is tested with the following releases of Trac: |
| 14 | |
| 15 | * Trac 0.11: Started development with Trac 0.11.3 |
| 16 | |
| 17 | |
| 18 | == Bugs/Feature Requests == |
| 19 | |
| 20 | Existing bugs and feature requests for PhpdocPlugin are |
| 21 | [report:9?COMPONENT=PhpdocPlugin here]. |
| 22 | |
| 23 | If you have any issues, create a |
| 24 | [http://trac-hacks.org/newticket?component=PhpdocPlugin&owner=exarv new ticket]. |
| 25 | |
| 26 | == Download == |
| 27 | |
| 28 | Download the zipped source from [download:phpdocplugin here]. |
| 29 | |
| 30 | == Source == |
| 31 | |
| 32 | You can check out PhpdocPlugin from [http://trac-hacks.org/svn/phpdocplugin here] using Subversion, or [source:phpdocplugin browse the source] with Trac. |
| 33 | |
| 34 | == Example == |
| 35 | |
| 36 | ---- |
| 37 | === Installation === |
| 38 | |
| 39 | - Download the zipped source. |
| 40 | - Extract the zip file |
| 41 | - Go to the phpdocplugin/0.11 directory |
| 42 | - run: |
| 43 | {{{ |
| 44 | python ./setup.py install |
| 45 | }}} |
| 46 | |
| 47 | This will generate a python egg and copy it into the trac/plugins directory and follow the Configuration steps outlined below. |
| 48 | |
| 49 | You may need to restart web server to see PHPDoc button in navigation tab. |
| 50 | |
| 51 | add the following to your configuration: |
| 52 | |
| 53 | === Configuring Trac === |
| 54 | ==== Basic Configuration ==== |
| 55 | A `[phpdoc]` section should be created in TracIni. |
| 56 | There's only one mandatory setting, it's the `path` to the generated documentation. |
| 57 | This should match the [http://manual.phpdoc.org/HTMLSmartyConverter/HandS/phpDocumentor/tutorial_phpDocumentor.howto.pkg.html#using.command-line.target -t] parameter of the phpdoc command (if that's a relative path, you'll need to prepend the current working directory used |
| 58 | when running `phpdoc`). Also, don't forget to grant the users the PHPDOC_VIEW permission, or you'll just get a blank page. |
| 59 | |
| 60 | Note that there's also the [http://manual.phpdoc.org/HTMLSmartyConverter/HandS/phpDocumentor/tutorial_phpDocumentor.howto.pkg.html#using.command-line.output -o] |
| 61 | parameter which might play a role here. I got best results with the value 'HTML:Smarty:PHP' |
| 62 | |
| 63 | '''Example:''' [[br]] |
| 64 | |
| 65 | First checkout the latest version of your trunk: |
| 66 | {{{ |
| 67 | mkdir/var/cache/phpdoc |
| 68 | cd /var/cache/phpdoc |
| 69 | mkdir myproject |
| 70 | cd myproject |
| 71 | svn co http://my.svn.server.org/svn/myproject/trunk source |
| 72 | mkdir doc |
| 73 | /whereever/you/installed/phpdoc -o HTML:Smarty:PHP -d source -t doc |
| 74 | }}} |
| 75 | Now you should have the latest source in /var/cache/phpdoc/myproject/source |
| 76 | And the generated documentation in /var/cache/phpdoc/myproject/doc |
| 77 | |
| 78 | Now setup Trac's configuration: |
| 79 | {{{ |
| 80 | [phpdoc] |
| 81 | path = /var/cache/phpdoc/myproject/doc |
| 82 | }}} |
| 83 | |
| 84 | The next time, you only need to run "svn up" in stead of "svn co" and runphpdoc again with the same parameters. |
| 85 | |
| 86 | It's possible all other options (configuration options multiple documentation projects, links in wiki) will work also, just like the ones specified with DoxygenPlugin, but I can't garranty anything. |
| 87 | On a first view, it appears to work good enough for me with this source and configuration. |
| 88 | |
| 89 | == Recent Changes == |
| 90 | |
| 91 | [[ChangeLog(phpdocplugin, 3)]] |
| 92 | |
| 93 | == Author/Contributors == |
| 94 | |
| 95 | '''Author:''' [wiki:exarv] [[BR]] |
| 96 | '''Contributors:''' |