<?php
defined( 'ABSPATH' ) or exit; 

function ewz_help_menu(){
    $webforms = Ewz_Webform::get_all_webforms("can_view_webform", false );
    $webform = $webforms[0];
    foreach ( $webform->layout->fields as $field ) {
        $webform->field_idents[$field->field_id] = $field->field_ident;
        $webform->field_types[$field->field_id] = $field->field_type;
        $webform->field_names[$field->field_id] = ewz_html_esc( $field->field_header );
     }
     $ewzG["maxTotalMb"] = EWZ_MAX_TOTAL_MB;
     $ewzG["maxNumitems"] = EWZ_MAX_NUMITEMS;
     $ewzG["maxUploadMb"] = EWZ_MAX_SIZE_MB;
?>


<div class="wrap ewz_help">


    <H1> EntryWizard Help </H1>
        <p class="ewzheader"> This page contains the text of all the help popups in the rest of the plugin admin area, collected together
           so it can be read as a unit and searched.</p>

  <ul class="ewz_inline">
  <li class="ewzpagelink"><a class="" href="#helplayouts">Permissions</a></li>
  <li class="ewzpagelink"><a class="" href="#helplayouts">Layouts</a></li>
  <li class="ewzpagelink"><a class="" href="#helpwebforms">Webforms</a></li>
  <li class="ewzpagelink"><a class="" href="#helpitemlist">Webform Item List</a></li>
  <?php  do_action( 'ewz_before_help' ); ?>
</ul>
 <a id='helppermissions' name='helppermissions'></a>
 <hr class='ewzhelpdiv'>
<div class='d1'>
<H1>  Permissions </H1>
           <i>
             <p>The entrywizard permissions system operates on top of the normal Wordpress
                <a href='http://codex.wordpress.org/Roles_and_Capabilities'> roles and capabilities</a>.
             </p>

             <p>As of version 1.3.17, WordPress "list_users" capability is no longer required to see user information stored by
                entrywizard.  Instead, you may give "See User Data" permission here.
             </p>

             <p>As of version 1.2.28, either 'edit_users' or 'manage_options' Wordpress capability is required to see the Permissions page.
                Earlier versions of entrywizard required manage_options. Both are by default restricted to admin.
             </p>
            </i>

<div class='d2'>
<H2>  User Data Permissions </H2>
            <p>EntryWizard allows for the display of some personal data in the spreadsheets.
               Since this could potentially compromise privacy, permission to see such data should be specifically
                   granted here to those who need it.
            </p>

</div>
<div class='d2'>
<H2>  Layout Permissions </H2>
            <p><i>"Edit"</i> permission on a layout means change any of its data.  "Edit Any Layout" is required to create or delete layouts.</p>
            <p><i>"Assign"</i> permission on a layout means set it as the layout for a web form. Permission to edit the web form is also required.</p>

</div>
<div class='d2'>
<H2>  Webform Permissions </H2>
            <p><i>"Manage"</i> &nbsp; a form means change it's name or identifier, open/close it for uploads,
                   and view, attach to pages or remove items.</p>
            <p><i>"Edit"</i> &nbsp; a form means do any of the above plus assign it's layout.</p>
            <p><i>"Edit Any Web Form"</i> &nbsp; is required to create or delete a web form.</p>

</div>
<div class='d2'>
<H2>  Rating Scheme Permissions </H2>

</div>
</div>
<br><hr class='ewzhelpdiv'>
<ul class="ewz_inline">
  <li class="ewzpagelink"><a class="" href="#helplayouts">Permissions</a></li>
  <li class="ewzpagelink"><a class="" href="#helplayouts">Layouts</a></li>
  <li class="ewzpagelink"><a class="" href="#helpwebforms">Webforms</a></li>
  <li class="ewzpagelink"><a class="" href="#helpitemlist">Webform Item List</a></li>
  <?php  do_action( 'ewz_before_help' ); ?>
</ul>
 <a id='helplayouts' name='helplayouts'></a>
 <hr class='ewzhelpdiv'>
<div class='d1'>
<H1>  Layout Management Page </H1>

</div>
<div class='d1'>
<H1>  Layouts </H1>
                <p>The "name" will appear on the menu of layouts on the "Webforms" page.
                </p>

                <p>The shortcode "ewz_show_webform" generates a webform with N rows, where
                    N is the maximum number of items, and a column for each field
                </p>
                <p>Users may alter the data they enter so long as the webform is open for uploads.
                   Text, Dropdown, Radio and Checkbox data may be changed, but the only way to alter uploaded
                   images is to delete the entire item and re-submit.  <i>Multiple image fields for an item must all be
                   uploaded at the same time.</i></p>

                <p>If some values in the "Maximum number of items" selection list are disabled, it it because
                   you have set a larger maximum for one of the options in a drop-down field.</p>

                <p>Note that your environment or your web hosting company puts three limits on
                    uploaded items.  These have been detected to be:</p>
                    <ol><li>No individual item may be bigger than <?php print $ewzG['maxUploadMb']; ?>M</li>

                        <li>The total size of the whole upload including all items may not be bigger than
                            <?php print $ewzG['maxTotalMb']; ?>M</li>

                        <li>The maximum number of items that may be uploaded simultaneously is
                            <?php print $ewzG['maxNumitems']; ?></li>
                    </ol>
                <p>( For the technically-minded, these limits are set in <i>php.ini</i>, and more
                    details may be obtained from the php documentation website
                    http://php.net/manual/en/ini.core.php )
                </p>

                <p>In addition, Wordpress currently is able to handle only the following image types:
                    <ol><li>.jpg/.jpeg</li>
                        <li>.png</li>
                        <li>.gif</li>
                    </ol>
                </p>

<div class='d2'>
<H2>  Name For Layout </H2>
                 <p>The name you set for the layout will appear as an option in the "Layouts" drop-down selection on the WebForms page.</p>

</div>
<div class='d2'>
<H2>  Maximum Number of Items </H2>
                 <p>The "Maximum number of items" controls the number of rows appearing in the upload form.</p>
                 <p>If you check "Overrideable by webforms", then any webform using this layout may change this number.
                 <p>If a webform overrides the "Maximum number of items", any maximum numbers set for individual drop-down selection
                     fields are <b>not</b> affected.  So if you set such maxima on individual fields, think carefully before checking
                     "Overrideable by webforms".</p>
                 <p>If some values in the "Maximum number of items" selection list are disabled, it it because
                    you have set a larger maximum for one of the options in a drop-down field.</p>

</div>
<div class='d2'>
<H2>  Notes </H2>
                 <p>You may ignore this input, or use it for notes as you like.  It has no effect, but is simply displayed here.</p>
                 <p>The input area normally shows only one line, but may be resized as you like.</p>

</div>
<div class='d2'>
<H2>  All Items </H2>
                 <p>( Since version 1.3.0 ) If this option is checked, the input is displayed only once, at the top of the webform,
                    and the same value is assigned to each item in the webform.</p>
                 <p>This may be useful in cases where a set of images is to be uploaded, and some overall title/option/category is to be
                    given to the set.</p>
                 <p>This option may not be used for image files.</p>

</div>
<div class='d2'>
<H2>  Fields </H2>
                <p>The <b>shortcode</b> "ewz_show_webform" generates a webform.  The form appears as a table with
                     the number of rows equal to the "maximum number of items" set above, and with
                     (normally -- see "Append to Previous Column in Webform" for an exceptional case )
                     a column for each field you create. <br>
                     Each field may be a text input, an image upload, a drop-down selection, a checkbox or
                     a radio button.
                </p>
                <ul>
                   <li> Optionally, other fields may appear above the main table. These are for input that applies to <u>all</u> the items.</li>
                   <li>
                     <p>The <b>order</b> of the fields in the webform may be changed by dragging the "postboxes", which
                     are the long bars containing the field titles, up or down.
                    (To move a postbox to the top you may have to drag the top one down, instead)
                   </li>
                   <li><b>Too many fields, or fields that are too wide</b>, may make a form that is too wide
                    to display on the viewer's monitor.  In that case, the form will display with a
                    scrollbar at the bottom, which is not very user-friendly. <br><br>
                    The width available for the form depends on the Wordpress theme. Some themes make it
                    easy to change the width, others may require some custom coding to do it.<br><br>
                    If your form is too wide, you may wish to compress the layout by using the
                    "Append to Previous Column in Webform" option on some fields.<br><br>
                    When designing your layout, keep testing the view with different window widths and font sizes.
                    If possible, view it on different monitors with different resolutions.<br><br>
                </li>
                <li> If a <b>restriction</b> has been created that forbids a certain combination of field
                    values, fields affected may no longer be deleted, and their type may no longer be changed.
                    If a restriction involves one or more options in a drop-down field, those options
                    may not be deleted, and their values may not be changed.<br><br>
                    Items that may no longer be changed for this reason are outlined in red.
                </li>
               </ul>

<div class='d3'>
<H3>  Column Header for Web Page </H3>
                <p>This will appear as a header for the field column on the page the user sees.</p>
                <p>If you have many fields, you may need to keep the total width of your form in
                    mind when setting this value.</p>

</div>
<div class='d3'>
<H3>  Data Type </H3>
                <p>Each field contains one of the following types of user input:
                    <ol>
                        <li><b>A text input:</b> The user may input any ( single-line ) piece of text,
                            subject only to the length restrictions you set</li>
                        <li><b>An image file:</b> The user will be asked to select a file from their
                            local machine.  You may restrict various image parameters, such a size
                            and dimensions.</li>
                        <li><b>A drop-down option list:</b> You choose the values that appear.
                            The user must select one of these values.
                            Optionally, you may set a maximum on the number of items that may have a
                            particular value selected </li>
                        <li><b>A checkbox:</b>
                            The user may either check the box or leave it blank.
                            <p>Note that "Requiring" a checkbox means requiring it to be checked.
                            In that case, the checkbox may not have a "Maximum number that may be checked", and that item will be disabled.</p>
                            <p>( It may sometimes be more useful to use a drop-down with options "Yes" and "No" instead of a checkbox. )</p>
                        </li>
                        <li><b>A radio button:</b>
                            The user may "check" the button for <b>just one item</b>, no more.
                            Clicking a "checked" button unchecks it.</li>
                        <li><b>A fixed-text label:</b>
                            This is not actually a user input, and you may never have a need for it. <br>
                            If you choose to display it to the user, it will show the same value in every row.<br>
                            It's main purpose is to generate a fixed custom column in the downloaded
                            spreadsheet, without the user having to enter anything. The column will contain, in every row,
                            the text entered for "Label".<br>
                            </li>
                    </ol>
                </p>

                <p>Users may alter the data they enter so long as the webform is open for uploads.
                   Text, Dropdown, Radio and Checkbox data may be changed, but the only way to alter uploaded
                   images is to delete the entire item and re-submit.  <i>Multiple image fields for an item must all be
                   uploaded at the same time.</i></p>

</div>
<div class='d3'>
<H3>  Field Identifier </H3>
                <p>This identifier is used for the header that appears at the top of the column
                    if this field is included in your spreadsheet.
                </p>
                <p>If the field is an image file, you may also (optionally) choose to include it
                    as part of the filename when you download the image.
                </p>
                <p>It must start with a letter and consist only of letters, digits, dashes or
                    underscores - no spaces or special characters. No more than 15 characters.
                    This makes sure that a filename containing it should be accepted by most
                    systems.
                </p>
                <hr />
                <b><i> For users of the ewz_followup shortcode only</i></b>
                <p> The ewz_followup shortcode is designed to give a user an overview of all the items they have  uploaded
                    to a set of webforms, together with one optional additional field ( textbox, checkbox, etc ).<br />
                    <br /><br />
                   There are certain special values for the identifier that will cause a change in EntryWizard's behaviour.
                   <ul>
                     <li> If the identifier has the special value 'followupQ', the field is treated as a
                     "followup" field, which is not displayed by the 'ewz_show_webform' shortcode.
                     It is the <u>only input</u> field shown by the 'ewz_followup' shortcode.</li>
                     <li> If the field contains 'XFQ' as part of it's identifier, the field will <b>not</b> be displayed by
                     the followup shortcode.</li>
                   </ul>
                     There is further information on using the 'ewz_followup' shortcode at the  top of the Webforms page.
                </p>

</div>
<div class='d3'>
<H3>  Spreadsheet Column </H3>
                <p>If you wish the data in this column to appear in the spreadsheet, specify here
                     the column in which it is to appear. If you select 'None', the item will not appear
                     in the spreadsheet at all.
                </p>
                <p>EntryWizard will not allow you to select a column you have already chosen for
                    another field
                </p>

</div>
<div class='d3'>
<H3>  Required </H3>
                <p>Check this box if you wish to insist that the field is filled out by everyone.
                   Leave it unchecked if the field is optional.<br>
                    ( The box is disabled for radiobutton and checkbox fields, since there is only
                      one possible way to fill them out. )
                </p>

</div>
<div class='d3'>
<H3>  Append To Previous Column </H3>
              <p>If your theme does not allow a sufficiently wide page width, a webform ( after clicking "Add, Change or Delete" ) may
              display only with a horizontal scrollbar.</p>
              <p>To avoid this, you may wish to display more than one field in a single table cell.
                 Checking "Append to Previous Column in Webform" will accomplish this.
                 Each field so checked will be displayed in a extra line in the previous column, instead of in a column of its own.</p>
              <p>For the first column, this option is ignored.</p>
              <p>NOTE: the "append" option may <u>not</u> be applied to fields that have "Applies To All Items" checked.</p>

</div>
<div class='d3'>
<H3>  Image Field </H3>
<div class='d4'>
<H4>  Image Dimensions </H4>
                 <p>A user attempting to upload an image with width or height greater than the maxima set here will receive an error message.</p>
                 <p>See also the help items on Maximum image size and Minimum longest dimension</p>

</div>
<div class='d4'>
<H4>  Can Rotate To Fit </H4>
                <p>If this is checked, and you have set a maximum width of 1280 and a maximum
                    height of 1024, an image with height 1280 and width 1024 will also be accepted.
                </p>
                <p>May be useful if the image is to be printed, or displayed on a rotatable monitor.
                </p>

</div>
<div class='d4'>
<H4>  Must Be As Large As Possible </H4>
                <p>If this is checked, images are required to have <u>either</u> a width equal to your maximum allowed width
                   <u>or</u> a height equal to your maximum allowed height.
                </p>
                <p>Note that the checking done here allows for the "margin of error" in your Settings.
                If checking this option, you may wish to set this margin to 1 or 2. We have found some software in use that does not always
                resize an image to the exact width or height requested.
                </p>

</div>
<div class='d4'>
<H4>  Maximum Image Size </H4>
                <p>Your web hosting company also puts three limits on uploaded items:</p>
                    <ol><li>No individual item may be bigger than <?php print $ewzG['maxUploadMb']; ?></li>
                        <li>The total size of the whole upload including all items may not be bigger than
                            <?php print $ewzG['maxTotalMb']; ?></li>
                        <li>The maximum number of items that may be uploaded simultaneously is
                            <?php print $ewzG['maxNumitems']; ?></li>
                    </ol>
                <p>For the technically-minded, these limits are set in <i>php.ini</i>, and more
                    details may be obtained from the php documentation website
                    http://php.net/manual/en/ini.core.php
                </p>

</div>
<div class='d4'>
<H4>  Minimum Longest Dimension </H4>
                <p>The purpose of this setting is to disallow very small images when they could be enlarged within the maximum width and height limitations.</p>
                <p>(An alternative method of doing this would be to check "Image must be as large as possible" and then set the "Pixels of leeway" in your settings to a fairly large value.)</p>
                <p>If not set, this value will default to <?php print EWZ_DEFAULT_MIN_LONGEST; ?></p>

</div>
<div class='d4'>
<H4>  Allowed Image Types </H4>
                <p>Wordpress currently is able to handle only the following image types:
                    <ol><li>.jpg/.jpeg</li>
                        <li>.png</li>
                        <li>.gif</li>
                    </ol>
                </p>
                <p>To aid in identifying files, EntryWizard saves images with filenames derived from the user's
                    original filenames in the following way:
                    <ol><li> All characters except letters, digits, underscores, dashes,
                             and all periods except the last,  are replaced by '_' (or the alternative  you select in your settings).
                             Note that <u>spaces are replaced</u>.
                             This ensures the filename is acceptable on most hosting systems. </li>
                        <li> If the base filename then ends with a digit, another '_' is appended.
                            This makes extra digits added by Wordpress in the case of duplicate
                            filenames more legible. It also ensures that no filename is totally
                            numeric - Wordpress handles files with completely numeric names
                            differently in some cases.</li>
                    </ol>
                </p>

</div>
</div>
<div class='d3'>
<H3>  Drop-Down Selection </H3>
<div class='d4'>
<H4>  Select Options </H4>
                <p>For each option you create, you need to select:
                    <ul><li><b>Label for Web Page:</b> the label that is displayed in the drop-down
                            list the user selects from.<br>
                            If you have many fields, you may need to keep the total width of your
                            form in mind when setting this value.<br>
                            May contain only letters, digits, dashes, underscores</li>
                        <li><b>Value for Spreadsheet:</b> what you see in the corresponding
                            spreadsheet column when the user selects this item.<br>
                            May contain only letters, digits, dashes, underscores<br>
                            (Behind the scenes, this is also the value stored in the database)<br>
                     <i>Hint:</i> When you set the Label, if the Value has not already been set it defaults to that of the Label.
                     If you want different values for Label and Value, try setting the Value first.
                            </li>
                        <li><b>Maximum Number Allowed:</b> If you enter a number N here,
                            no more than N items uploaded by this user may have the matching value.<br>
                            This allows for such rules as "6 images may be submitted, no more than
                            4 may be prints."<br>
                            You cannot set a maximum here that is greater than the "Maximum number
                            of items" set in the "General Information" section. </li>
                    </ul>
                    Use the 'X' button to delete an option.
                </p>
                <p>To create a list of numeric options, like "1,2,3,4,5"  or "5.0, 5.5, 6.0 ...", you may use the "Add Series" button:
                   <ul><li>Start, Step and End must all be numeric</li>
                       <li>Step cannot be zero.  If Step is positive, End must be greater than Start.
                           If Step is negative, End must be less than Start. </li>
                       <li>If any of Start, Step or End contains a decimal point, all values will be shown with the
                           highest number of decimal places in any of the inputs.</li>
                       <li>Stored value will always be the same as Label</li>
                       <li>If the max is set, it will be the same for all options</li>
                   </ul>


</div>
</div>
<div class='d3'>
<H3>  Text Field </H3>
<div class='d4'>
<H4>  Maximum Number of Characters </H4>
                <p>The user will not be able to type more than this many characters in the text box.
                </p>

</div>
<div class='d4'>
<H4>  Maximum Number of Visible Characters </H4>
                <p>For a regular single-line text box, this is the number of characters that will be visible
                   at any one time - ie the width of the text box.
                </p>
                <p>If you need many more characters
                than the width of your form allows, try setting the "Number of Lines" to something
                bigger than 1. That creates a "textarea" instead of a normal text input. In that case,
                this value represents the initial width in characters of the (resizeable) text area.
                </p>
                <p>If you have many fields, you may need to keep the total width of your form in mind
                    when setting this value.
                </p>

</div>
<div class='d4'>
<H4>  Number of Lines </H4>
                <p>A normal html text input is a single line only. Setting this value to something
                greater than 1 creates a "textarea" instead, with the assigned number of rows, and
                number of columns equal to the "Number of Characters Visible in Input". </p>

</div>
<div class='d4'>
<H4>  Formatted Text </H4>
                <p>FOR SINGLE_LINE TEXT INPUTS ONLY, if a column is selected, that column in the spreadsheet
                    will contain this item re-formatted so that each word starts with a capital letter.
                </p>
                <p>Useful for titles used in displays.
                </p>
                <p>( The text is shown unchanged if it already contains both upper and
                    lower-case characters )
                </p>

</div>
</div>
<div class='d3'>
<H3>  Checkbox Field </H3>
<div class='d4'>
<H4>  Maximum Number That May Be Checked </H4>
                <p>The maximum number of items that may have this checkbox checked.
                </p>

</div>
<div class='d4'>
<H4>  Label To Display When Checked </H4>
                <p>When the data is displayed to the user, the default is to
                   display "checked" if the checkbox is checked, and otherwise "-".  You may enter any other text to display instead.
                </p>

</div>
</div>
<div class='d3'>
<H3>  Radiobutton Field </H3>
<div class='d4'>
<H4>  Label To Display When Checked </H4>
                <p>When the data is displayed to the user, the default is to
                   display "checked" if the radio button is checked, and otherwise "-".  You may enter any other text to display instead.
                </p>

</div>
</div>
<div class='d3'>
<H3>  Label Field </H3>
<div class='d4'>
<H4>  Label </H4>
                <p>The value to display for the field.
                </p>

</div>
<div class='d4'>
<H4>  Show Label </H4>
                   <p>Show the label as a fixed text field in the webform.
                      If this is not checked, the field is hidden from the user, but appears in the downloaded spreadsheet
                      if the Spreadsheet Column is set.
                  </p>
                  <p>Hint: to avoid showing a blank table-cell for a field that is hidden from the user, append the field to the previous one. </p>

</div>
</div>
</div>
<div class='d2'>
<H2>  Compressed View </H2>
           <p>If you have a large number of layouts, you may prefer a more
            condensed view when rearranging them, so you can see more at once.</p>
            Selecting this will remove some of the vertical spacing.
           <p> Note: this option is not
            saved, so you will need to re-select every time you open the page.
          </p>

</div>
<div class='d2'>
<H2>  Saving </H2>
                      <p>Add a New Layout creates a new Layout copied from the one you select ( except for any restrictions ), and adds it to
                      the top of the list.
                  You then need to at least give it a name  before saving it.
                  ( Of course, there would be little point in doing this unless you were going to make other changes, too )</p>

</div>
<div class='d2'>
<H2>  Sorting </H2>
               <p>Layouts may be dragged to rearrange them.
                  Clicking "Save Order of Layouts" will save the order, and
                  the new order will subsequently be used for this page, and for the dropdown menus of layouts in the webforms page</p>

</div>
<div class='d2'>
<H2>  Restrictions </H2>
                <p>Normally, any combination of allowed field values is allowed.
                    There may, however, be occasions where you wish to disallow some particular combination.
                </p>
                <p>For instance, you may have a field <i>Type</i> with values <i>Digital</i>,
                    <i>Print</i> or <i>Slide</i>, and a field for an uploaded image <i>File</i>.
                    In this case, you may need to require that a <i>Digital</i> type must have a
                    <i>File</i>, although it may be optional for <i>Print</i> or <i>Slide</i>
                </p>
                <p>To do this, you may create a restriction forbidding the combination
                    <i>Type=Digital</i> and <i>File=Blank</i>, with the message
                    "A Digital type must have an uploaded image file".
                </p>
                <p>If a user clicks "Save Changes" when any item has one of these forbidden combinations,
                    your message will pop up and the upload will not work.
                </p>
                <p><br><b>Set up all your fields and click "Save Changes" first before adding
                        any restrictions</b>.  Once a field has had a restriction placed on it,
                        some items within the field may no longer be edited. These fields are
                        indicated by a red outline. If you need to change them, you must first
                        delete the restriction.
                </p>
                <p>NOTE: restrictions will <b>not</b> be enforced on "followup" fields ( fields with the
                   special identifier "followupQ" ).  For further information about followup fields
                   see the help button at the top of the webforms page.
                </p>

<div class='d3'>
<H3>  Restriction Message </H3>
                <p>If a user attempts to submit a webform with the forbidden combination of
                    field values, the upload will fail and this message will be shown.</p>

</div>
</div>
<div class='d2'>
<H2>  Extra Information </H2>
                <p>In addition to the information entered by members, you may include several
                    other items of information in the spreadsheet that you download.
                </p>
                <p>The source of the data is shown in parentheses.
                     <ul><li><b>"WP User data"</b> is information you control via the Wordpress Users menu.
                          <u>Note that this data is only visible to admins with the right permission</u>.</li>
                      <li><b>"EWZ Item data"</b> is information about an item stored by this plugin but not
                          actually set by the user.<br>
                          "Attached To" contains a record of the page title the image was attached to via the entrywizard interface. If further
                              changes were made via WordPress, they are <b>not</b> reflected here.<br>

                          The "EWZ Item data" may include data uploaded by the administrator via a .csv file
                          ( See the Data Management area on the WebForms page ).<br />
                           <i>NB for version 1.2.21: to make the terminology match that of the new WP gallery editor, the term "excerpt"
                            has been replaced by "caption", and "content" by "description".</i><br />
                          The "WP Item ID" is a numeric identifier created by Wordpress.  You will need this
                          if you wish to upload such a .csv file.
                                     </li>
                     <li><b>"EWZ Webform data"</b> is mainly set by the administrator on the WebForms page.
                          The WP Webform ID is a numeric identifier created by Wordpress.</li>
                     <li><b>"Custom data"</b> is optional. Wordpress stores some information about a
                         user, but there are plugins, like CIMI User Extra Fields or S2Member,  that allow you
                         to add more information.<br>
                         If you have such a plugin, and if it provides a function to access the
                         information, you may tell EntryWizard about it -- see the "ewz-extra.txt"
                         file.</li>
                  </ul>
               </p>

</div>
</div>
<br><hr class='ewzhelpdiv'>
<ul class="ewz_inline">
  <li class="ewzpagelink"><a class="" href="#helplayouts">Permissions</a></li>
  <li class="ewzpagelink"><a class="" href="#helplayouts">Layouts</a></li>
  <li class="ewzpagelink"><a class="" href="#helpwebforms">Webforms</a></li>
  <li class="ewzpagelink"><a class="" href="#helpitemlist">Webform Item List</a></li>
  <?php  do_action( 'ewz_before_help' ); ?>
</ul>
 <a id='helpwebforms' name='helpwebforms'></a>
 <hr class='ewzhelpdiv'>
<div class='d1'>
<H1>  Webforms </H1>
            EntryWizard defines two shortcodes that you may include in a page.<br>
            These shortcodes may be inserted by typing them directly into the page, or by using the EWZ Shortcodes menu in the text editor.
                <hr>
            <p><b><i>1. The ewz_show_webform shortcode</i></b><br><br>
            The shortcode <b>&nbsp; &#91;ewz_show_webform&nbsp;identifier="xxx"&#93;</b> &nbsp; inserts the
               webform with identifier "xxx" into your page.
              You use this page to create the webforms and set their identifiers.</p>
            <p>This is the main shortcode defined by the plugin, and the one normally used.</p>
                <hr>
                <br>
            <b><i>2. The ewz_followup shortcode</i></b>
            <p>It is also possible to display a read-only summary of all the  data uploaded
               by the user, via specified webforms, using the shortcode<br>
               <b>&#91;ewz_followup &nbsp; idents="ident1,ident2,ident3" &nbsp; show="item_data,content"&#93;</b> </p>
            <ul>
              <li>The parameter "idents" lists the identifiers of all webforms to be displayed, separated by commas.</li>
               <li>The parameter "show" lists extra information to be displayed, beyond the fields defined by the layout. <br />
                  The "show" parameter may include any ( or none ) of the following data:
                  <ul><li> "title","caption","description","tag" uploaded using the "extra image data" section of the webform below</li>
                      <li> "item_data" uploaded using the  "extra item data"  section of the webform below</li>
                  </ul>
               </li>
            </ul>
            <p><i>( The motivation for this was the use by some camera clubs of a yearly "Second Chance" competition
                 in which previously uploaded images could be re-submitted for a second chance. )</i></p>

            <p>NB: If all the webforms requiring "followup" use the same layout, you may find that the interface offered by
               the new Ewz-Rating plugin is a little nicer and more flexible.</p>
            <hr>

            <b><i>Special Field Identifiers</i></b>
            <ul>
              <li> If the identifier has the special value 'followupQ', the field is treated as a
              "followup" field, which is not displayed by the 'ewz_show_webform' shortcode.
              It is the <u>only input</u> field shown by the 'ewz_followup' shortcode.
              Data entered in it will be stored and may be downloaded as usual.
              </li>
              <li> If the field contains 'XFQ' as part of it's identifier, the field will <b>not</b> be displayed by
              the followup shortcode.</li>
              <li>A "followupQ" field may not be of "Image File" type.</li>
              <li>Restrictions will not be enforced on "followupQ" fields.</li>
            </ul>
            <hr>

            <b><i>'Hiding' Webforms</i></b>
            <p>If you wish to keep a large number of webforms active, but do not need to be able to edit all of them, you may hide some of them from this page.
               Select the ones you wish to hide, then choose "Hide Selected Webforms" from the "Bulk Actions" list and click "Apply".
            </p>
            <p>You may "unhide" them by selecting them from the drop-down list at the top of this page. (To delete them, you must first unhide them ).</p>
            <p>Hiding and un

<div class='d2'>
<H2>  Auto-Open/Close </H2>
           <p>If any webform has the "Open Automatically" or "Close Automatically" date/times set for future dates, they will be listed here.</p>

</div>
<div class='d2'>
<H2>  Batch Actions </H2>
            <p>If you wish to keep a large number of webforms active, but do not need to be able to edit all of them, you may hide some of them from this page.
               Select the ones you wish to hide, then choose "Hide Selected Webforms"  and click "Apply".
            </p>
            <p>You may "unhide" them by selecting them from the drop-down list at the top of this page. (To delete them, you must first unhide them ).</p>
            <p>When you download spreadsheets or images, .csv or .zip files may be generated in the webform folder
               (inside wp-content/uploads/ewz_img_uploads). They are not needed after your download is complete, and the
               "Cleanup Selected Webform Folders" action deletes any that are more than a minute old.
            </p>

</div>
<div class='d2'>
<H2>  Add, Save Order </H2>
            <p>Add a New Webform creates a new, blank webform, and adds it to the top of the list.
               You then need to give it a title, an identifier and a layout before saving it.</p>
            <p>Webforms may be dragged to rearrange them.
               Clicking "Save Order of Webforms" will save the order, and
               the new order will subsequently be used for this page</p>

</div>
<div class='d2'>
<H2>  Setup </H2>
<div class='d3'>
<H3>  Title </H3>
            <p>The title is displayed at the top of the webform. No two webforms
                may have the same title.</p>

</div>
<div class='d3'>
<H3>  Identifier </H3>
            <p>The  main uses of this identifier are
                <ol>
                   <li> To specify which webform to use in the "ewz_show_webform" shortcode.  If your identifier is
                        "main", then in the page where you wish the webform to appear,
                         type <pre>[ewz_show_webform identifier="main"]</pre>
                   </li>
                   <li> As the name for the folder in which the image files are stored on the server ( within the uploads/ewz_img_uploads folder ).</li>
                   <li> The identifier is also included as part of the filename when  downloading images.</li>
                </ol>
            </p>
            <p>To make it acceptable as part of a filename on most systems, it
                must consist of <b>letters, digits or underscores</b> only,
                and start with a letter.</p>
            <p>It should be kept as short as possible, but no two webforms may
                have the same identifier.</p>

</div>
<div class='d3'>
<H3>  Layout </H3>
            <p>The layouts are created in the Layouts admin page.
                You select one here. It determines what information is required,
                and in what order the items appear in the form.</p>
            <p>If the selected layout allows the webform to override the number of items allowed,
               you will need to save the webform before the "number of items" selection box appears.</p>

</div>
<div class='d3'>
<H3>  Number of Items </H3>
           <p>If the layout allows it, this option overrides the "Maximum number of items" set in the layout.</p>
           <p>It has no effect on any maximum numbers set in the layout for drop-down selection fields.</p>

</div>
<div class='d3'>
<H3>  Prefix </H3>
           <?php /****** NB: this is repeated for each webform below, and needs to be changed there, too ***/ ?>
           <h2>Optional Filename Change</h2>
           <p>Normally, an uploaded image file is stored on the server with a name as close as possible
              ( with just spaces and special characters changed ) to the one given it by the person uploading.
               And the file is normally downloaded by the administrator with the same name as it has on the server.
               If you are happy with that, you do not need to read any further.</p>

           <h2>Adding a Prefix to the Filename</h2>
            <p class="ewz_wnotes">(Applies to all webforms)</p>
           <p>If you wish, <u>you may choose to add a prefix</u> to each of the image file names, or even replace the filename
              with a generated one.</p>
           <ul>
              <li>
              The prefix is normally applied to each file as it is uploaded to the server ( and the new filename
              is displayed to the person uploading ). <br>
              If using the Download buttons on this page takes too long and times out ( which may happen if your webhost limits
              certain resources and you attempt to download too many images ), you may then use ftp to obtain the renamed
              files from the <?php print EWZ_IMG_UPLOAD_DIR ?> folder.
              </li>
              <li>
              If you deselect this option, the prefix is applied only to the files downloaded using the Download Images buttons below.
              Then you do not have the option of downloading the renamed images via FTP.<br>
              Also note that you need to be very careful downloading anything before the webform has been closed for uploads, because
              the user may later change a field that is used in the filename.
              </li>
            </ul>

            <p>
               The prefix may contain only letters, digits, dashes or underscores,  <u>spaces only if it is NOT applied on upload</u>,
               plus the  following expressions, which will be replaced as indicated here:</p>
           <table class="ewz_border">
               <thead><tr><th class="ewz_b">Expression</th><th class="ewz_b">Replacement</th></tr></thead>
               <tbody>
                   <tr><td class="ewz_b">[~RAND] </td>
                       <td class="ewz_b"> A random 3-digit number between 0 and 999 **</td></tr>
                   <tr><td class="ewz_b">[~WFM] </td>
                       <td class="ewz_b"> Identifier for this webform</td></tr>
                   <tr><td class="ewz_b">[~UID] </td>
                       <td class="ewz_b"> Submitter's Wordpress ID Number</td></tr>
                   <tr><td class="ewz_b">[~FLD] </td>
                       <td class="ewz_b"> Wordpress ID of the field the image was uploaded under<br>
                           (only useful if an item may contain more than one image)  </td></tr>
                   <tr><td class="ewz_b">[~1] </td>
                       <td class="ewz_b"> <i>For generated filenames only</i>, a number 1,2,3,... to ensure no two images have the same filename</td></tr>
     <?php
        foreach( Ewz_Custom_Data::$data as $key => $value ) {
            $esc_code = str_replace( 'custom', '~CD', esc_html( $key ) );
     ?>
            <tr><td class='ewz_b'> [<?php print $esc_code; ?>] </td>
                <td class='ewz_b'> <?php print esc_html( $value); ?>  ( Custom data )</td>
            </tr>
     <?php } ?>
              </tbody>
           </table>
           <p><i><b>**</b> If random numbers are used and the prefix is NOT applied on upload, <b>spreadsheet and images must be downloaded together</b> if these numbers are to match in filename and spreadsheet.</p>
           <p><b>More information will be available once this new webform has been saved</b></p>
           <?php /****** NB: this text is also above for new webforms, and needs to be changed there, too ***/ ?>
               <h2>Optional Filename Change</h2>
               <p>Normally, an uploaded image file is stored on the server with a name as close as possible
                  ( with just spaces and special characters changed ) to the one given it by the person uploading.
                   And the file is normally downloaded by the administrator with the same name as it has on the server.
                   If you are happy with that, you do not need to read any further.</p>

               <h2>Adding a Prefix to the Filename</h2>
               <p>If you wish, <u>you may choose to add a prefix</u> to each of the image file names, or even replace the filename
                  with a generated one.</p>
               <ul>
                  <li>
                  The prefix is normally applied to each file as it is uploaded to the server ( and the new filename
                  is displayed to the person uploading ). <br>
                  If using the Download buttons on this page takes too long and times out ( which may happen if your webhost limits
                  certain resources and you attempt to download too many images ), you may then use ftp to obtain the renamed
                  files from the <?php print EWZ_IMG_UPLOAD_DIR ?> folder.
                  </li>
                  <li>
              If you deselect this option, the prefix is applied only to the files downloaded using the Download Images buttons below.
              Then you do not have the option of downloading the renamed images via FTP.<br>
              Also note that you need to be very careful downloading anything before the webform has been closed for uploads, because
              the user may later change a field that is used in the filename.
                  </li>
                </ul>

                <p>
                   The prefix may contain only letters, digits, dashes or underscores,  <u>spaces only if it is NOT applied on upload</u>,
                   plus the  following expressions, which will be replaced as indicated here:</p>
               <table class="ewz_border">
                   <thead><tr><th class="ewz_b">Expression</th><th class="ewz_b">Replacement</th></tr></thead>
                   <tbody>
                   <tr><td class="ewz_b">[~RAND] </td>
                       <td class="ewz_b"> A random 3-digit number between 0 and 999 **</td></tr>
                   <tr><td class="ewz_b">[~WFM] </td>
                       <td class="ewz_b"> Identifier for this webform</td></tr>
                   <tr><td class="ewz_b">[~UID] </td>
                       <td class="ewz_b"> Submitter's Wordpress ID Number</td></tr>
                   <tr><td class="ewz_b">[~FLD] </td>
                       <td class="ewz_b"> Wordpress ID of the field the image was uploaded under<br>
                           (only useful if an item may contain more than one image)  </td></tr>
                   <tr><td class="ewz_b">[~1] </td>
                       <td class="ewz_b"> <i>For generated filenames only</i>, a number 1,2,3,... to ensure no two images have the same filename</td></tr>
     <?php
        foreach( Ewz_Custom_Data::$data as $key => $value ) {
            $esc_code = str_replace( 'custom', '~CD', esc_html( $key ) );
     ?>
            <tr><td class='ewz_b'> [<?php print $esc_code; ?>] </td>
                <td class='ewz_b'> <?php print esc_html($value)?>  ( Custom data )</td>
            </tr>
     <?php } ?>

            <tr><td colspan="2" style="text-align:center; background: #eeeeee; font-style:italic;">Anything below here depends on the layout</td></tr>
               <?php
                    foreach( $webform->field_types as $field_id => $field_type ) {
                       if( $webform->field_idents[ $field_id ] != 'followupQ' ) {
                           $esc_code =  '~'. esc_attr( $webform->field_idents[ $field_id ] ) ;
               ?>
                                   <tr><td class="ewz_b">[<?php print $esc_code; ?>] </td>
                                       <td class="ewz_b"> <?php print esc_html( $webform->field_names[ $field_id ] ) ?>
                                       <b><?php print ( esc_html($field_type) != 'opt' ? '***' : '') ?></b></td>
                                   </tr>
               <?php
                      }
                   }
               ?>
           </tbody></table>
               <p><i><b>**</b> If the prefix is NOT applied on upload, spreadsheet and images <b>must be downloaded together</b> if these random numbers are to match in filename and spreadsheet.<br>
              <p><i><b>*** Only if the prefix is NOT applied on upload</b><br>
                 If the prefix is applied on upload, <b>only option-list fields</b> may be used in this way. This ensures that
                 the resulting filename is legitimate on the server, and not unreasonably long.
                ( What is put into the prefix is the "Value for Spreadsheet", not the "Label for Web Page" ). <br>
                If the prefix is *not* applied on upload, any field may be used. The resulting filename is processed to remove
                or replace any characters ( including spaces ) that are not safe in filenames for most systems.
                <br><br><b>Warning:</b> If you use user-editable data as part of the prefix, and apply the prefix
                    immediately on upload, that data <u>can no longer be changed by the user</u> after the upload.
                </i>

               </p>
               For instance, suppose
                   <ol><li> You set the identifier for this webform
                       as "group1" and enter &nbsp; <b>"2012Jan-[~WFM]-[~UID]-[~Cat]"</b>
                       in the Optional Prefix box above</li>
                   <li> A member with wordpress id number <b>257</b> uploads images</li>
                   <li> One of these images is uploaded with the filename <b>myimage.jpg</b> and with value "P" selected from a drop-down menu with identifier "Cat"</li>
               </ol>
               <p>Then the image will be downloaded with the filename
               &nbsp; <b>"2012Jan-group1-257-P-my_image.jpg".</b>  This may be useful
               if you wish the images to sort or group in a particular way.
               </p>
               <h2>Generating an Entire New Filename</h2>
               <p><u>You may also generate an entire image filename</u>.
                  This will be simply the "prefix" alone, with its special expressions replaced as above.<br>
                  This facility should be used cautiously, because if anything goes wrong it may be more difficult to associate
                  the renamed image with the original. But it may be necessary if a particular filename format is needed.<br><br>
                  If more than one image in the webform has the same value for the prefix, numbers 1,2,3... will be appended to the <u>second and
                  subsequent filenames</u> as required ( this is a Wordpress function, not part of EntryWizard ), but not to the first.
                  You may choose instead to insert '[~1]' into the prefix, and EntryWizard will replace this with a number in <u>every</u>
                  file that makes the filenames unique. </p>

                For instance, suppose
                   <ol><li>You have an option list with identifier "Cat" which may return "value for spreadsheet" of "PD", "ND", "NP" </li>
                       <li>and a custom field "Custom1" containing a membership number</li>
                       <li>You set the options to apply prefix on upload, and generate a filename</li>
                       <li>You set the prefix to "Img[~CD1][~Cat][~1]"</li>
                       <li>A user with membership number 52 uploads two image files both with a "Cat" value of "ND"</li>
                   </ol>
                 <p>  Then the images will be saved on the server as "Img52ND1.jpg" and "Img52ND2.jpg".
                   After uploading, the user will no longer be able to change the "Cat" option, although they may still change any other fields.</p>

                <p><b>Warning:</b> Wordpress does strange things with files whose name consists entirely of digits.  <br>
                  Wordpress also appends a number to the end of duplicate filenames in the upload folder, to distinguish them.
                  Normally, EntryWizard tries to make that more visible by adding an underscore to the end of filenames that end in a digit,
                  but it does  not do this when you elect to generate the entire filename. So it is then your responsibility to make
                  sure that no completely numeric filenames are generated, and that if you generate duplicate filenames, you understand
                  how they are handled.</p>
                 <p><b>Warning:</b> When downloading files with generated names that were not applied on upload, spreadsheet and images
                 should be downloaded together using the  "Download Images and Spreadsheet" button to make sure the generated filenames match.</p>

</div>
<div class='d3'>
<H3>  Open for Uploads </H3>
            <p>When this box is checked, users may upload images using the webform.
                When is it not checked, they see only a "Sorry, not open for upload"
                message (or whatever you assigned in the Settings).</p>
            <p>When the webform is closed, you have the option of opening it
                temporarily for selected members only.
                This may be useful if someone needs to change a submission, or
                is late for an acceptable reason,
                but you do not wish anyone else to be able to upload
            </p>

</div>
<div class='d3'>
<H3>  Show User Selection </H3>
            <p>When the webform is closed, an <b>Administrator</b> has the option of opening it
                temporarily for selected members only.
                This may be useful if someone needs to change a submission, or
                is late for an acceptable reason,
                but you do not wish anyone else to be able to upload.</p>
            <p>Checking this box will open a list of users for you to select. Because the list may be long, and is not always used,
               it is obtained from the server when you click. This means it may be a little slow to load.</p>
            <p>
                Clicking an item in the left-hand box will "select" it -- ie move it to the right-hand box.
                Clicking an item in the right-hand box will "de-select" it -- ie move it back to the left-hand box.
                (If you have a long list of users, try using Ctrl-F to search the list.)</p>
             <p>When you "Save Changes", your selected users will be able to
                upload but others will not.</p>
            <p>Note that to see the user list, you need either wordpress <b>"list_users"</b> capability,
               or 'See User Data' permission via the EntryWizard Permissions page.
            </p>
            <p><i>Opening the webform automatically cancels any existing selection.</i></p>

</div>
<div class='d3'>
<H3>  Close Automatically </H3>
           <p>As of version 1.3.16, a webform may be set to open and/or close automatically at specified date/times.
              ( in the timezone specified by your site settings ).
           </p>
           <p><b>Notes: </b><br>
              <b>1. Date Format and Time Format must be set</b> in your  wordpress Settings.<br>
              <b>2. This feature relies on wp-cron</b>, which is the built-in timing facility for wordpress.<br>
              Some sites modify the way in which wp-cron is run. If your site has done this,
              please note that the webform will be opened <i>the first time wp-cron is run after your set opening time</i>
              and closed <i>the first time wp-cron is run after your set closing time</i>.<br>
              Opening and closing times are stored by wp-cron, not by entrywizard. <br>

              A new button at the top right of this page will pop up a list of all your scheduled open/close events.
              If you make heavy use of the auto-open/close feature, you may wish to install one of the many plugins availble to view or control wp-cron.</p>
           <p>If error logging is turned on (in wp-config.php), the open or close action will be logged when it actually takes place.
           </p>

</div>
</div>
<div class='d2'>
<H2>  Data </H2>
<div class='d3'>
<H3>  Per-Image Upload </H3>
             <p>You may optionally upload a .csv file containing three or four extra items
                 of data to be stored for each <b>image</b>.<br>
             For images you subsequently attach to a page (using the Manage Items link below),
                 the first three items are used for the Title, Caption and Description of
                 the image in a standard Wordpress gallery, and the optional fourth is a tag intended to help
                 in sorting the images within the gallery.
                 They may also be: </p>
                 <ul>
                 <li>included in a downloaded spreadsheet (see Extra Data in the Layout)</li>
                 <li>displayed in a "followup" page (see the Help item at the top of this page )</li>
                 <li>displayed to judges if you are using the EWZ-Rating plugin.</li>
               </ul>
             The following rules apply:
             <ul>

            <li>The file must be in plain text, "comma-delimited" format.<br>
                The easiest way to generate the .csv file is to save a spreadsheet
                in .csv format.  There should be no header line.</li>
            <li>The first column <b>must contain the wordpress item sequence number</b>.
                You may obtain this by including the WP Item ID under Extra Data in the layout and then
                viewing it by clicking "Manage Items" on the webforms page or by downloading the spreadsheet.</li>
            <li>The second column must contain the identifier you assigned to the layout field that contained the image file. It will usually
                have the same value for every line in the file.</li>
            <li>The 3rd, 4th, 5th columns contain, in this order:
                  <br> &nbsp; The title
                  <br> &nbsp; The caption
                  <br> &nbsp; The description
                  <br> &nbsp; The optional 6th column contains the tag.
                <br>for each image you wish to annotate in this way.</li>
            <li>You may use some basic html markup in your text:<br>
            <?php print allowed_tags(); print "&lt;br&gt;"; ?></li>
           </ul>
            <p><b>Note:</b> If you upload a second file containing the same item number, the title, caption and description
               for that item wil be overwritten by the new values.
            </p>
            <p><b>Note:</b> By default, accented characters (and others requiring more than 8 bits) are removed from uploaded .csv files because they have caused problems in the past. If you are confident your software can generate correct .csv files, you may try unchecking the "convert the data to ASCII format" option in the Settings page.
            </p>
            The following examples show lines as they would appear if you opened the csv file in a text editor like wordpad (<u>not</u> excel):
           <p><b>Example 1</b>:  if your layout allows for one image per item, in column 3, and you have assigned
           the identifier "imgfile"  to the image field,<br> the line:
           <br><br><i>700,"imgfile",Antelope,"John Doe: Antelope","Intermediate Runner Up","NatNov"</i><br><br>
               would assign a Title of "Antelope", a Caption of "John Doe: Antelope", a Description of "Intermediate Runner Up"
               and a Tag "NatNov" ( to be used in sorting the items before attaching to a page ).
               for the image of item 700. ( Note that the field identifier "imgfile" would be the same for every item using that layout ).</p>

           <p><b>Example 2</b>:  if your layout allows for two images per item, in columns 1 and 5, and you have assigned
           identifiers 'original' and 'final' to columns 1 and 5,<br> the line:
           <br><br><i>700,original,"Title for image 1","Caption for image 1","Image 1 Description","final","title
               for column 5", "&lt;b&gt;Caption #5&lt;/b&gt;","Description for image in column 5"</i><br><br>
               would create Title, Caption and Description values for the images in columns 1 and 5
               of item 700, with the caption for item 5 in bold.</p>
            ( Since commas are used to separate the columns, any value that actually contains a comma should be surrounded by quotes. If a column contains no comma, quotes may be generated or not, depending on the software you use.)

</div>
<div class='d3'>
<H3>  Per-Item Upload </H3>
             <p>You may also optionally upload a .csv file containing a single extra piece
                of text to be stored for each <b>item</b>. This is referred to as the Added Item Data.
                It may be: </p>
                 <ul>
                 <li>included in a downloaded spreadsheet (see Extra Data in the Layout)</li>
                 <li>displayed in a "followup" page (see the Help item at the top of this page )</li>
                 <li>displayed to judges if you are using the EWZ-Rating plugin.</li>
               </ul>
               The following rules apply:
             <ul>
            <li>The file must be in plain text, "comma-delimited" format.<br>
                The easiest way to generate the .csv file is to save a spreadsheet
                in .csv format. There should be no header line.</li>
            <li>The first column <b>must contain the wordpress item sequence number</b>.
                You may obtain this by including the WP Item ID under Extra Data in
                the layout and then viewing it by clicking "Manage Items" on the webforms page.</li>
            <li>The second column should contain the text you wish to store for the item</li>
            <li>You may use some basic html markup in your text:<br>
            <?php print allowed_tags(); print "&lt;br&gt;"; ?></li>
           </ul>
            <p><b>Note:</b> If you upload a second file containing the same item number, the title, caption and description
               for that item wil be overwritten by the new values.
            </p>
            <p><b>Note:</b> By default, accented characters (and others requiring more than 8 bits) are removed from uploaded .csv files because they have caused problems in the past. If you are confident your software can generate correct .csv files, you may try unchecking the "convert the data to ASCII format" option in the Settings page.
            </p>


</div>
<div class='d3'>
<H3>  Batch Entry Upload </H3>
           <p>The normal way to get items into the entrywizard database is by uploading them using the ewz_show_webform shortcode.
           </p>
           <p>This section provides a way to add any number of items to the entrywizard database if you already have the images, and have the
                required information in a spreadsheet.<br>
                It may be useful if you want to use Ewz-Rating for online judging, without having each user upload individually.</p>
            <p>The disadvantage of doing this is that you do not get all of entrywizard's usual checking of image dimensions and allowed values.
                   You are responsible for providing valid data yourself in the correct columns, although some minimal checking is performed.</p>
           <p><b>Please read the following instructions carefully:</b></p>
           <p><b><u>Images</u></b><br>
              The .jpg images <u>and their thumbnails</u> must be placed in the uploads/ewz_img_uploads/XXX folder, where XXX is the
              identifier of this webform. </p>
              <p>If the image filenames contain any characters other than letters, digits, dashes or underscores, the batch loading process will
              rename them. If any image is renamed, a .csv file containing the original and new names is placed in the webform's uploads folder.</p>
            <p><b><u>Format of Uploaded File</u></b></p>
           <ul>
            <li>The file must be in plain text, "comma-delimited" format.
              ( The easiest way to generate the .csv file is to save a spreadsheet in .csv format ).</li>
              <li>The first (header) row consists of the field identifiers of the fields you wish to populate.</li>
            <li>Subsequent rows are values for those fields, in the same order as they appear in the first row.
               <ul><li>For a checkbox or radio-button field, the value should be "1" if the field is to be checked, and "0" otherwise.</li>
                   <li>For an image field, the value should be the filename of the image ( without any path component ), optionally followed by
                       a colon and the thumbnail filename.  If the thumbnail filename is not specified, it is assumed to be the image filename with
                       '.jpg' replaced by '-thumb.jpg'.</li>
                   <li>An extra column "LoginName" (note the capitalization), may be added, containing a valid wordpress user login.
                       If there is no such column, the item owner is assumed to be the administrator doing the upload.</li>
               </ul>
             </li>
           </ul>

                       <p>Here is an example file as you would see it if you opened it in a text editor like wordpad (<u>not</u> excel):<br><pre>
<b>LoginName,type,category,Title,Filename,ForComment</b>
user150,Print,Assigned,"Batch-Uploaded Image",test123.jpg,1
myname,Digial,Pictorial,"Image Number Two",test345.jpg:test345-120x120.jpg,0
myname,Digital,Assigned,"Image Number Three",test789.jpg:thumb_for_test789.jpg,1
</pre></p>
 <p>The image files test123.jpg, test345.jpg, test789.jpg, together with their thumbnails
     test123-thumb.jpg, test345-120x120.jpg and thumb_for_test789.jpg,
                should be in the correct subdirectory  of uploads/ewz-img-uploads. <br>
                ( ie in uploads/ewz-img-uploads/your-webform-identifier )</br>
 ( Since commas are used to separate the columns, any value that actually contains a comma should be surrounded by quotes. If a column contains no comma, quotes may be generated or not, depending on the software you use.)

            <p><b>Note:</b> By default, accented characters (and others requiring more than 8 bits) are removed from uploaded .csv files because they have caused problems in the past. If you are confident your software can generate correct .csv files, you may try unchecking the "convert the data to ASCII format" option in the Settings page.
            </p>

            <p><b><u>Usage</u></b></p>
               <ul>
                 <li>The batch entry upload does NOT work in the same way as the data uploads above.<br>
                     <b>*Repeating a successful upload will <u>duplicate the items</u> in the EntryWizard database.*</b><br>
                     If something goes wrong, you need to delete the item via the "Manage Items" link below, and make sure the file has
                     been deleted from the server. Then upload a corrected file contain <u>only that item</u>.</li>
                 <li>If you include a "LoginName" column, you may click the "Check Data" radiobutton to request EntryWizard to run some checks
                       on your data before you actually save it. <br>
                       If there are any errors  found ( such as unsatisfied restrictions ), this will be reported. <br>
                       NOTE 1: the checks assume that there are no items for the webform currently on the database for any user in the file
                        -- if there are, an item may fail to save, or save data that does not satisfy count limits, even if it passes the check.<br>
                       NOTE 2: some checks stop at the first error found, so you need to repeat the check process until there are no errors.<br>
                       NOTE 3: most data checks normally performed by EntryWizard on uploaded items will be done, but there is no checking of
                               image size or dimensions.
                      </li>
                <li>If you do not include a "LoginName" column, checking the data is not possible.</li>
                <li>In either case, once you check the "Do Upload" radiobutton, <u>you are responsible for making sure the data is correct</u>.
                    If you run a check first, you will have to re-select the file for upload - make sure to pick the correct file.</li>
                <li>You may need to widen the message window to see the error report properly.</li>
               <li>To make changes after the saving has taken place, you would need to either log in as the relevant user,
                       or delete the item using the admin interface and re-upload it.</li>
               </ul>
           <p>Note that there will be no image size or dimension information available in the spreadsheet or item list display</p>

</div>
<div class='d3'>
<H3>  Discrepancy Report </H3>
            <p>Report on any discrepancies between image filenames stored on the database and files actually on the server.</p>
            <p>The image files themselves ( and their thumbnail files ) are stored in the matching webform folder in the
               ewz_img_uploads uploads folder. All other information about an item is
               stored in the wordpress database, together with the image filenames.  Normally, the uploads folder should contain an
               image and a thumbnail for every image uploaded to the webform.
               Discrepancies may occur:  </p>
                  <ol><li>In rare cases where something fails while a user is uploading, or when an administrator deletes an item.</li>
                      <li>If you used the batch entry uploader, and did not put all the right images in the folder.</li>
                      <li>If you have copied the database, perhaps to a test site, and have not copied all the images.</li>
                      <li>There may sometimes be a small number of .zip or .csv files generated by EntryWizard for downloading.
                          If you like, you can deleted them once they are no longer required.
                          EntryWizard normally deletes old ones when new ones are created.</li>
                  </ol>
               <p>( Extra files in the folder should not do any harm other than using storage space. )</p>

</div>
<div class='d3'>
<H3>  Select Items </H3>
            <p>The data management area for the webform lets you select all its
                items or just some of them.
               A selection list is generated here for each field in the webform's
               layout, except for text and image fields.
             </p>
             <p><i>New in version 1.2.5 for those who created an ewz_extra plugin to allow entrywizard to
                access custom fields: </i> If you have a custom field that <u>may take on only a limited number
                of values</u>,  you may add a new "selection_list" function  to your ewz_extra.php file that
                enables you to select by this field, too.  See ewz_extra.txt file.
             </p>
             <p>
               With the selected images you may do one of several things:</p>
            <ul>
             <li> Download a spreadsheet containing all the uploaded information
                connected to the items
                <br>( <i>The spreadsheet is in .csv (comma-delimited) form, which
                    should open easily in most spreadsheet software.
                 The separator/delimiter is a comma (,), and the text delimiter is a
                    double quote (").</i></li>
            <li>Download the same spreadsheet together with the uploaded image
                files</li>
            <li>Download just the uploaded image files</li>
           <?php if( Ewz_Permission::can_manage_some_webform() ) { ?>
                <li>View the images and the fields that would show in the spreadsheet ( Requires permission to manage the webform ).
                With the image thumbnails visible, you may then inspect data, remove individual items,
                 or attach images to a page or post.</li>
             </ul>
             <p>Note that downloading a large number of images by this method may take more time than some
                webhosting companies allow. In that case, the alternative is to download the images via
                ftp. The images are in a folder whose name is the webform identifier, inside:<br>
                <?php print EWZ_IMG_UPLOAD_DIR ?>.  <br>Unfortunately, if you are using a prefix, you will then have to apply it on upload.</p>
             <p>The alternative would be to select a smaller number of images at a time for download, if necessary adding more
                fields to the layout.</p>
            <?php } ?>

</div>
</div>
</div>
<div class='d1'>
<H1>  Web Forms </H1>
<div class='d2'>
<H2>  Compressed View </H2>
           <p>If you have a large number of web forms, you may prefer a more
            condensed view when rearranging them, so you can see more at once.</p>
            Selecting this will remove some of the vertical spacing.
           <p> Note: this option is not
            saved, so you will need to re-select every time you open the page.
          </p>

</div>
<div class='d2'>
<H2>  Hidden Forms List </H2>
           <p>The listed forms have been hidden from this page using the "Hide Selected Webforms" option in the Bulk Actions dropdown.<br>
            You may unhide forms by selecting them and then clicking "Un-Hide Selected".  The newly visible forms will show close to the top of the list.
          </p>

</div>
</div>
<br><hr class='ewzhelpdiv'>
<ul class="ewz_inline">
  <li class="ewzpagelink"><a class="" href="#helplayouts">Permissions</a></li>
  <li class="ewzpagelink"><a class="" href="#helplayouts">Layouts</a></li>
  <li class="ewzpagelink"><a class="" href="#helpwebforms">Webforms</a></li>
  <li class="ewzpagelink"><a class="" href="#helpitemlist">Webform Item List</a></li>
  <?php  do_action( 'ewz_before_help' ); ?>
</ul>
 <a id='helpitemlist' name='helpitemlist'></a>
 <hr class='ewzhelpdiv'>
<div class='d1'>
<H1>  Item List </H1>
<div class='d2'>
<H2>  Main Options </H2>
<div class='d3'>
<H3>  Destination </H3>
<p>Images that have been "attached" to a page may be displayed on the page in a regular
wordpress gallery, or in other ways depending on what plugins you have.</p>
<p>-------------------------------</p>
<p><b>Important Note:</b> Images attached to pages are copied from the entrywizard uploaded image, and from then on
are no longer accessible from entrywizard.
    The user who originally uploaded the image is assigned as the "author" of the copy</p>
<p>This means that:
<ol><li>If the image is deleted from EntryWizard (by the user or by the admin using this page), the
attached copy remains on the page it was attached to.</li>
<li>If the user who originally uploaded the image is subsequently
deleted from the wordpress installation, you will be asked whether to delete the user's "content" or assign
                        it to another user as "author".  <i>The content referred to would include any such copied images.</i></li>
                    <li>In WordPress 4.9.6 a new "Export Personal Data" facility was introduced. This function lists the
                        exported images as part of the user's personal data, but <b>not</b> their associated title,
    caption or description.</li>
</ol>
<p>-------------------------------</p>

<p>To set up the gallery, include the shortcode <b>"[gallery]"</b> on your page where you wish the
gallery to appear.  If your theme has not overridden the default behaviour, this will display
    in the page thumbnails of all the attached images, which link to larger versions. If you have
    uploaded a .csv file of image data, it's contents will determine the headers and captions of the
               images.</p>
            <p>Your theme determines the format of the gallery.  The "twentyeleven" theme shows a gallery that
            displays the title and caption below the thumbnail, and the title, caption and description on the image
            page it links to.  Some other themes may not display all three  pieces of text with each image.
            Some may display the text only on mouseover. ( If you know how to do it, you can often change the
            look of the gallery by adding css using either a child theme or a css plugin. )</p>

            <p> <i><b>NB:</b> The Wordpress gallery functionality is in the process of changing.
               Currently there are two formats for the shortcode:
           <ul><li>[gallery]  ( with optional parameters like the number of columns ). In this form,
                   the gallery displays all images currently attached to the page. </li>
               <li>[gallery ids="n1, n2, n3 ...."] where n1 n2 etc are the id's of the images to
display. Only the specified images are displayed, and they do not need to be
                                                                  attached to the page.</li>
</ul> EntryWizard currently assumes the first format.</i>

As of wordpress version 3.5, once the gallery content has been changed using the Wordpress
    editor, the shortcode will
    automatically be put in the "list of images" format, and newly attached images will
    not be displayed in the gallery.
    This may be changed by using the "text" tab in the page editor to change the gallery
    shortcode back to the first format.</p>
<p>For documentation about the gallery shortcode, see
  http://codex.wordpress.org/Gallery_Shortcode.</p>
  <p>-------------------------------</p>
  <p>If you wish the gallery to display scores or other image-specific information not
  uploaded by the member, you need first
      to upload a csv file containing this data, using the "Upload extra <u>per-image</u> data" button on
      the "Webforms" page. Make sure that you put the text into the title, caption and/or description
      depending on which your theme actually displays.</p>

</div>
<div class='d3'>
<H3>  Allow Comments </H3>
  <p>If this is checked, anyone with permission to see the destination page will be allowed
  to add comments to the image. </p>
  <p>The default value for this option is set in the EWZ Settings page.</p>

</div>
<div class='d3'>
<H3>  Attached Image Size </H3>
  <p>"Attaching" creates a copy of the image which is added to the Wordpress media.  This
  allows the attached copy to be deleted or modified using the normal wordpress interface,
      without affecting the entrywizard file.</p>
  <p>You may, if you like, choose to make this copy a smaller version of the uploaded image
  instead of the full-size one. In fact, if your theme does not make use of the full uploaded size,
                                                     you will be wasting time and bandwidth if you do not resize to something that fits your theme.</p>
  <p>On the other hand, the resizing does take some time during the attachment process. </p>
  <p>Select "full" to copy the original uploaded image. </p>
  <p>The copy is created in your normal uploads directory, so it will not be deleted if you
  should uninstall entrywizard.  Editing or deleting the copy should have no effect on
      the image stored in EntryWizard.</p>
  <p>The default value for this option is set in the EWZ Settings page.</p>

</div>
<div class='d3'>
<H3>  Image Quality </H3>
  <p>Until version 4.5, Wordpress defaulted to setting a jpeg quality of 90% when resizing
  images. With version 4.5, the default was lowered to 82%. If you find the quality reduction is noticeable,
      ( or if you do not need such a high quality ), you may set the value here.</p>
  <p>Of course, higher image quality means large image files, so pages will be slower
  to download. </p>
  <p>The default value for this option is set in the EWZ Settings page.</p>

</div>
<div class='d3'>
<H3>  Attachment Text </H3>
  <p>When an image is "attached" to a wordpress page, a new individual "attachment page" is created for the image.
  Like all wordpress pages, the attachment page may have three pieces of text associated with it:
      Title, Excerpt and Content. Exactly how and where these are displayed depends on your theme.  </p>
  <p>If the information you wish to display in these fields is already available in the table below, you may set those values here.
  In the text you enter, "[~n]" will be replaced, for each item, by the value in the nth column  below (numbers are in parentheses, empty columns do not appear).</p>
  <p>e.g. If column 3 contains a title for the image, and column 7 contains the photographer's name,
             then
             "[~3] by [~7]" will result in something like "My Beautiful Image by Jane Doe".</p>


</div>
<div class='d3'>
<H3>  Attaching More Than Once </H3>
           <p>If you have a lot of images, it's fairly easy to mistakenly select one that has already been attached.
  EntryWizard will only attach it a second time to the same page if you check this box.</p>
  <p>But attaching creates new copies of the images, and EntryWizard does not keep track of those.  If you
  delete or unattach one of the attachment copies for some reason, and wish to re-attach the image, you would need to
                                                               check this box to override the normal behaviour.</p>

</div>
<div class='d3'>
<H3>  Multiple Images </H3>
  <p>Only images from one column may be attached in one action. If you have more than one image column,
  you need to select one.</p>

</div>
</div>
<div class='d2'>
<H2>  Show on Screen </H2>
  <p>Attaching images to a page requires resizing on the server, which may take some time. You will
  probably need to do only a few at a time to avoid timeout errors.</p>
  <p>Setting this value will make it easier to do a few at a time and keep track of what has been done.</p>
  <p>It may also be useful to set an increased max_execution_time in your .htaccess file.</p>

</div>
<div class='d2'>
<H2>  Bulk Actions </H2>
  <p>The option to "Edit the uploaded data for selected items" was added with version 1.3.14.</p>
  <p>It allows the administrator to edit the data that was entered in the layout fields by the user. </p>
  <p>Use the left-hand check boxes to select the items you wish to edit, select "Edit the uploaded data ..."
  from the  Bulk Actions menu, then click 'Apply'.
      A new page will show only your selected items and their layout fields, in editable form.</p>
  <p>In the new edit page, make your changes, then select "Save changes ...." from the Bulk Actions menu and click "Apply".
  ( After editing, you will be returned to the first page no matter which page you were on before. )</p>
  <p>Please note:</p>
  <ul>
  <li>In the edit view, changes to <b>All</b> editable items will be saved, even if you do not check the left-hand box.
  To back out of a change, either manually revert to the original values, or reload the page without saving. </li>
  <li><b>Restrictions will not be enforced.</b></li>
  </ul>
  <hr>
  <p>The option to "Delete Selected Item Data Only" was added with version 1.2.21 along with the batch entry uploader</p>
  <p>Normally, you would want to delete an item's image file(s) along with its data.
               If using the batch entry uploader, however, it is possible you may not want the image deleted, just the data you uploaded.</p>

</div>
</div>
<br><hr class='ewzhelpdiv'>
<ul class="ewz_inline">
  <li class="ewzpagelink"><a class="" href="#helplayouts">Permissions</a></li>
  <li class="ewzpagelink"><a class="" href="#helplayouts">Layouts</a></li>
  <li class="ewzpagelink"><a class="" href="#helpwebforms">Webforms</a></li>
  <li class="ewzpagelink"><a class="" href="#helpitemlist">Webform Item List</a></li>
  <?php  do_action( 'ewz_before_help' ); ?>
</ul>


<?php do_action( 'ewz_after_help' ); // insert ratings help ?>

</div>  <!-- div class=wrap -->
<br>
<?php } // end ewz_help_menu 

