تفاوت دو نسخهٔ متفاوت از صفحه را مشاهده میکنید.
نگارش قبل در دو طرف نگارش قبل نگارش بعد | نگارش قبل | ||
wiki:syntax [2013/10/24 11:26] M1KE [پیوندهای تصویر] |
wiki:syntax [2013/10/24 19:51] (فعلی) babak [Formatting Syntax] |
||
---|---|---|---|
خط 1: | خط 1: | ||
- | ====== راهنمای ویرایش و قالببندی ====== | + | ====== Formatting Syntax ====== |
- | [[doku>جزوه پویای آکادمیاکافه]] از نشانه گذاریهای سادهای استفاده میکند که تلاش آنها بر آسانسازی هر چه بیشتر خواندن فایلهای دادهای است. این صفحه به توضیح همه دستورها و قواعدی پرداخته است که شما برای ویرایش صفحههای مختلف میتوانید از آنها استفاده نمایید. برای مشاهده منبع این صفحه میتوانید "ویرایش این صفحه" را بزنید. اگر میخواهید چیزی را آزمایش کنید، می توانید از صفحه [[playground:playground|زمین بازی]] استفاده نمایید. همچنین آسانگر نشانهگذاری به سادگی در [[doku>toolbar|نوار ابزار]] قابل دسترس است. | + | [[doku>DokuWiki]] supports some simple markup language, which tries to make the datafiles to be as readable as possible. This page contains all possible syntax you may use when editing the pages. Simply have a look at the source of this page by pressing "Edit this page". If you want to try something, just use the [[playground:playground|playground]] page. The simpler markup is easily accessible via [[doku>toolbar|quickbuttons]], too. |
- | ===== مبانی قالببندی متن ===== | + | |
- | جزوه پویای آکادمیا کافه امکان نوشتن متن به صورت **ضخیم**، //خمیده//، __زیرخطدار__ و ''همعرضشده'' را فراهم میکند. البته امکان **__//''ترکیب کردن''//__** همه اینها نیز وجود دارد. | + | ===== Basic Text Formatting ===== |
- | جزوه پویای آکادمیا کافه امکان نوشتن متن به صورت **ضخیم**، //خمیده//، __زیرخطدار__ و ''همعرضشده'' را | + | DokuWiki supports **bold**, //italic//, __underlined__ and ''monospaced'' texts. Of course you can **__//''combine''//__** all these. |
- | فراهم میکند. البته امکان **__//''ترکیب کردن''//__** همه اینها نیز وجود دارد. | + | |
- | میتوانید از <sub>زیروند</sub> و <sup>بالاوند</sup> نیز استفاده نمایید. | + | DokuWiki supports **bold**, //italic//, __underlined__ and ''monospaced'' texts. |
+ | Of course you can **__//''combine''//__** all these. | ||
- | میتوانید از <sub>زیروند</sub> و <sup>بالاوند</sup> نیز استفاده نمایید. | + | You can use <sub>subscript</sub> and <sup>superscript</sup>, too. |
- | میتوانید یک متن را به صورت <del>حذف شده</del> نیز نشان دهید. | + | You can use <sub>subscript</sub> and <sup>superscript</sup>, too. |
- | میتوانید یک متن را به صورت <del>حذف شده</del> نیز نشان دهید. | + | You can mark something as <del>deleted</del> as well. |
- | **پاراگرافها** از خط های فاصله (با زدن دکمه Enter) ایجاد می شوند. اگر می خواهید از قابلیت **ایجاد یک خط جدید اجباری** بدون ایجاد پاراگراف استفاده نمایید، می توانید دو علامت خط مورب و سپس یک علامت فاصله در انتهای خط بگذارید. | + | You can mark something as <del>deleted</del> as well. |
- | این نمونهای از یک متن دارای چند خط جدید اجباری است\\ توجه داشته باشید که دو علامت خط مورب فقط در انتهای یک خط شناسایی میشوند\\ | + | **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. |
- | یا آنکه\\ یک علامت فاصله در ادامه آن آمده باشد \\بدون آن این اتفاق رخ میدهد. | + | |
- | این نمونهای از یک متن دارای چند خط جدید اجباری است\\ توجه داشته باشید که | + | 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. |
- | تنها زمانی می بایست از ایجاد اجباری یک خط جدید استفاده نمایید که واقعا نیاز باشد زیرا زیبایی نوشته را از بین میبرند. | + | 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. | ||
- | ===== پیوندها ===== | + | You should use forced newlines only if really needed. |
- | در جزوه پویای آکادمیاکافه چندین راه برای ایجاد پیوند (link) وجود دارد. | + | ===== Links ===== |
- | ==== بیرونی ==== | + | DokuWiki supports multiple ways of creating links. |
- | پیوندهای بیرونی به طور خودکار شناسایی می شوند: http://www.google.com یا به سادگی www.google.com - می توانید همچنین متن پیوند را تنظیم کنید [[http://www.google.com|این پیوند به گوگل می رود]]. آدرس های ایمیل مانند این: <andi@splitbrain.org> نیز به طور خودکار شناسایی می شوند. | + | ==== External ==== |
- | پیوندهای بیرونی به طور خودکار شناسایی می شوند: http://www.google.com | + | External links are recognized automagically: http://www.google.com or simply www.google.com - You can set the link text as well: [[http://www.google.com|This Link points to google]]. Email addresses like this one: <andi@splitbrain.org> are recognized, too. |
- | یا به سادگی www.google.com - می توانید همچنین متن پیوند را | + | |
- | تنظیم کنید [[http://www.google.com|این پیوند به گوگل می رود]]. | + | |
- | آدرس های ایمیل مانند این: <andi@splitbrain.org> نیز به طور خودکار شناسایی می شوند. | + | |
- | ==== درونی ==== | + | |
- | پیوندهای درونی توسط براکت ایجاد می شوند. می توانید تنها [[نام صفحه]] را بدهید یا اینکه [[نام صفحه|متن مربوط به پیوند]] را هم معرفی نمایید. | + | DokuWiki supports multiple ways of creating links. External links are recognized |
+ | automagically: http://www.google.com or simply www.google.com - You can set | ||
+ | link text as well: [[http://www.google.com|This Link points to google]]. Email | ||
+ | addresses like this one: <andi@splitbrain.org> are recognized, too. | ||
- | پیوندهای درونی توسط براکت ایجاد می شوند. می توانید تنها [[نام صفحه]] را بدهید | + | ==== Internal ==== |
- | یا اینکه [[نام صفحه|متن مربوط به پیوند]] را هم معرفی نمایید. | + | |
- | [[doku>pagename|نام صفحههای ویکی]] به طور خودکار به حروف کوچک تبدیل میشوند و نمیتوان در آنها از کاراکترهای خاص استفاده نمود. | + | Internal links are created by using square brackets. You can either just give a [[pagename]] or use an additional [[pagename|link text]]. |
- | میتوانید با به کارگیری علامت دونقطه در نام صفحه از [[some:namespaces]] استفاده نمایید. | + | Internal links are created by using square brackets. You can either just give |
+ | a [[pagename]] or use an additional [[pagename|link text]]. | ||
- | میتوانید با به کارگیری علامت دونقطه در نام صفحه از [[some:namespaces]] استفاده نمایید. | + | [[doku>pagename|Wiki pagenames]] are converted to lowercase automatically, special characters are not allowed. |
- | برای جزئیات مربوط به namespaceها میتوانید [[doku>namespaces]] را نگاه کنید. | + | You can use [[some:namespaces]] by using a colon in the pagename. |
- | پیوند دادن به یک بخش خاص نیز امکانپذیر است. برای این کار فقط کافیست نام بخش موردنظر را همانگونه که در HTML مرسوم است، پس از علامت # قرار دهید. این به [[syntax#internal|این بخش]] پیوند داده شده است. | + | You can use [[some:namespaces]] by using a colon in the pagename. |
- | این به [[syntax#internal|این بخش]] پیوند داده شده است. | + | For details about namespaces see [[doku>namespaces]]. |
- | نکات: | + | Linking to a specific section is possible, too. Just add the section name behind a hash character as known from HTML. This links to [[syntax#internal|this Section]]. |
- | * پیونددهی به [[syntax|صفحههای موجود]] به شکل متفاوتی از صفحههای [[وجودنداشته]] نشان داده میشوند. | + | This links to [[syntax#internal|this Section]]. |
- | * جزوه پویای آکادمیاکافه به طور پیشفرض برای ایجاد خودکار پیوندها از شیوه نوشتاری [[wp>درشتنویسی]] استفاده نمیکند، ولی این قابلیت را میتوان در فایل [[doku>config]] فعال نمود. نکته: اگر در این نوشته عبارت DokuWiki به صورت لینک نشان داده میشود، در آنگاه این قابلیت فعال است. | + | |
- | * وقتی عنوان یک بخش تغییر مییابد، نشانهگذاری (bookmark) آن نیز تغییر میکند. بنابراین زیاد به پیونددهی به بخش متکی نباشید. | + | |
- | ==== درونویکی ==== | + | Notes: |
- | جزوه پویای آکادمیا کافه قابلیت پیوندهای [[doku>درونویکی]] را فراهم میکند. اینها پیوندهای سریعی هستند که به دیگر ویکیها داده میشوند. برای نمونه این یک پیوند به [[wp>Wiki]] است: صفحه مربوط به ویکیها در وبسایت ویکیپدیا. | + | * Links to [[syntax|existing pages]] are shown in a different style from [[nonexisting]] ones. |
+ | * DokuWiki does not use [[wp>CamelCase]] to automatically create links by default, but this behavior can be enabled in the [[doku>config]] file. Hint: If DokuWiki is a link, then it's enabled. | ||
+ | * When a section's heading is changed, its bookmark changes, too. So don't rely on section linking too much. | ||
+ | |||
+ | ==== Interwiki ==== | ||
+ | |||
+ | DokuWiki supports [[doku>Interwiki]] links. These are quick links to other Wikis. For example this is a link to Wikipedia's page about Wikis: [[wp>Wiki]]. | ||
DokuWiki supports [[doku>Interwiki]] links. These are quick links to other Wikis. | DokuWiki supports [[doku>Interwiki]] links. These are quick links to other Wikis. | ||
For example this is a link to Wikipedia's page about Wikis: [[wp>Wiki]]. | For example this is a link to Wikipedia's page about Wikis: [[wp>Wiki]]. | ||
- | ==== اشتراکهای ویندوز ==== | + | ==== Windows Shares ==== |
- | اشتراکهای ویندوز همچون [[\\server\share|این]] نیز توسط این جزوه پویا شناسایی میشوند. لطفا توجه داشته باشید که این موارد فقط در یک گروه کاربری یکسان [[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>Intranet]]. |
- | اشتراکهای ویندوز همچون [[\\server\share|این]] نیز توسط این جزوه پویا شناسایی میشوند. | + | Windows Shares like [[\\server\share|this]] are recognized, too. |
- | نکات: | + | Notes: |
- | * به دلایل امنیتی، به طور پیشفرض، مرور و جستجوی اشتراکهای ویندوز فقط در مرورگر اینترنتی مایکروسافت (و فقط در "ناحیه محلی") کار میکند. | + | * For security reasons direct browsing of windows shares only works in Microsoft Internet Explorer per default (and only in the "local zone"). |
- | * در مورد مرورگرهای موزیلا و فایرفاکس میتوان این قابلیت را از راه دیگری که در [[http://kb.mozillazine.org/Links_to_local_pages_do_not_work|پایگاه اطلاعاتی موزیلا]] توضیح داده شده است، فعال نمود. با این حال، هنگام باز کردن یک اشتراک ویندوزی، یک پیغام هشدار JavaScript داده خواهد شد. برای حذف این پیغام هشدار (برای تمام کاربران)، این رشته را در ''conf/userscript.js'' قرار دهید: | + | * For Mozilla and Firefox it can be enabled through different workaround mentioned in the [[http://kb.mozillazine.org/Links_to_local_pages_do_not_work|Mozilla Knowledge Base]]. However, there will still be a JavaScript warning about trying to open a Windows Share. To remove this warning (for all users), put the following line in ''conf/lang/en/lang.php'' (more details at [[doku>localization#changing_some_localized_texts_and_strings_in_your_installation|localization]]): <code - conf/lang/en/lang.php> |
+ | <?php | ||
+ | /** | ||
+ | * Customization of the english language file | ||
+ | * Copy only the strings that needs to be modified | ||
+ | */ | ||
+ | $lang['js']['nosmblinks'] = ''; | ||
+ | </code> | ||
- | LANG.nosmblinks = ''; | + | ==== Image Links ==== |
- | ==== پیوندهای تصویر ==== | + | You can also use an image to link to another internal or external page by combining the syntax for links and [[#images_and_other_files|images]] (see below) like this: |
- | همچنین میتوانید از یک تصویر برای پیوند دادن به یک صفحه بیرونی یا درونی استفاده کنید. برای این کار کافیست که دستورهای مربوط به پیوندها و [[#images_and_other_files|تصویرها]] (پایین را نگاه کنید) مانند این با یکدیگر ترکیب شوند: | + | [[http://php.net|{{wiki:dokuwiki-128.png}}]] |
- | [[http://www.php.net|{{wiki:dokuwiki-128.png}}]] | + | [[http://php.net|{{wiki:dokuwiki-128.png}}]] |
- | [[http://www.php.net|{{wiki:dokuwiki-128.png}}]] | + | Please note: The image formatting is the only formatting syntax accepted in link names. |
- | لطفا توجه داشته باشید که تنها دستورهای قالببندی تصویر در نام پیوندها پذیرفته میشود. | + | The whole [[#images_and_other_files|image]] and [[#links|link]] syntax is supported (including image resizing, internal and external images and URLs and interwiki links). |
- | کل دستورهای مربوط به [[#images_and_other_files|تصویر]] و [[#links|پیوند]] (شامل تغییر اندازه دادن تصویر، URLها و تصویرهای درونی و بیرونی و پیوندهای درونویکی) قابل استفاده هستند. | + | ===== 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. |
- | میتوانید با استفاده از دو پرانتز باز و بسته، یک پاورقی ((این یک پاورقی است)) ایجاد کنید. | + | ===== 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 ''<nowiki>~~NOTOC~~</nowiki>'' in the document. |
- | در این جزوه امکان ایجاد حداکثر پنج سطح برای عنوانها وجود دارد. اگر بیشتر از سه عنوان داشته باشید، یک جدول عنوانها به صورت خودکار در ابتدای متن ایجاد میشود -- برای غیر فعال نمودن این قابلیت میتوان رشته ''<nowiki>~~NOTOC~~</nowiki>'' را در متن قرار داد. | + | ==== Headline Level 3 ==== |
- | ==== عنوان سطح سه ==== | + | === Headline Level 4 === |
- | === عنوان سطح چهار === | + | == Headline Level 5 == |
- | == عنوان سطح پنج == | + | |
- | ==== عنوان سطح سه ==== | + | ==== Headline Level 3 ==== |
- | === عنوان سطح چهار === | + | === Headline Level 4 === |
- | == عنوان سطح پنج == | + | == Headline Level 5 == |
- | با گذاشتن چهار یا تعداد بیشتری علامت مساوی میتوانید یک خط افقی ایجاد نمایید: | + | By using four or more dashes, you can make a horizontal line: |
---- | ---- | ||
- | ===== تصویرها و دیگر فایلها ===== | + | ===== Media Files ===== |
- | شما میتوانید با استفاده از دو کروشه باز و دو کروشه بسته، [[doku>تصویرها]]ی درونی و بیرونی را در متن بیاورید. | + | You can include external and internal [[doku>images|images, videos and audio files]] with curly brackets. Optionally you can specify the size of them. |
- | اندازه واقعی: {{wiki:dokuwiki-128.png}} | + | Real size: {{wiki:dokuwiki-128.png}} |
- | تغییر اندازه دادن به یک عرض دلخواه: {{wiki:dokuwiki-128.png?50}} | + | Resize to given width: {{wiki:dokuwiki-128.png?50}} |
- | تغییر اندازه دادن به عرض و ارتفاع دلخواه((وقتی نسبت عرض و ارتفاع مشخص شده با نسبت عرض و ارتفاع مربوط به تصویر یکی نباشد، قبل از آنکه به نسبت موردنظر تغییر یابد، بریده (cropped) میشود)): {{wiki:dokuwiki-128.png?200x50}} | + | Resize to given width and height((when the aspect ratio of the given width and height doesn't match that of the image, it will be cropped to the new ratio before resizing)): {{wiki:dokuwiki-128.png?200x50}} |
- | تصویر تغییر اندازه شده بیرونی: {{http://de3.php.net/images/php.gif?200x50}} | + | Resized external image: {{http://php.net/images/php.gif?200x50}} |
- | اندازه واقعی: {{wiki:dokuwiki-128.png}} | + | Real size: {{wiki:dokuwiki-128.png}} |
- | تغییر اندازه دادن به یک عرض دلخواه: {{wiki:dokuwiki-128.png?50}} | + | Resize to given width: {{wiki:dokuwiki-128.png?50}} |
- | تغییر اندازه دادن به عرض و ارتفاع دلخواه: {{wiki:dokuwiki-128.png?200x50}} | + | Resize to given width and height: {{wiki:dokuwiki-128.png?200x50}} |
- | تصویر تغییر اندازه شده بیرونی: {{http://de3.php.net/images/php.gif?200x50}} | + | Resized external image: {{http://php.net/images/php.gif?200x50}} |
- | با به کارگیری علامتهای فاصله در سمت چپ یا راست میتوانید راستای تصویر را انتخاب نمایید. | + | By using left or right whitespaces you can choose the alignment. |
{{ wiki:dokuwiki-128.png}} | {{ wiki:dokuwiki-128.png}} | ||
خط 148: | خط 157: | ||
{{ wiki:dokuwiki-128.png }} | {{ wiki:dokuwiki-128.png }} | ||
- | همچنین میتوانید یک عنوان برای تصویر بگذارید که توسط بیشتر مرورگرها به عنوان یک caption شناسایی میشود. با بردن نشانگر موس به روی تصویر این عنوان را میتوان دید. | + | Of course, you can add a title (displayed as a tooltip by most browsers), too. |
- | {{ wiki:dokuwiki-128.png |این عنوان است}} | + | {{ wiki:dokuwiki-128.png |This is the caption}} |
- | {{ wiki:dokuwiki-128.png |این عنوان است}} | + | {{ wiki:dokuwiki-128.png |This is the caption}} |
- | اگر نام یک فایل (درونی یا بیرونی) را مشخص سازید که تصویر (''gif, jpeg, png'') نباشد، در این صورت به شکل یک پیوند نشان داده خواهد شد. | + | For linking an image to another page see [[#Image Links]] above. |
- | برای پیوند دادن یک تصویر به یک صفحه دیگر [[#پیوندهای تصویر]] در بالا را نگاه کنید. | + | ==== Supported Media Formats ==== |
- | ===== فهرستها ===== | + | DokuWiki can embed the following media formats directly. |
- | جزوه پویای آکادمیاکافه قابلیت نشان دادن فهرستهای منظم (شمارهبندی شده) و نامنظم (بدون شماره) را داراست. برای ایجاد یک فهرست، در ابتدای متن موردنظر دو علامت فاصله بگذارید و سپس اگر می خواهید فهرست به صورت شمارهدار باشد علامت ''-'' و اگر میخواهید فهرست به صورت بدون شماره باشد یک علامت ''*'' بگذارید. | + | | Image | ''gif'', ''jpg'', ''png'' | |
+ | | Video | ''webm'', ''ogv'', ''mp4'' | | ||
+ | | Audio | ''ogg'', ''mp3'', ''wav'' | | ||
+ | | Flash | ''swf'' | | ||
- | * این یک فهرست است | + | If you specify a filename that is not a supported media format, then it will be displayed as a link instead. |
- | * آیتم دوم | + | |
- | * ممکن است سطحهای مختلف داشته باشید | + | |
- | * آیتم دیگر | + | |
- | - همان فهرست فقط به صورت منظم (شمارهبندی شده) | + | By adding ''?linkonly'' you provide a link to the media without displaying it inline |
- | - آیتم دیگر | + | |
- | - برای سطحهای عمیقتر کافی است از علامتهای فاصله بیشتری استفاده نمایید. | + | {{wiki:dokuwiki-128.png?linkonly}} |
- | - به همین سادگی | + | |
+ | {{wiki:dokuwiki-128.png?linkonly}} This is just a link to the image. | ||
+ | |||
+ | ==== 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 ''video.webm'' and ''video.ogv'' next to the referenced ''video.mp4'', DokuWiki will automatically add them as alternatives so that one of the three files is understood by your browser. | ||
+ | |||
+ | Additionally DokuWiki supports a "poster" image which will be shown before the video has started. That image needs to have the same filename as the video and be either a jpg or png file. In the example above a ''video.jpg'' file would work. | ||
+ | |||
+ | ===== Lists ===== | ||
+ | |||
+ | Dokuwiki supports ordered and unordered lists. To create a list item, indent your text by two spaces and use a ''*'' for unordered lists or a ''-'' for ordered ones. | ||
+ | |||
+ | * This is a list | ||
+ | * The second item | ||
+ | * You may have different levels | ||
+ | * Another item | ||
+ | |||
+ | - The same list but ordered | ||
+ | - Another item | ||
+ | - Just use indention for deeper levels | ||
+ | - That's it | ||
<code> | <code> | ||
- | * این یک فهرست است | + | * This is a list |
- | * آیتم دوم | + | * The second item |
- | * ممکن است سطحهای مختلف داشته باشید | + | * You may have different levels |
- | * آیتم دیگر | + | * Another item |
- | - همان فهرست فقط به صورت منظم (شمارهبندی شده) | + | - The same list but ordered |
- | - آیتم دیگر | + | - Another item |
- | - برای سطحهای عمیقتر کافی است از علامتهای فاصله بیشتری استفاده نمایید. | + | - Just use indention for deeper levels |
- | - به همین سادگی | + | - That's it |
</code> | </code> | ||
- | همچنین به [[doku>faq:lists|FAQ مربوط به آیتمهای فهرست]] نگاه کنید. | + | Also take a look at the [[doku>faq:lists|FAQ on list items]]. |
- | + | ||
- | ===== تبدیل متن به تصویر یا HTML ===== | + | |
- | جزوه پویای آکادمیاکافه میتواند برخی از کاراکترها یا رشتههای از پیش تعریف شده را به تصویرها یا دیگر متنها یا HTML تبدیل کند. | + | ===== Text Conversions ===== |
- | تبدیل متن به تصویر بیشتر برای خندانکها استفاده میشود. متن به HTML نیز بیشتر برای جایگزینسازیهای تایپی به کار میرود، ولی میتوان آن را به شکلی تعریف نمود که که HTML های دیگر را نیز استفاده کند. | + | DokuWiki can convert certain pre-defined characters or strings into images or other text or HTML. |
- | ==== تبدیل متن به تصویر ==== | + | The text to image conversion is mainly done for smileys. And the text to HTML conversion is used for typography replacements, but can be configured to use other HTML as well. |
- | جزوه پویای آکادمیاکافه [[wp>شکلک]]های شناخته شده را به معادلهای تصویری آنها تبدیل میکند. این [[doku>خندانکها]] و دیگر تصویرها را میتوان تعریف نمود و آنها را توسعه داد. در زیر فهرستی از خندانکهای به کار رفته در جزوه پویای آکادمیاکافه آورده شده است: | + | ==== Text to Image Conversions ==== |
+ | DokuWiki converts commonly used [[wp>emoticon]]s to their graphical equivalents. Those [[doku>Smileys]] and other images can be configured and extended. Here is an overview of Smileys included in DokuWiki: | ||
* 8-) %% 8-) %% | * 8-) %% 8-) %% | ||
خط 218: | خط 253: | ||
* DELETEME %% DELETEME %% | * DELETEME %% DELETEME %% | ||
- | ==== تبدیل متن به HTML ==== | + | ==== Text to HTML Conversions ==== |
- | [[جزوه پویای آکادمیاکافه]] میتواند کاراکترهای ساده متنی را به شکلهای درست نوشتاری آنها تبدیل کند. نمونهای از کاراکترهای شناخته شده در زیر آورده شده است: | + | Typography: [[DokuWiki]] can convert simple text characters to their typographically correct entities. Here is an example of recognized characters. |
-> <- <-> => <= <=> >> << -- --- 640x480 (c) (tm) (r) | -> <- <-> => <= <=> >> << -- --- 640x480 (c) (tm) (r) | ||
خط 230: | خط 265: | ||
</code> | </code> | ||
- | روش مشابهی را میتوان برای ایجاد هر نوع HTML به کار گرفت. برای این کار کافیست که به [[doku>entities|فایل الگو]] افزوده شود. | + | The same can be done to produce any kind of HTML, it just needs to be added to the [[doku>entities|pattern file]]. |
- | سه استثنا وجود دارد که از آن فایل الگو نمیآیند: ضرب کردن مقادیر (640x480)، 'تنها' و "نقلقولهای دوگانه". این موارد را میتوان در [[doku>config:typography|confing option]] غیر فعال نمود. | + | There are three exceptions which do not come from that pattern file: multiplication entity (640x480), 'single' and "double quotes". They can be turned off through a [[doku>config:typography|config option]]. |
- | ===== نقل قول کردن ===== | + | ===== Quoting ===== |
- | گاهی نیاز دارید که یک متن را به شکلی نشانهگذاری نمایید که نشان دهید یک پاسخ یا کامنت است. برای این کار میتوانید از ساختار زیر استفاده نمایید: | + | Some times you want to mark some text to show it's a reply or comment. You can use the following syntax: |
- | فکر می کنم میبایست آن را انجام دهیم. | + | <code> |
- | + | I think we should do it | |
- | > نه نباید انجام دهیم. | + | |
- | + | > No we shouldn't | |
- | >> ولی من میگویم میبایست انجام دهیم. | + | |
- | + | >> Well, I say we should | |
- | > واقعا؟ | + | |
- | + | > Really? | |
- | >> بله! | + | |
- | + | >> Yes! | |
- | >>> پس انجامش بدهیم! | + | |
+ | >>> Then lets do it! | ||
+ | </code> | ||
- | فکر می کنم میبایست آن را انجام دهیم. | + | I think we should do it |
- | > نه نباید انجام دهیم. | + | > No we shouldn't |
- | >> ولی من میگویم میبایست انجام دهیم. | + | >> Well, I say we should |
- | > واقعا؟ | + | > Really? |
- | >> بله! | + | >> Yes! |
- | >>> پس انجامش بدهیم! | + | >>> Then lets do it! |
- | ===== جدولها ===== | + | ===== Tables ===== |
- | جزوه پویای آکادمیاکافه از قواعد سادهای برای ایجاد جدولها استفاده میکند. | + | DokuWiki supports a simple syntax to create tables. |
^ Heading 1 ^ Heading 2 ^ Heading 3 ^ | ^ Heading 1 ^ Heading 2 ^ Heading 3 ^ | ||
خط 271: | خط 308: | ||
| Row 3 Col 1 | Row 3 Col 2 | Row 3 Col 3 | | | Row 3 Col 1 | Row 3 Col 2 | Row 3 Col 3 | | ||
- | ردیفهای معمولی جدول میبایست با یک ''|'' آغاز و پایان یابند. ردیف عنوان میبایست با ''^'' آغاز و پایان یابد. | + | Table rows have to start and end with a ''|'' for normal rows or a ''^'' for headers. |
^ Heading 1 ^ Heading 2 ^ Heading 3 ^ | ^ Heading 1 ^ Heading 2 ^ Heading 3 ^ | ||
خط 278: | خط 315: | ||
| Row 3 Col 1 | Row 3 Col 2 | Row 3 Col 3 | | | Row 3 Col 1 | Row 3 Col 2 | Row 3 Col 3 | | ||
- | برای وصل کردن افقی سلولها به یکدیگر، کافیست همانگونه در بالا نشان داده شد، سلول کناری کاملا خالی باشد. اطمینان حاصل کنید که همیشه تعداد جداکنندههای سلولها به اندازه مساوی باشند! | + | To connect cells horizontally, just make the next cell completely empty as shown above. Be sure to have always the same amount of cell separators! |
- | گذاشتن عنوانهای عمودی نیز امکانپذیر است. | + | Vertical tableheaders are possible, too. |
| ^ Heading 1 ^ Heading 2 ^ | | ^ Heading 1 ^ Heading 2 ^ | ||
خط 287: | خط 324: | ||
^ Heading 5 | Row 2 Col 2 | Row 2 Col 3 | | ^ Heading 5 | Row 2 Col 2 | Row 2 Col 3 | | ||
- | همانگونه که میبینید، جداکنندهای که قبل از هر سلول گذاشته میشود در مورد نوع آن تصمیمگیری میکند: | + | As you can see, it's the cell separator before a cell which decides about the formatting: |
| ^ Heading 1 ^ Heading 2 ^ | | ^ Heading 1 ^ Heading 2 ^ | ||
خط 294: | خط 331: | ||
^ 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 ''%%:::%%'' into the cells below the one to which they should connect. |
^ Heading 1 ^ Heading 2 ^ Heading 3 ^ | ^ Heading 1 ^ Heading 2 ^ Heading 3 ^ | ||
خط 301: | خط 338: | ||
| Row 3 Col 1 | ::: | Row 2 Col 3 | | | Row 3 Col 1 | ::: | Row 2 Col 3 | | ||
- | به غیر از قاعده مربوط به سلولهای عمودی متصل شده، آن سلولها نباید دارای نوشته دیگری باشند. | + | Apart from the rowspan syntax those cells should not contain anything else. |
^ Heading 1 ^ Heading 2 ^ Heading 3 ^ | ^ Heading 1 ^ Heading 2 ^ Heading 3 ^ | ||
خط 308: | خط 345: | ||
| Row 3 Col 1 | ::: | Row 2 Col 3 | | | Row 3 Col 1 | ::: | Row 2 Col 3 | | ||
- | میتوان راستای نوشتههای جدول را نیز تعیین نمود. برای این کار فقط کافیست تا دو علامت فاصله در انتهای جهت خلاف متن موردنظر قرار دهید. برای راستچین نمودن، دو علامت فاصله در سمت چپ قرار دهید. برای چپچین نمودن، دو علامت فاصله در سمت راست قرار دهید. برای وسطچین نمودن، در هر دو انتهای نوشته دو علامت فاصله بگذارید. | + | You can align the table contents, too. Just add at least two whitespaces at the opposite end of your text: Add two spaces on the left to align right, two spaces on the right to align left and two spaces at least at both ends for centered text. |
^ Table with alignment ^^^ | ^ Table with alignment ^^^ | ||
خط 315: | خط 352: | ||
| xxxxxxxxxxxx | xxxxxxxxxxxx | xxxxxxxxxxxx | | | xxxxxxxxxxxx | xxxxxxxxxxxx | xxxxxxxxxxxx | | ||
- | جدول بالا در حالت سورس به صورت زیر دیده میشود: | + | This is how it looks in the source: |
^ Table with alignment ^^^ | ^ Table with alignment ^^^ | ||
خط 322: | خط 359: | ||
| xxxxxxxxxxxx | xxxxxxxxxxxx | xxxxxxxxxxxx | | | xxxxxxxxxxxx | xxxxxxxxxxxx | xxxxxxxxxxxx | | ||
- | توجه: امکان تنظیم راستای عمودی در سلولها فراهم نیست. | + | Note: Vertical alignment is not supported. |
- | ===== بدون فرمتبندی ===== | + | ===== No Formatting ===== |
- | اگر میخواهید متن به همان صورت که نوشته میشود نشان داده شود (بدون هرگونه فرمتبندی)، عبارت ''%%<nowiki>%%'' را در دو سوی آن قرار دهید. برای این کار همچنین میتوانید دو علامت درصد ''<nowiki>%%</nowiki>'' در دو سوی نوشته موردنظر قرار دهید. | + | If you need to display text exactly like it is typed (without any formatting), enclose the area either with ''%%<nowiki>%%'' tags or even simpler, with double percent signs ''<nowiki>%%</nowiki>''. |
<nowiki> | <nowiki> | ||
خط 338: | خط 375: | ||
The same is true for %%//__this__ text// with a smiley ;-)%%. | The same is true for %%//__this__ text// with a smiley ;-)%%. | ||
- | ===== بلوکهای کدنویسی ===== | + | ===== Code Blocks ===== |
- | میتوانید بلوکهای مربوط به کدها را با گذاشتن دو علامت فاصله در ابتدای آنها (همانند آنچه برای مثالهای قبلی به کار رفت) یا با استفاده از عبارتهای ''%%<code>%%'' یا ''%%<file>%%'' در متن قرار داد. | + | 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 ''%%<code>%%'' or ''%%<file>%%''. |
- | در ابتدای این نوشته دو علامت فاصله گذاشته شده است. | + | This is text is indented by two spaces. |
<code> | <code> | ||
- | این نوشته به صورت کد نشان داده شده و همه علامتهای فاصله حفظ شده است: مانند <-این | + | This is preformatted code all spaces are preserved: like <-this |
</code> | </code> | ||
<file> | <file> | ||
- | این هم تقریبا مشابه قبلی است، اما میتواند برای نشان دادن اینکه یک فایل نقل قول شده به کار رود. | + | This is pretty much the same, but you could use it to show that you quoted a file. |
</file> | </file> | ||
- | بلوکهای بالا توسط سورسهای زیر نوشته شدهاند: | + | Those blocks were created by this source: |
- | در ابتدای این نوشته دو علامت فاصله گذاشته شده است. | + | This is text is indented by two spaces. |
<code> | <code> | ||
- | این نوشته به صورت کد نشان داده شده و همه علامتهای فاصله حفظ شده است: مانند <-این | + | This is preformatted code all spaces are preserved: like <-this |
</code> | </code> | ||
<file> | <file> | ||
- | این هم تقریبا مشابه قبلی است، اما میتواند برای نشان دادن اینکه یک فایل نقل قول شده به کار رود. | + | This is pretty much the same, but you could use it to show that you quoted a file. |
</file> | </file> | ||
- | ==== سایهزدن بخشهایی از کد ==== | + | ==== Syntax Highlighting ==== |
- | [[wiki:جزوه پویای آکادمیاکافه]] این امکان را فراهم میکند که بخشهایی از سورس کد، سایه زده شود و به این ترتیب خواندن این کدها آسانتر شود. برای این منظور از ابزار سایهزنی [[http://qbnz.com/highlighter/|GeSHi]] استفاده میشود -- بنابراین هر زبانی که توسط GESHi شناسایی شود در اینجا نیز قابل استفاده است. قاعده کار مشابه بلوکهای کدنویسی و فایل است که در بخش قبل توضیح داده شد، با این تفاوت که این بار نام دستوری که میبایست سایه زده شود نیز در عبارت موردنظر آورده میشود، برای نمونه ''<nowiki><code java></nowiki>'' یا ''<nowiki><file java></nowiki>''. | + | [[wiki:DokuWiki]] can highlight sourcecode, which makes it easier to read. It uses the [[http://qbnz.com/highlighter/|GeSHi]] Generic Syntax Highlighter -- so any language supported by GeSHi is supported. The syntax uses the same code and file blocks described in the previous section, but this time the name of the language syntax to be highlighted is included inside the tag, e.g. ''<nowiki><code java></nowiki>'' or ''<nowiki><file java></nowiki>''. |
<code java> | <code java> | ||
خط 380: | خط 417: | ||
</code> | </code> | ||
- | هماکنون رشتههای زیر در اینجا شناسایی میشوند: //4cs, 6502acme, 6502kickass, 6502tasm, 68000devpac, abap, actionscript-french, actionscript, actionscript3, ada, algol68, apache, applescript, asm, asp, autoconf, autohotkey, autoit, avisynth, awk, bascomavr, bash, basic4gl, bf, bibtex, blitzbasic, bnf, boo, c, c_loadrunner, c_mac, caddcl, cadlisp, cfdg, cfm, chaiscript, cil, clojure, cmake, cobol, coffeescript, cpp, cpp-qt, csharp, css, cuesheet, d, dcs, delphi, diff, div, dos, dot, e, epc, ecmascript, eiffel, email, erlang, euphoria, f1, falcon, fo, fortran, freebasic, fsharp, gambas, genero, genie, gdb, glsl, gml, gnuplot, go, groovy, gettext, gwbasic, haskell, hicest, hq9plus, html, html5, icon, idl, ini, inno, intercal, io, j, java5, java, javascript, jquery, kixtart, klonec, klonecpp, latex, lb, lisp, llvm, locobasic, logtalk, lolcode, lotusformulas, lotusscript, lscript, lsl2, lua, m68k, magiksf, make, mapbasic, matlab, mirc, modula2, modula3, mmix, mpasm, mxml, mysql, newlisp, nsis, oberon2, objc, objeck, ocaml-brief, ocaml, oobas, oracle8, oracle11, oxygene, oz, pascal, pcre, perl, perl6, per, pf, php-brief, php, pike, pic16, pixelbender, pli, plsql, postgresql, povray, powerbuilder, powershell, proftpd, progress, prolog, properties, providex, purebasic, pycon, python, q, qbasic, rails, rebol, reg, robots, rpmspec, rsplus, ruby, sas, scala, scheme, scilab, sdlbasic, smalltalk, smarty, sql, systemverilog, tcl, teraterm, text, thinbasic, tsql, typoscript, unicon, uscript, vala, vbnet, vb, verilog, vhdl, vim, visualfoxpro, visualprolog, whitespace, winbatch, whois, xbasic, xml, xorg_conf, xpp, yaml, z80, zxbasic// | + | The following language strings are currently recognized: //4cs 6502acme 6502kickass 6502tasm 68000devpac abap actionscript3 actionscript ada aimms algol68 apache applescript apt_sources arm asm asp asymptote autoconf autohotkey autoit avisynth awk bascomavr bash basic4gl batch bf biblatex bibtex blitzbasic bnf boo caddcl cadlisp ceylon cfdg cfm chaiscript chapel cil c_loadrunner clojure c_mac cmake cobol coffeescript c cpp cpp-qt cpp-winapi csharp css cuesheet c_winapi dart dcl dcpu16 dcs delphi diff div dos dot d ecmascript eiffel email epc e erlang euphoria ezt f1 falcon fo fortran freebasic freeswitch fsharp gambas gdb genero genie gettext glsl gml gnuplot go groovy gwbasic haskell haxe hicest hq9plus html html4strict html5 icon idl ini inno intercal io ispfpanel java5 java javascript jcl j jquery julia kixtart klonec klonecpp kotlin latex lb ldif lisp llvm locobasic logtalk lolcode lotusformulas lotusscript lscript lsl2 lua m68k magiksf make mapbasic mathematica matlab mercury metapost mirc mk-61 mmix modula2 modula3 mpasm mxml mysql nagios netrexx newlisp nginx nimrod nsis oberon2 objc objeck ocaml-brief ocaml octave oobas oorexx oracle11 oracle8 oxygene oz parasail parigp pascal pcre perl6 perl per pf phix php-brief php pic16 pike pixelbender pli plsql postgresql postscript povray powerbuilder powershell proftpd progress prolog properties providex purebasic pycon pys60 python qbasic qml q racket rails rbs rebol reg rexx robots rpmspec rsplus ruby rust sas sass scala scheme scilab scl sdlbasic smalltalk smarty spark sparql sql standardml stonescript swift systemverilog tclegg tcl teraterm texgraph text thinbasic tsql twig typoscript unicon upc urbi uscript vala vbnet vb vbscript vedit verilog vhdl vim visualfoxpro visualprolog whitespace whois winbatch xbasic xml xojo xorg_conf xpp yaml z80 zxbasic// |
- | ==== بلوکهای کدنویسی قابل دانلود ==== | + | There are additional [[doku>syntax_highlighting|advanced options]] available for syntax highlighting, such as highlighting lines or adding line numbers. |
- | وقتی از دستور ''%%<code>%%'' یا ''%%<file>%%'' همانند بالا استفاده میشود، ممکن است بخواهید که امکان دانلود کردن کد نشان داده شده هم فراهم باشد. این کار را میتوانید با مشخص ساختن نام یک فایل پس از کد انجام دهید، به صورت زیر: | + | ==== Downloadable Code Blocks ==== |
+ | |||
+ | When you use the ''%%<code>%%'' or ''%%<file>%%'' syntax as above, you might want to make the shown code available for download as well. You can do this by specifying a file name after language code like this: | ||
<code> | <code> | ||
خط 396: | خط 435: | ||
</file> | </file> | ||
- | اگر نمیخواهید هیچگونه سایهزنی وجود داشته باشد ولی امکان دانلود فایل فراهم باشد، یک خط تیره (''-'') را به عنوان کد بگذارید: ''%%<code - myfile.foo>%%''. | + | If you don't want any highlighting but want a downloadable file, specify a dash (''-'') as the language code: ''%%<code - myfile.foo>%%''. |
- | ===== قرار دادن HTML و PHP ===== | + | ===== Embedding HTML and PHP ===== |
- | شما میتوانید با استفاده از دستورهای ''%%<html>%%'' یا ''%%<php>%%'' کدهای HTML یا PHP را در نوشتههای خود بگذارید. (اگر میخواهید المانهای سطح بلوک را ببندید از دستورهای با حروف بزرگ استفاده نمایید). | + | You can embed raw HTML or PHP code into your documents by using the ''%%<html>%%'' or ''%%<php>%%'' tags. (Use uppercase tags if you need to enclose block level elements.) |
- | مثال HTML: | + | HTML example: |
<code> | <code> | ||
خط 421: | خط 460: | ||
</HTML> | </HTML> | ||
- | مثال PHP: | + | PHP example: |
<code> | <code> | ||
<php> | <php> | ||
- | echo 'A logo generated by PHP:'; | + | echo 'The PHP version: '; |
- | echo '<img src="' . $_SERVER['PHP_SELF'] . '?=' . php_logo_guid() . '" alt="PHP Logo !" />'; | + | echo phpversion(); |
- | echo '(generated inline HTML)'; | + | echo ' (generated inline HTML)'; |
</php> | </php> | ||
<PHP> | <PHP> | ||
echo '<table class="inline"><tr><td>The same, but inside a block level element:</td>'; | echo '<table class="inline"><tr><td>The same, but inside a block level element:</td>'; | ||
- | echo '<td><img src="' . $_SERVER['PHP_SELF'] . '?=' . php_logo_guid() . '" alt="PHP Logo !" /></td>'; | + | echo '<td>'.phpversion().'</td>'; |
echo '</tr></table>'; | echo '</tr></table>'; | ||
</PHP> | </PHP> | ||
خط 437: | خط 476: | ||
<php> | <php> | ||
- | echo 'A logo generated by PHP:'; | + | echo 'The PHP version: '; |
- | echo '<img src="' . $_SERVER['PHP_SELF'] . '?=' . php_logo_guid() . '" alt="PHP Logo !" />'; | + | echo phpversion(); |
- | echo '(inline HTML)'; | + | echo ' (inline HTML)'; |
</php> | </php> | ||
<PHP> | <PHP> | ||
echo '<table class="inline"><tr><td>The same, but inside a block level element:</td>'; | echo '<table class="inline"><tr><td>The same, but inside a block level element:</td>'; | ||
- | echo '<td><img src="' . $_SERVER['PHP_SELF'] . '?=' . php_logo_guid() . '" alt="PHP Logo !" /></td>'; | + | echo '<td>'.phpversion().'</td>'; |
echo '</tr></table>'; | echo '</tr></table>'; | ||
</PHP> | </PHP> | ||
- | **توجه**: به طور پیشفرض قرار دادن HTML و PHP غیر فعال شده است. اگر غیر فعال شده باشد، به جای آنکه کد اجرا شده باشد نشان داده میشود. | + | **Please Note**: HTML and PHP embedding is disabled by default in the configuration. If disabled, the code is displayed instead of executed. |
- | ===== کدهای RSS/ATOM ===== | + | |
+ | ===== RSS/ATOM Feed Aggregation ===== | ||
[[DokuWiki]] can integrate data from external XML feeds. For parsing the XML feeds, [[http://simplepie.org/|SimplePie]] is used. All formats understood by SimplePie can be used in DokuWiki as well. You can influence the rendering by multiple additional space separated parameters: | [[DokuWiki]] can integrate data from external XML feeds. For parsing the XML feeds, [[http://simplepie.org/|SimplePie]] is used. All formats understood by SimplePie can be used in DokuWiki as well. You can influence the rendering by multiple additional space separated parameters: | ||
خط 457: | خط 497: | ||
| date | show item dates | | | date | show item dates | | ||
| description| show the item description. If [[doku>config:htmlok|HTML]] is disabled all tags will be stripped | | | description| show the item description. If [[doku>config:htmlok|HTML]] is disabled all tags will be stripped | | ||
+ | | nosort | do not sort the items in the feed | | ||
| //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:DokuWiki]] will generally try to supply a cached version of a page, obviously this is inappropriate when the page contains dynamic external content. The parameter tells [[wiki:DokuWiki]] to re-render the page if it is more than //refresh period// since the page was last rendered. | The refresh period defaults to 4 hours. Any value below 10 minutes will be treated as 10 minutes. [[wiki:DokuWiki]] will generally try to supply a cached version of a page, obviously this is inappropriate when the page contains dynamic external content. The parameter tells [[wiki:DokuWiki]] to re-render the page if it is more than //refresh period// since the page was last rendered. | ||
- | **مثال:** | + | By default the feed will be sorted by date, newest items first. You can sort it by oldest first using the ''reverse'' parameter, or display the feed as is with ''nosort''. |
+ | |||
+ | **Example:** | ||
{{rss>http://slashdot.org/index.rss 5 author date 1h }} | {{rss>http://slashdot.org/index.rss 5 author date 1h }} | ||
خط 468: | خط 511: | ||
- | ===== ماکروها ===== | + | ===== Control Macros ===== |
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: | ||
خط 476: | خط 519: | ||
| %%~~NOCACHE~~%% | DokuWiki caches all output by default. Sometimes this might not be wanted (eg. when the %%<php>%% syntax above is used), adding this macro will force DokuWiki to rerender a page on every call | | | %%~~NOCACHE~~%% | DokuWiki caches all output by default. Sometimes this might not be wanted (eg. when the %%<php>%% syntax above is used), adding this macro will force DokuWiki to rerender a page on every call | | ||
- | ===== پلاگینها ===== | + | ===== Syntax Plugins ===== |
DokuWiki's syntax can be extended by [[doku>plugins|Plugins]]. How the installed plugins are used is described on their appropriate description pages. The following syntax plugins are available in this particular DokuWiki installation: | DokuWiki's syntax can be extended by [[doku>plugins|Plugins]]. How the installed plugins are used is described on their appropriate description pages. The following syntax plugins are available in this particular DokuWiki installation: |