Simple:Press Documentation

Plugin: Policy Documents

Plugin Description

Plugin: Create and Link to Policy Documents – This Simple:Press plugin displays an optional Forum Registration/Usage policy and/or an optional Forum Privacy policy from links in, by default, the forum footer. The Registration Policy can be displayed to new users as part of the registration process and, if desired, the new users can be forced to accept the policy before they can register.

The Registration Policy text and the Privacy Policy text are not supplied in this Simple:Press plugin. They are to be created or supplied by the forum staff.

Plugin Features

Installing this Simple:Press plugin adds:

  • A new “Policy Documents” section in the “Available Plugins – Install Simple:Press Plugins” panel under the forum Admin menu path Forum > Plugins > Available Plugins. From this panel the Simple:Press “Create and Link to Policy Documents” plugin (optionally referred to as the “Policy Documents” plugin) can be activated, or deleted by the admin.

Activating this plugin provides:

  • A change to the new “Policy Documents” section in the “Available Plugins – Install Simple:Press Plugins” panel under the Admin menu path Forum > Plugins > Available Plugins so the Simple:Press “Policy Documents” plugin can be deactivated, uninstalled, and have it Options set.
    • The Options link goes to the new “Components – Policy Documents” forum Admin panel where the forum Admin sets up the registration and privacy policies.
    • The “Getting Started” link associated with the “Deactivate/Uninstall/Options” selections should be selected to view the pertinent information regarding the plugin.
  • A new “Policy Documents” sub-menu entry under the forum Admin menu Forum > Components > Policy Documents entry also linked to the new “Components – Policy Documents” panel where the forum Admin sets up the registration and privacy policies.
  • A new “Components – Policy Documents” forum Admin panel with “Registration Policy”, “Registration Policy Statement”, and “Privacy Policy Statement’ sections where the forum Admin sets up the registration and privacy policies.
    • A selection allows the Registration Policy to be displayed after the “Register” button is selected to start the registration process.
    • A selection can force a new user to accept the Registration Policy before the registration process can continue.
    • A selection allows using an optional file containing the Registration Policy text or putting it directly into a text input box on the panel.
    • A selection allows using an optional file containing the Privacy Policy text or putting it directly into a text input box on the panel.
    • The “Help” links should be used for assistance in setting up the options.
  • Near the bottom of the footer in forums using the standard supplied Simple:Press themes
    • The policy document icon and a new link to the Registration Policy text available by clicking on the label “Usage Policy”.
      • The Registration Policy text can be displayed as a popup or on a page as determined by the value of the ‘popup’ argument in template tag sp_PolicyDocPolicyLink.
    • The policy document icon and a new link to the Privacy Policy text available by clicking on the label “Privacy Policy”.
      • The Registration Policy text can be displayed as a popup or on a page as determined by the value of the ‘popup’ argument in template tag sp_PolicyDocPrivacyLink.
  • A new “forum-policies” folder for storing Registration Policy Statement and Privacy Policy Statement files if standalone text files are developed for the respective statements. The files can contain html.
    • The default location for the ‘forum-policies’ folder is “…wp-content/sp-resources/forum-policies”.

There are no new permissions added to the permission sets due to this plugin.

Plugin Requirements

Simple:Press version 5.5.7 and above is required.

The Simple:Press plugin must be installed, activated, and its options set before it is operational.

As part of the installation, a “Policy Documents” section is added to the “Available Plugins – Install Simple:Press Plugins” panel under the admin menu Forum > Plugins > Available Plugins. From this panel the “Policy Documents” plugin can be activated, deactivated, uninstalled, deleted, or its options set up using its “Activate/Delete” and “Deactivate/Uninstall/Options” selections.

  • The Options link goes to the new “Components – Policy Documents” forum Admin panel where the options are set up.

