From 7cd6a790e05a41ec704a84b95d9d10b2fbc5fb95 Mon Sep 17 00:00:00 2001 From: nlopess Date: Thu, 10 Feb 2005 13:27:26 +0000 Subject: [PATCH] commiting the new tools to make the CHM manual. #ripped from phpdoc --- .gitattributes | 1 + .gitignore | 3 + docs/Makefile.in | 3 + docs/README | 11 +- docs/chm/.cvsignore | 3 + docs/chm/README | 97 +++++++++++++++ docs/chm/chm_settings.php | 157 +++++++++++++++++++++++ docs/chm/common.php | 75 +++++++++++ docs/chm/make_chm.bat | 57 +++++++++ docs/chm/make_chm.php | 219 +++++++++++++++++++++++++++++++++ docs/chm/make_chm_fancy.php | 131 ++++++++++++++++++++ docs/chm/make_chm_spc.gif | Bin 0 -> 43 bytes docs/chm/make_chm_style.css | 57 +++++++++ docs/en/make_chm_index_en.html | 36 ++++++ 14 files changed, 849 insertions(+), 1 deletion(-) create mode 100755 docs/chm/.cvsignore create mode 100755 docs/chm/README create mode 100755 docs/chm/chm_settings.php create mode 100755 docs/chm/common.php create mode 100755 docs/chm/make_chm.bat create mode 100755 docs/chm/make_chm.php create mode 100755 docs/chm/make_chm_fancy.php create mode 100755 docs/chm/make_chm_spc.gif create mode 100755 docs/chm/make_chm_style.css create mode 100755 docs/en/make_chm_index_en.html diff --git a/.gitattributes b/.gitattributes index e8a29fc0..0a4d0346 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,4 +1,5 @@ * text=auto !eol +docs/chm/make_chm_spc.gif -text docs/fop/thryb.ttf -text docs/fop/thrybi.ttf -text docs/fop/thryi.ttf -text diff --git a/.gitignore b/.gitignore index abc9f38a..8ebfb9f2 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,9 @@ docs/*.cache docs/*.fot docs/Makefile +docs/chm/*.chm +docs/chm/*.hh? +docs/chm/fancy docs/config.* docs/configure docs/diff diff --git a/docs/Makefile.in b/docs/Makefile.in index e779b4f0..361f70c7 100755 --- a/docs/Makefile.in +++ b/docs/Makefile.in @@ -53,6 +53,9 @@ web: FORCE pdf: FORCE ${FOP} -xml manual.xml -xsl xsl/fo.xsl -pdf manual.pdf +chm: html + chm/make_chm.bat $(LANG) + test: $(NSGMLS) -i lang-$(LANG) -s $(XMLDCL) manual.xml diff --git a/docs/README b/docs/README index f4f8dea7..3ef10004 100644 --- a/docs/README +++ b/docs/README @@ -26,9 +26,18 @@ In order to generate PDF files you need some tools: To generate the file, just type 'make pdf' +Generate CHM files +================== +In order to generate CHM files you need the Microsoft(r) HTML Help Workshop, +which can be freely downloaded at +http://msdn.microsoft.com/library/en-us/htmlhelp/html/vsconhh1start.asp + +Then type 'make chm'. This will run the 'make html' and then build the chm file. + + Revision Tracking (for translations): * make revcheck (this will create revcheck.html) You should have libxml and autoconf installed in your system. -Read http://php.net/manual/howto/chapter-tools.html for more info. +Read http://doc.php.net/php/dochowto/chapter-tools.php for more info. diff --git a/docs/chm/.cvsignore b/docs/chm/.cvsignore new file mode 100755 index 00000000..6d21d95f --- /dev/null +++ b/docs/chm/.cvsignore @@ -0,0 +1,3 @@ +*.chm +*.hh? +fancy diff --git a/docs/chm/README b/docs/chm/README new file mode 100755 index 00000000..64f14350 --- /dev/null +++ b/docs/chm/README @@ -0,0 +1,97 @@ +**************************************************************** +** This is a modified version of phpdoc/chm ** +**************************************************************** + +BUILDING THE MANUAL IN WINDOWS HELP FILE (.CHM) FORMAT + +Note: Where 'lang' is mentioned in this doc, it is the actual +language code (e.g. en) of the manual you are compiling, +not the 'lang' word itself! + +With the herein described tools you're able to build the .chm manual +with two options: + + a) Simply build the traditional html manual + b) Make a fancy version of the html manual and build it + +======================================================================= +WHAT YOU NEED + +* Microsoft(r) HTML Help Workshop. + You can download it freely at: + http://msdn.microsoft.com/library/en-us/htmlhelp/html/vsconhh1start.asp + You need the complete workshop package install (about 4 Megs). + Of course you need Microsoft(r) Windows to run that software :) + +* The html manual (build with 'make') + +The .chm manual generator files (from cvs.php.net): + + make_chm.bat - The only file you need to run yourself. + make_chm.php - Auto toc generator. + + To make the fancy manual, additional files are needed: + + make_chm_fancy.php - Converts the normal html files to fancy + (good looking) pages + make_chm_index_lang.html - Fancy index. (you find it in phpdoc/lang + dir, if it exists for that language). + make_chm_spc.gif - GIF file needed by the fancy pages. + make_chm_style.css - This adds some good style to html files. + +======================================================================= +INSTALLATION + +Install Microsoft(r) HTML Help Workshop. + +Put the above listed make_chm_* files to one directory. + +Open make_chm.bat in a text editor and set the appropriate +environment variables. You need to + + - set PHP_PATH to the full path of the CGI php.exe on + your machine (including php.exe). + - set PHP_HELP_COMPILER to the full path of hhc.exe on + your machine (including hhc.exe). + - set PHP_HELP_COMPILE_LANG to the language code of the + actual manual (use the code from cvs.php.net, eg. hu) + - set PHP_HELP_COMPILE_DIR to the directory of the + html manual (eg. ..\html when you build it like mentioned in the howto) + - set PHP_HELP_COMPILE_INDEX to the index filename in + the directory you set above. This used to be manual.html + for a long time, but it seems it is now index.html. + + The following variable is only needed for the fancy manual: + + - set PHP_HELP_COMPILE_FANCYDIR to the directory name where + the fancy pages will go. + You can decide not to sacrifice any more space for the fancy dir + (it takes ~25% more space than the normal html-manual), and set + this variable to the same as PHP_HELP_COMPILE_DIR. Then your old + HTML files will be rewritten to be fancy ones. + +======================================================================= +BUILDING THE MANUAL: + +Put the html manual (~2100 files) under the subdir specified above in +PHP_HELP_COMPILE_DIR (eg. html). + +To compile the NORMAL manual, use the 'normal' command line option: + + make_chm normal + +To compile the FANCY manual, just run: + + make_chm + +After this process, you will have smarty_manual_lang.chm... + +======================================================================= +The fancy design improvemenets and the .css file is based on +the newsite design(TM) work of Colin Viebrock [colin@easyDNS.com] :) + +Written by Gabor Hojtsy (goba@php.net), and adapted by +Thomas Schoefbeck (tom@php.net). Contact them or the phpdoc list +(phpdoc@lists.php.net) if you have any questions or suggestions... + +Last modified $Date$ \ No newline at end of file diff --git a/docs/chm/chm_settings.php b/docs/chm/chm_settings.php new file mode 100755 index 00000000..0214f7a4 --- /dev/null +++ b/docs/chm/chm_settings.php @@ -0,0 +1,157 @@ + HTML Help Code conversion +// Code list: http://www.helpware.net/htmlhelp/hh_info.htm +// Charset list: http://www.microsoft.com/globaldev/nlsweb/default.asp +// Language code: http://www.unicode.org/unicode/onlinedat/languages.html +// MIME preferred charset list: http://www.iana.org/assignments/character-sets +// Font list: http://www.microsoft.com/office/ork/xp/three/inte03.htm + +$LANGUAGES = array( + "hk" => array( + "langcode" => "0xc04 Hong Kong Cantonese", + "preferred_charset" => "CP950", + "mime_charset_name" => "Big5", + "preferred_font" => "MingLiu,10,0" + ), + "tw" => array( + "langcode" => "0x404 Traditional Chinese", + "preferred_charset" => "CP950", + "mime_charset_name" => "Big5", + "preferred_font" => "MingLiu,10,0" + ), + "cs" => array( + "langcode" => "0x405 Czech", + "preferred_charset" => "Windows-1250", + "mime_charset_name" => "Windows-1250", + "preferred_font" => $DEFAULT_FONT, + ), + "da" => array( + "langcode" => "0x406 Danish", + "preferred_charset" => "Windows-1252", + "mime_charset_name" => "Windows-1252", + "preferred_font" => $DEFAULT_FONT, + ), + "de" => array( + "langcode" => "0x407 German (Germany)", + "preferred_charset" => "Windows-1252", + "mime_charset_name" => "Windows-1252", + "preferred_font" => $DEFAULT_FONT, + ), + "el" => array( + "langcode" => "0x408 Greek", + "preferred_charset" => "Windows-1253", + "mime_charset_name" => "Windows-1253", + "preferred_font" => $DEFAULT_FONT + ), + "en" => array( + "langcode" => "0x809 English (United Kingdom)", + "preferred_charset" => "Windows-1252", + "mime_charset_name" => "Windows-1252", + "preferred_font" => $DEFAULT_FONT + ), + "es" => array( + "langcode" => "0xc0a Spanish (International Sort)", + "preferred_charset" => "Windows-1252", + "mime_charset_name" => "Windows-1252", + "preferred_font" => $DEFAULT_FONT + ), + "fr" => array( + "langcode" => "0x40c French (France)", + "preferred_charset" => "Windows-1252", + "mime_charset_name" => "Windows-1252", + "preferred_font" => $DEFAULT_FONT + ), + "fi" => array( + "langcode" => "0x40b Finnish", + "preferred_charset" => "Windows-1252", + "mime_charset_name" => "Windows-1252", + "preferred_font" => $DEFAULT_FONT + ), + "he" => array( + "langcode" => "0x40d Hebrew", + "preferred_charset" => "Windows-1255", + "mime_charset_name" => "Windows-1255", + "preferred_font" => $DEFAULT_FONT + ), + "hu" => array( + "langcode" => "0x40e Hungarian", + "preferred_charset" => "Windows-1250", + "mime_charset_name" => "Windows-1250", + "preferred_font" => $DEFAULT_FONT + ), + "it" => array( + "langcode" => "0x410 Italian (Italy)", + "preferred_charset" => "Windows-1252", + "mime_charset_name" => "Windows-1252", + "preferred_font" => $DEFAULT_FONT + ), + "ja" => array( + "langcode" => "0x411 Japanese", + "preferred_charset" => "CP932", + "mime_charset_name" => "csWindows31J", + "preferred_font" => "MS PGothic,10,0" + ), + "kr" => array( + "langcode" => "0x412 Korean", + "preferred_charset" => "CP949", + "mime_charset_name" => "EUC-KR", + "preferred_font" => "Gulim,10,0" + ), + "nl" => array( + "langcode" => "0x413 Dutch (Netherlands)", + "preferred_charset" => "Windows-1252", + "mime_charset_name" => "Windows-1252", + "preferred_font" => $DEFAULT_FONT + ), + "pl" => array( + "langcode" => "0x415 Polish", + "preferred_charset" => "Windows-1250", + "mime_charset_name" => "Windows-1250", + "preferred_font" => $DEFAULT_FONT + ), + "pt_BR" => array( + "langcode" => "0x416 Portuguese (Brazil)", + "preferred_charset" => "Windows-1252", + "mime_charset_name" => "Windows-1252", + "preferred_font" => $DEFAULT_FONT + ), + "ro" => array( + "langcode" => "0x418 Romanian", + "preferred_charset" => "Windows-1250", + "mime_charset_name" => "Windows-1250", + "preferred_font" => $DEFAULT_FONT + ), + "ru" => array( + "langcode" => "0x419 Russian", + "preferred_charset" => "Windows-1251", + "mime_charset_name" => "Windows-1251", + "preferred_font" => $DEFAULT_FONT + ), + "sk" => array( + "langcode" => "0x41b Slovak", + "preferred_charset" => "Windows-1250", + "mime_charset_name" => "Windows-1250", + "preferred_font" => $DEFAULT_FONT + ), + "sl" => array( + "langcode" => "0x424 Slovenian", + "preferred_charset" => "Windows-1250", + "mime_charset_name" => "Windows-1250", + "preferred_font" => $DEFAULT_FONT + ), + "sv" => array( + "langcode" => "0x41d Swedish", + "preferred_charset" => "Windows-1252", + "mime_charset_name" => "Windows-1252", + "preferred_font" => $DEFAULT_FONT + ), + "zh" => array( + "langcode" => "0x804 Simplified Chinese", + "preferred_charset" => "CP936", + "mime_charset_name" => "gb2312", + "preferred_font" => "simsun,10,0" + ) +); +?> diff --git a/docs/chm/common.php b/docs/chm/common.php new file mode 100755 index 00000000..2f0151f6 --- /dev/null +++ b/docs/chm/common.php @@ -0,0 +1,75 @@ +|[^a-zA-Z1-9][^>]*>)/Ue", "preg_replace('/[\r\n]{1,2}/U', ' ', \"<\$1 \$2\")", file_get_contents($filename)); + } else { + $buf = preg_replace("/[\r|\n]{1,2}/U", " ", file_get_contents($filename)); + } + $charset = detectDocumentCharset($buf); + + if ($charset === false) $charset = "UTF-8"; + + if ($charset != $INTERNAL_CHARSET) { + if (function_exists("iconv")) { + $buf = iconv($charset, $INTERNAL_CHARSET, $buf); + } elseif (function_exists("mb_convert_encoding")) { + $buf = mb_convert_encoding($buf, $INTERNAL_CHARSET, $charset); + } elseif (preg_match("/^UTF-?8$/i", $INTERNAL_CHARSET) && preg_match("/^(ISO-8859-1|WINDOWS-1252)$/i", $charset)) { + $buf = utf8_encode($buf); + } else { + die("charset conversion function is not available."); + } + } + return $buf; +} + +function fputs_wrapper($fp, $str) +{ + fputs($fp, convertCharset($str)); +} + +function convertCharset($buf) +{ + global $LANGUAGE, $LANGUAGES, $INTERNAL_CHARSET; + + $charset = $LANGUAGES[$LANGUAGE]['preferred_charset']; + + if ($charset != $INTERNAL_CHARSET) { + if (function_exists("iconv")) { + $buf = iconv($INTERNAL_CHARSET, "$charset//TRANSLIT", $buf); + } elseif (function_exists("mb_convert_encoding")) { + $buf = mb_convert_encoding($buf, $charset, $INTERNAL_CHARSET); + } elseif (preg_match("/^UTF-?8$/i", $INTERNAL_CHARSET) && preg_match("/^(ISO-8859-1|WINDOWS-1252)$/i", $charset)) { + $buf = utf8_decode($buf); + } else { + die("$LANGUAGE locale is not supported."); + } + } + return $buf; +} // oneLiner() function end + +// Returns the name of character set in the given document +function detectDocumentCharset($doc) +{ + if (preg_match("//iU", $doc, $reg)) { + return $reg[1]; + } + return false; +} + +function setDocumentCharset($doc, $charset) +{ + return preg_replace("/()/iU", "\$1$charset\$3", $doc); +} +?> + diff --git a/docs/chm/make_chm.bat b/docs/chm/make_chm.bat new file mode 100755 index 00000000..7ecffa5c --- /dev/null +++ b/docs/chm/make_chm.bat @@ -0,0 +1,57 @@ +@echo off + +rem !! Please read the make_chm.README file for information +rem !! about how to build a "php_manual_lang.chm" file. + +rem Path of the PHP executable +set PHP_PATH=php + +rem Path of the Help Compiler command line tool +set PHP_HELP_COMPILER=C:\progra~1\htmlhe~1\hhc.exe + +rem The language of the manual to compile +set PHP_HELP_COMPILE_LANG=en + +rem The source directory with the original DSSSL made HTML +set PHP_HELP_COMPILE_DIR=html + +rem The directory, where the fancy files need to be copied +set PHP_HELP_COMPILE_FANCYDIR=chm\fancy + +rem ========================================================== +rem !!!!! DO NOT MODIFY ANYTHING BELOW THIS LINE !!!!! +rem ========================================================== + +echo. + +rem set PHP_HELP_COMPILE_LANG=%1 +if "%1" == "" set PHP_HELP_COMPILE_LANG=en + +echo Language choosen: %PHP_HELP_COMPILE_LANG% + +if a%2a == anormala goto skipfancy + +echo Now generating the fancy manual in %PHP_HELP_COMPILE_FANCYDIR% dir... +IF NOT EXIST %PHP_HELP_COMPILE_FANCYDIR%\NUL md %PHP_HELP_COMPILE_FANCYDIR% +%PHP_PATH% chm\make_chm_fancy.php + +goto normal + +:skipfancy +set PHP_HELP_COMPILE_FANCYDIR= +echo Skipping fancy manual generation... + +:normal + +echo Now running the toc and project file generator script... +%PHP_PATH% chm\make_chm.php + +echo Compiling the actual helpfile (smarty_manual_%PHP_HELP_COMPILE_LANG%.chm)... +%PHP_HELP_COMPILER% chm\smarty_manual_%PHP_HELP_COMPILE_LANG%.hhp + +echo. +echo Cleaning up the directory +del chm\smarty_manual_%PHP_HELP_COMPILE_LANG%.hh? + +echo Done! +echo. diff --git a/docs/chm/make_chm.php b/docs/chm/make_chm.php new file mode 100755 index 00000000..14ffe7f6 --- /dev/null +++ b/docs/chm/make_chm.php @@ -0,0 +1,219 @@ + + + + + + + + + + +
    '; + +makeProjectFile(); +makeContentFiles(); + +// Generate the HTML Help content files +function makeContentFiles() +{ + global $LANGUAGE, $MANUAL_TITLE, $HEADER, $MAIN_FILES, + $HTML_PATH, $INDEX_IN_HTML, $FIRST_PAGE; + + $toc = fopen("chm/smarty_manual_$LANGUAGE.hhc", "w"); + $index = fopen("chm/smarty_manual_$LANGUAGE.hhk", "w"); + + // Write out file headers + fputs_wrapper($toc, $HEADER); + fputs_wrapper($index, $HEADER); + + // Read original index file and drop out newlines + $indexline = oneLiner("$HTML_PATH/$INDEX_IN_HTML"); + + // Print out the objects, autoparsing won't find + mapAndIndex($MANUAL_TITLE, $FIRST_PAGE, " ", $toc, $index, 21); + + // There is a fancy index + if ($FIRST_PAGE != $INDEX_IN_HTML) { + + // Find the name of the Table of Contents + preg_match('|CLASS=\"TOC\" *>
    (.*)([^<]*)|U', $indexline, $match); + if (empty($match[1])) { // Fallback + $match[1] = "Preface"; + } + mapAndIndex($match[1], "preface.html", " ", $toc, $index); + + // Now autofind the main pages + $MAIN_REGEXP = join("|", $MAIN_FILES); + + preg_match_all("![IVX]+\. ([^<]+).*(?:)?(?:[IVX]|\n"); + preg_match_all('!\d+\. ([^<]*)!iSU', $matchinfo[0], $subpages, PREG_SET_ORDER); + + foreach ($subpages as $spinfo) { + mapAndIndex($spinfo[2], $spinfo[1], " ", $toc, $index); + findDeeperLinks($spinfo[1], $toc, $index); + } + fputs_wrapper($toc, "\n
