|Version 4 (modified by mian.hasan.khalil@…, 6 years ago) (diff)|
PHPDocumentor plugin for Trac
Integrates phpdocumentor documentation into Trac.
Started as a simple copy of the DoxygenPlugin
The phpdoc plugin provides a new main navigation tab (named PHPDoc by default), which will present the phpdoc index page.
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.
This plugin is tested with the following releases of Trac:
- Trac 0.11: Started development with Trac 0.11.3
If you have any issues, create a new ticket.
Download the zipped source from [download:phpdocplugin here].
- Download the zipped source.
- Extract the zip file
- Go to the phpdocplugin/0.11 directory
python ./setup.py install
This will generate a python egg and copy it into the trac/plugins directory and follow the Configuration steps outlined below.
You may need to restart web server to see PHPDoc button in navigation tab.
add the following to your configuration:
A [phpdoc] section should be created in TracIni. There's only one mandatory setting, it's the path to the generated documentation. This should match the -t parameter of the phpdoc command (if that's a relative path, you'll need to prepend the current working directory used when running phpdoc). Also, don't forget to grant the users the PHPDOC_VIEW permission, or you'll just get a blank page.
Note that there's also the -o parameter which might play a role here. I got best results with the value 'HTML:Smarty:PHP'
First checkout the latest version of your trunk:
mkdir/var/cache/phpdoc cd /var/cache/phpdoc mkdir myproject cd myproject svn co http://my.svn.server.org/svn/myproject/trunk source mkdir doc /whereever/you/installed/phpdoc -o HTML:Smarty:PHP -d source -t doc
Now you should have the latest source in /var/cache/phpdoc/myproject/source And the generated documentation in /var/cache/phpdoc/myproject/doc
Now setup Trac's configuration:
[phpdoc] path = /var/cache/phpdoc/myproject/doc
The next time, you only need to run "svn up" in stead of "svn co" and runphpdoc again with the same parameters.
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. On a first view, it appears to work good enough for me with this source and configuration.
Note: If you install the plugin globally, you'll also need to enable it in trac.ini as follows:
[components] phpdoctrac.* = enabled
It's possible to create links to phpdoc documentation from anywhere within a Wiki text, by using the phpdoc: link prefix.
The general syntax of such links is: phpdoc:documentation_file.
[phpdoc:index.html Documentation] # Simple documentation in phpdoc path. [phpdoc:Database/db.html Class db from Package Database] @ Link to a class in a Package
- 7799 by exarv on 2010-03-30 16:41:04
re #6833 - Changed None to an empty string
- 5890 by exarv on 2009-05-29 15:12:13
First initial version of the PhpdocPlugin.
Currently mainly a copy of the Doxygen plugin, with all doxygen words replaces by phpdoc,
and some extra css to make the HTML:Smarty:PHP layout of PHPDocumentor look good.
- 5889 by exarv on 2009-05-29 15:06:32
New hack PhpdocPlugin, created by exarv