The plugin allows the text for either or both the Registration Policy and the Privacy Policy to be contained in optional text files with one policy’s text per file or to be inserted directly into its own text input box on the “Components – Policy Documents” forum Admin panel.

  • If optional text files will contain the policy text:
    • Only one policy per file.
    • The files must be plain text files.
    • The file name for the file:
      • must have a “.txt” extension.
      • must not contain “spaces”.
      • should indicate the policy it contains
    • HTML formatting may be used in the files.
    • The files must reside in the ‘forum-policies’ folder set up when this plugin is activated.

There are no new permissions added to the permission sets due to this plugin.

The plugin has five (5) template tags two (2) of which, ‘sp_PolicyDocPolicyLink’ and ‘sp_PolicyDocPrivacyLink’ are incorporated into supplied Simple:Press themes.

  • If the locations of the two (2) template tags in the themes as well as the argument and parameter values for the template tags are acceptable, nothing need be done.
  • If any item relating to the two (2) template tags is to be modified or if any of the other three (3) template tags might be added to themes, it is recommended that a Child or Custom theme is created first to accept the changes prior to installing this plugin.
  • In all cases the two (2) template tags and any of the other three (3) that might be be added to themes should be called conditionally, if (function_exists(‘ ‘)) so that if the “Create and Link to Policy Documents” plugin is deactivated or does not exist, the website will continue to operate.

Plugin Installation and Activation

Please see Using Plugins on how to obtain and install the Simple:Press Create and Link to Policy Documents plugin.

As mentioned there the default location for Simple:Press plugin folders is …/wp-content/sp-resources/forum-plugins. If this path is changed, it is important to note that the plugin’s folder and its content need to reside in the forum plugins folder wherever it has been moved and however it has been renamed. See Storage Locations for more information.

Activation is accomplished from the Admin Dashboard panel menu by selecting Forum > Plugins > Available Plugins from the drop down forum Admin menu. On the “Available Plugins – Install Simple:Press Plugins” panel select the “Policy Documents” plugin and click on “Activate”. The “Activate/Delete” label changes to “Deactivate/Uninstall/Options” with a “Get Started” Link.

  • The “Getting Started” link associated with the “Deactivate/Uninstall/Option” selections should be selected to view the pertinent information regarding the plugin.

To deactivate the plugin, click on “Deactivate”. The “Deactivate/Uninstall/Options” label changes to “Activate/Delete”.

Plugin Administrative Options

If optional plain text files are to be used to contain the Registration Policy text or the Privacy Policy text, those text files must have certain characteristics.

  • Optional Registration Policy File and optional Privacy Policy File Characteristics
    • Only one policy per file.
    • The files must be plain text files.
    • The file name for the file:
      • must have a “.txt” extension.
      • must not contain “spaces”.
      • should indicate the policy it contains
    • HTML formatting may be used in the files.
    • The files must reside in the ‘forum-policies’ folder set up when this plugin is activated.

After activate, if optional plain text files are to be used to contain the Registration Policy text or the Privacy Policy text, those text files must be placed in the new ‘forum-policies’ folder set up when this plugin was activated.

  • Placing the optional Registration Policy file and/or optional Privacy Policy file
    • Find the ‘forum-policies’ folder set up when this plugin was activated.
      • The location of the ‘forum-policies’ folder is identified by the “Forum policy documents folder” entry on the “Integration – Storage Locations” panel viewed from the forum Admin menu at Forum > Integration > Storage Locations.
      • The location of the ‘forum-policies’ folder is also identified preceded by the phrase “Based on your storage location settings, policy text files must be located at: …” just above the “Update” button at the very bottom of the “Components – Policy Documents” panel viewed from the forum Admin menu at Forum > Components > Policy Documents.
      • The default location for the ‘forum-policies’ folder is “…wp-content/sp-resources/forum-policies”.
    • If an optional Registration Policy plain text file is to be used, transfer the file to the ‘forum-policies’ folder and record its file name for use later.
    • If an optional Privacy Policy plain text file is to be used, transfer the file to the ‘forum-policies’ folder and record its file name for use later.

