[TASK] Move documentation to reST 95/47895/2
authorFrancois Suter <francois@typo3.org>
Mon, 25 Apr 2016 10:02:56 +0000 (12:02 +0200)
committerFrancois Suter <francois@typo3.org>
Mon, 25 Apr 2016 10:03:57 +0000 (12:03 +0200)
Resolves: #75905
Releases: 2.0
Change-Id: Ibc93907cb69952b836596cac25f1c6078d24e34c
Reviewed-on: https://review.typo3.org/47895
Reviewed-by: Francois Suter <francois@typo3.org>
Tested-by: Francois Suter <francois@typo3.org>
ChangeLog
Documentation/BugReporting/Index.rst [new file with mode: 0644]
Documentation/Images/PhpDisplayRecord.png [new file with mode: 0644]
Documentation/Includes.txt [new file with mode: 0644]
Documentation/Index.rst [new file with mode: 0644]
Documentation/Installation/Index.rst [new file with mode: 0644]
Documentation/Introduction/Index.rst [new file with mode: 0644]
Documentation/Settings.yml [new file with mode: 0644]
Documentation/UserManual/Index.rst [new file with mode: 0644]
doc/manual.pdf [deleted file]
doc/manual.sxw [deleted file]

index 582d1c0..6af9b86 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,7 @@
 2016-04-25 Francois Suter (Cobweb)  <typo3@cobweb.ch>
 
        * Verified compatibility with TYPO3 CMS 7, cleaned up code, applied PSR-2, resolves #75900
+       * Moved documentation to reStructuredText, resolves #75905
 
 2014-05-09 Francois Suter (Cobweb)  <typo3@cobweb.ch>
 
