Skip to content

Commit 9dda419

Browse files
committed
Load Smarty 2 documentation
1 parent a62603c commit 9dda419

File tree

1,973 files changed

+317217
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,973 files changed

+317217
-0
lines changed

docs/.cvsignore

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
configure
2+
Makefile
3+
manual.xml
4+
config.*
5+
*.cache
6+
*.fot
7+
html
8+
phpweb
9+
diff
10+
revcheck.html
11+
manual.pdf

docs/Makefile.in

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
# +----------------------------------------------------------------------+
2+
# | PHP Version 5 |
3+
# +----------------------------------------------------------------------+
4+
# | Copyright (c) 1997-2004 The PHP Group |
5+
# +----------------------------------------------------------------------+
6+
# | This source file is subject to version 3.0 of the PHP license, |
7+
# | that is bundled with this package in the file LICENSE, and is |
8+
# | available through the world-wide-web at the following url: |
9+
# | http://www.php.net/license/3_0.txt. |
10+
# | If you did not receive a copy of the PHP license and are unable to |
11+
# | obtain it through the world-wide-web, please send a note to |
12+
# | license@php.net so we can mail you a copy immediately. |
13+
# +----------------------------------------------------------------------+
14+
#
15+
16+
#
17+
# $Id$
18+
#
19+
20+
all: html
21+
22+
# {{{ variables
23+
24+
PHP=@PHP@
25+
LANG=@LANG@
26+
NSGMLS=@SP_OPTIONS@ @NSGMLS@
27+
JADE=@SP_OPTIONS@ @JADE@ -D . -wno-idref
28+
XMLLINT=@XMLLINT@
29+
FOP=@FOP@
30+
XMLDCL=./dtds/dbxml-4.1.2/phpdocxml.dcl
31+
CATALOG=@CATALOG@
32+
HTML_STYLESHEET=dsssl/html.dsl
33+
PHPWEB_STYLESHEET=dsssl/php.dsl
34+
35+
# }}}
36+
37+
#default behaviour
38+
all:html
39+
40+
FORCE:
41+
42+
html: FORCE
43+
@test -d html || mkdir html
44+
$(JADE) $(CATALOG) -d $(HTML_STYLESHEET) -V use-output-dir -t sgml $(XMLDCL) manual.xml
45+
$(PHP) scripts/html_syntax.php html html/
46+
47+
web: FORCE
48+
@test -d phpweb || mkdir phpweb
49+
$(JADE) $(CATALOG) -d $(PHPWEB_STYLESHEET) -V use-output-dir -t sgml $(XMLDCL) manual.xml
50+
$(PHP) scripts/generate_web.php
51+
$(PHP) scripts/html_syntax.php php phpweb/
52+
53+
pdf: FORCE
54+
${FOP} -xml manual.xml -xsl xsl/fo.xsl -pdf manual.pdf
55+
56+
chm: html FORCE
57+
chm/make_chm.bat $(LANG)
58+
59+
test:
60+
$(NSGMLS) -i lang-$(LANG) -s $(XMLDCL) manual.xml
61+
62+
test_xml:
63+
$(XMLLINT) --noent --noout --valid manual.xml
64+
65+
revcheck: FORCE
66+
$(PHP) -f scripts/revcheck.php $(LANG) > revcheck.html
67+
68+
# {{{ cleanup
69+
70+
clean:
71+
rm -f Makefile config.* manual.xml configure entities/version.ent *.fot dsssl/html-common.dsl manual.pdf
72+
rm -f revcheck.html file-entities.php entities/file-entities.ent scripts/file-entities.php manual.fo
73+
rm -fr autom4te.cache html phpweb
74+
75+
# }}}

