Simple:Press Documentation

About Template Files

All Simple:Press themes rely on specific template files to render the display of the forum pages. Each template file performs a specific task.

Some theme templates display the same content in the same way regardless of the viewing device. Other themes change the content depending on whether the viewing device is a “desktop” device or “mobile” device such as a smart phone or tablet. It is important to understand that even though the filenames of files are the same in the various themes, the file content may be different.

The “templates” folder in a theme’s folder contains the template files that define the various pages of the theme. More information regarding the contents of a theme’s folder is available at the Theme Structure page.

The general structure of template pages and thus the structure of theme pages of standard supplied Simple:Press themes is contained at the Theme Page Structure Codex page. Knowledge of the template file structure is helpful if modifications to pages within a theme are being considered.

Note: If ANY changes are being considered to template files 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.

 

Barebones-CSS-Desktop, Barebones-CSS-Mobile, CSS-only, Default, Stacked and Unified Themes

The Barebones-CSS-Desktop, Barebones-CSS-Mobile, CSS-only, Default, iForum, Stacked, and Unified themes utilize the template files listed immediately below for their pages or parts of pages.

    • Of these themes, only the

Unified

    • theme distinguishes between “desktop” and “mobile” (smart phones, tablets, etc.) viewing devices. It does this with “if” statements within the individual template file needing to make the distinction to properly display the forum page.

The Barebones-CSS-Desktop theme is a variant of the Barebones theme (desktop version) using standard CSS only. If is for those unable to use the Simple:Press “.php” overlay styled themes.

The Barebones-CSS-Mobile theme is a variant of the Barebones theme (mobile version) using standard CSS only. If is for those unable to use the Simple:Press “.php” overlay styled themes.

spDefault.php

The ‘default’ template is used to display generic or unknown pages.  For example if someone tried to go to a page they are not authorized to view, this template will inform them that access is denied. If a page being requested cannot be found, the “(404)” error message is displayed on this page.

spFoot.php

This template is used to show the content at the bottom (footer) of every full forum page in this group of themes except the iForum theme which does not have footers. In the other themes in this group the file is not used on pages displayed using the ‘spListView.php’ and ‘spProfilePopupShow.php’ template files.

spForumView.php

This template is used to display a Forum and the list of Topics within the Forum.

spFunctions.php

The ‘functions’ file can be used for custom functions & is loaded with each template. It does not use header nor footer files.

spGroupView.php

The ‘group’ template is used to display the Groups and the Forums within each Group.

spHead.php

This template is used to display all the forum content at the top of every full forum page. It is not used on pages displayed using ‘spListView.php’ and ‘spProfilePopupShow.php’ template files. Additionally it is not used on the two (2) special iForum theme files, ‘spForumSubView.php’, and ‘spGroupSubView.php’.

spListView.php

The ‘list’ template is used to display the Topic Listing. It does not call the theme’s ‘spHead.php’ nor ‘spFoot.php’ files. It calls its own unique functions for its header and footer.

spMembersView.php

The ‘members’ template is used to display the Members Listing containing summary information that can be viewed by other forum users about each member.

spNewPostsView.php

This template is used to display new posts listings.

spProfileEdit.php

The ‘profile-edit’ template is used to display a user’s own profile form with all its tabs. From this page various portions of the profile can be edited by its owner.

spProfilePopupShow.php

This template is used to display selected information from a forum member’s profile in a popup after that user has been selected from the members list generally by another user. It does not call the theme’s ‘spHead.php’ nor ‘spFoot.php’ files. It calls its own unique function for its header. It does not have a footer.

spProfileShow.php

This template is used to display additional information from a user’s profile after the “View Full Profile for …” button is selected on the user profile popup page displayed using the ‘spProfilePopupShow.php’ file. Most often the forum member’s profile is being viewed by another user. The profile information displayed is not the complete content seen by the profile owner via the ‘spProfileEdit.php’ template file.

spSearchView.php

The ‘search’ template is used to display a simplified Search Listing of the search results.

spTopicView.php

This template is used to display a Topic and all the Posts within that Topic.

The iForum theme contains two (2) template files not in the other themes.

spForumSubView.php

This template is used to display a forum’s post listings shown under the “TOPICS” column when in the Group View (when spGroupView.php is the page being displayed). It does not call the theme’s ‘spHead.php’ nor ‘spFoot.php’ files. It calls its own unique function for its header. It does not have a footer.

spGroupSubView.php

This template is used to display the groups and their forums shown under the “FORUMS” column when in the Forum View (when spForumView.php is the page being displayed). It does not call the theme’s ‘spHead.php’ nor ‘spFoot.php’ files. It calls its own unique function for its header. It does not have a footer.

The Barebones-CSS-Desktop and Barebones-CSS-Mobile themes contains six (6) template files not in the other themes in this grouping. These six (6) files are in the Reboot and Barebones themes.

spPMFoot.php

This template is used to display a unique Private Message (PM) footer before the normal page footer on the PM pages defined by ‘spPMMessagesView.php’ and ‘spPMThreadsView.php’ template files.

spPMHead.php

This template is used to display a unique Private Message (PM) header after the normal page header on the PM pages defined by ‘spPMMessagesView.php’ and ‘spPMThreadsView.php’ template files.