diff --git a/Documentation/BugReporting/Index.rst b/Documentation/BugReporting/Index.rst
new file mode 100644 (file)
index 0000000..30fb039
--- /dev/null
@@ -0,0 +1,15 @@
+.. ==================================================
+.. FOR YOUR INFORMATION
+.. --------------------------------------------------
+.. -*- coding: utf-8 -*- with BOM.
+
+.. include:: ../Includes.txt
+
+
+.. _bug-reporting:
+
+Bug reporting
+=============
+
+For feature requests, please open a report on Forge issue tracker:
+http://forge.typo3.org/projects/extension-phpdisplay/issues 
diff --git a/Documentation/Images/PhpDisplayRecord.png b/Documentation/Images/PhpDisplayRecord.png
new file mode 100644 (file)
index 0000000..558b9f4
Binary files /dev/null and b/Documentation/Images/PhpDisplayRecord.png differ
diff --git a/Documentation/Includes.txt b/Documentation/Includes.txt
new file mode 100644 (file)
index 0000000..8ef89a7
--- /dev/null
@@ -0,0 +1,21 @@
+.. ==================================================
+.. FOR YOUR INFORMATION
+.. --------------------------------------------------
+.. -*- coding: utf-8 -*- with BOM.
+
+.. This is 'Includes.txt'. It is included at the very top of each and
+   every ReST source file in this documentation project (= manual).
+
+
+.. ==================================================
+.. DEFINE SOME TEXT ROLES
+.. --------------------------------------------------
+
+.. role::   typoscript(code)
+
+.. role::   ts(typoscript)
+   :class:  typoscript
+
+.. role::   php(code)
+
+.. highlight:: php
diff --git a/Documentation/Index.rst b/Documentation/Index.rst
new file mode 100644 (file)
index 0000000..33b866c
--- /dev/null
@@ -0,0 +1,61 @@
+.. ==================================================
+.. FOR YOUR INFORMATION
+.. --------------------------------------------------
+.. -*- coding: utf-8 -*- with BOM.
+
+.. include:: Includes.txt
+
+.. _start:
+
+===========================================
+EXT: PHP-based Data Display (Data Consumer)
+===========================================
+
+.. only:: html
+
+    :Classification:
+        phpdisplay
+
+    :Version:
+        |release|
+
+    :Language:
+        en
+
+    :Description:
+        Use Plain PHP templates to display any kind of data returned by a Data Provider. More info
+        on http://www.typo3-tesseract.com.
+
+    :Keywords:
+        forAdmins, forIntermediates, tesseract
+
+    :Copyright:
+        2008-2016
+
+    :Author:
+        Fabien Udriot
+
+    :Email:
+        fabien.udriot@ecodev.ch
+
+    :License:
+        This document is published under the Open Publication License
+        available from http://www.opencontent.org/openpub/
+
+    :Rendered:
+        |today|
+
+    The content of this document is related to TYPO3,
+    a GNU/GPL CMS/Framework available from `www.typo3.org <https://typo3.org/>`__.
+
+
+    **Table of Contents**
+
+.. toctree::
+    :maxdepth: 3
+    :titlesonly:
+
+    Introduction/Index
+    Installation/Index
+    UserManual/Index
+    BugReporting/Index
diff --git a/Documentation/Installation/Index.rst b/Documentation/Installation/Index.rst
new file mode 100644 (file)
index 0000000..1b84a9c
--- /dev/null
@@ -0,0 +1,25 @@
+.. ==================================================
+.. FOR YOUR INFORMATION
+.. --------------------------------------------------
+.. -*- coding: utf-8 -*- with BOM.
+
+.. include:: ../Includes.txt
+
+
+.. _installation:
+
+Installation
+============
+
+Installation is pretty straightforward, but the extension is useless on its own. It must be
+installed as part of the Tesseract project.
+
+The only condition is that “phpdisplay” must be installed **before** “displaycontroller”.
+
+
+.. _installation-compatibility:
+
+Compatibility
+-------------
+
+As of version 2.0.0, TYPO3 CMS 7 LTS or more is required.
diff --git a/Documentation/Introduction/Index.rst b/Documentation/Introduction/Index.rst
new file mode 100644 (file)
index 0000000..04ff7d4
--- /dev/null
@@ -0,0 +1,60 @@
+.. ==================================================
+.. FOR YOUR INFORMATION
+.. --------------------------------------------------
+.. -*- coding: utf-8 -*- with BOM.
+
+.. include:: ../Includes.txt
+
+
+.. _introduction:
+
+Introduction
+============
+
+
+.. _introduction-what-does-it-do:
+
+What does it do?
+----------------
+
+The "phpdisplay" extension is a Data Consumer for the Tesseract framework. It is used to display and
+format data given to him by the controller. PHP Display is well indicated when dealing with complex
+layout by offering the flexibility of the PHP language. It is also targeting developers who prefer
+to deal with PHP template. For small needs or for people who are not very familiar with PHP, the
+"templatedisplay" extension would be probably more appropriate.
+
+
+.. _introduction-screenshot:
+
+Screenshot
+----------
+
+Here's a view of a PHP Display record in the TYPO3 BE:
+
+.. image:: ../Images/PhpDisplayRecord.png
+
+
+.. _introduction-questions:
+
+Questions?
+----------
+
+If you have any questions about this extension, you may want to refer to the Tesseract Project web
+site (http://www.typo3-tesseract.com/) for support and tutorials. You may also ask questions in the
+TYPO3 English mailing list (typo3.english).
+
+
+.. _introduction-keeping-the-developer-happy:
+
+Keeping the developer happy
+---------------------------
+
+If you like this extension, do not hesitate to make noise about it by
+using the social bookmarks available in the extension's detailed view
+on typo3.org:
+
+http://typo3.org/extensions/repository/view/phpdisplay
+
+You may also take a step back and reflect about the beauty of sharing.
+Think about how much you are benefiting and how much yourself is
+giving back to the community.
diff --git a/Documentation/Settings.yml b/Documentation/Settings.yml
new file mode 100644 (file)
index 0000000..b6f5ca5
--- /dev/null
@@ -0,0 +1,11 @@
+# This is the project specific Settings.yml file.
+# Place Sphinx specific build information here.
+# Settings given here will replace the settings of 'conf.py'.
+
+---
+conf.py:
+  copyright: 208-2016
+  project: EXT: PHP-based Data Display (Data Consumer)
+  version: 2.0
+  release: 2.0.0
+...
\ No newline at end of file
diff --git a/Documentation/UserManual/Index.rst b/Documentation/UserManual/Index.rst
new file mode 100644 (file)
index 0000000..b43a529
--- /dev/null
@@ -0,0 +1,92 @@
+.. ==================================================
+.. FOR YOUR INFORMATION
+.. --------------------------------------------------
+.. -*- coding: utf-8 -*- with BOM.
+
+.. include:: ../Includes.txt
+
+
+.. _user-manual:
+
+User manual
+===========
+
+
+.. _user-manual-setting-up-a-template:
+
+Setting up a template
+---------------------
+
+#. Create a new record of type PHP based Display on a page or a sysfolder.
+#. Define a value for field "Template path" (cf. screenshot below).
+#. Start editing the file. Variable **$datastructure**  contains the result of the data provider and
+   can be used to manipulate data in the template. Some **useful examples** can be taken from the files
+   in the :file:`Samples` folder.
+
+.. code-block:: php
+
+    <?php
+        // a good starting point is to display / debug the structure
+        print_r($datastructure);
+    ?>
+
+
+.. image:: ../Images/PhpDisplayRecord.png
+
+
+.. _user-manual-available-variables:
+
+Available variables
+-------------------
+
+==============  =================================================  ======
+variable name   Description                                        Type
+--------------  -------------------------------------------------  ------
+$datastructure  The Data Structure passed by the controller which  Array
+                contains the records
+--------------  -------------------------------------------------  ------
+$filter         The values of the Data Filter                      Array
+--------------  -------------------------------------------------  ------
+$controller     The Display Controller itself which is the parent  Object
+                object
+==============  =================================================  ======
+
+
+.. _user-manual-syntax-overview:
+
+Syntax overview
+---------------
+
+As said, PHP Display is using PHP as a language template. To avoid confusion whenever writing PHP
+code within HTML, it is recommended to use the syntax bellow:
+
+.. code-block:: php
+
+    // loop
+    <?php foreach($datastructure as $record): ?>
+        <?php print $record['title'] ?>
+    <?php endforeach ?>
+
+    // condition
+    <?php if($foo == 'foo'): ?>
+        Test has been validated as TRUE
+    <?php else: ?>
+        Test has been validated as TRUE
+    <?php endif ?>
+
+
+Basically, a very basic PHP based template can looks like:
+
+.. code-block:: html
+
+    Hello World!
+
+    Here is a list of pages:
+    <ul>
+        <li>
+            <?php foreach($datastructure['page']['records'] as $record): ?>
+                <?php print $record['title'] ?>
+            <?php endforeach ?>
+        </li>
+    </ul>
+
diff --git a/doc/manual.pdf b/doc/manual.pdf
deleted file mode 100644 (file)
index 12f79ca..0000000
Binary files a/doc/manual.pdf and /dev/null differ
diff --git a/doc/manual.sxw b/doc/manual.sxw
deleted file mode 100755 (executable)
index 6dc173c..0000000
Binary files a/doc/manual.sxw and /dev/null differ