Skip to main content.

PHP-Generated Pages

If you have a document which is generated by other PHP code, that can also be converted by Umm. However there are two issues that need to be addressed in non-static pages.

First, document caching must be turned off. If transformations of the document are cached in the database, then only the first such transformation will be displayed. There are two ways to ensure that document caching is off. First, one can simply turn off document cache for all documents which use the same installation of Umm. This will however cause static documents to be served much more slowly. Preferably, you should just turn off document caching for the page in question. To ensure that you can do this, allow per-file configuration of document caching. In localconfig.php, set:

$per_file['document caching'] = true;

Next, turn off caching for the dynamic page, by setting $cache_page to false before you call Umm from your dynamic file.

<?php
  $cache_page = false;
  include("/path/to/umm/Browser_Compatibility.php"); 
?>

Secondly, when using Umm to transform a PHP-generated document, you must ensure that Umm is given the full document. Umm uses output buffering to collect the contents of your document for transformation, so Umm must be called before the script sends any output.

^ TOP

Format Selection Menu

The Javascript included by the InsertSelectionMenu() function will cause the page to reload if the user changes their equation format. This script will preserve GET variables, but may interfere with other things.