\n"); + } + + // Write out closing line, and end files + fputs_wrapper($index, " \n\n"); + fputs_wrapper($toc, " \n\n"); + fclose($index); + fclose($toc); +} // makeContentfiles() function end + +// Generates the HTML Help project file +function makeProjectFile() +{ + global $LANGUAGE, $MANUAL_TITLE, $LANGUAGES, + $HTML_PATH, $FANCY_PATH, $INDEX_IN_HTML, + $FIRST_PAGE; + + // Try to find the fancy index file + if (file_exists("$FANCY_PATH/fancy-index.html")) { + $FIRST_PAGE = 'fancy-index.html'; + } else { + $FIRST_PAGE = $INDEX_IN_HTML; + } + + $FIRST_PAGEP = substr($FANCY_PATH, 4) . "\\$FIRST_PAGE"; + + // Start writing the project file + $project = fopen("chm/smarty_manual_$LANGUAGE.hhp", "w"); + fputs_wrapper($project, "[OPTIONS]\n"); + fputs_wrapper($project, "Compatibility=1.1 or later\n"); + fputs_wrapper($project, "Compiled file=smarty_manual_$LANGUAGE.chm\n"); + fputs_wrapper($project, "Contents file=smarty_manual_$LANGUAGE.hhc\n"); + fputs_wrapper($project, "Index file=smarty_manual_$LANGUAGE.hhk\n"); + fputs_wrapper($project, "Default Window=smarty\n"); + fputs_wrapper($project, "Default topic=$FIRST_PAGEP\n"); + fputs_wrapper($project, "Display compile progress=Yes\n"); + fputs_wrapper($project, "Full-text search=Yes\n"); + + // Get the proper language code from the array + fputs_wrapper($project, "Language={$LANGUAGES[$LANGUAGE]["langcode"]}\n"); + + // Now try to find out how the manual named in the actual language + // this must be in the index.html file as the title (DSSSL generated) + $content = oneLiner("$HTML_PATH/$INDEX_IN_HTML"); + if (preg_match("|([^<]*)|U", $content, $found)) { + $MANUAL_TITLE = $found[1]; + } else { // Fallback + $MANUAL_TITLE = "Smarty Manual"; + } + + fputs_wrapper($project, "Title=$MANUAL_TITLE\n"); + fputs_wrapper($project, "Default Font={$LANGUAGES[$LANGUAGE]['preferred_font']}\n"); + + // Define the phpdoc window style (adds more functionality) + fputs_wrapper($project, "\n[WINDOWS]\nsmarty=\"$MANUAL_TITLE\",\"smarty_manual_$LANGUAGE.hhc\",\"smarty_manual_$LANGUAGE.hhk\"," . + "\"$FIRST_PAGEP\",\"$FIRST_PAGEP\",,,,,0x23520,,0x386e,,,,,,,,0\n"); + + // Write out all the filenames as in FANCY_PATH + fputs_wrapper($project, "\n[FILES]\n"); + $handle = opendir($FANCY_PATH); + while (false !== ($file = readdir($handle))) { + if ($file != "." && $file != "..") { + fputs_wrapper($project, substr($FANCY_PATH, 4)."\\$file\n"); + } + } + closedir($handle); + fclose($project); +} // makeProjectFile() function end + +// Print out a SiteMap object for a file +function mapAndIndex($name, $local, $tabs, $toc, $index, $imgnum = "auto") +{ + global $FANCY_PATH; + $name = str_replace('"', '"', $name); + + fputs_wrapper($toc, " +$tabs
  • +$tabs +$tabs +"); + + if ($imgnum != "auto") { + fputs_wrapper($toc, "$tabs \r\n"); + } + fputs_wrapper($toc, "$tabs \r\n"); + + fputs_wrapper($index, " +
  • + + +
  • +"); + +} // mapAndIndex() function end + + +// Process a file, and find any links need to be presented in tree +function findDeeperLinks ($filename, $toc, $index) +{ + global $HTML_PATH; + $contents = oneLiner("$HTML_PATH/$filename"); + + // Find all sublinks + if (preg_match_all("!([^<]*)!U", $contents, $matches, PREG_SET_ORDER)) { + + // Print out the file informations for all the links + fputs_wrapper($toc, "\n
      "); + foreach ($matches as $onematch) { + $param["html"] = $onematch[1]; + if (!empty($onematch[3])) { + $param["html"] .= $onematch[3]; + } + $param["title"] = strip_tags($onematch[4]); + mapAndIndex($param["title"], $param["html"], " ", $toc, $index); + } + fputs_wrapper($toc, "
    \n"); + + } else { + echo "no deeper TOC info found in $filename\n"; + } + +} // findDeeperLinks() function end +?> diff --git a/docs/chm/make_chm_fancy.php b/docs/chm/make_chm_fancy.php new file mode 100755 index 00000000..e985a385 --- /dev/null +++ b/docs/chm/make_chm_fancy.php @@ -0,0 +1,131 @@ + fancy HTML +function fancy_design($fname) +{ + global $HTML_PATH, $FANCY_PATH, $LANGUAGE, $LANGUAGES, $counter, $original_index, $publication_date; + + // Get the contents of the file from $HTML_PATH + $content = oneLiner("$HTML_PATH/$fname", true); + + // CSS file linking + $content = preg_replace("|/", '', $content); + + // Whole page table and backgrounds + $wpbegin = '
    '; + $bnavt = ''; + $lnavt = ''; + $space = ''; + + // Navheader backgound + $content = preg_replace("/<\\/DIV\\s*>/Us", + $wpbegin . '' . $lnavt . '

    ' . $space . '
    ', $content); + + // Navfooter backgound + $content = preg_replace("/<\\/DIV\\s*>/Us", + '
    ' . $space . '
    ', $content); + + // Fix copyright page fault... + if ($fname == "copyright.html") { + $content = preg_replace("/&copy;/", "©", $content); + $content = preg_replace("/)|", "\\1 ", $content); + $content = preg_replace("|( )|", "\\1 ", $content); + } + + // Fix the original manual index to look far better... + elseif ($fname == "$original_index") { + + // Find out manual generation date + if (preg_match('|([\\d-]+)
    |U', $content, $match)) { + $publication_date = $match[1]; + } else { + $publication_date = 'n/a'; + } + + // Modify the index file to meet our needs + preg_match('|CLASS=\"title\"\\s*>(.*)(.*) 
    +
    '; + $content = preg_replace("/(/Us", "", $content); + preg_match('|(.*)|U', $content, $match); + $content = preg_replace("|(CLASS=\"title\"\\s+>).*().*((.*)|U", "", $content); + + } + + // Print out that new file to $FANCY_PATH + $fp = fopen("$FANCY_PATH/$fname", "w"); + $content = setDocumentCharset($content, $LANGUAGES[$LANGUAGE]['mime_charset_name']); + fputs_wrapper($fp, $content); + fclose($fp); + + // Print out a message to see the progress + echo "$FANCY_PATH/$fname ready...\n"; + $counter++; + +} // fancy_design() function end + +?> diff --git a/docs/chm/make_chm_spc.gif b/docs/chm/make_chm_spc.gif new file mode 100755 index 0000000000000000000000000000000000000000..1d11fa9ada9e93505b3d736acb204083f45d5fbf GIT binary patch literal 43 ucmZ?wbhEHbWMp7uX!y@?;J^U}1_s5SEQ|~c3=BFT0wlx0#N@)rU=0A%AqP7E literal 0 HcmV?d00001 diff --git a/docs/chm/make_chm_style.css b/docs/chm/make_chm_style.css new file mode 100755 index 00000000..01e87da6 --- /dev/null +++ b/docs/chm/make_chm_style.css @@ -0,0 +1,57 @@ +BODY { + FONT-FAMILY: Verdana,arial,helvetica,sans-serif; FONT-SIZE: 10pt +} +TD { + FONT-FAMILY: Verdana,arial,helvetica,sans-serif; FONT-SIZE: 10pt +} +TH { + FONT-FAMILY: Verdana,arial,helvetica,sans-serif; FONT-SIZE: 10pt +} +P { + MARGIN-BOTTOM: 2pt; MARGIN-TOP: 10pt +} +EM { + FONT-STYLE: italic; FONT-WEIGHT: bold +} +UL { + MARGIN-TOP: 10pt +} +OL { + MARGIN-TOP: 10pt +} +PRE { + FONT-FAMILY: "andale mono", "monotype.com", "courier new", monospace; FONT-SIZE: 10pt +} +A.nav { + COLOR: #000066; TEXT-DECORATION: none; FONT-WEIGHT: bold +} +A.nav:hover { + COLOR: #000066; TEXT-DECORATION: underline; FONT-WEIGHT: bold +} +H1 { + COLOR: #000066; FONT-FAMILY: tahoma,arial,helvetica,sans-serif; FONT-SIZE: 18pt; FONT-WEIGHT: bold; MARGIN-BOTTOM: 5pt +} +H2 { + COLOR: #000066; FONT-FAMILY: tahoma,arial,helvetica,sans-serif; FONT-SIZE: 14pt; FONT-WEIGHT: bold; MARGIN-BOTTOM: 5pt +} +H3 { + COLOR: #000066; FONT-FAMILY: tahoma,arial,helvetica,sans-serif; FONT-SIZE: 12pt; FONT-WEIGHT: bold; MARGIN-BOTTOM: 5pt +} +SMALL { + FONT-FAMILY: arial,helvetica,sans-serif; FONT-SIZE: 8.5pt +} +.tableTitle { + FONT-FAMILY: arial,helvetica,sans-serif; FONT-SIZE: 12pt; FONT-WEIGHT: bold +} +.tableExtras { + COLOR: #ffffff; FONT-FAMILY: arial,helvetica,sans-serif; FONT-SIZE: 8.5pt +} + +TABLE.warning, TABLE.caution { + border-color : #B22222; + background-color : #EEE8AA; + border-width : 2; + font : bold normal Arial, Helvetica, sans-serif; + margin : 0; + border-spacing : 0px; +} diff --git a/docs/en/make_chm_index_en.html b/docs/en/make_chm_index_en.html new file mode 100755 index 00000000..3d53d826 --- /dev/null +++ b/docs/en/make_chm_index_en.html @@ -0,0 +1,36 @@ + + + + Smarty Manual + + + + + + + +

    + +

    +
    +

    Smarty Manual

    +
    Monte Ohrt
    +
    Andrei Zmievski
    +
    +

    This file was generated: [GENTIME]
    +Go to http://smarty.php.net/download-docs.php +to get the actual version.

    + +
    + +
    +