After activation, a) on the aforementioned “Available Plugins – Install Simple:Press Plugins” panel, click “Options” on the “Policy Documents” plugin section or b) under the “Components” entry on the forum menu on the left side forum admin page click the “Policy Documents” sub-menu item to get the “Components – Policy Documents” panel to set up the plugin’s option.

    • Setting Up Registration Policy Section Options

There are two (2) selections to make in this section.

      • Show registration policy on registration form

When activated, this option displays the site’s registration policy text after the “Register” button has been selected and before the registration form appears.

        • To select this feature, click on the check box to the left of “Show registration policy on registration form” if it does not already contain a green check mark. If the check box already contains a green check mark, this action is not required.
          • A green check mark is added to the check box to show the feature is selected.
        • Scroll to the bottom of the page to click the “Update” button if there are no other options to set on the panel. Otherwise, wait to click the button until the other desired options have been set.
      • Force Policy Acceptance on Registration (checkbox)

When activated, this option forces the new forum user to accept the site Registration/Usage Policy by clicking on a check-box before registration is allowed to continue.

Note: The “Show registration policy on registration form” option must be selected by the forum Admin in order for the forced acceptance feature of this option to be in effect. Otherwise, clicking the “Register” button goes directly to the registration form.

      • To select this feature, click on the check box to the left of “Force policy acceptance on registration (checkbox)” if it does not already contain a green check mark. If the check box already contains a green check mark, this action is not required.
        • A green check mark is added to the check box to show the feature is selected.
      • Scroll to the bottom of the page to click the “Update” button if there are no other options to set on the panel. Otherwise, wait to click the button until the other desired options have been set.
    • Setting Up Registration Policy Statement Section Options

This section is used to determine where the template tag goes to find the Registration Policy text to be displayed. The Registration Policy text can be contained in an optional plain text file or can be inserted directly into the text input box in this section.

      • NOTE: At the bottom of the entire panel just above the “Update” button, the location policy text files must be located is shown preceded by the message, “Based on your storage location settings, policy test files must be located at:”.

 

      • Optional Registration Policy Text File Name or Direct Text Input
        • If an optional text file containing the Registration Policy text is being used, enter the document’s file name in the text input box to the right of “Optional policy text file name:”. No path is required.
          • If an optional text file is not being used, leave the text input box blank (empty).
        • If an optional text file containing the Registration Policy text is not being used, enter the Registration Policy text directly into the text input box below “Policy Statement:”.
        • Scroll to the bottom of the page to click the “Update” button if there are no other options to set on the panel. Otherwise, wait to click the button until the other desired options have been set.

 

    • Setting Up Privacy Policy Statement Section Options

This section is used to determine where the template tag goes to find the Privacy Policy text to be displayed. The Privacy Policy text can be contained in an optional plain text file or can be inserted directly into the text input box in this section.

      • NOTE: At the bottom of the entire panel just above the “Update” button, the location policy text files must be located is shown preceded by the message, “Based on your storage location settings, policy test files must be located at:”.

 

    • Optional Privacy Policy Text File Name or Direct Text Input
      • If an optional text file containing the Privacy Policy text is being used, enter the document’s file name in the text input box to the right of “Optional policy text file name:”. No path is required.
        • If an optional text file is not being used, leave the text input box blank (empty).
      • If an optional text file containing the Privacy Policy text is not being used, enter the Privacy Policy text directly into the text input box below “Policy Statement:”.
      • Scroll to the bottom of the page to click the “Update” button if there are no other options to set on the panel. Otherwise, wait to click the button until the other desired options have been set.

Plugin Language Translation

Three types of language translations files can exist for translating forum message strings from English to other languages and then displaying the translation. Parts of the forum may not have translation files.

    • Simple:Press Language files for translating core forum message strings

If translations are available “Admin” and “Front End” sections have their own files each with possibly multiple pages.

    • Simple:Press Plugin Language Files for translating forum plugin message strings

Each plugin has its own files each with possibly multiple pages if translations are available.

    • Simple:Press Theme Language Files for translating forum theme message strings

