Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

SitePoint PHP Blog:
Fast Multi-language Docs with SitePoint’s RTDSphinx-PHP
Sep 09, 2015 @ 12:42:50

The SitePoint PHP blog has a tutorial posted showing you how to create multi-language documentation with ReadTheDocs and Sphinx with the help of the RTDSphinx-PHP library.

This post will guide you through getting up and running with RTDSphinx-PHP, a ReadTheDocs-friendly Sphinx based PHP documentation skeleton with sane defaults, pre-installed directives, and modified styles for optimal API and prose documentation rendering in multiple languages. For an unfinished example of the documentation, see here and switch the language in the bottom left flyout panel.

If this sounds familiar, it’s because we already went through a manual setup of a similar skeleton in a previous post, but that one had no localization support, too many steps, and wasn’t as reusable as this newly developed one.

He starts with the "quickstart" instructions to help you get the necessary tools installed to create the documentation. From there he gets into some of the main features the library provides including localization, a few utility scripts and syntax highlighting. Each of these comes with a bit of code/markup showing how to put them to use. The post ends with the instructions you'll need to push the documentation you've created up to ReadTheDocs and what the results should look like.

tagged: documentation multilanguage language readthedocs sphinx library

Link: http://www.sitepoint.com/fast-multi-language-docs-with-sitepoints-rtdsphinx-php/

SitePoint PHP Blog:
Using Sphinx for PHP Project Documentation
Aug 17, 2015 @ 09:19:04

The SitePoint PHP blog has posted a guide to using Sphinx, a documentation generation tool that's used behind the scenes for the ReadTheDocs hosted documentation service.

I recently had the need to write proper prose-like source-code documentation for the Diffbot PHP client. Having looked at several documentation generators, and even having suggested a @prose tag for importing of related MD/reST documents into method and class descriptions, I realized there simply is no perfect solution we can all agree on (yet). So until I extend Sage with a @prose token and reST parsing, I opted for ReadTheDocs and Sphinx.

He starts with a quick "TL;DR" of the necessary commands to get things working quickly but follows it with the full details. He walks you through the installation of Sphinx locally, setting up the folders and adding a custom theme. He show how to create the table of contents, activate the PHP syntax highlighting and how to show/hide the "Edit on GitHub" links. He also includes the steps to convert Markdown documents into the reST format and, finally, adding the project to the ReadTheDocs site and pushing your results.

tagged: sphinx project documentation tutorial readthedocs markdown rest

Link: http://www.sitepoint.com/using-sphinx-for-php-project-documentation/

New User Guide in Development
Oct 06, 2011 @ 09:55:48

The CodeIgniter development team is happy to announce work that's been done on the framework's user guide to help make it even better and easier to find the information you're looking for (now based on the Sphinx documentation generation engine).

In addition to handling the tedium of generating page and document tables of contents, or maintaining internal links and references, the documentation is now easier to write, as you can simply focus on the content instead of markup and presentation. Don’t forget syntax highlighting of PHP, HTML, CSS, and JavaScript in code samples. Based on ReStructured Text, it’s also more human readable in a text editor than HTML is, which is likely where you spend most of your time. As an added benefit, Sphinx can output HTML, PDF, and even EPUB formats all from the same source files.

There's also been a style redesign in the latest release (here on github) on the development branch of the framework. They warn of a few "bumps" that you might come across in using it, but they're working hard to take care of those quickly. If you'd like to see the new version, check out the nightly build results.

tagged: usergruide development sphinx markup generation framework codeigniter


Label Media Blog:
Installing Sphinx and PECL/Sphinx on Mac OS X
Jan 13, 2011 @ 13:08:20

Sam Holman has written up a new post on the Label Media blog today about installing Sphinx and PECL/sphinx on a Mac OS X system. No sample code is provided, but this will definitely help with the setup.

I’ve got a fairly vanilla install of Snow Leopard (10.6) and use the default installations of PHP, MySQL, Apache, et al. Installing the Sphinx open source search engine and the PECL extension wasn’t too much of a pain, but would have been easier had i had the following notes to hand.

His first try was with Macports, but dependency issues shot that down quickly. Instead he opted for the more conventional path of: download the binaries of Sphinx and using the "pecl" command line too to install the PECL module. All that's left is adding the line to load the share object (sphinx.so) into the php.ini's config. You can find out more about the PECL sphinx package here

tagged: install sphinx pecl osx tutorial commandline


Zend Developer Zone:
Indexing Email Messages with PHP, Zend Lucene and Sphinx
Aug 20, 2009 @ 07:52:29

New on the Zend Developer Zone is this new tutorial about combining the Sphinx and the Zend Framework to search and index email messages from a remote mailbox. He'll also compare it to the Zend Framwork Lucene indexing tool.

Over the next few pages, I'll run you through what I did and the steps I took to index a large email collection with Sphinx. I'll also try the same thing with another very common text search engine, the Zend Framework's Lucene implementation, in order to compare and contrast the differences between the two approaches.

The tutorial shows how to install the PEAR packages needed to access the mailbox, includes a quick look at installing Sphinx and the code to create the searchable index (and perform a search) for each tool. Screenshots are included so you can see the desired results.

tagged: tutorial sphinx zendframework lucene search


Antony Dovgal's Blog:
PECL/sphinx - fast fulltext search made easy
Jul 31, 2008 @ 15:14:08

Antony Dovgal has a quick post today about a PECL extension that makes for quick and easy full-text searching on standard SQL databases.

As some of you might have noticed, I've been a bit busy lately creating new PECL extension - sphinx. The extension provides an interface to a feature-rich fulltext search engine Sphinx written by Andrew Aksyonoff. We (Andrew and me) made our best to keep the extension as compatible to the pure-PHP API (shipped with Sphinx) as possible in order to make the transition easier.

The PECL page has already been created as well as a page in the manual for how it works. He also briefly mentions the installation (including teh required libraries).

tagged: pecl sphinx fulltext search sql extension install