[PHP-DOC] cvs: phpdoc /chm make_chm.php make_chm_fancy.php
momoFri Jul 11 10:47:16 2003 EDT Modified files: /phpdoc/chm make_chm.php make_chm_fancy.php Log: revert Hadar patch Index: phpdoc/chm/make_chm.php diff -u phpdoc/chm/make_chm.php:1.20 phpdoc/chm/make_chm.php:1.21 --- phpdoc/chm/make_chm.php:1.20Fri Jul 11 06:19:49 2003 +++ phpdoc/chm/make_chm.php Fri Jul 11 10:47:16 2003 @@ -28,21 +28,6 @@ appendixes.html ); -if($LANGUAGE == he) { -// Header for index and toc -$HEADER = '!DOCTYPE HTML PUBLIC -//IETF//DTD HTML//HE -html -head - meta name=generator content=PHP 4 - Auto TOC script - !-- Sitemap 1.0 -- -/head -body dir=rtl lang=he - object type=text/site properties -param name=Window Styles value=0x800227 - /object - ul'; -} -else { // Header for index and toc $HEADER = '!DOCTYPE HTML PUBLIC -//IETF//DTD HTML//EN html @@ -55,7 +40,6 @@ param name=Window Styles value=0x800227 /object ul'; -} makeProjectFile(); makeContentFiles(); Index: phpdoc/chm/make_chm_fancy.php diff -u phpdoc/chm/make_chm_fancy.php:1.9 phpdoc/chm/make_chm_fancy.php:1.10 --- phpdoc/chm/make_chm_fancy.php:1.9 Fri Jul 11 06:19:35 2003 +++ phpdoc/chm/make_chm_fancy.php Fri Jul 11 10:47:16 2003 @@ -10,12 +10,6 @@ include_once('common.php'); include_once('chm_settings.php'); -if($LANGUAGE == he) { - include_once(./scripts/rtlpatch/HtmlParser.class.php); - include_once(./scripts/rtlpatch/HtmlExtParser.class.php); - -} - // This script takes much time to run set_time_limit(0); @@ -29,11 +23,7 @@ $handle = opendir($HTML_PATH); while (false !== ($filename = readdir($handle))) { if (strpos($filename, .html) ($filename != fancy-index.html)) { -if($LANGUAGE == he) { - fancy_parser_design($filename); -} else { - fancy_design($filename); -} +fancy_design($filename); } } closedir($handle); @@ -85,21 +75,12 @@ // HR dropout $content = preg_replace(/HR\\s+ALIGN=\LEFT\\\s+WIDTH=\100%\/, '', $content); - if($LANGUAGE == he) { -// Whole page table and backgrounds -$wpbegin = 'TABLE BORDER=0 WIDTH=100% HEIGHT=100% CELLSPACING=0 CELLPADDING=0 DIR=RTLTRTD COLSPAN=3'; -$bnavt = 'TABLE BGCOLOR=#FF BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH=100% DIR=RTL'; -$lnavt = 'TR BGCOLOR=#66TDIMG SRC=spacer.gif BORDER=0 WIDTH=1 HEIGHT=1BR/TD/TR'; -$space = 'IMG SRC=spacer.gif WIDTH=10 HEIGHT=1'; - } - else { // Whole page table and backgrounds $wpbegin = 'TABLE BORDER=0 WIDTH=100% HEIGHT=100% CELLSPACING=0 CELLPADDING=0TRTD COLSPAN=3'; $bnavt = 'TABLE BGCOLOR=#FF BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH=100%'; $lnavt = 'TR BGCOLOR=#66TDIMG SRC=spacer.gif BORDER=0 WIDTH=1 HEIGHT=1BR/TD/TR'; $space = 'IMG SRC=spacer.gif WIDTH=10 HEIGHT=1'; - } - + // Navheader backgound $content = preg_replace(/DIV\\s+CLASS=\NAVHEADER\\\s*TABLE(.*)CELLPADDING=\0\(.*)\\/TABLE\\s*\\/DIV\\s*/Us, $wpbegin . 'DIV CLASS=NAVHEADER' . $bnavt . 'TRTDTABLE\\1CELLPADDING=3\\2/TABLE/TD/TR' . $lnavt . '/TABLE/DIV/TD/TRTRTD' . $space . '/TDTD HEIGHT=100% VALIGN=TOP WIDTH=100%BR', $content); @@ -150,127 +131,5 @@ $counter++; } // fancy_design() function end - - -// Convert one file from HTML = fancy HTML using CHtmlParser -function fancy_parser_design($fname) -{ -global $HTML_PATH, $FANCY_PATH, $LANGUAGE, $LANGUAGES, $counter, $original_index, $publication_date; - -global $EHType,$HEType; - -// Get the contents of the file from $HTML_PATH -//TODO: iconv stuff, for when charset element byte -$content = file_get_contents($HTML_PATH/$fname); - $tree = new CHtmlExtParse($content); - - // CSS file linking - $head = $HEType[head]; - if(isset($tree-EBT[$head][0])) - $tree-ATE[$tree-EBT[$head][0]][chaintoend] = 'LINK REL=stylesheet HREF=style.css'; - - // Charset: - $meta = $HEType[meta]; - if(isset($tree-EBT[$meta])){ - for($a=0;$acount($tree-EBT[$meta]);$a++){ - $elem = $tree-ATE[$tree-EBT[$meta][$a]]; - if(isset($elem[http-equiv]) $elem[http-equiv]==Content-type) - $elem[content] = text/html; {$LANGUAGES[$LANGUAGE]['mime_charset_name']}; - } - } - -// No margins around -$body = $HEType[body]; - if(isset($tree-EBT[$body][0])){ - $tree-ATE[$tree-EBT[$body][0]][TOPMARGIN] =0; - $tree-ATE[$tree-EBT[$body][0]][LEFTMARGIN] =0; - } - - -// HR dropout -$tmp=0; - do{ - if($tmp = $tree-get_element_id_by_rule(array(tag=hr,properties=array(align,LEFT,width,100%),offset=($tmp+1{ - $tree-change_tag_type($tmp,__HTML_FREE_ENGLISH__); - } - } while($tmp); - - if($LANGUAGE ==
[PHP-DOC] cvs: phpdoc /chm make_chm.php make_chm_fancy.php
dallas Fri Aug 30 11:08:42 2002 EDT Modified files: /phpdoc/chm make_chm.php make_chm_fancy.php Log: Make small changes, hope it works more smoothly for general user. Index: phpdoc/chm/make_chm.php diff -u phpdoc/chm/make_chm.php:1.3 phpdoc/chm/make_chm.php:1.4 --- phpdoc/chm/make_chm.php:1.3 Mon Aug 26 04:39:59 2002 +++ phpdoc/chm/make_chm.php Fri Aug 30 11:08:41 2002 -84,7 +84,7 if ($FIRST_PAGE != $INDEX_IN_HTML) { // Find the name of the Table of Contents -preg_match('|CLASS=\title\ A NAME=\manual\ (.+)/A|U', $indexline, $match); +preg_match('|CLASS=\TOC\ DL DT B (.*)/B|U', $indexline, $match); if (empty($match[1])) { // Fallback $match[1] = Table of Contents; } Index: phpdoc/chm/make_chm_fancy.php diff -u phpdoc/chm/make_chm_fancy.php:1.3 phpdoc/chm/make_chm_fancy.php:1.4 --- phpdoc/chm/make_chm_fancy.php:1.3 Thu May 9 06:42:01 2002 +++ phpdoc/chm/make_chm_fancy.php Fri Aug 30 11:08:41 2002 -44,8 +44,8 fputs($fp, $content); fclose($fp); -copy(chm/make_chm_style.css, $fancydir/style.css); -copy(chm/make_chm_spc.gif, $fancydir/spacer.gif); +copy(make_chm_style.css, $fancydir/style.css); +copy(make_chm_spc.gif, $fancydir/spacer.gif); // Three files added (fancy-index.html, style.css and spacer.gif) $counter += 3; -107,14 +107,14 } // Modify the index file to meet our needs - preg_match('|CLASS=\title\\\s+A\\s+NAME=\manual\\\s+(.*)/A\\s+/H1|U', $content, $match); + +preg_match('|CLASS=\title\\\s+A\\s+NAME=\manual\\\s+(.*)/A\\s+(.*)/H1|U', +$content, $match); $indexchange = 'TABLE BORDER=0 WIDTH=100% HEIGHT=100% CELLSPACING=0 CELLPADDING=0TRTD COLSPAN=3DIV CLASS=NAVHEADERTABLE BGCOLOR=#FF BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH=100%TRTDTABLE -WIDTH=100% BORDER=0 CELLPADDING=3 CELLSPACING=0TRTH COLSPAN=3'.$match[1].'/TH/TRTRTD COLSPAN=3 ALIGN=centernbsp;/TD/TR/TABLE/TD/TRTR BGCOLOR=#66TDIMG SRC=spacer.gif BORDER=0 WIDTH=1 HEIGHT=1BR/TD/TR/TABLE +WIDTH=100% BORDER=0 CELLPADDING=3 CELLSPACING=0TRTH +COLSPAN=3'.$match[2].'/TH/TRTRTD COLSPAN=3 +ALIGN=centernbsp;/TD/TR/TABLE/TD/TRTR BGCOLOR=#66TDIMG +SRC=spacer.gif BORDER=0 WIDTH=1 HEIGHT=1BR/TD/TR/TABLE /DIV/TD/TRTRTDIMG SRC=spacer.gif WIDTH=10 HEIGHT=1/TDTD HEIGHT=100% VALIGN=TOP WIDTH=100%BR'; $content = preg_replace(/(DIV\\s+CLASS=\BOOK\)/, $indexchange\\1, $content); $content = preg_replace(/(DIV\\s+CLASS=\author\).*HR/Us, , $content); preg_match('|DIV\\s+CLASS=TOC\\s+DL\\s+DT\\s+B\\s+(.*)/B\\s+|U', $content, $match); -$content = preg_replace(|(CLASS=\title\\\s+A\\s+NAME=\manual\\\s+).*(/A)|U, \\1$match[1]\\2, $content); +$content = +preg_replace(|(CLASS=\title\\\s+A\\s+NAME=\manual\\\s+).*(/A\\s+).*(/H1)|U, + \\1$match[1]\\2\\3, $content); $content = preg_replace(|DT\\s+B\\s+(.*)/B\\s+/DT\\s+|U, , $content); } -- PHP Documentation Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DOC] cvs: phpdoc /chm make_chm.php make_chm_fancy.php
-copy(chm/make_chm_style.css, $fancydir/style.css); -copy(chm/make_chm_spc.gif, $fancydir/spacer.gif); +copy(make_chm_style.css, $fancydir/style.css); +copy(make_chm_spc.gif, $fancydir/spacer.gif); This was vital for the build system mainatined by Derick. He may add more info to this, but those path values were important (otherwise the page display will be way too slow). Goba -- PHP Documentation Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php