Each theme has its own files each with possibly multiple pages if translations are available.

Translation files of a given type are to reside in a unique forum folder location as defined on the “Integration – Storage Locations” forum Admin panel available through the forum Admin menu at Forum > Integration > Storage Locations.

  • Forum core translation files are to reside at the location indicated by the “Simple:Press Language Files” entry.
    • The default location for forum core translation files is the folder “…/wp-content/sp-resources/forum-language/simple-press”.
  • Forum Plugin translation files are to reside at the location indicated by the “Simple:Press Plugin Language Files” entry.
    • The default location for forum plugin translation files is the folder “…/wp-content/sp-resources/forum-language/sp-plugins”.
  • Forum Theme translation files are to reside at the location indicated by the “Simple:Press Theme Language Files” entry.
    • The default location for forum core translation files is the folder “…/wp-content/sp-resources/forum-language/sp-themes”.

Information regarding downloading language files, “mo’ language file placement, and translation (language localization) is found at Localization.

More information is available regarding translation files at Simple:Press Translations. On the base page, select the “Getting Started Guide” link for basics about it’s use. On that page, select the “register a username here” link to obtain a password to the site. Use the “Contact Form” link to request the desired language if it is not currently available. The “Contact Form” link may also be used to volunteer to be a validator for a translation project.

The Policy Documents plugin’s available language translation files with translation statistics, and message translations can be viewed at Policy Documents Translations.

  • Finding and Storing the Simple:Press Plugin Language Translation ‘mo’ files
    • Find the Simple:Press Plugin Language Files folder where plugin translation files are to be stored.
      • Note: Do not confuse the forum-language folders. There are three (3) different ones as discussed above.
      • The location of the Simple:Press Plugin Language File folder is identified by the “Simple:Press Plugin Language Files” entry on the “Integration – Storage Locations” panel viewed from the forum Admin menu at Forum > Integration > Storage Locations.
        • The default location for Simple:Press plugin language files is …/wp-content/sp-resources/forum-language/sp-plugins.
          • If this path is changed, it is important to note that the plugin’s language file needs to reside in the language sub-folder for sp plugins wherever it has been moved and however it has been renamed.
          • See Storage Locations for more information.
    • Go to the plugin translation files at Policy Documents Translations.
    • Select the Version link to see the languages available.
    • Select the link for the desired language to see forum messages and their available translations.
    • If available, export the file for the selected language to the forum language plugin sub-folder as a “mo” file using the export link at the bottom of the page displaying the actual message translations for the language selected.

Plugin Usage

Forum Admins use this plugin to set up the Registration/Usage Policy and the Privacy Policy documents and displays.

New forum Users can register with the process for registering varying depending on the options selected by the forum Admin.

  • Registering if Registration Policy options were not selected
    • If the forum Admin has not selected the “Show registration policy on registration form” option on the “Components – Policy Documents” forum Admin panel:
    • On the forum page, click the “Register” button in the header to go directly to the registration form for registering.
    • Registering if Registration Policy options were selected
      • Note: To terminate the registration process after it has been started and return to the forum without registering, click on the “RETURN TO FORUM” button.

 

    • If the forum Admin has selected the “Show registration policy on registration form” option on the “Components – Policy Documents” forum Admin panel:
    • On the forum page, click the “Register” button in the header to have the Registration Policy displayed.
    • After reading the Registration Policy:
      • if a check box and “Accept policy to register” are not displayed below the Registration Policy text, the forum Admin did not select the “Force policy acceptance on registration (checkbox) option so:
        • click on the “REGISTER” button to continue to the registration form page.
      • if a check box and “Accept policy to register” are displayed below the Registration Policy text, the forum Admin did select the “Force policy acceptance on registration (checkbox) option so:
        • click on the check box to accept the policy and continue with the registration process.
          • a green check mark appears in the check box indicating the policy has been accepted.
        • the grayed out “REGISTER” button below the check box darkens indicating it can now be selected.
        • click on the “REGISTER” button to continue to the registration form page.

