wiki:syntax
Khác biệt
Đây là những khác biệt giữa hai phiên bản của trang.
| Phiên bản trước của cả hai bênPhiên bản trướcPhiên bản sau | Phiên bản trước | ||
| wiki:syntax [2012/02/29 16:10] – thehung | wiki:syntax [2026/07/23 15:06] (hiện tại) – sửa đổi bên ngoài 127.0.0.1 | ||
|---|---|---|---|
| Dòng 1: | Dòng 1: | ||
| - | ====== | + | ====== |
| - | [[doku> | + | [[doku> |
| - | ===== Định dạng Văn bản cơ bản ===== | + | ===== Basic Text Formatting |
| - | DokuWiki | + | DokuWiki |
| - | DokuWiki | + | DokuWiki |
| - | | + | |
| - | Bạn có thể sử dụng < | + | Note that the formatting markers have to directly enclose the text, so '' |
| - | Bạn có thể sử dụng | + | You can use <sub>subscript</ |
| - | Bạn cũng có thể đánh dấu văn bản bị xóa bằng cách <del>gạch ngang</del> chúng. | + | You can use <sub>subscript</sub> and < |
| - | Bạn cũng có thể đánh dấu văn bản bị xóa bằng cách <del>gạch ngang</ | + | You can mark something as <del>deleted</ |
| - | **Các đoạn văn bản** được phân cách bởi 1 dòng trống. Nếu bạn muốn **xuống dòng** mà không phân đoạn, bạn có thể sử dụng hai dấu chéo ngược, tiếp đó là một khoảng trắng hoặc kết thúc dòng. | + | You can mark something as < |
| - | Đây là một số văn bản với một số linebreaks\\ Lưu ý rằng | + | **Paragraphs** are created from blank lines. If you want to **force a newline** without a paragraph, you can use two backslashes followed by a whitespace or the end of line. |
| - | hai dấu chéo ngược chỉ được chấp nhận nếu nó đứng ở cuối dòng chữ\\ | + | |
| - | hoặc sau\\ một khoảng trắng (cách trống). \\Nếu không đúng bạn sẽ thấy nó thế này. | + | |
| - | Đây là một số văn bản với một số linebreaks\\ | + | This is some text with some linebreaks\\ |
| - | hai dấu chéo ngược chỉ được chấp nhận nếu nó đứng ở cuối dòng chữ\\ | + | two backslashes are only recognized at the end of a line\\ |
| - | | + | or followed by\\ a whitespace |
| - | Bạn chỉ nên sử dụng dòng mới khi thực sự cần thiết. | + | This is some text with some linebreaks\\ Note that the |
| + | two backslashes are only recognized at the end of a line\\ | ||
| + | or followed by\\ a whitespace \\this happens without it. | ||
| - | ===== Liên kết/ | + | You should use forced newlines only if really needed. |
| - | DokuWiki hỗ trợ nhiều cách tạo liên kết. | + | ===== Links ===== |
| - | ==== Liên kết bên ngoài | + | DokuWiki supports multiple ways of creating links. |
| + | |||
| + | ==== External | ||
| External links are recognized automagically: | External links are recognized automagically: | ||
| Dòng 43: | Dòng 45: | ||
| addresses like this one: < | addresses like this one: < | ||
| - | ==== Liên kết nội bộ ==== | + | ==== Internal |
| Internal links are created by using square brackets. You can either just give a [[pagename]] or use an additional [[pagename|link text]]. | Internal links are created by using square brackets. You can either just give a [[pagename]] or use an additional [[pagename|link text]]. | ||
| Dòng 62: | Dòng 64: | ||
| This links to [[syntax# | This links to [[syntax# | ||
| - | Lưu ý: | + | Notes: |
| * Links to [[syntax|existing pages]] are shown in a different style from [[nonexisting]] ones. | * Links to [[syntax|existing pages]] are shown in a different style from [[nonexisting]] ones. | ||
| Dòng 68: | Dòng 70: | ||
| * When a section' | * When a section' | ||
| - | ==== Giữa các wiki/Interwiki ==== | + | ==== Interwiki ==== |
| - | DokuWiki | + | DokuWiki |
| DokuWiki supports [[doku> | DokuWiki supports [[doku> | ||
| For example this is a link to Wikipedia' | For example this is a link to Wikipedia' | ||
| - | ==== Thư mục chia sẻ trên windows | + | ==== Windows Shares |
| Windows shares like [[\\server\share|this]] are recognized, too. Please note that these only make sense in a homogeneous user group like a corporate [[wp> | Windows shares like [[\\server\share|this]] are recognized, too. Please note that these only make sense in a homogeneous user group like a corporate [[wp> | ||
| Dòng 81: | Dòng 83: | ||
| Windows Shares like [[\\server\share|this]] are recognized, too. | Windows Shares like [[\\server\share|this]] are recognized, too. | ||
| - | Lưu ý: | + | Notes: |
| * For security reasons direct browsing of windows shares only works in Microsoft Internet Explorer per default (and only in the "local zone" | * For security reasons direct browsing of windows shares only works in Microsoft Internet Explorer per default (and only in the "local zone" | ||
| - | * For Mozilla and Firefox it can be enabled through different workaround mentioned in the [[http:// | + | * For Mozilla and Firefox it can be enabled through different workaround mentioned in the [[http:// |
| + | <?php | ||
| + | /** | ||
| + | * Customization of the english language file | ||
| + | * Copy only the strings that needs to be modified | ||
| + | */ | ||
| + | $lang[' | ||
| + | </ | ||
| - | $lang[' | + | ==== Image Links ==== |
| - | + | ||
| - | ==== Liên kết tới ảnh ==== | + | |
| You can also use an image to link to another internal or external page by combining the syntax for links and [[# | You can also use an image to link to another internal or external page by combining the syntax for links and [[# | ||
| - | [[http://www.php.net|{{wiki: | + | [[http:// |
| - | [[http://www.php.net|{{wiki: | + | [[http:// |
| - | Lưu ý: The image formatting is the only formatting syntax accepted in link names. | + | Please note: The image formatting is the only formatting syntax accepted in link names. |
| The whole [[# | The whole [[# | ||
| - | ===== Chú thích cuối trang ===== | + | ===== Footnotes |
| You can add footnotes ((This is a footnote)) by using double parentheses. | You can add footnotes ((This is a footnote)) by using double parentheses. | ||
| Dòng 106: | Dòng 113: | ||
| You can add footnotes ((This is a footnote)) by using double parentheses. | You can add footnotes ((This is a footnote)) by using double parentheses. | ||
| - | ===== Đề mục ===== | + | ===== Sectioning |
| You can use up to five different levels of headlines to structure your content. If you have more than three headlines, a table of contents is generated automatically -- this can be disabled by including the string ''< | You can use up to five different levels of headlines to structure your content. If you have more than three headlines, a table of contents is generated automatically -- this can be disabled by including the string ''< | ||
| Dòng 122: | Dòng 129: | ||
| ---- | ---- | ||
| - | ===== Ảnh và các loại tệp tin khác ===== | + | ===== Media Files ===== |
| - | You can include external and internal [[doku> | + | You can include external and internal [[doku> |
| Real size: {{wiki: | Real size: {{wiki: | ||
| Dòng 132: | Dòng 139: | ||
| Resize to given width and height((when the aspect ratio of the given width and height doesn' | Resize to given width and height((when the aspect ratio of the given width and height doesn' | ||
| - | Resized external image: | + | Resized external image: |
| Real size: {{wiki: | Real size: {{wiki: | ||
| Resize to given width: | Resize to given width: | ||
| Resize to given width and height: {{wiki: | Resize to given width and height: {{wiki: | ||
| - | Resized external image: | + | Resized external image: |
| Dòng 151: | Dòng 158: | ||
| {{wiki: | {{wiki: | ||
| {{ wiki: | {{ wiki: | ||
| + | |||
| + | You can also set the alignment explicitly with a ''? | ||
| + | |||
| + | {{wiki: | ||
| + | |||
| + | {{wiki: | ||
| Of course, you can add a title (displayed as a tooltip by most browsers), too. | Of course, you can add a title (displayed as a tooltip by most browsers), too. | ||
| Dòng 157: | Dòng 170: | ||
| {{ wiki: | {{ wiki: | ||
| - | |||
| - | If you specify a filename (external or internal) that is not an image ('' | ||
| For linking an image to another page see [[#Image Links]] above. | For linking an image to another page see [[#Image Links]] above. | ||
| - | ===== Danh sách ===== | + | ==== Supported Media Formats |
| + | |||
| + | DokuWiki can embed the following media formats directly. | ||
| + | |||
| + | | Image | '' | ||
| + | | Video | '' | ||
| + | | Audio | '' | ||
| + | | Flash | '' | ||
| + | |||
| + | If you specify a filename that is not a supported media format, then it will be displayed as a link instead. | ||
| + | |||
| + | By adding ''? | ||
| + | |||
| + | {{wiki: | ||
| + | |||
| + | {{wiki: | ||
| + | |||
| + | ==== Fallback Formats ==== | ||
| + | |||
| + | Unfortunately not all browsers understand all video and audio formats. To mitigate the problem, you can upload your file in different formats for maximum browser compatibility. | ||
| + | |||
| + | For example consider this embedded mp4 video: | ||
| + | |||
| + | {{video.mp4|A funny video}} | ||
| + | |||
| + | When you upload a '' | ||
| + | |||
| + | Additionally DokuWiki supports a " | ||
| + | |||
| + | ===== Lists ===== | ||
| Dokuwiki supports ordered and unordered lists. To create a list item, indent your text by two spaces and use a '' | Dokuwiki supports ordered and unordered lists. To create a list item, indent your text by two spaces and use a '' | ||
| Dòng 190: | Dòng 230: | ||
| Also take a look at the [[doku> | Also take a look at the [[doku> | ||
| - | ===== Hoán chuyển văn bản ===== | + | ===== Text Conversions |
| DokuWiki can convert certain pre-defined characters or strings into images or other text or HTML. | DokuWiki can convert certain pre-defined characters or strings into images or other text or HTML. | ||
| Dòng 196: | Dòng 236: | ||
| The text to image conversion is mainly done for smileys. And the text to HTML conversion is used for typography replacements, | The text to image conversion is mainly done for smileys. And the text to HTML conversion is used for typography replacements, | ||
| - | ==== Hoán chuyển chữ thành ảnh ==== | + | ==== Text to Image Conversions |
| DokuWiki converts commonly used [[wp> | DokuWiki converts commonly used [[wp> | ||
| Dòng 215: | Dòng 255: | ||
| * ;-) %% ;-) %% | * ;-) %% ;-) %% | ||
| * ^_^ %% ^_^ %% | * ^_^ %% ^_^ %% | ||
| + | * m( %% m( %% | ||
| * :?: %% :?: %% | * :?: %% :?: %% | ||
| * :!: %% :!: %% | * :!: %% :!: %% | ||
| Dòng 221: | Dòng 262: | ||
| * DELETEME %% DELETEME %% | * DELETEME %% DELETEME %% | ||
| - | ==== Hoán chuyển chữ thành | + | ==== Text to HTML Conversions |
| Typography: [[DokuWiki]] can convert simple text characters to their typographically correct entities. Here is an example of recognized characters. | Typography: [[DokuWiki]] can convert simple text characters to their typographically correct entities. Here is an example of recognized characters. | ||
| Dòng 237: | Dòng 278: | ||
| There are three exceptions which do not come from that pattern file: multiplication entity (640x480), ' | There are three exceptions which do not come from that pattern file: multiplication entity (640x480), ' | ||
| - | ===== Trích dẫn ===== | + | ===== Quoting |
| Some times you want to mark some text to show it's a reply or comment. You can use the following syntax: | Some times you want to mark some text to show it's a reply or comment. You can use the following syntax: | ||
| - | | + | < |
| - | + | I think we should do it | |
| - | > No we shouldn' | + | |
| - | + | > No we shouldn' | |
| - | >> Well, I say we should | + | |
| - | + | >> Well, I say we should | |
| - | > Really? | + | |
| - | + | > Really? | |
| - | >> Yes! | + | |
| - | + | >> Yes! | |
| - | >>> | + | |
| + | >>> | ||
| + | </ | ||
| I think we should do it | I think we should do it | ||
| Dòng 265: | Dòng 308: | ||
| >>> | >>> | ||
| - | ===== Bảng | + | ===== Tables |
| DokuWiki supports a simple syntax to create tables. | DokuWiki supports a simple syntax to create tables. | ||
| Dòng 297: | Dòng 340: | ||
| ^ Heading 5 | Row 2 Col 2 | Row 2 Col 3 | | ^ Heading 5 | Row 2 Col 2 | Row 2 Col 3 | | ||
| - | You can have rowspans (vertically connected cells) by adding '':::'' | + | You can have rowspans (vertically connected cells) by adding '' |
| ^ Heading 1 ^ Heading 2 ^ Heading 3 ^ | ^ Heading 1 ^ Heading 2 ^ Heading 3 ^ | ||
| Dòng 327: | Dòng 370: | ||
| Note: Vertical alignment is not supported. | Note: Vertical alignment is not supported. | ||
| - | ===== Không định dạng văn bản ===== | + | ===== No Formatting |
| If you need to display text exactly like it is typed (without any formatting), | If you need to display text exactly like it is typed (without any formatting), | ||
| Dòng 341: | Dòng 384: | ||
| The same is true for %%// | The same is true for %%// | ||
| - | ===== Khối mã nguồn | + | ===== Code Blocks |
| You can include code blocks into your documents by either indenting them by at least two spaces (like used for the previous examples) or by using the tags '' | You can include code blocks into your documents by either indenting them by at least two spaces (like used for the previous examples) or by using the tags '' | ||
| Dòng 367: | Dòng 410: | ||
| </ | </ | ||
| - | ==== Tô màu cú pháp ==== | + | ==== Syntax Highlighting |
| - | [[wiki: | + | [[wiki: |
| <code java> | <code java> | ||
| Dòng 383: | Dòng 426: | ||
| </ | </ | ||
| - | The following language strings are currently recognized: //4cs, abap, actionscript-french, actionscript, | + | The following language strings are currently recognized: //4cs 6502acme 6502kickass 6502tasm 68000devpac |
| - | ==== Khối mã nguồn có thể tải về ==== | + | There are additional [[doku> |
| - | When you use the '' | + | ==== Downloadable Code Blocks ==== |
| + | |||
| + | When you use the '' | ||
| < | < | ||
| Dòng 401: | Dòng 446: | ||
| If you don't want any highlighting but want a downloadable file, specify a dash ('' | If you don't want any highlighting but want a downloadable file, specify a dash ('' | ||
| - | + | ===== RSS/ | |
| - | ===== Nhúng HTML và PHP ===== | + | |
| - | + | ||
| - | You can embed raw HTML or PHP code into your documents by using the '' | + | |
| - | + | ||
| - | HTML example: | + | |
| - | + | ||
| - | < | + | |
| - | < | + | |
| - | This is some <span style=" | + | |
| - | </ | + | |
| - | < | + | |
| - | <p style=" | + | |
| - | </ | + | |
| - | </ | + | |
| - | + | ||
| - | < | + | |
| - | This is some <span style=" | + | |
| - | </ | + | |
| - | < | + | |
| - | <p style=" | + | |
| - | </ | + | |
| - | + | ||
| - | PHP example: | + | |
| - | + | ||
| - | < | + | |
| - | < | + | |
| - | echo 'A logo generated by PHP:'; | + | |
| - | echo '< | + | |
| - | echo ' | + | |
| - | </ | + | |
| - | < | + | |
| - | echo '< | + | |
| - | echo '< | + | |
| - | echo '</ | + | |
| - | </ | + | |
| - | </ | + | |
| - | + | ||
| - | < | + | |
| - | echo 'A logo generated by PHP:'; | + | |
| - | echo '< | + | |
| - | echo ' | + | |
| - | </ | + | |
| - | < | + | |
| - | echo '< | + | |
| - | echo '< | + | |
| - | echo '</ | + | |
| - | </ | + | |
| - | + | ||
| - | **Please Note**: HTML and PHP embedding is disabled by default in the configuration. If disabled, the code is displayed instead of executed. | + | |
| - | + | ||
| - | ===== Tập hợp nguồn cấp RSS/ATOM ===== | + | |
| [[DokuWiki]] can integrate data from external XML feeds. For parsing the XML feeds, [[http:// | [[DokuWiki]] can integrate data from external XML feeds. For parsing the XML feeds, [[http:// | ||
| Dòng 460: | Dòng 454: | ||
| | author | | author | ||
| | date | show item dates | | | date | show item dates | | ||
| - | | description| show the item description. | + | | description| show the item description. |
| + | | nosort | ||
| | //n//[dhm] | refresh period, where d=days, h=hours, m=minutes. (e.g. 12h = 12 hours). | | | //n//[dhm] | refresh period, where d=days, h=hours, m=minutes. (e.g. 12h = 12 hours). | | ||
| The refresh period defaults to 4 hours. Any value below 10 minutes will be treated as 10 minutes. [[wiki: | The refresh period defaults to 4 hours. Any value below 10 minutes will be treated as 10 minutes. [[wiki: | ||
| + | |||
| + | By default the feed will be sorted by date, newest items first. You can sort it by oldest first using the '' | ||
| **Example: | **Example: | ||
| Dòng 472: | Dòng 469: | ||
| - | ===== Điều khiển | + | ===== Control |
| Some syntax influences how DokuWiki renders a page without creating any output it self. The following control macros are availble: | Some syntax influences how DokuWiki renders a page without creating any output it self. The following control macros are availble: | ||
| Dòng 480: | Dòng 477: | ||
| | %%~~NOCACHE~~%% | DokuWiki caches all output by default. Sometimes this might not be wanted (eg. when the %%< | | %%~~NOCACHE~~%% | DokuWiki caches all output by default. Sometimes this might not be wanted (eg. when the %%< | ||
| - | ===== Cú pháp bổ trợ ===== | + | ===== Syntax Plugins |
| DokuWiki' | DokuWiki' | ||
wiki/syntax.1330531859.txt.gz · Sửa đổi lần cuối: (sửa đổi bên ngoài)