docs/README

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
This directory contains the documentation for Smarty. All files are in docbook
2+
format with an .xml extention. Different subdirs contain different available languages.
3+
4+
5+
NEW BUILD SYSTEM
6+
================
7+
Firstly issue these commands:
8+
1) autoconf
9+
2) ./configure --with-lang=xx [DEFAULT=en]
10+
11+
TEST:
12+
* make test
13+
* make test_xml (test for XML validity)
14+
15+
MAKE:
16+
* make (to make plain html)
17+
* make web (to make docs for website)
18+
19+
20+
Generate PDF files
21+
==================
22+
In order to generate PDF files you need some tools:
23+
* Apache FOP (http://xml.apache.org/fop/)
24+
* JRE 1.2 or later
25+
26+
To generate the file, just type 'make pdf'
27+
28+
29+
Generate CHM files
30+
==================
31+
In order to generate CHM files you need the Microsoft(r) HTML Help Workshop,
32+
which can be freely downloaded at
33+
http://msdn.microsoft.com/library/en-us/htmlhelp/html/vsconhh1start.asp
34+
35+
Then type 'make chm'. This will run the 'make html' and then build the chm file.
36+
37+
38+
Revision Tracking (for translations):
39+
* make revcheck (this will create revcheck.html)
40+
41+
42+
You should have libxml and autoconf installed in your system.
43+
Read http://doc.php.net/php/dochowto/chapter-tools.php for more info.

docs/TODO

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
*normal mode* :
2+
- add CDATA sections in all programlistings.
3+
- add roles to programlisting (especially role="php") and add PHP tags in PHP examples (short_open_tag is banned). This will help to :
4+
-- check parse errors : for i in $(ls |grep xml); do php -d short_open_tag=off -l $i; done
5+
6+
*pedentic mode* :
7+
- fix indenting in all .xml files : don't uses tabs, indent by a space. Here's a nice indentation :
8+
9+
<para>
10+
<example>
11+
<title />
12+
<programlisting>
13+
<![CDATA[
14+
// ..
15+
]]>
16+
</programlisting>
17+
</example>
18+
</para>
19+
20+
- clean all the examples :
21+
(if aggreed) examples should be XHTML compliant and should stick to PEAR's coding standards.
22+
23+
Here's how a complete example, using PHP and templates, should be written :
24+
25+
<example>
26+
<title>html_image example</title>
27+
<programlisting role="php">
28+
<![CDATA[
29+
<?php
30+
31+
require('Smarty.class.php');
32+
$smarty = new Smarty;
33+
$smarty->display('index.tpl');
34+
35+
?>
36+
]]>
37+
</programlisting>
38+
<para>
39+
where index.tpl is:
40+
</para>
41+
<programlisting>
42+
<![CDATA[
43+
{html_image file="pumpkin.jpg"}
44+
]]>
45+
</programlisting>
46+
<para>
47+
a possible output would be:
48+
</para>
49+
<screen>
50+
<![CDATA[
51+
<img src="pumpkin.jpg" alt="" border="0" width="44" height="68" />
52+
]]>
53+
</screen>
54+
</example>
55+

docs/chm/.cvsignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
*.chm
2+
*.hh?
3+
fancy

docs/chm/README

Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
****************************************************************
2+
** This is a modified version of phpdoc/chm **
3+
****************************************************************
4+
5+
BUILDING THE MANUAL IN WINDOWS HELP FILE (.CHM) FORMAT
6+
7+
Note: Where 'lang' is mentioned in this doc, it is the actual
8+
language code (e.g. en) of the manual you are compiling,
9+
not the 'lang' word itself!
10+
11+
With the herein described tools you're able to build the .chm manual
12+
with two options:
13+
14+
a) Simply build the traditional html manual
15+
b) Make a fancy version of the html manual and build it
16+
17+
=======================================================================
18+
WHAT YOU NEED
19+
20+
* Microsoft(r) HTML Help Workshop.
21+
You can download it freely at:
22+
http://msdn.microsoft.com/library/en-us/htmlhelp/html/vsconhh1start.asp
23+
You need the complete workshop package install (about 4 Megs).
24+
Of course you need Microsoft(r) Windows to run that software :)
25+
26+
* The html manual (build with 'make')
27+
28+
The .chm manual generator files (from cvs.php.net):
29+
30+
make_chm.bat - The only file you need to run yourself.
31+
make_chm.php - Auto toc generator.
32+
33+
To make the fancy manual, additional files are needed:
34+
35+
make_chm_fancy.php - Converts the normal html files to fancy
36+
(good looking) pages
37+
make_chm_index_lang.html - Fancy index. (you find it in phpdoc/lang
38+
dir, if it exists for that language).
39+
make_chm_spc.gif - GIF file needed by the fancy pages.
40+
make_chm_style.css - This adds some good style to html files.
41+
42+
=======================================================================
43+
INSTALLATION
44+
45+
Install Microsoft(r) HTML Help Workshop.
46+
47+
Put the above listed make_chm_* files to one directory.
48+
49+
Open make_chm.bat in a text editor and set the appropriate
50+
environment variables. You need to
51+
52+
- set PHP_PATH to the full path of the CGI php.exe on
53+
your machine (including php.exe).
54+
- set PHP_HELP_COMPILER to the full path of hhc.exe on
55+
your machine (including hhc.exe).
56+
- set PHP_HELP_COMPILE_LANG to the language code of the
57+
actual manual (use the code from cvs.php.net, eg. hu)
58+
- set PHP_HELP_COMPILE_DIR to the directory of the
59+
html manual (eg. ..\html when you build it like mentioned in the howto)
60+
- set PHP_HELP_COMPILE_INDEX to the index filename in
61+
the directory you set above. This used to be manual.html
62+
for a long time, but it seems it is now index.html.
63+
64+
The following variable is only needed for the fancy manual:
65+
66+
- set PHP_HELP_COMPILE_FANCYDIR to the directory name where
67+
the fancy pages will go.
68+
You can decide not to sacrifice any more space for the fancy dir
69+
(it takes ~25% more space than the normal html-manual), and set
70+
this variable to the same as PHP_HELP_COMPILE_DIR. Then your old
71+
HTML files will be rewritten to be fancy ones.
72+
73+
=======================================================================
74+
BUILDING THE MANUAL:
75+
76+
Put the html manual (~2100 files) under the subdir specified above in
77+
PHP_HELP_COMPILE_DIR (eg. html).
78+
79+
To compile the NORMAL manual, use the 'normal' command line option:
80+
81+
make_chm normal
82+
83+
To compile the FANCY manual, just run:
84+
85+
make_chm
86+
87+
After this process, you will have smarty_manual_lang.chm...
88+
89+
=======================================================================
90+
The fancy design improvemenets and the .css file is based on
91+
the newsite design(TM) work of Colin Viebrock [colin@easyDNS.com] :)
92+
93+
Written by Gabor Hojtsy (goba@php.net), and adapted by
94+
Thomas Schoefbeck (tom@php.net). Contact them or the phpdoc list
95+
(phpdoc@lists.php.net) if you have any questions or suggestions...
96+
97+
Last modified $Date$

0 commit comments

Comments
 (0)