Forum Users can view the Registration / Usage Policy or the Privacy Policy via links in the forum page footer ‘about’ section of standard supplied Simple:Press themes.

  • Viewing the Registration / Usage Policy in Forum Footer
    • On the forum page, scroll down to the footer
    • In the footer, click on the “Usage Policy” button to see the Registration (Usage) Policy text displayed either on a popup or on a separate page.
    • After reading the Registration Policy, return to the forum page by:
      • If the policy was shown in a popup window, close the window by clicking on the “X” in the upper right corner of the popup.
      • If the policy was shown on a page, click the browser back arrow near the top of the page.
  • Viewing the Privacy Policy in Forum Footer
    • On the forum page, scroll down to the footer
    • In the footer, click on the “Privacy Policy” button to see the Privacy Policy text displayed either on a popup or on a separate page.
    • After reading the Privacy Policy, return to the forum page by:
      • If the policy was shown in a popup window, close the window by clicking on the “X” in the upper right corner of the popup.
      • If the policy was shown on a page, click the browser back arrow near the top of the page.

Plugin Special Notes

None

 

Template Tags Used in the Plugin

There are five (5) template tags available for this plugin that allow further customization of the plugin’s usage or otherwise customize the website. Two (2) tags, ‘sp_PolicyDocPolicyLink’ and ‘sp_PolicyDocPrivacyLink’ are incorporated into all the standard supplied Simple:Press themes. The other three (3) are used within the plugin.

  • If the default locations in the themes as well as the arguments and parameter values for the two (2) template tags are acceptable, nothing need be done.
  • If any of these items relating to the two (2) template tags is to be modified or if any of the other three (3) template tags might be added to themes, it is recommended that a Child or Custom theme is created first to accept the changes prior to installing this plugin.
  • In all cases the two (2) template tags and any of the other three (3) that might be be added to themes should be called conditionally, if (function_exists(‘ ‘)) so that if the “Create and Link to Policy Documents” plugin is deactivated or does not exist, the website will continue to operate.

The Template Tag can be viewed by selecting its link below.

Action and Hooks Used in the Plugin

There are Actions and Hooks available in the Plugin’s Template Tags. The Template Tag’s Action and Hooks can be viewed by selecting its link below.

There are no other Actions and Hooks available for this plugin.

Plugin and Template Tag Changelog

Since Simple:Press version 5.0.

Codex page sync’d to code version 5.5.5 and plugin version 1.3.9.



Individual Template Tags


 

sp_PolicyDocPolicyLink

Description

sp_PolicyDocPolicyLink() – This template displays an icon and creates a link to the Registration Policy popup or standalone page.

Usage

sp_PolicyDocPolicyLink($args=”, $label=”, $tooltip=”);

Arguments

$args – List of arguments for controlling display.
Type:
(string) (optional)
Default:
‘tagId’ => ‘spPolicyDoc’
‘tagClass’ => ‘spPolicyDoc’
‘icon’ => ‘sp_PolicyDoc.png’
‘iconClass’ => ‘spIcon’
‘linkClass’ => ‘spLink’
‘popup’ => 1

‘tagId’: CSS ID for the Div.
‘tagClass’: CSS Class for the Div.
‘icon’: Filename of the file to display for the icon.
‘iconClass’: CSS Class for the icon.
‘linkClass’: CSS Class for the link.
‘popup’: Flag to indicate whether to show the Registration Policy text in a popup or on a standalone page. A one (1) will show the Registration Policy in a popup window. A zero (0) will show the Registration Policy on a standalone page.

$label – Text shown as the label of the icon.
Type:
(string) (optional)
Default:
None

$toolTip – Text displayed when the cursor hovers over the icon.
Type:
(string) (optional)
Default:
None

Special Notes

In standard supplied Simple:Press themes this template tag is included in the footer (‘spFoot.php’) file.
The exception is:

  • the reboot theme where the template tag is not included in the ‘spFoot.php’ file, but is included in the ‘spFootDesktop.php’ and ‘spFootMobile.php’ files.

