Commit 2f288470 authored by Pierre.Vriens's avatar Pierre.Vriens
Browse files

#2124777 Correct typos, add missing links in Renderers- and Site Building guides

parent 2d17a949
......@@ -12,12 +12,21 @@
<frx:docgen />
<frx:fields>
<frx:field id="title" link="reports/help.renderers#{link}" />
<frx:field id="user_distribution_report" link="reports/sample.user_distribution_simple?state=NJ"
target="_blank">User Distribution</frx:field>
<frx:field id="tutorial_reports" link="reports/help.toc" target="_blank">Reporting Tutorials</frx:field>
<frx:field id="datablock_security" link="reports/help.data#datablocksecurity"
target="_self">data block security</frx:field>
<frx:field id="role_detail_report" link="reports/drupaladmin.role_detail" target="_blank"> Roles</frx:field>
<frx:field id="setup_svggraph_report" link="reports/help.setup#svggraph" target="_blank">PHP SVGGraph library</frx:field>
<frx:field id="state_summary_report" link="reports/sample.state_summary" target="_blank">State Summary</frx:field>
<frx:field id="state_summary_ie8_report" link="reports/sample.state_summary_ie8"
<frx:field id="state">{State}</frx:field>
<frx:field id="total">{total}</frx:field>
<frx:field id="color">{color}</frx:field>
<frx:field id="svggraph_library" link="http://www.goat1000.com/svggraph.php"
target="_blank">PHP SVGGraph library</frx:field>
<frx:field id="state_summary_ie8_report" link="reports/sample.state_summary_ie8"
target="_blank">External SVG Graph Example</frx:field>
<frx:field id="watchdog_stats_report" link="reports/drupaladmin.watchdog_stats?prmsev=4" target="_blank">Watchdog Statistics (for entries with severity 4)</frx:field>
</frx:fields>
</head>
<body>
......@@ -28,13 +37,14 @@
</ul>
</div>
<h2 id="intro">Introduction</h2>
<p>
A renderer specifies how an tag in the report template is to render. A good example is to render
the use of the svg renderere using the <a href="http://www.goat1000.com/svggraph.php" target="_blank"> PHP SVGGraph</a> library, as in
the {state_summary_report} sample report:
A renderer specifies how a tag in the report template is to render. A good example is to render
a chart using the <a href="http://www.goat1000.com/svggraph.php" target="_blank"> PHP SVGGraph</a> library, as in the {state_summary_report} sample report:
</p>
<html frx:renderer="FrxSource" id="frxsrc-1">
<head>...
<head>
...
</head>
<body>
...
......@@ -49,7 +59,7 @@
<h2 id="frxtitle">FrxTitle</h2>
<p>Use the content of this tag to override the title of the report. This allows both the page title and the tab title to be replaced by token replaced values in the report.</p>
<p>As an illustration of how to use this renderer, consider the {user_distribution_report} sample report:</p>
<div frx:renderer="FrxSource">
<div frx:renderer="FrxSource" id="frxsrc-2">
<h2 frx:renderer="FrxTitle" id="frx-frxtitle">Users in cities in state {name}</h2>
</div>
<p>
......@@ -73,25 +83,25 @@
The above sample shows a list of all non-hidden reports in category <strong>Sample</strong>, using the category as the header generated
by the following code:
</p>
<div frx:renderer="FrxSource">
<div frx:renderer="FrxSource" id="frxsrc-3">
<div frx:renderer="FrxMyReports" frx:category="Sample" id="frxmyrpts" />
</div>
<p>The following attributes are supported for the FrxMyReports renderer:</p>
<table>
<tr>
<th>frx:category</th>
<td>Limit the list of reports to be shown to a particular category. Multiple categories may be used by specifying category_2 and category_3 attribtues accordingly.</td>
<td>Limit the list of reports to be shown to a particular category. Multiple categories may be used by specifying category_2 and category_3 attributes accordingly.</td>
</tr>
</table>
<h2 id="frxsource">FrxSource</h2>
<p>The FrxSource renderer displays markup as a code snippet. No token replacement is done for the children and all embedded
code is escaped html. This is used in the {tutorial_reports} to display the source of reports.</p>
code is escaped HTML. This is used in the {tutorial_reports} to display the source of reports.</p>
<p>
This renderer is used throughout the documentation as follows:
</p>
<div frx:renderer="FrxSource">
<div frx:renderer="FrxSource" id="frxsrc-4">
<div frx:renderer="FrxSource">
<p>Embedded xhtml that you want displayed as source including {tokens} that you want to display without being replaced</p>
<p>Embedded XHTML that you want displayed as source including {tokens} that you want to display without being replaced</p>
</div>
</div>
<h2 id="frxxml">FrxXML</h2>
......@@ -99,15 +109,11 @@
report, it will show you the XML data source that is used for token replacement, so it can give you a good idea as to what data
is being returned and which tokens can be used.</p>
<p>Here is a sample that is displayed using the FrxXML renderer which shows the data returned by the datablock:</p>
<div class="xml">
<div frx:renderer="FrxXML" id="frx-frxxml" frx:block="forena_help/reportingwysiwyg_topics"></div>
</div>
<div frx:renderer="FrxXML" id="frx-frxxml" frx:block="forena_help/reportingwysiwyg_topics"></div>
<p>Be aware however that this FrxXML renderers removes XML comment lines (e.g. those used to specify
{datablock_security} in XML format).</p>
<p>The above example was generated with the following code:</p>
<div frx:renderer="FrxSource">
<div frx:renderer="FrxSource" id="frxsrc-5">
<div frx:renderer="FrxXML" id="frx-frxxml" frx:block="forena_help/reportingwysiwyg_topics" />
</div>
<h2 id="frxparameterform">FrxParamterForm</h2>
......@@ -116,7 +122,7 @@
report to control various aspects of the rendering of the parameter form, as in the {role_detail_report} sample report, for
which the .frx file includes these lines:
</p>
<html frx:renderer="FrxSource">
<html frx:renderer="FrxSource" id="frxsrc-6">
<head>
...
<frx:parameters>
......@@ -178,7 +184,7 @@
to using this renderer.</p>
<p>We'll use the {state_summary_report} sample report to illustrate how to use this renderer, for which the .frx file
includes these lines:</p>
<div frx:renderer="FrxSource">
<div frx:renderer="FrxSource" id="frxsrc-7">
<div frx:block="sampledb/users_by_state" id="users_by_state-block" class="FrxSVGGraph">
<svg id="state-chart" frx:renderer="FrxSVGGraph" frx:type="bargraph" frx:xpath="*[total&gt;10000]" frx:color="{color}"
frx:link="sample.user_distribution_simple?state={state}" frx:series_1="{total}" frx:label="{state}">
......@@ -221,7 +227,7 @@
<tr>
<th>frx:link</th>
<td>Create a hyperlink for the data to be graphed (e.g. <strong>sample.user_distribution_simple?state={state}</strong>.
Use feild tokens to generate the link dynamically .
Use field tokens to generate the link dynamically.
</td>
</tr>
<tr>
......@@ -239,7 +245,7 @@
<tr>
<th>frx:options</th>
<td>This legacy attribute is currently still supported, but it is recommended to replace them by the corresponding <strong>frx:xyz</strong>
attributes. Here is a sample of it was used:<br /> <strong>frx:options="series[]={total}&amp;label={state}&amp;colors[]=green&amp;colors[]=yellow"</strong></td>
attributes. Here is a sample of how it was used:<br /> <strong>frx:options="series[]={total}&amp;label={state}&amp;colors[]=green&amp;colors[]=yellow"</strong></td>
</tr>
</table>
<p>
......@@ -268,9 +274,9 @@
</tr>
</table>
<p>
Here is an example:
Checkout the {svggraph_library} documentation to fully understand the available options, as in this example:
</p>
<div frx:renderer="FrxSource">
<div frx:renderer="FrxSource" id="frxsrc-8">
<div frx:block="sampledb/users_by_state" id="users_by_state-block" class="FrxSVGGraph">
<svg id="state-chart" frx:renderer="FrxSVGGraph" frx:type="bargraph" frx:xpath="*[total&gt;10000]" frx:color="{color}"
frx:link="sample.user_distribution_simple?state={state}" frx:series_1="{total}" frx:label="{state}" frx:height="300"
......@@ -282,9 +288,6 @@
</svg>
</div>
</div>
<p>
<strong>Note</strong>: checkout the {svggraph_library} documentation to fully understand those options.
</p>
<h2 id="frxinclude">FrxInclude</h2>
<p>This renderer includes another report as an asset with the appropriate tag. The primary use of this renderer is to
create references to external SVG assets. When rendered in a web page, these need to be wrapped in embed tags, but when being
......@@ -292,10 +295,10 @@
the .frx file includes these lines:
</p>
<div frx:renderer="FrxSource">
<div frx:src="reports/sample.state_graph.svg?height=400&amp;width=600" frx:renderer="FrxInclude" frx:height="480"
frx:width="640">...</div>
</div>
<div frx:renderer="FrxSource" id="frxsrc-9">
<div frx:src="reports/sample.state_graph.svg?height=400&amp;width=600" frx:renderer="FrxInclude" frx:height="480"
frx:width="640">...</div>
</div>
<p>
The above example illustrates the following FRX attributes supported by the FrxInclude renderer:
</p>
......@@ -350,11 +353,11 @@
<tr><td>WA</td><td>100</td><td>50</td></tr>
<tr><td>ID</td><td>25</td><td>30</td></tr>
</table>
<p>In order to do this you will need to specify a grouping attribute and a dimension attribute. The grouping attribute determines how to group the rows of data while
the dimension attribute speicifies which field will be used to create the columns out of.</p>
<p>In order to do this you will need to specify a <strong>grouping</strong> attribute and a <strong>dimension</strong> attribute. The grouping attribute determines how to group the rows of data while
the dimension attribute specifies which field will be used to create the columns out of.</p>
<p>The layout of the cross tab is follows:</p>
<div frx:renderer="FrxSource">
<div frx:renderer="FrxSource" id="frxsrc-10">
<div id="watchdog_stats_block" class="FrxCrosstab" frx:block="drupal/watchdog_stats">
<table watchdog_stats="watchdog_stats-renderer" frx:renderer="FrxCrosstab" frx:group="{severity}{name}"
frx:dim="Msg Type: {type}">
......@@ -376,12 +379,10 @@ the dimension attribute speicifies which field will be used to create the column
</tbody>
</table>
</div>
</div>
<p>In the above layout the td elements in the thead section of the table tell the crosstab renderer to use that field as the
dynamic columns that make up the pivot. The frx:dim attribute determines the values that will be used as columns in the table.
Columns that are indicated with th elements are fixed. The structure is then mirrored in the tbody section. The frx:group
attribute dictates what will be used to uniquely group the rows. One row will be generated for each unique frx:group specified.
The frx:dim element d</p>
<p>In the above layout the <strong>td</strong> elements in the <strong>thead</strong> section of the table tell the crosstab renderer to use that field as the
dynamic columns that make up the pivot. The <strong>frx:dim</strong> attribute determines the values that will be used as columns in the table.
Columns that are indicated with th elements are fixed. The structure is then mirrored in the <strong>tbody</strong> section. The <strong>frx:group</strong>
attribute dictates what will be used to uniquely group the rows. One row will be generated for each unique frx:group specified.</p>
</body>
</html>
......@@ -8,7 +8,7 @@
<head>
<title>Site Building Guide</title>
<frx:category>Help</frx:category>
<frx:options hidden="1" />
<frx:options hidden="1" skin="tutorial_skin" />
<frx:fields>
<frx:field id="title" link="reports/help.sitebuilding#{link}" />
<frx:field id="feeds_module" link="https://drupal.org/project/feeds" target="_blank">Feeds module</frx:field>
......@@ -16,25 +16,16 @@
<frx:field id="views_module" link="https://drupal.org/project/views" target="_blank">Views module</frx:field>
<frx:field id="masquerade_module" link="https://drupal.org/project/masquerade" target="_blank">Masquerade module</frx:field>
<frx:field id="enable_locale" link="admin/modules#core" target="_blank">enable module locale</frx:field>
<frx:field id="cck_module" link="https://drupal.org/project/cck" target="_blank">Content Construction Kit (CCK) module</frx:field>
<frx:field id="eck_module" link="https://drupal.org/project/eck" target="_blank">Entity Construction Kit (ECK) module</frx:field>
<frx:field id="tutorial_toc_report" link="reports/help.toc" target="_blank">Tutorial Table Of Contents</frx:field>
<frx:field id="admin_content_blocks" link="admin/content/blocks" target="_blank">Admin / Content / Blocks</frx:field>
<frx:field id="block_add" link="block/add" target="_blank">Add Block</frx:field>
<frx:field id="block_add_forena" link="block/add/forena" target="_blank">Block / Add / Forena</frx:field>
<frx:field id="admin_structure_block" link="admin/structure/block" target="_blank">Admin / Structure / Block</frx:field>
<frx:field id="mojzis" link="https://www.drupal.org/u/mojzis" target="_blank">mojzis</frx:field>
<frx:field id="reports_as_blocks" link="https://www.drupal.org/node/1863770" target="_blank">Reports as blocks</frx:field>
<frx:field id="wysiwyg_module" link="https://drupal.org/project/wysiwyg" target="_blank">Wysiwyg module</frx:field>
<frx:field id="wysiwyg_editor" link="reports/help.reportingwysiwyg.intro"
target="_blank">WYSIWYG reporting user interface</frx:field>
<frx:field id="wysiwyg_editor" link="reports/help.reportingwysiwyg"
target="_self">WYSIWYG reporting user interface</frx:field>
<frx:field id="forena_issue_queue" link="https://www.drupal.org/node/829210" target="_blank">Forena Issue Queue</frx:field>
<frx:field id="cleanup_html_output" link="https://www.drupal.org/node/2234227#comment-8653971"
target="_blank">cleanup HTML output</frx:field>
<frx:field id="text_formats" link="reports/help.setup.administration#text-formats"
target="_blank">Text formats configuration</frx:field>
<frx:field id="ckeditor_config" link="https://www.drupal.org/node/2055369#comment-7770335"
target="_blank">Creating a new text format</frx:field>
<frx:field id="text_formats" link="reports/help.setup#text-formats"
target="_self">Text formats configuration</frx:field>
<frx:field id="ckeditor_issue" link="https://www.drupal.org/node/2140683"
target="_blank">CKEditor</frx:field>
</frx:fields>
......@@ -59,15 +50,13 @@
<li>Use the {views_module} with Forena to create additional more complicated layouts than can typically be created
using views. Forena provides a views rowstyle plugin that lets you use a forena report to format the output of a view.</li>
<li>Use the {masquerade_module} to review (experiment with) all sorts of Forena related authorizations.</li>
<li>Use a <strong>wysiwyg editor</strong> to edit the body of a report, to avoid editing the specifications of the report
<li>Use a <strong>WYSIWYG editor</strong> to edit the body of a report, to avoid editing the specifications of the report
body using XHTML tags.
</li>
</ul>
<h2 id="locale">Translating Reports</h2>
<p>This guide documents the available integrations.</p>
<p>Forena includes support for report translations in multiple languages. To enable this support simply
{enable_locale} which is included in Drupal core. Unlike other approaches at localization, because Forena allows full html markup, each report
must be translated into the target language. </p>
{enable_locale} which is included in Drupal core. Unlike other approaches at localization, because Forena allows full HTML markup, each report must be translated into the target language. </p>
<h2 id="feeds">Feeds Importing</h2>
<p>Using the Forena integration with the {feeds_module} it is possible to import data blocks and reports as
Drupal nodes or Drupal users).</p>
......@@ -97,8 +86,7 @@
<h3>Example</h3>
<p>
As an illustration of how to use this feature, let's create a block showing a condensed version of the {tutorial_toc_report}
report.:
As an illustration of how to use this feature, let's create a block showing a condensed version of the {tutorial_toc_report} report:
</p>
<ol>
<li>Ensure that the {bean_module} is available (installed and enabled).</li>
......@@ -133,53 +121,46 @@
</li>
<li>At this point we have the requested Forena report block available, but it isn't showing up anywhere yet, because the
block is has not been placed into a regioin of our theme. Visit the {admin_structure_block} to place this block in your theme per
block is has not been placed into a region of our theme. Visit the {admin_structure_block} to place this block in your theme per
the normal drupal instructions.
</li>
</ol>
<h2 id="viewsrowstyle">Views Integration</h2>
<p>Using the Forena integration with the {views_module}, it is possible to use Forena reports as a views row
style, so that in a view you can use the Forena templating engine to do the formatting. Although this can be done
through the views tempalting engine Forena users may find they have more control with this engine.</p>
<p>
For a great tutorial about the available features, checkout the video about <a
href="http://www.youtube.com/watch?v=bg4P747DmE8" target="_blank">How to import data and reports based on data as Drupal
nodes</a>.
</p>
through the views templating engine Forena users may find they have more control with this engine.</p>
<h2 id="wysiwygeditors">WYSIWYG Editors</h2>
<p>
Forena's {wysiwyg_editor} facilitates the editing of the <strong>body</strong> of a report using a wysiwyg editor (so that you
Forena's {wysiwyg_editor} facilitates the editing of the <strong>body</strong> of a report using a WYSIWYG editor (so that you
are not assumed to be familiar with HTML tags to understand or edit the specifications of the report body). But because of the
custom (FRX) attributes, some challenges need to be addressed:
</p>
<ul>
<li>Forena will (a) save away custom attributes in the report body before presenting it for editing via a wysiwyg editor
<li>Forena will (a) save away custom attributes in the report body before presenting it for editing via a WYSIWYG editor
and (b) merge them back in after editing ended.</li>
<li>Forena adds back the special tags that were stripped based on id attributes, but it also makes sure that there is an
id on every HTML tag that has an FRX attribute.</li>
</ul>
<p>Some recommendations to prevent issues when attempting to enable a wysiwyg editor for editing the body of a report:</p>
<p>Some recommendations to prevent issues when attempting to enable a WYSIWYG editor for editing the body of a report:</p>
<ul>
<li>Complete your homework first regarding {text_formats}! Doing so will prevent a lot of trouble with just any wysiwyg
editor.</li>
<li>Complete your homework first regarding {text_formats}! Doing so will prevent a lot of trouble with just any WYSIWYG editor.</li>
<li>Be careful in selecting a WYSIWYG editor so that it doesn't conflict with the FRX attributes. At a minimum id attributes
cannot be stripped by the editor. Forena makes an attempt to readd any custom attributes based on html id attributes, but if these
are stripped, all custom frx:attributes can</li>
cannot be stripped by the editor. Forena makes an attempt to read any custom attributes based on html id attributes, but if these
are stripped, all custom frx:attributes can cause problems.</li>
</ul>
<p>Some more details about available wysiwyg editors for editing the body of a report:</p>
<p>Some more details about available WYSIWYG editors for editing the body of a report:</p>
<ul>
<li><strong>TinyMCE</strong> editor works provided when configured with these options:
<ul>
<li>Verify HTML.</li>
<li>Remove Line Breaks.</li>
<li>Convert Font Tags to Styles.</li>
</ul> Warnfing: Tincymce will strip out SVG graphs from any report it is used to edit.
</ul> Warning: TincyMCE will strip out SVG graphs from any report it is used to edit.
</li>
<li>It should work with other wysiwyg HTML editors, however {ckeditor_issue} seems to cause problems as it strips id attributes by default. You will
need to set the allowedContent option on CKEditor to make sure it does not strip them.</li>
<li>It should work with other WYSIWYG HTML editors, however {ckeditor_issue} seems to cause problems as it strips id attributes by default. You will
need to set the allowed Content option on CKEditor to make sure it does not strip them.</li>
</ul>
<p>If you have experience with other editors that you'd recommend to include here, or you noticed anything
that's incomplete, please report about it in the {forena_issue_queue}. .</p>
that's incomplete, please report about it in the {forena_issue_queue}.</p>
</body>
</html>
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment