Jump to content
Holiday Closure, Nov 26 & 27 ×

Guides

Upgrading themes to 4.4

For the most part, themes created for Invision Community 4.3 should work without modification on Invision Community 4.4. However, for sites with more heavily customized themes, there may be some manual updates you will need to make to ensure compatibility.

The document below outlines the areas you should review. We'll update the document as and when we identify particular areas that may be causing upgrade problems.

 

Global

includeJS

If you have modified includeJS.phtml, you will need to add two new keys to the main ipsSettings settings block in order for lazy loading of media to work correctly:

lazyLoadEnabled: {{if \IPS\Settings::i()->lazy_load_enabled}}true{{else}}false{{endif}},
blankImg: "{expression="\IPS\Text\Parser::blankImage()"}",

 

Pages Record Templates

Next unread links

If you have modified any of the record view templates in Pages, you may encounter a template error after upgrading. The format of data passed to generate the next unread record link has changed.

In your database record template change:

<div class='ipsGrid ipsGrid_collapsePhone ipsPager ipsClearfix ipsSpacer_top'>
	<div class="ipsGrid_span6 ipsType_left ipsPager_prev">
		{{if $record::database()->use_categories}}
			<a href="{$record->container()->url()}" title="{lang="cms_back_to_category_with_title" sprintf="$record->container()->_title"}" rel="up">
				<span class="ipsPager_type">{lang="cms_back_to_category" sprintf="$record::database()->recordWord( 2 )"}</span>
				<span class="ipsPager_title ipsType_light ipsTruncate ipsTruncate_line">{lang="$record->container()->_title"}</span>
			</a>
		{{else}}
			{{$page = \IPS\cms\Pages\Page::$currentPage;}}
			<a href="{$page->url()}" title="{lang="cms_back_to_category_with_title" sprintf="$page->_title"}" rel="up">
				<span class="ipsPager_type">{lang="cms_back_to_category" sprintf="$record::database()->recordWord( 2 )"}</span>
				<span class="ipsPager_title ipsType_light ipsTruncate ipsTruncate_line">{$page->_title}</span>
			</a>
		{{endif}}
	</div>
	{{if $nextUnread !== NULL}}
		<div class='ipsGrid_span6 ipsType_right ipsPager_next'>
			<a href="{$nextUnread->url()->setQueryString( array( 'do' => 'getNewComment' ) )}" title='{lang="cms_view_next_unread_title" sprintf="$record::database()->recordWord( 1 )"}'>
				<span class="ipsPager_type">{lang="cms_next_unread_title" sprintf="$record::database()->recordWord( 1 )"}</span>
				<span class="ipsPager_title ipsType_light ipsTruncate ipsTruncate_line">{$nextUnread->mapped('title')}</span>
			</a>
		</div>
	{{endif}}
</div>

To:

<div class='ipsGrid ipsGrid_collapsePhone ipsPager ipsClearfix ipsSpacer_top'>
	<div class="ipsGrid_span6 ipsType_left ipsPager_prev ipsPager_noDesc">
		{{if $record::database()->use_categories}}
			<a href="{$record->container()->url()}" title="{lang="cms_back_to_category_with_title" sprintf="$record->container()->_title"}" rel="up">
				<span class="ipsPager_type">{lang="cms_back_to_category" sprintf="$record::database()->recordWord( 2 )"}</span>
			</a>
		{{else}}
			{{$page = \IPS\cms\Pages\Page::$currentPage;}}
			<a href="{$page->url()}" title="{lang="cms_back_to_category_with_title" sprintf="$page->_title"}" rel="up">
				<span class="ipsPager_type">{lang="cms_back_to_category" sprintf="$record::database()->recordWord( 2 )"}</span>
			</a>
		{{endif}}
	</div>
	{{if $nextUnread !== NULL}}
		<div class='ipsGrid_span6 ipsType_right ipsPager_next ipsPager_noDesc'>
			<a href="{$record->url()->setQueryString( array( 'do' => 'nextUnread' ) )}" title='{lang="cms_view_next_unread_title" sprintf="$record::database()->recordWord( 1 )"}'>
				<span class="ipsPager_type">{lang="cms_next_unread_title" sprintf="$record::database()->recordWord( 1 )"}</span>
			</a>
		</div>
	{{endif}}
</div>

This change also affects topic view, however you should use the built-in template editor tools to compare and update your custom template.

Follow buttons

If you see an error accessing your records (or in the system log) that use a custom template such as "Total count attempted on a query not ran with SQL_CALC_FOUND_ROWS" you will need to make some changes to your template to make it compatible with 4.4.

Change (2 instances) of

{template="follow" app="core" group="global" params="'cms', 'records'.$record::$customDatabaseId, $record->primary_id_field, $record->followers()->count( TRUE )"}

To

{template="follow" app="core" group="global" params="'cms', 'records'.$record::$customDatabaseId, $record->primary_id_field, $record->followersCount()"}

 


  Report Guide


×
×
  • Create New...

Important Information

We use technologies, such as cookies, to customise content and advertising, to provide social media features and to analyse traffic to the site. We also share information about your use of our site with our trusted social media, advertising and analytics partners. See more about cookies and our Privacy Policy