spPMMessagesView.php

This template is used to display an individual Private Messaging thread and its posts.

spPMThreadsView.php

This template is used to display the Private Messaging list of Threads.

spSearchBlogView.php

This template is used to display the results of a Blog Search in a simplified Blog Search Listing. It does not call the theme’s header or footer files. It calls its own unique function for its header. It does not have a footer.

Reboot and Barebones Themes

In the Reboot and Barebones themes several of the standard theme pages are defined by files with the same names as those in the previously discussed themes. Unless indicated differently, the header and footer for these files are determined by the type of viewing device, either “Desktop” or “Mobile” as discussed later. These files include:

  • spDefault.php
  • spFunctions.php – This file contains checks for ‘mobile’ or ‘tablet’ devices. It does not call header or footer files.
  • spNewPostsView.php
  • spProfileEdit.php
  • spProfilePopupShow.php – As in the other themes, this file calls its own unique function for its header. It does not have a footer.
  • spProfileShow.php
  • spSearchView.php

A number of standard named files do not define actual page content. Instead the below listed files contain primarily only ‘if’ statements that will call a separate ‘.php’ file defining the page or part of the page to be displayed depending on whether the viewing device is “Desktop” or “Mobile”.

  • spFoot.php
  • spForumView.php
  • spGroupView.php
  • spHead.php
  • spListView.php
  • spMembersView.php
  • spTopicView.php

The specific “Desktop” and “Mobile” files defining the pages reside in separate sub-folders in the ‘template’ folder.

    • The “

Desktop

    • ” sub-folder contains files used when the viewing device is a desktop type device.

spFootDesktop.php

This template is used to show the content that is to be at the bottom every full ‘Desktop’ forum page. It is not used on pages displayed using ‘spListViewDesktop.php’, ‘spProfilePopupShow.php’, and ‘spSearchBlogView.php’ template files.

Note: This template file contains a special function ‘sp_OpenCloseControl()’ that displays a special ‘Forum Statistics’ Open / Close icon in the top of the footer which allows closing or opening the Forum Statistics section without any code modification.For more information see the FAQ – How To Remove Forum Statistics Codex page.

spForumViewDesktop.php

This template is used to display a Forum and the list of Topics within the Forum.

spGroupViewDesktop.php

This template is used to display the Groups and the Forums with each Group.

spHeadDesktop.php

This template is used for all forum content that is displayed at the top of every full ‘Desktop’ forum page. This is not used on pages displayed using ‘spListViewDesktop.php’, ‘spProfilePopupShow.php’, and ‘spSearchBlogView.php’ template files.

spListViewDesktop.php

This template is used to display the Topic Listing. It does not call the theme’s ‘spHeadDesktop.php’ nor ‘spFootDesktop.php’ files. It calls its own unique functions for its header and footer.

spMembersViewDesktop.php

This template is used to display the Members Listing containing summary information that can be viewed by other forum users about each member.

spTopicViewDesktop.php

This template is used to display a Topic and all the Posts within that Topic.

The “Mobile” sub-folder contains files used when the viewing device is a mobile type device.

spFootMobile.php

This template is used to show the content that is to be at the bottom every full ‘Mobile’ forum page. It is not used on pages displayed using’spListViewMobile.php’, ‘spProfilePopupShow.php’, and ‘spSearchBlogView.php’ template files.

spForumViewMobile.php

This template is used to display a Forum and the list of Topics within the Forum.

spGroupViewMobile.php

This template is used to display the Groups and the Forums with each Group.

spHeadMobile.php

This template is used for all forum content that is displayed at the top of every full ‘Mobile’ forum page. This is not used on pages displayed using’spListViewMobile.php’, ‘spProfilePopupShow.php’, and ‘spSearchBlogView.php’ template files.

spListViewMobile.php

This template is used to display the Topic Listing. It does not call the theme’s ‘spHeadMobile.php’ nor ‘spFootMobile.php’ files. It calls its own unique functions for its header and footer.

spMembersViewMobile.php

This template is used to display the Members Listing containing summary information that can be viewed by other forum users about each member.

spTopicViewMobile.php

This template is used to display a Topic and all the Posts within that Topic.

The Reboot and Barebones themes contain unique pages not available in the other themes other than Barebones-CSS-Desktop and Barebones-CSS-Mobile. The files for these special pages are contained in the themes ‘template’ folder and are:

spPMFoot.php

This template is used to display a unique Private Message (PM) footer before the normal page footer on the PM pages defined by ‘spPMMessagesView.php’ and ‘spPMThreadsView.php’ template files.

spPMHead.php

This template is used to display a unique Private Message (PM) header after the normal page header on the PM pages defined by ‘spPMMessagesView.php’ and ‘spPMThreadsView.php’ template files.

spPMMessagesView.php

This template is used to display an individual Private Messaging thread and its posts.

spPMThreadsView.php

This template is used to display the Private Messaging list of Threads.

spSearchBlogView.php

This template is used to display the results of a Blog Search in a simplified Blog Search Listing. It does not call the theme’s header or footer files. It calls its own unique function for its header. It does not have a footer.

Changelog

Since Simple:Press initial versions.

Codex page sync’d to code version 5.6.6.


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