Simple:Press Documentation

Theme Page Structure

In a Theme’s Structure the ‘template’ folder contains the template files which determine the content of the various theme pages.
More information on Theme Structure can be found on the Theme Structure documentation page.
More information on template files can be found on the About Template Files documentation page.

Note: If ANY changes are being considered to template files making up the pages in the standard supplied Simple:Press themes, it is recommended a Child Theme be developed to contain minor changes. A Custom theme is recommended if more extensive changes are being considered.

Theme Page Sections

Simple:Press standard supplied theme template pages (‘spGroupView.php’, ‘spForumView.php’, etc.) generally have the same structure being divided into ‘head’, ‘body’, and ‘foot’ sections. The sections of theme pages are identified by section start and section end functions with the content of the section defined between these functions. A top level example of a typical page is:

sp_SectionStart('tagClass=spHeadContainer', 'head');
      • #Content of the Header section is between the ‘sp_SectionStart()’ and “sp_SectionEnd()’.

 

      • #Generally it consists of a call to another file which itself containing a series of sections each started by ‘sp_SectionStart()’ and ended by ‘sp_SectionEnd()’.
sp_SectionEnd('', 'head');

 

sp_SectionStart('tagClass=spBodyContainer', 'body');
      • #Content of the Body section is between the ‘sp_SectionStart()’ and “sp_SectionEnd()’.

 

      • #Generally it consists of a series of sections (sometimes containing other sections) each started by ‘sp_SectionStart()’ and ended by ‘sp_SectionEnd()’.
sp_SectionEnd('', 'body');

 

sp_SectionStart('tagClass=spFootContainer', 'foot');
      • #Content of the Footer section is between the ‘sp_SectionStart()’ and “sp_SectionEnd()’.

 

      • #Generally it consists of a call to another file which itself containing a series of sections each started by ‘sp_SectionStart’ and ended by ‘sp_SectionEnd’.
sp_SectionEnd('', 'foot');

Theme Page Section Content

The current Default theme’s ‘spGroupView.php’ file will be used in this example of content for theme page section content. Content can vary from page to page and theme to theme.

    • Head Section – the forum content that is displayed at the top of each full forum page. In most pages of a theme this content is the same. ‘spHead.php’, ‘spHeadDesktop.php’, or ‘spHeadMobile.php’ determine the content on most pages of a theme. For the Default theme, ‘spHead.php’ is the file containing the header information. ‘spHead.php’ is made up of sections containing specific forum information.
      • Admin Bar‘ section where the admin queue and links are displayed if the admin bar plugin is activated.
      • User Info‘ section where the User Avatar, Login and out button, Register button, Profile button, Member button, Last Visit, Login Form, and User Notices information may be displayed. This section may also contain buttons specific to Simple:Press Plugins such as Private Message Inbox button, Subscriptions Review button, and Watches Review button.
      • Search‘ section where the quicklinks to ‘Select Forum’ and to ‘New/Recently Updated Topics’ may be found along with the forum Search Form with Search text box, Search button, and link the the ‘Advanced Search’ form.
      • Bread Crumbs‘ section where the path to the displayed forum page is shown.
      • Page Top Status‘ section where the ‘Go To Bottom’ button, Unread Post information for number of topics with unread posts, and icons with links to ‘Most recent topics with unread posts’, and ‘Mark all topics as read’ are displayed. This section may also contain a button specific to the Simple:Press Display Forum Rank Information plugin.
      • Forum Lock Down‘ section where the message “The forums are currently locked and only available for read only access” would be displayed if the forums were locked down to further changes.
    • Body Section – the unique content in each forum page of a theme. For example, on the Group View page (in ‘spGroupView.php’ of the Default theme or ‘spGroupViewDesktop.php’ and ‘spGroupViewMobile.php’ of the Reboot theme) this is the content displaying the Groups and the Forums within each group.
      • Group View‘ section where the social media share buttons are displayed if the Simple:Press ‘Share This’ plugin is active. This section also contains the ‘Group Loop’ that loops through the cascaded sections for each Group as follows:
        • Group Header‘ section with the ‘Group RSS’ button, group icon, group header name, group open and close button, group header description, and the group header message. This section also contains the ‘Forum List’ section.
          • Forum List‘ section with the ‘Forum Loop’ that loops through the ‘Forum’ section with its columns to display each forum in the group.
            • Forum‘ section where the forum icon, forum name, forum description, forum page links (if its posts are shown on multiple pages), forum topic count, forum post count, forum status icons, last post information, and sub-forum information about the Forum are displayed.
    • Foot Section – the forum content that is displayed at the bottom of each full forum page. In most pages of a theme this content is the same. ‘spFoot.php’, ‘spFootDesktop.php’, or ‘spFootMobile.php’ determine the content on most pages of a theme. For the Default theme, ‘spFoot.php’ is the file containing the footer information. ‘spFoot.php’ is made up of the sections below containing specific forum information.
      • Page Bottom Status‘ section where the ‘All RSS’ and ‘Go To Top’ buttons are displayed. This section may also contain buttons specific to Simple:Press Plugins such as the Subscriptions ‘Subscribe’ button, and Watches ‘Watch’ button.
      • Stats‘ section where the statistics for the forum are displayed. In this section the Forum Timezone, User Timezone, Online Statistics, Top Posters Statistics, Membership Statistics, Forum Statistics, New Members, Moderators, and Administrators are displayed. This section may also contain buttons/links/icons/text specific to Simple:Press Plugins such as ‘Who’s Online’ or ‘User Birthdays’.

Note: It is frequently asked how all the statistics in the footer of the forum page can be removed. Commenting out the entire ‘Stats‘ section in a Child Theme as discussed at Creating a Child Theme will remove all the statistics. See the FAQ – How To Remove Forum Statistics Codex page.Commenting out specific calls within the section can remove that specific element of the statistics while continuing to display the rest.

    • User selections of ‘Theme’ or ‘Language’ for the displayed forum pages are not contained in a section, but are standalone in the footer if the Simple:Press ‘Language and Theme Selection’ (user-selection) plugin is active.
    • About‘ section where the ‘About Simple:Press’ and ‘Visit Simple:Press’ buttons/links are displayed. This section may also contain ‘Usage Policy’ and ‘Privacy Policy’ buttons/links specific to the Simple:Press ‘Create and Link to Policy Documents’ (policy-docs) plugin.

Changelog

Since Simple:Press initial versions.

Codex page sync’d to code version 5.5.8.


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