Table of Contents
Table of Contents
PHP-Gtk manual browser is a program which allows you to browse the php-gtk manual in an easy way by giving you a table-of-contents tree, an index, a search functionality and a bookmark system.
I created the program as I wanted to have a similar help system for php-gtk as there is for php with the .chm version - which allows you exactly the same: TOC, index and search functionality. As the creation of .chm files require a Windows operating system and displaying is not natively supported by linux systems, I decided not to build a .chm out of the php-gtk manual sources but write a program which uses the normal php-gtk manual.
The program is programmed entirely with php-gtk, using glade for the user interface definitions. The program has an internal browser which is an extendet version of Alan Knowles' WidgetHtml class. Despite the internal, you can define an external browser to view the manual pages.
The PHP-Gtk manual browser requires that you have installed the "PHP-Gtk manual (Many HTML files)".
The TOC, index and search each require a file with the serialized data. These files can automatically be downloaded and updated from within the program.
And, of course, you need a working php4 installation with php-gtk and glade activated.
Table of Contents
The program window is split into two parts: The left side contains the TOC, index and search; and the internal browser is placed on the right side of the window.
You can change settings like the manual and browser locations in the preferences dialog, accessible by pressing "Alt+P" or choosing the Settings/Preferences menu item.
Open a shell, navigate to the folder you extracted PHP-Gtk manual browser to, and type "php manualBrowser.phpw" to start it.
The extension ".phpw" stands for "windowed php application".
The first tab of the navigation is the TOC, the table of contents. It is a hierarchical tree with all the chapters of the manual.
When you click on an entry, the corresponding page is opened in the selected browser.
The "<--" button above the tree is the "Sync" button. It opens the currently viewed page in the tree, so that the full path is visible. This is useful if you reached a page via the search or the index and want to see all the pages belonging to the class/tutorial/...
The index is an alphabetically ordered list of all the page titles from the TOC.
By typing the word you search in the text field above the list, the first matching item is highlighted in the list. Pressing "Return" opens the selected page in the browser.
Sometimes the index will not help you as you don't know the full name of the function or class. Type a name in the search field and press "Return" - the manual file names will be searched for your search term(s) and the matching ones will be displayed in the list below the text field.
Note that only full words but no partial ones will be found, e.g. "tab" will find pages dealing with tabs, but not with tables.
You can enter several search terms at once, separated with a space. So "get menu" will find all pages having "get" and "menu" in their filename.
The search uses the same algorithm as the "indexed search" of the gtk.php.net manual search function.
If you find a page worth to remember, go to the "Bookmarks" tab, type in a title click "Add". The page is now in the bookmark list and can be accessed by clicking on it in the bookmark tree.
You can create folders by using the slash "/" in your titles, e.g. "classes/Tree" would create a folder "classes" and add the bookmark "tree" just below it.
Delete bookmarks: Select the bookmark/folder and press the "Delete" key.
The bookmarks are stored in XBEL format, the XML bookmark exchange language. As this is a standard format, you can import the bookmarks created with PHP-Gtk manual browser in KDE or Opera.
PHP-Gtk manual browser has an internal browser for displaying the manual pages. It is written in pure php using an owner-drawn widget. The class was written by Alan Knowles, and I extendet it to make it more usable for programmers.
The widget can display some basic html tags and tables, but knows nothing about CSS and images. Furthermore it doesn't let you select and copy parts of the documents. As this are some real limitations, I let you decide what browser to use: The internal one, or an external like Firefox , Mozilla or Opera.
You can choose your favorite browser in the "Settings" menu. All pages will be opened in the selected browser.
When the program ist started the first time, it tries to find the browsers at some known locations. If that fails, you have to type in the path of the browsers yourself in the preferences dialog. If one of the given browsers is not available on your system, just let the field empty.
Linux: Please make sure that the browser is already running before opening a manual page from the manual browser in it - the manual browser will hang otherwise.
Windows: As the "start" command behaves very strange, it could be that any browser is started but not inevitably the selected one.
The preferences dialog lets you change settings like the location of the manual files and the browsers. It also lets you update the index files of the TOC, index and search functionality via the "Get update" button.
Updates can be necessary when the manual has changed and gotten some new chapters. As the TOC, index and search data are not grabbed from the installed manual, but some index files, the index files can be outdated when installing an update of the manual.
As it would be inefficient to let you install a new version of PHP-Gtk manual browser just because the manual has been updated, the program can update the index files automatically via the internet.
When you click "Get update", the program calls cweiske.de and loads a software version information file. If the date of your local file is older than the one on the information file, this means that there is an update available. You will be asked if you really want to download the file, and by clicking "yes" the file will be loaded to a temporary location. When the download is complete, the current index file will be backuped and replaced by the new one.
If you have installed the PEAR package "MIME_Type", you will be able to drag-and-drop files from your favorite file manager onto the file entry widgets!
The bookmarks are stored in XBEL (XML Bookmark Exchange Language) format. This format can be read by several programs, including the Opera browser, the KDE bookmark manager and other browsers.
The update check information files (check if new version is available) are provided in the nearly forgotten "XML Software Autoupdate" format. It is ideal for informing people about current software versions, as the files can be easily aggregated by software tools.
PHP-Gtk manual browser has been written by Christian Weiske, a german student of information technologies at the age of 22.
You can find my page at http://www.cweiske.de, my email address is cweiske@cweiske.de
The program can be used without any fee; I just ask you to send me a postcard from your part of the world if you use the program regular. My postal address is:
Christian Weiske
Dorfstrasse 42
04683 Threna
Germany