The function is called conditionally, if (function_exists(‘ ‘)), so that if the “Policy Document” plugin is deactivated or does not exist, the website will continue to operate.

If the template tag is to be modified, it is suggested a Custom or Child theme be made to accept the modified template tag. Please see discussion at Template Tags Used in the Plugin.

This template tag function requires the usage of the ‘sp-policy-doc-policy-link-tag.php’ file located in the plugin’s template-tag folder.

Examples

1. In the footer of the Simple:Press Default theme page conditionally display an icon and the link to the Registration Policy on a popup page using the default arguments with the label “Usage Policy” and “View site usage policy” shown when the cursor hovers over the button. In the Default theme the following template tag is placed in the ‘spFoot.php’ file:

if (function_exists('sp_PolicyDocPolicyLink')) sp_PolicyDocPolicyLink('', __sp('Usage Policy'), __sp('View site usage policy'));

2. In the footer of a theme page conditionally display an icon and the link to the Registration Policy on a standalone page with the label “Usage Policy” and “View site usage policy” shown when the cursor hovers over the button.

Because the ‘popup’ argument value is being changed from that in the standard supplied theme, it is suggested a Child Theme be developed to accept the modified template tag. For this example, the Default theme’s Child Theme Framework would be downloaded in the ‘forum-theme’ folder and set up. The Default theme’s ‘spFoot.php’ file should be copied over to the corresponding folder in the Child Theme Framework. Modify the Child Theme’s ‘spFoot.php’ file’s standard ‘sp_PolicyDocPolicyLink’ call to be:

if (function_exists('sp_PolicyDocPolicyLink')) sp_PolicyDocPolicyLink('popup=0', __sp('Usage Policy'), __sp('View site usage policy'));

 

Actions and Hooks Used in the sp_PolicyDocPolicyLink Template Tag

  • apply_filters(‘sph_PolicyDoc_args’, $a) – Allows modification of the arguments to the template tag. $a contains the parsed arguments.
  • apply_filters(‘sph_PolicyDoc’, $out) – Allows modification of the display code just prior to being output/returned. $out will contain the html display code.

Changelog

See Plugin and Template Tag Changelog for Template Tag changes and Codex page syncing to code versions.


 

sp_PolicyDocPrivacyLink

Description

sp_PolicyDocPrivacyLink() – This template displays an icon and creates a link to the Privacy Policy popup or standalone page.

Usage

sp_PolicyDocPrivacyLink($args=”, $label=”, $tooltip=”);

Arguments

$args – List of arguments for controlling display.
Type:
(string) (optional)
Default:
‘tagId’ => ‘spPrivacyDoc’
‘tagClass’ => ‘spPrivacyDoc’
‘icon’ => ‘sp_PolicyDoc.png’
‘iconClass’ => ‘spIcon’
‘linkClass’ => ‘spLink’
‘popup’ => 1

‘tagId’: CSS ID for the Div.
‘tagClass’: CSS Class for the Div.
‘icon’: Filename of the file to display for the icon.
‘iconClass’: CSS Class for the icon.
‘linkClass’: CSS Class for the link.
‘popup’: Flag to indicate whether to show the Privacy Policy text in a popup or on a standalone page. A one (1) will show the Privacy Policy in a popup window. A zero (0) will show the Privacy Policy on a standalone page.

$label – Text shown as the label of the icon.
Type:
(string) (optional)
Default:
None

$toolTip – Text displayed when the cursor hovers over the icon.
Type:
(string) (optional)
Default:
None

Special Notes

In standard supplied Simple:Press themes this template tag is included in the footer (‘spFoot.php’) file.
The exception is:

  • the reboot theme where the template tag is not included in the ‘spFoot.php’ file, but is included in the ‘spFootDesktop.php’ and ‘spFootMobile.php’ files.

The function is called conditionally, if (function_exists(‘ ‘)), so that if the “Policy Document” plugin is deactivated or does not exist, the website will continue to operate.

