cvs: smarty /docs/ru/appendixes bugs.xml resources.xml tips.xml troubleshooting.xml
"Antony Dovgal" <[email protected]>
| Newsgroups | gmane.comp.php.cvs.smarty |
|---|---|
| Message-ID | <cvstony20011081956549@cvsserver> |
tony2001 Wed Apr 14 11:29:09 2004 EDT
Modified files:
/smarty/docs/ru/appendixes bugs.xml resources.xml tips.xml
troubleshooting.xml
Log:
multiple WS & syntax fixes
--
Smarty CVS Mailing List (http://cvs.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
tony2001-20040414112909.txt
(text/plain, 24.4 KB)
http://cvs.php.net/diff.php/smarty/docs/ru/appendixes/bugs.xml?r1=1.1&r2=1.2&ty=u
Index: smarty/docs/ru/appendixes/bugs.xml
diff -u smarty/docs/ru/appendixes/bugs.xml:1.1 smarty/docs/ru/appendixes/bugs.xml:1.2
--- smarty/docs/ru/appendixes/bugs.xml:1.1 Tue Mar 30 04:05:36 2004
+++ smarty/docs/ru/appendixes/bugs.xml Wed Apr 14 11:29:09 2004
@@ -1,11 +1,11 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.1 $ -->
+<?xml version="1.0" encoding="windows-1251"?>
+<!-- $Revision: 1.2 $ -->
<chapter id="bugs">
- <title>BUGS</title>
- <para>
- Check the BUGS file that comes with the latest distribution of Smarty, or
- check the website.
- </para>
+ <title>Îøèáêè</title>
+ <para>
+ Ñìîòðèòå ôàéë <filename>BUGS</filename>, êîòîðûé ïîñòàâëÿåòñÿ âìåñòå ñ
+ ñòàíäàðòíîé ïîñòàâêî Smarty èëè èùèòå ñïèñîê íà ñàéòå.
+ </para>
</chapter>
<!-- Keep this comment at the end of the file
Local variables:
http://cvs.php.net/diff.php/smarty/docs/ru/appendixes/resources.xml?r1=1.1&r2=1.2&ty=u
Index: smarty/docs/ru/appendixes/resources.xml
diff -u smarty/docs/ru/appendixes/resources.xml:1.1 smarty/docs/ru/appendixes/resources.xml:1.2
--- smarty/docs/ru/appendixes/resources.xml:1.1 Tue Mar 30 04:05:36 2004
+++ smarty/docs/ru/appendixes/resources.xml Wed Apr 14 11:29:09 2004
@@ -1,15 +1,15 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.1 $ -->
+<?xml version="1.0" encoding="windows-1251"?>
+<!-- $Revision: 1.2 $ -->
<chapter id="resources">
- <title>Èñòî÷íèêè</title>
- <para>
- Äîìàøíÿÿ ñòðàíèöà Smarty: <ulink
+ <title>Èñòî÷íèêè</title>
+ <para>
+ Äîìàøíÿÿ ñòðàíèöà Smarty: <ulink
url="&url.smarty;">&url.smarty;</ulink>
- Äëÿ ïîäïèñêè íà íîâîñòè, íàäî ïîñëàòü ïèñüìî íà
- &ml.general.sub;.
- Àðõèâ ïîäïèñêè äîñòóïåí íà
- <ulink url="&url.ml.archive;">&url.ml.archive;</ulink>.
- </para>
+ Äëÿ ïîäïèñêè íà íîâîñòè, íàäî ïîñëàòü ïèñüìî íà
+ &ml.general.sub;.
+ Àðõèâ ïîäïèñêè äîñòóïåí íà
+ <ulink url="&url.ml.archive;">&url.ml.archive;</ulink>.
+ </para>
</chapter>
<!-- Keep this comment at the end of the file
Local variables:
@@ -31,3 +31,4 @@
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->
+
http://cvs.php.net/diff.php/smarty/docs/ru/appendixes/tips.xml?r1=1.3&r2=1.4&ty=u
Index: smarty/docs/ru/appendixes/tips.xml
diff -u smarty/docs/ru/appendixes/tips.xml:1.3 smarty/docs/ru/appendixes/tips.xml:1.4
--- smarty/docs/ru/appendixes/tips.xml:1.3 Tue Mar 30 04:35:29 2004
+++ smarty/docs/ru/appendixes/tips.xml Wed Apr 14 11:29:09 2004
@@ -1,26 +1,24 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.3 $ -->
+<?xml version="1.0" encoding="windows-1251"?>
+<!-- $Revision: 1.4 $ -->
<chapter id="tips">
- <title>Óëîâêè</title>
- <para>
- </para>
- <sect1 id="tips.blank.var.handling">
- <title>Îáðàáîòêà ïóñòûõ ïåðåìåííûõ</title>
- <para>
- Èíîãäà, íàïðèìåð, äëÿ òîãî ÷òîáû ôîí òàáëèöû ðàáîòàë êîððåêòíî,
- íåîáõîäèìî âûâåñòè âìåñòî ïóñòîãî çíà÷åíèÿ ïåðåìåííîé, çíà÷åíèå
- ïî óìîë÷àíèþ "&nbsp;". Ìíîãèå áû èñïîëüçîâàëè êîíñòðóêöèþ {if},
- íî åñòü áîëåå êîðîòêèé ïóòü â Smatry èñïîëüçóÿ <emphasis>default</emphasis>
- ìîäèôèêàòîð ïåðåìåííîé.
- </para>
+ <title>Ñîâåòû</title>
+ <sect1 id="tips.blank.var.handling">
+ <title>Îáðàáîòêà ïóñòûõ ïåðåìåííûõ</title>
+ <para>
+ Èíîãäà, íàïðèìåð, äëÿ òîãî ÷òîáû ôîí òàáëèöû ðàáîòàë êîððåêòíî,
+ íåîáõîäèìî âûâåñòè âìåñòî ïóñòîãî çíà÷åíèÿ ïåðåìåííîé, çíà÷åíèå
+ ïî óìîë÷àíèþ "&nbsp;". Ìíîãèå áû èñïîëüçîâàëè êîíñòðóêöèþ {if},
+ íî åñòü áîëåå êîðîòêèé ïóòü â Smatry èñïîëüçóÿ <emphasis>default</emphasis>
+ ìîäèôèêàòîð ïåðåìåííîé.
+ </para>
<example>
-<title>Âûâîä &nbsp; êîãäà ïåðåìåííàÿ ïóñòà</title>
+<title>Âûâîä &nbsp;, åñëè ïåðåìåííàÿ ïóñòà</title>
<programlisting>
-
+<![CDATA[
{* äëèííûé ïóòü *}
{if $title eq ""}
- &nbsp;
+
{else}
{$title}
{/if}
@@ -28,39 +26,43 @@
{* êîðîòêèé ïóòü *}
-{$title|default:"&nbsp;"}</programlisting>
+{$title|default:" "}
+]]>
+</programlisting>
</example>
- </sect1>
-
- <sect1 id="tips.default.var.handling">
- <title>Îáðàáîòêà ïåðåìåííûõ ïî óìëî÷àíèþ</title>
- <para>
- Åñëè ïåðåìåííàÿ âñòðå÷àåòñÿ ÷àñòî, òî èñïîëüçîâàíèå ìîäèôèêàòîðà
- default êàæäûé ðàç ìîæíî èçáåæàòü, èñïîëüçóÿ ôóíêöèþ
- <link linkend="language.function.assign">assign</link>.
- </para>
+</sect1>
+<sect1 id="tips.default.var.handling">
+ <title>Îáðàáîòêà ïåðåìåííûõ ïî óìëî÷àíèþ</title>
+ <para>
+ Åñëè ïåðåìåííàÿ âñòðå÷àåòñÿ ÷àñòî, òî èñïîëüçîâàíèå ìîäèôèêàòîðà
+ default êàæäûé ðàç ìîæíî èçáåæàòü, èñïîëüçóÿ ôóíêöèþ
+ <link linkend="language.function.assign">assign</link>.
+ </para>
<example>
<title>Íàçíà÷åíèå ïåðåìåííîé øàáëîíà çíà÷åíèÿ ïî óìîë÷àíèþ</title>
<programlisting>
+<![CDATA[
{* ââåðõó øàáëîíà *}
{assign var="title" value=$title|default:"no title"}
{* åñëè ïåðåìåííàÿ $title áûëà ïóñòîé, òî ñåé÷àñ îíà ñîäåðæèò "no title" *}
-{$title}</programlisting>
+{$title}
+]]>
+</programlisting>
</example>
- </sect1>
- <sect1 id="tips.passing.vars">
- <title>Ïðèñâîåíèå ïåðåìåííîé çàãîëîâêà (title) çàãîëîâêó øàáëîíà.</title>
- <para>
- Rîãäà áîëüøèíñòâî âàøèõ øàáëîíîâ èìåþò ïîõîæèå âåðõíèå ÷àñòè
- è íèæíèå, òî èìååò ñìûñë âûíåñòè èõ â îòäåëüíûå ôàéëû. Íî åñëè
- øàïêà äîëæíà èìåòü ðàçëè÷íûå çàãîëîâêè íà ðàçëè÷íûõ ñòðàíèöàõ?
- Âû ìîæåòå ïåðåäàòü çàãîëîâîê â øàïêó, êîãäà îíà ïðèñîåäèíÿåòüñÿ.
- </para>
+</sect1>
+<sect1 id="tips.passing.vars">
+ <title>Ïðèñâîåíèå ïåðåìåííîé çàãîëîâêà (title) çàãîëîâêó øàáëîíà.</title>
+ <para>
+ Åñëè áîëüøèíñòâî âàøèõ øàáëîíîâ èìåþò ïîõîæèå âåðõíèå è íèæíèå
+ ÷àñòè, òî èìååò ñìûñë âûíåñòè èõ â îòäåëüíûå ôàéëû. Íî åñëè
+ øàïêà äîëæíà èìåòü ðàçëè÷íûå çàãîëîâêè íà ðàçëè÷íûõ ñòðàíèöàõ?
+ Ñìîòðèòå ïðèìåð íèæå.
+ </para>
<example>
<title>Ïðèñâîåíèå ïåðåìåííîé çàãîëîâêà (title) çàãîëîâêó øàáëîíà.</title>
<programlisting>
-
+<![CDATA[
mainpage.tpl
------------
@@ -80,40 +82,42 @@
header.tpl
----------
-<HTML>
-<HEAD>
-<TITLE>{$title|default:"BC News"}</TITLE>
-</HEAD>
-<BODY>
+<HTML>
+ <HEAD>
+ <TITLE>{$title|default:"BC News"}</TITLE>
+ </HEAD>
+ <BODY>
footer.tpl
----------
-</BODY>
-</HTML></programlisting>
+</BODY>
+</HTML>
+]]>
+</programlisting>
</example>
- <para>
- Åñëè âûâîäèòñÿ ãëàâíàÿ ñòðàíèöà, òî çàãîëîâîê áóäåò "Main Page",
- åñëè àðõèâû, òî çàãîëîâê áåðåòñÿ èç ôàéëà êîíôèãóðàöèè. Åñëè
- çàãîëîâîê áóäåò ïóñòîé, òî âûâåäåòüñÿ çíà÷åíèå ïî óìîë÷àíèþ "BC News".
- </para>
- </sect1>
- <sect1 id="tips.dates">
- <title>Äàòû</title>
- <para>
- Îáû÷íî äàòû â Smarty âñåãäà ïåðåäàþòñÿ êàê timestamps, ÷òî
- ïîçâîëÿåò ïðîåêòèðîâùèêàì øàáëîíà èñïîëüçîâàòü <link
+ <para>
+ Åñëè âûâîäèòñÿ ãëàâíàÿ ñòðàíèöà, òî çàãîëîâîê áóäåò "Main Page",
+ åñëè àðõèâû, òî çàãîëîâê áåðåòñÿ èç ôàéëà êîíôèãóðàöèè. Åñëè
+ çàãîëîâîê áóäåò ïóñòîé, òî âûâåäåòñÿ çíà÷åíèå ïî óìîë÷àíèþ "BC News".
+ </para>
+</sect1>
+<sect1 id="tips.dates">
+<title>Äàòû</title>
+ <para>
+ Îáû÷íî äàòû â Smarty âñåãäà ïåðåäàþòñÿ êàê âðåìåííûå ìåòêè, ÷òî
+ ïîçâîëÿåò ïðîåêòèðîâùèêàì øàáëîíîâ èñïîëüçîâàòü <link
linkend="language.modifier.date.format">date_format</link>
- äëÿ ïîëíîãî íàä ôîðìàòèðîâàíèåì äàòû, è òàêæå äåëàåò ëåãêèì
- ñðàâíåíèå äàò åñëè íåîáõîäèìî.
- </para>
- <para>
- ÇÀÌÅ×ÀÍÈÅ: Îò Smarty 1.4.0 âû ìîæåòå ïåðåäàâàòü äàòû êàê unix
- timestamps, mysql timestamps, èëè ëþáûå äðóãèå äàòû, êîòîðûå
- îáðàáîòàþòñÿ strtotime().
- </para>
+ äëÿ ïîëíîãî êîíòðîëÿ íàä ôîðìàòèðîâàíèåì äàòû è òàêæå äåëàåò ëåãêèì
+ ñðàâíåíèå äàò òàì, ãäå ýòî íåîáõîäèìî.
+ </para>
+ <para>
+ ÇÀÌÅ×ÀÍÈÅ: Íà÷èíàÿ ñ âåðñèè Smarty 1.4.0 âû ìîæåòå ïåðåäàâàòü äàòó â âèäå
+ âðåìåííîé ìåòêè Unix (Unix timestamp), âðåìåííîé ìåòêè MySQL èëè â ëþáîì
+ äðóãîì âèäå, êîòîðûé ïîäåðæèâàåòñÿ ôóíêöèåé PHP strtotime().
+ </para>
<example>
-<title>èñïîëüçîâàíèå date_format</title>
+ <title>Èñïîëüçîâàíèå date_format</title>
<programlisting>
<![CDATA[
{$startDate|date_format}
@@ -135,14 +139,15 @@
{/if}
]]></programlisting>
</example>
- <para>
- Êîãäà {html_select_date} èñïîëüçóåòñÿ â øàáëîíå, ïðîãðàììèñòû îáû÷íî
- õîòÿò ïîëó÷èòü äàòó âèäå timestamp. Ôîò ôóíêöèÿ, êîòîðàÿ ïîìîæåò ýòî
- ñäåëàòü.
- </para>
+<para>
+ Êîãäà {html_select_date} èñïîëüçóåòñÿ â øàáëîíå, ïðîãðàììèñòàì ìîæåò
+ ïîíàäîáèòüñÿ ïîëó÷èòü äàòó âèäå âðåìåííîé ìåòêè. Âîò ôóíêöèÿ, êîòîðàÿ ïîìîæåò ýòî
+ ñäåëàòü.
+</para>
<example>
-<title>Ïðåîáðàçîâàíèå ýëåìåíòîâ ôîðìû ââîäà äàòû íàçàä ê timestamp</title>
+<title>Ïðåîáðàçîâàíèå ýëåìåíòîâ ôîðìû ââîäà äàòû íàçàä ê âðåìåííîé ìåòêå</title>
<programlisting>
+<![CDATA[
// Ïðåäïîëàãàåòñÿ, ÷òî âàøè ýëåìåíòû ôîðìû íàçâàíû
// startDate_Day, startDate_Month, startDate_Year
@@ -158,23 +163,25 @@
$day = strftime("%d");
return mktime(0,0,0,$month,$day,$year);
-}</programlisting>
+ }
+]]>
+</programlisting>
</example>
- </sect1>
- <sect1 id="tips.wap">
- <title>WAP/WML</title>
- <para>
- WAP/WML øàáëîíû òðåáóþò, ÷òîáû PHP content-type çàãîëîâêè áûëè
- ïåðåäàíû âìåñòå ñ øàáëîíîì. Ïðîñòåéøèé ïóòü - íàïèñàòü
- ïîëüçîâàòåëüñêóþ ôóíêöèþ, êîòîðàÿ áóäåò âûâîäèòü çàãîëîâêè.
- Òàê êàê ìû áóäåì ïîëüçîâàòüñÿ òýãàìè insert òî çàãîëîâêè íå áóäóò
- êýøèðîâàòüñÿ. Òàê æå íè÷åãî íå äîëæíî âûâîäèòüñÿ â áðàóçåð äî
- øàáëîíà, èíà÷å çàãîëîâêè ìîãóò áûòü íåïðàâèëüíî âîñïðèíÿòû.
- </para>
+</sect1>
+<sect1 id="tips.wap">
+ <title>WAP/WML</title>
+ <para>
+ WAP/WML øàáëîíû òðåáóþò, ÷òîáû çàãîëîâîê Content-type áûë
+ ïåðåäàí âìåñòå ñ øàáëîíîì. Ïðîñòåéøèé ïóòü - íàïèñàòü
+ ïîëüçîâàòåëüñêóþ ôóíêöèþ, êîòîðàÿ áóäåò âûâîäèòü çàãîëîâêè.
+ Òàê êàê ìû áóäåì ïîëüçîâàòüñÿ òýãàìè insert, òî çàãîëîâêè íå áóäóò
+ êýøèðîâàòüñÿ. Òàê æå íè÷åãî íå äîëæíî âûâîäèòüñÿ â áðàóçåð äî
+ øàáëîíà, èíà÷å çàãîëîâêè ìîãóò áûòü íåïðàâèëüíî âîñïðèíÿòû.
+ </para>
<example>
-<title>Bñïîëüçîâàíèå insert äëÿ çàïèñè WML Content-Type çàãîëîâêîâ</title>
+ <title>Èñïîëüçîâàíèå insert äëÿ çàïèñè WML Content-Type çàãîëîâêîâ</title>
<programlisting>
-// Apache äîëæåí áûòü ñêîíôèãóðèðîâàí ñ .wml ðàñøèðåíèåì!
+<![CDATA[
// ïîìåñòèòå ýòó ôóíêöèþ â ïðèëîæåíèå, èëè â Smarty.addons.php
function insert_header() {
// this function expects $content argument
@@ -188,55 +195,57 @@
// øàáëîí ÄÎËÆÅÍ íà÷èíàòüñÿ ñ òýãà insert. Ïðèìåð:
{insert name=header content="Content-Type: text/vnd.wap.wml"}
-<?xml version="1.0"?>
-<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org/DTD/wml_1.1.xml">
+<?xml version="1.0"?>
+<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org/DTD/wml_1.1.xml">
-<!-- begin new wml deck -->
-<wml>
-<!-- begin first card -->
-<card>
-<do type="accept">
-<go href="#two"/>
-</do>
-<p>
+<!-- begin new wml deck -->
+<wml>
+<!-- begin first card -->
+<card>
+<do type="accept">
+<go href="#two"/>
+</do>
+<p>
Welcome to WAP with Smarty!
Press OK to continue...
-</p>
-</card>
-<!-- begin second card -->
-<card id="two">
-<p>
+</p>
+</card>
+<!-- begin second card -->
+<card id="two">
+<p>
Pretty easy isn't it?
-</p>
-</card>
-</wml></programlisting>
+</p>
+</card>
+</wml>
+]]>
+</programlisting>
</example>
- </sect1>
- <sect1 id="tips.componentized.templates">
- <title>Ñîñòàâíûå øàáëîíû</title>
- <para>
- This tip is a bit of a hack, but still a neat idea. Use at your own
- risk. ;-)
- </para>
- <para>
- Traditionally, programming templates into your applications goes as
- follows: First, you accumulate your variables within your PHP
- application, (maybe with database queries.) Then, you instantiate your
- Smarty object, assign the variables and display the template. So lets
- say for example we have a stock ticker on our template. We would
- collect the stock data in our application, then assign these variables
- in the template and display it. Now wouldn't it be nice if you could
- add this stock ticker to any application by merely including the
- template, and not worry about fetching the data up front?
- </para>
- <para>
- You can embed PHP into your templates with the {php}{/php} tags.
- With this, you can setup self contained templates with their own
- data structures for assigning their own variables. With the logic
- embedded like this, you can keep the template & logic together. This
- way no matter where the template source is coming from, it is always
- together as one component.
- </para>
+</sect1>
+<sect1 id="tips.componentized.templates">
+ <title>Ñîñòàâíûå øàáëîíû</title>
+ <para>
+ This tip is a bit of a hack, but still a neat idea. Use at your own
+ risk. ;-)
+ </para>
+ <para>
+ Traditionally, programming templates into your applications goes as
+ follows: First, you accumulate your variables within your PHP
+ application, (maybe with database queries.) Then, you instantiate your
+ Smarty object, assign the variables and display the template. So lets
+ say for example we have a stock ticker on our template. We would
+ collect the stock data in our application, then assign these variables
+ in the template and display it. Now wouldn't it be nice if you could
+ add this stock ticker to any application by merely including the
+ template, and not worry about fetching the data up front?
+ </para>
+ <para>
+ You can embed PHP into your templates with the {php}{/php} tags.
+ With this, you can setup self contained templates with their own
+ data structures for assigning their own variables. With the logic
+ embedded like this, you can keep the template & logic together. This
+ way no matter where the template source is coming from, it is always
+ together as one component.
+ </para>
<example>
<title>componentized template</title>
<programlisting>
@@ -263,13 +272,13 @@
Stock Name: {$ticker_name} Stock Price: {$ticker_price}
]]></programlisting>
</example>
- <para>
- As of Smarty 1.5.0, there is even a cleaner way. You can include php in
- your templates with the {include_php ...} tag. This way you can keep
- your PHP logic separated from the template logic. See the <link
- linkend="language.function.include.php">include_php</link> function for
- more information.
- </para>
+ <para>
+ As of Smarty 1.5.0, there is even a cleaner way. You can include php in
+ your templates with the {include_php ...} tag. This way you can keep
+ your PHP logic separated from the template logic. See the <link
+ linkend="language.function.include.php">include_php</link> function for
+ more information.
+ </para>
<example>
<title>componentized template with include_php</title>
<programlisting>
@@ -303,36 +312,36 @@
Stock Name: {$ticker_name} Stock Price: {$ticker_price}
]]></programlisting>
</example>
- </sect1>
- <sect1 id="tips.obfuscating.email">
- <title>Obfuscating E-mail Addresses</title>
- <para>
- Do you ever wonder how your E-mail address gets on so many spam mailing
- lists? One way spammers collect E-mail addresses is from web pages. To
- help combat this problem, you can make your E-mail address show up in
- scrambled javascript in the HTML source, yet it it will look and work
- correctly in the browser. This is done with the mailto plugin.
- </para>
+</sect1>
+<sect1 id="tips.obfuscating.email">
+ <title>Obfuscating E-mail Addresses</title>
+ <para>
+ Do you ever wonder how your E-mail address gets on so many spam mailing
+ lists? One way spammers collect E-mail addresses is from web pages. To
+ help combat this problem, you can make your E-mail address show up in
+ scrambled javascript in the HTML source, yet it it will look and work
+ correctly in the browser. This is done with the mailto plugin.
+ </para>
<example>
<title>Example of Obfuscating an E-mail Address</title>
<programlisting>
-
+<![CDATA[
index.tpl
---------
Send inquiries to
{mailto address=$EmailAddress encode="javascript" subject="Hello"}
-
+]]>
</programlisting>
</example>
- <note>
- <title>Technical Note</title>
- <para>
- This method isn't 100% foolproof. A spammer could conceivably program his
- e-mail collector to decode these values, but not likely.
- </para>
- </note>
- </sect1>
+<note>
+ <title>Technical Note</title>
+ <para>
+ This method isn't 100% foolproof. A spammer could conceivably program his
+ e-mail collector to decode these values, but not likely.
+ </para>
+</note>
+</sect1>
</chapter>
<!-- Keep this comment at the end of the file
Local variables:
@@ -354,3 +363,4 @@
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->
+
http://cvs.php.net/diff.php/smarty/docs/ru/appendixes/troubleshooting.xml?r1=1.1&r2=1.2&ty=u
Index: smarty/docs/ru/appendixes/troubleshooting.xml
diff -u smarty/docs/ru/appendixes/troubleshooting.xml:1.1 smarty/docs/ru/appendixes/troubleshooting.xml:1.2
--- smarty/docs/ru/appendixes/troubleshooting.xml:1.1 Tue Mar 30 04:05:36 2004
+++ smarty/docs/ru/appendixes/troubleshooting.xml Wed Apr 14 11:29:09 2004
@@ -1,59 +1,53 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.1 $ -->
+<?xml version="1.0" encoding="windows-1251"?>
+<!-- $Revision: 1.2 $ -->
<chapter id="troubleshooting">
- <title>Troubleshooting</title>
- <para></para>
- <sect1 id="smarty.php.errors">
- <title>Smarty/PHP errors</title>
- <para>
- Smarty ìîæåò ðàñïîçíàòü ìíîãî îøèáîê òèïà îòñóòñòâóþùèõ ïðèçíàêîâ ïðèçíàêà
- Èëè óðîäëèâûå ïåðåìåííûå íàçâàíèÿ(èìåíà). Åñëè ýòî ñëó÷àåòñÿ, Âû áóäåòå âèäåòü îøèáêó
- Ïîäîáíûé ñëåäóþùåìó:
-
- Smarty can catch many errors such as missing tag attributes
- or malformed variable names. If this happens, you will see an error
- similar to the following:
- </para>
-
-<example>
-<title>Smarty errors</title>
-<programlisting>
+ <title>Troubleshooting</title>
+ <sect1 id="smarty.php.errors">
+ <title>Smarty/PHP errors</title>
+ <para>
+ Smarty can catch many errors such as missing tag attributes
+ or malformed variable names. If this happens, you will see an error
+ similar to the following:
+ </para>
+ <example>
+ <title>Smarty errors</title>
+ <programlisting>
Warning: Smarty: [in index.tpl line 4]: syntax error: unknown tag - '%blah'
- in /path/to/smarty/Smarty.class.php on line 1041
+in /path/to/smarty/Smarty.class.php on line 1041
Fatal error: Smarty: [in index.tpl line 28]: syntax error: missing section name
- in /path/to/smarty/Smarty.class.php on line 1041</programlisting>
-</example>
-
- <para>
- Smarty shows you the template name, the line number and the error.
- After that, the error consists of the actual line number in the Smarty
- class that the error occured.
- </para>
-
- <para>
- There are certain errors that Smarty cannot catch, such as missing
- close tags. These types of errors usually end up in PHP compile-time
- parsing errors.
- </para>
-
-<example>
-<title>PHP parsing errors</title>
-<programlisting>
-Parse error: parse error in /path/to/smarty/templates_c/index.tpl.php on line 75</programlisting>
-</example>
-
- <para>
- When you encounter a PHP parsing error, the error line number will
- correspond to the compiled PHP script, not the template itself. Usually
- you can look at the template and spot the syntax error. Here are some
- common things to look for: missing close tags for {if}{/if} or
- {section}{/section}, or syntax of logic within an {if} tag. If you
- can't find the error, you might have to open the compiled PHP file and
- go to the line number to figure out where the corresponding error is in
- the template.
- </para>
- </sect1>
+in /path/to/smarty/Smarty.class.php on line 1041
+ </programlisting>
+ </example>
+ <para>
+ Smarty shows you the template name, the line number and the error.
+ After that, the error consists of the actual line number in the Smarty
+ class that the error occured.
+ </para>
+
+ <para>
+ There are certain errors that Smarty cannot catch, such as missing
+ close tags. These types of errors usually end up in PHP compile-time
+ parsing errors.
+ </para>
+ <example>
+ <title>PHP parsing errors</title>
+ <programlisting>
+Parse error: parse error in /path/to/smarty/templates_c/index.tpl.php on line 75
+ </programlisting>
+ </example>
+
+ <para>
+ When you encounter a PHP parsing error, the error line number will
+ correspond to the compiled PHP script, not the template itself. Usually
+ you can look at the template and spot the syntax error. Here are some
+ common things to look for: missing close tags for {if}{/if} or
+ {section}{/section}, or syntax of logic within an {if} tag. If you
+ can't find the error, you might have to open the compiled PHP file and
+ go to the line number to figure out where the corresponding error is in
+ the template.
+ </para>
+ </sect1>
</chapter>
<!-- Keep this comment at the end of the file
Local variables: