Simple:Press Documentation

Theme Changes 5.7.2

If you have created a custom theme then this will not be automatically updated when you upgrade Simple:Press to a new version. If you would like to take advantage of any new features that 5.7.2 offers then these notes outline the main changes. We recommend that you use an editor that has good file compare functionality so that you can easily see these changes in your theme and apply any desired changes to your own if you choose to do so.

Your theme should continue to work using Simple:Press 5.7.2 without making any changes. Our goal has been not to disturb custom themes but sometimes this is beyond our control. Where this happen – or if you wish to take advantage of new features, some changes will be required. Sometimes, sadly, changes are forced upon us by modifications to core WordPress.

If you find changes needed are extensive, we would recommend you change from a custom theme to a child theme, which will avoid the majority – but not all – of changes needed in the future.


Modifications to Existing Templates

The Search Form – All Themes

The search form array (in all ‘spHead.php’ templates) has had a new argument added – ‘placeHolder‘ to allow for separate text to that used on the search button. This initially defaults to the same text as the current ‘submitLabel’ argument which will continue to be used if the theme is not updated.

Tooltip Text Change – All Themes

All topic view templates (‘spTopicView.php‘) have had the tooltip parameter in the template tag
sp_TopicHeaderShowBlogLink()
changed where the term ‘goto’ has been corrected to ‘go to’.


New Template Display Functions

Supporting the New/Unread Post flag

Some of the following changes are quite complex and we recommend comparing your custom templates with the updated, supplied templates to check the changes required.

Changes are required to all Group, Forum, Topic and List templates to take advantage of the newly introduced ‘new/unread ppost flag’.

Desktop AND Mobile templates

Group View templates

Locate the call to the function sp_ForumIndexName()
Immediately BEFORE it add:

	sp_UserNewPostFlag('', 'group');

Immediately AFTER it add:

	sp_InsertBreak('direction=left');

Forum View templates

Locate the call to the function sp_TopicIndexName()
Immediately BEFORE it add:

	sp_UserNewPostFlag('', 'forum');

Immediately AFTER it add:

	sp_InsertBreak('direction=left');

Topic View templates

Locate the call to the function sp_PostIndexNewPost()
comment it out and add below it as a replacement:

	sp_UserNewPostFlag('', 'topic');

List View templates

Locate the call to the function sp_ListNewPostButton()
comment it out and add below it as a replacement:

	sp_UserNewPostFlag('', 'list');

Mobile Templates

List View template (spListViewMobile.php)

Locate the call to the function sp_ListLastPost()
Immediately after it add:

	sp_UserNewPostFlag('locationClass=spRight', 'list');

Locate the function sp_ListForumName()
and remove the last label text so that it look like:

	sp_ListForumName('', __sp('Browse topics in %NAME%'), '');

The spNewPostsView.php Template

Remove the code between the line:

	global $spThisUser, $spListView, $spThisListTopic;

and:

	sp_load_template('spListView.php');

and replace with:

	global $spThisUser, $spListView, $spThisListTopic;
	$first = sp_esc_int($_GET['first']);
	$group = sp_esc_int($_GET['group']);
	$id = sp_esc_int($_GET['id']);
	if (!empty($id)) {
		$topics = array();
		for ($x=0; $x<count($spThisUser->newposts['forums']); $x++) {
			if ($spThisUser->newposts['forums'][$x] == $id) $topics[] = $spThisUser->newposts['topics'][$x];
		}
	} else {
		$topics = $spThisUser->newposts['topics'];
	}
	if(isset($count) ? $count = sp_esc_int($_GET['count']) : $count = 0);
	$spListView = new spTopicList($topics, $count, $group, $id, $first, 0, 'all unread posts');
	sp_load_template('spListView.php');

CSS and Template Class Changes

BareBones – Corrections and Tidy-ups

Find:

#spMainContainer .spHeaderAddButton

Add:

font-weight: bold;

Find:

#spMainContainer .spSearchForm input.spControl

Change border from $inputFieldBorder to:

$solidBorderLight

Find:

#spMainContainer #spGrid .spGridCell br

Add a new rule block beneath the above block as:

	#spMainContainer #spGrid .spGridCell a {
		font-weight: bold;
		font-size: 80%;
	}

Find:

#spMainContainer a.spToolsButtonMobile

Add new rules:

	font-weight: bold;
	font-size: ;
	outline-style: none;
	color: ;

In the /styles/desktop/sp-pm-spcss file
Find:

#spMainContainer .spPmMessageSection .pmMessageActions a.spLink

Remove the rule:

font-weight: normal;

and add the rules:

	font-weight: bold;
	font-size: 80%;

Find:

#spMainContainer .spPostSection .spPostActionLabel

and:

#spMainContainer .spPostSection .spPostActionLabel:hover

For both, remove the reference to:

.spPostSection

Locate the spHeadMobile.php template and make the following changes:

Find the tag: sp_AdminLinks()
Change the arguments to read:

'tagClass=spToolsButtonMobile spRight&iconClass=spIcon&icon='

Find the tag: sp_AdminQueue()
Change the arguments to read:

'tagClass=spLeft&buttonClass=spToolsButtonMobile spLeft&countClass=spLeft spButtonAsLabel&icon='

Locate the ‘barebones-mobile.php‘ in the /styles folder.

Near the very top of the file – the entry for:

#spMainContainer a:link

and remove the :link portion so it reads as:

#spMainContainer a

Reboot – Integrated Toolbar not being used

If not using the Integrated Toolbar and the submit/cancel buttons are not clear make the following change to the main Reboot.php file:

Locate the CSS for

#spMainContainer #spPostForm .spEditorSection .spSubmit {

and add a second line as follows:

#spMainContainer #spPostForm .spEditorSection .spSubmit,
#spMainContainer #spPostForm .spEditorSubmitButton .spSubmit {

Letter Spacing – CSS-Only, Default, iForum, Stacked and Unified

In the appropriate ‘reset.css‘ – or ‘base-reset.css‘ file

in the large group at the top add the rule:

	letter-spacing: normal;

top improve letter spacing with some WordPress themes


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