If the template tag is to be modified, it is suggested a Custom or Child theme be made to accept the modified template tag. Please see discussion at Template Tags Used in the Plugin.

This template tag function requires the usage of the ‘sp-policy-doc-privacy-link-tag.php’ file located in the plugin’s template-tag folder.

Examples

1. In the footer of the Simple:Press Default theme page conditionally display an icon and the link to the Privacy Policy on a popup page using the default arguments with the label “Privacy Policy” and “View site privacy policy” shown when the cursor hovers over the icon. In the Default theme the following template tag is placed in the ‘spFoot.php’ file:

if (function_exists('sp_PolicyDocPrivacyLink')) sp_PolicyDocPrivacyLink('', __sp('Privacy Policy'), __sp('View site privacy policy'));

2. In the footer of a theme page conditionally display an icon and the link to the Privacy Policy on a standalone page with the label “Privacy Policy” and “View site privacy policy” shown when the cursor hovers over the button. Show the Registration Policy text on a regular page, not a popup.

Because the ‘popup’ argument value is being changed from that in the standard supplied theme, it is suggested a Child Theme be developed to accept the modified template tag. For this example, the Default theme’s Child Theme Framework would be downloaded in the ‘forum-theme’ folder and set up. The Default theme’s ‘spFoot.php’ file should be copied over to the corresponding folder in the Child Theme Framework. Modify the Child Theme’s ‘spFoot.php’ file’s standard ‘sp_PolicyDocPrivacyLink’ call to be:

if (function_exists('sp_PolicyDocPrivacyLink')) sp_PolicyDocPrivacyLink('popup=0', __sp('Privacy Policy'), __sp('View site privacy policy'));

 

Actions and Hooks Used in the sp_PolicyDocPrivacyLink Template Tag

  • apply_filters(‘sph_PolicyDoc_args’, $a) – Allows modification of the arguments to the template tag. $a contains the parsed arguments.
  • apply_filters(‘sph_PolicyDoc’, $out) – Allows modification of the display code just prior to being output/returned. $out will contain the html display code.

Changelog

See Plugin and Template Tag Changelog for Template Tag changes and Codex page syncing to code versions.


 

sp_PolicyDocPrivacyShow

Description

sp_PolicyDocPrivacyShow() – This template tag displays a label and the Privacy Policy text.

Usage

sp_PolicyDocPrivacyShow($args=”, $label=”);

Arguments

$args – List of arguments for controlling display.
Type:
(string) (optional)
Default:
‘tagId’ => ‘spPolicyDocPrivacy’
‘tagClass’ => ‘spPolicyDocPrivacy’

‘tagId’: CSS ID for the Div.
‘tagClass’: CSS Class for the Div.

$label – Text shown as the label for the Privacy Policy.
Type:
(string) (optional)
Default:
None

Special Notes

This template tag is not contained in any of the standard supplied Simple:Press themes. It is contained in the ‘spPrivacyDocView.php’ file that sets up a page to display the Privacy Policy as a standalone page. ‘spPrivacyDocView.php’ is in the ‘template-files’ folder of the “Policy Documents” plugin.

This template tag requires the usage of the ‘sp-policy-doc-show-privacy-tag.php’ file located in the plugin’s template-tag folder.

Examples

Display the Privacy Policy text preceding it on the page with the title “Privacy Policy”.

sp_PolicyDocPrivacyShow('', __('Privacy Policy', 'sp-policy'));

 

Actions and Hooks Used in the sp_PolicyDocPrivacyShow Template Tag

  • apply_filters(‘sph_PolicyDocPrivacy_args’, $a) – Allows modification of the arguments to the template tag. $a contains the parsed arguments.
  • apply_filters(‘sph_PolicyDocPrivacy’, $out) – Allows modification of the display code just prior to being output/returned. $out will contain the html display code.

Changelog

See Plugin and Template Tag Changelog for Template Tag changes and Codex page syncing to code versions.


 

