PHPDocumentor plugin for Trac
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 Trac 0.11.3.
If you have any issues, create a new ticket.
0 / 1
Download the zipped source from here.
- Download the zipped source.
- Extract the zip file
- Go to the phpdocplugin/0.11 directory and run:
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 prefer the easy_install way:
sudo easy_install https://trac-hacks.org/svn/phpdocplugin/0.11
You may need to restart your web server to see a PHPDoc button in the navigation tab.
A [phpdoc] section should be created in TracIni. There is only one mandatory setting, it is the path to the generated documentation. This should match the -t parameter of the phpdoc command. If that is 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 /path/to/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" instead of "svn co" and run phpdoc 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 there are no guarantees. 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