bjori           Tue Jun 19 23:33:48 2007 UTC

  Modified files:              
    /livedocs   build.sh style_mapping.php 
    /livedocs/themes/default    livedoc.css 
    /livedocs/themes/php.net    livedoc.css 
    /livedocs/themes/smarty     livedoc.css 
  Log:
  Add "example image" support (sync with phpdoc)
  
  
http://cvs.php.net/viewvc.cgi/livedocs/build.sh?r1=1.33&r2=1.34&diff_format=u
Index: livedocs/build.sh
diff -u livedocs/build.sh:1.33 livedocs/build.sh:1.34
--- livedocs/build.sh:1.33      Tue Jun 19 23:22:52 2007
+++ livedocs/build.sh   Tue Jun 19 23:33:48 2007
@@ -65,6 +65,23 @@
        # make search cache database
        mv "${GENDIR}/livedoc-cache-idx.$i.sqlite" "${OUTPUTDIR}/$i/"
        chmod 0666 "${OUTPUTDIR}/$i/livedoc-cache-idx.$i.sqlite"
+
+       if test "$i" = "en"; then
+               echo "Copying image examples from ${PHPDOC}/en"
+               mkdir "${OUTPUTDIR}/figures"
+               for folder in `find "${PHPDOC}/en" -type d -name figures`; do
+                       echo $folder
+                       sect=`dirname ${folder} | xargs basename`
+                       for file in ${folder}/*; do
+                               if test -f "$file"; then
+                                       name=`basename "${file}"`
+                                       echo cp "${file}" 
"${OUTPUTDIR}/figures/${sect}.${name}"
+                               fi
+                       done
+               done
+               echo "Done"
+       fi
+
        cd $curpath
 done;
 
http://cvs.php.net/viewvc.cgi/livedocs/style_mapping.php?r1=1.35&r2=1.36&diff_format=u
Index: livedocs/style_mapping.php
diff -u livedocs/style_mapping.php:1.35 livedocs/style_mapping.php:1.36
--- livedocs/style_mapping.php:1.35     Tue Jun 19 23:22:52 2007
+++ livedocs/style_mapping.php  Tue Jun 19 23:33:48 2007
@@ -18,7 +18,7 @@
 // | Helper functions for formatting elements                             |
 // +----------------------------------------------------------------------+
 //
-// $Id: style_mapping.php,v 1.35 2007/06/19 23:22:52 philip Exp $
+// $Id: style_mapping.php,v 1.36 2007/06/19 23:33:48 bjori Exp $
 
 // almost XPATH.. ;-)
 $map = array(
@@ -78,6 +78,7 @@
        'refsect2/title'        => 'h4',
        'replaceable'           => 'span',
        'screen'                => 'format_listing',
+       'screenshot/graphic'    => 'format_image',
        'section/title'         => 'h1',
        'sect1/title'           => 'h2',
        'sect2/title'           => 'h3',
@@ -393,6 +394,10 @@
        return sprintf('<div class="%scode"%s>%s</div>', 
$node->attributes['role'], LTR, $content);
 }
 
+function format_image($node, $map = array()) {
+       return sprintf('<img src="%s" class="%s" />', 
$node->attributes['fileref'], $node->tagname);
+}
+
 function format_params($node) 
 {
        $node->parent = null;
http://cvs.php.net/viewvc.cgi/livedocs/themes/default/livedoc.css?r1=1.8&r2=1.9&diff_format=u
Index: livedocs/themes/default/livedoc.css
diff -u livedocs/themes/default/livedoc.css:1.8 
livedocs/themes/default/livedoc.css:1.9
--- livedocs/themes/default/livedoc.css:1.8     Wed Feb  9 19:03:56 2005
+++ livedocs/themes/default/livedoc.css Tue Jun 19 23:33:48 2007
@@ -1,4 +1,4 @@
-/* $Id: livedoc.css,v 1.8 2005/02/09 19:03:56 iliaa Exp $ */
+/* $Id: livedoc.css,v 1.9 2007/06/19 23:33:48 bjori Exp $ */
 body {
     font-family: verdana;
     font-size: 11pt;
@@ -154,7 +154,7 @@
 div.shellcode, div.xmlcode, div.phpcode,
 div.inicode, div.htmlcode, div.screen,
 div.apache-confcode, div.code,
-div.synopsis {
+div.synopsis, div.screenshot {
     background-color: #eeeeee;
     border: solid 2px #dddddd;
     padding: 0.6em;
http://cvs.php.net/viewvc.cgi/livedocs/themes/php.net/livedoc.css?r1=1.7&r2=1.8&diff_format=u
Index: livedocs/themes/php.net/livedoc.css
diff -u livedocs/themes/php.net/livedoc.css:1.7 
livedocs/themes/php.net/livedoc.css:1.8
--- livedocs/themes/php.net/livedoc.css:1.7     Sat Aug 21 14:31:35 2004
+++ livedocs/themes/php.net/livedoc.css Tue Jun 19 23:33:48 2007
@@ -1,4 +1,4 @@
-/* $Id: livedoc.css,v 1.7 2004/08/21 14:31:35 derick Exp $ */
+/* $Id: livedoc.css,v 1.8 2007/06/19 23:33:48 bjori Exp $ */
 body {
     font-family: verdana;
     font-size: 11pt;
@@ -179,7 +179,7 @@
 div.shellcode, div.xmlcode, div.phpcode,
 div.inicode, div.htmlcode, div.screen,
 div.apache-confcode, div.code,
-div.synopsis {
+div.synopsis, div.screenshot {
     background-color: #eeeeee;
     border: solid 2px #dddddd;
     padding: 0.6em;
http://cvs.php.net/viewvc.cgi/livedocs/themes/smarty/livedoc.css?r1=1.2&r2=1.3&diff_format=u
Index: livedocs/themes/smarty/livedoc.css
diff -u livedocs/themes/smarty/livedoc.css:1.2 
livedocs/themes/smarty/livedoc.css:1.3
--- livedocs/themes/smarty/livedoc.css:1.2      Tue May  4 15:29:23 2004
+++ livedocs/themes/smarty/livedoc.css  Tue Jun 19 23:33:48 2007
@@ -1,4 +1,4 @@
-/* $Id: livedoc.css,v 1.2 2004/05/04 15:29:23 nlopess Exp $ */
+/* $Id: livedoc.css,v 1.3 2007/06/19 23:33:48 bjori Exp $ */
 body {
     font-family: verdana;
     font-size: 11pt;
@@ -153,7 +153,7 @@
 div.shellcode, div.xmlcode, div.phpcode,
 div.inicode, div.htmlcode, div.screen,
 div.apache-confcode, div.code,
-div.synopsis {
+div.synopsis, div.screenshot {
     background-color: #eeeeee;
     border: solid 2px #dddddd;
     padding: 0.6em;

Reply via email to