sp_PolicyDocRegisterShow

Description

sp_PolicyDocRegisterShow() – This template tag displays a label and the Registration Policy text.

Usage

sp_PolicyDocRegisterShow($args=”, $label=”);

Arguments

$args – List of arguments for controlling display.
Type:
(string) (optional)
Default:
‘tagId’ => ‘spPolicyDocRegister’
‘tagClass’ => ‘spPolicyDocRegister’

‘tagId’: CSS ID for the Div.
‘tagClass’: CSS Class for the Div.

$label – Text shown as the label for the Registration Policy.
Type:
(string) (optional)
Default:
None

Special Notes

This template tag is not contained in any of the standard supplied Simple:Press themes. It is contained in the ‘spRegisterDocView.php’ file that sets up a page to display the Registration Policy (Usage Policy) as a standalone page. ‘spRegisterDocView.php’ is in the ‘template-files’ folder of the “Policy Documents” plugin.

This template tag requires the usage of the ‘sp-policy-doc-show-register-tag.php’ file located in the plugin’s template-tag folder.

Examples

Display the Privacy Policy text preceding it with the title “Privacy Policy”.

sp_PolicyDocRegisterShow('', __('Registration Policy', 'sp-policy'));

 

Actions and Hooks Used in the sp_PolicyDocRegisterShow Template Tag

  • apply_filters(‘sph_PolicyDocRegister_args’, $a) – Allows modification of the arguments to the template tag. $a contains the parsed arguments.
  • apply_filters(‘sph_PolicyDocRegister’, $out, $a) – Allows modification of the display code just prior to being output/returned. $out will contain the html display code.

Changelog

See Plugin and Template Tag Changelog for Template Tag changes and Codex page syncing to code versions.


 

sp_PolicyDocShow

Description

sp_PolicyDocShow() – This template tag sets up the inline site Registration Policy content that can be displayed during the new user registration process.

Usage

sp_PolicyDocShow($args=”, $headerLabel=”, $acceptLabel=”);

Arguments

$args – List of arguments for controlling display.
Type:
(string) (optional)
Defaults:
‘tagId’ => ‘spPolicyDocReg’
‘tagClass’ => ‘PolicyDocReg’

‘tagId’: Id for the Div.
‘tagClass’: CSS Class for the Div.

$headerLabel – Text displayed as the title above the Registration Policy text.
Type:
(string) (optional)
Default:
None

$acceptLabel – Text displayed adjacent to the acceptance check box on the page.
Type:
(string) (optional)
Default:
None

Special Notes

The results of this template tag are displayed if the forum admin selected the “Show registration policy on registration form” option on the “Components – Policy Documents” forum Admin panel.

This template tag is not contained in any of the standard supplied Simple:Press themes. It is contained in the ‘spPolicyDocView.php’ file that sets up a page to display the Registration Policy (Usage Policy) as part of the new user registration process. ‘spPolicyDocView.php’ is in the ‘template-files’ folder of the “Policy Documents” plugin.

This template tag requires the usage of the ‘sp-policy-doc-show-tag.php’ file located in the plugin’s template-tag folder.

Examples

Display the Registration Policy text preceded on the page with the title “Registration Policy” and followed by a check box with “Accept policy to register” adjacent to it.

sp_PolicyDocShow('', __('Registration policy', 'sp-policy'), __('Accept policy to register', 'sp-policy'));

 

Actions and Hooks Used in the sp_PolicyDocShow Template Tag

  • apply_filters(‘sph_PolicyDocReg_args’, $a) – Allows modification of the arguments to the template tag. $a contains the parsed arguments.
  • apply_filters(‘sph_PolicyDocReg’, $out, $a) – Allows modification of the display code just prior to being output/returned. $out will contain the html display code.

Changelog

See Plugin and Template Tag Changelog for Template Tag changes and Codex page syncing to code versions.


More Topics In SimplePress: Plugins


Copyright © 2006-2019 Simple:Press. All Rights Reserved.