Fixed more template errors in order to get everything running with PHP 8.0.

This commit is contained in:
azett 2021-01-01 13:54:58 +01:00
parent c539c2bb7e
commit ee9269c6ba
5 changed files with 68 additions and 23 deletions

View File

@ -5,10 +5,10 @@
<subtitle>{$flatpress.subtitle}</subtitle>
<link href="{$smarty.const.BLOG_BASEURL}" />
<link rel="self" href="{'atom'|theme_feed_link}" />
<generator uri="http://www.flatpress.org/" version="{$flatpress.version}">
<generator uri="http://www.flatpress.org/" version="{$smarty.const.SYSTEM_VER}">
FlatPress
</generator>
<rights> {$flatpress.author} {$smarty.now|date_format:'%Y'} </rights>
<rights> {$flatpress.author} {'Y'|date} </rights>
<updated>{$smarty.now|date_rfc3339}</updated>
<author>
<name>{$flatpress.author}</name>
@ -31,13 +31,15 @@
</div>
</content>
{foreach from=$enclosure item=encl}
<link rel="enclosure"
href="{$encl.url}"
title="{$encl.title}"
length="{$encl.length}"
type="{$encl.type}" />
{/foreach}
{if isset($enclosure)}
{foreach from=$enclosure item=encl}
<link rel="enclosure"
href="{$encl.url}"
title="{$encl.title}"
length="{$encl.length}"
type="{$encl.type}" />
{/foreach}
{/if}
</entry>
{/entry}

View File

@ -13,16 +13,46 @@
<fieldset><legend>{$lang.contact.fieldset1}</legend>
<p><label class="textlabel" for="name">{$lang.contact.name}</label><br />
<input type="text" name="name" id="name" {$error.name|notempty:'class="field-error"'}
value="{$values.name|stripslashes|wp_specialchars:true}" /></p>
{if isset($error) && isset($error.name) && !empty($error.name)}
{assign var=class value="field-error"}
{else}
{assign var=class value=""}
{/if}
{if isset($values) && isset($values.name) && !empty($values.name)}
{assign var=namevalue value=$values.name}
{else}
{assign var=namevalue value=""}
{/if}
<input type="text" name="name" id="name" class="{$class}"
value="{$namevalue|stripslashes|wp_specialchars:true}" /></p>
<p><label class="textlabel" for="email">{$lang.contact.email}</label><br />
<input type="text" name="email" id="email" {$error.email|notempty:'class="field-error"'}
value="{$values.email|stripslashes|wp_specialchars:true}" /></p>
{if isset($error) && isset($error.email) && !empty($error.email)}
{assign var=class value="field-error"}
{else}
{assign var=class value=""}
{/if}
{if isset($values) && isset($values.email) && !empty($values.email)}
{assign var=emailvalue value=$values.email}
{else}
{assign var=emailvalue value=""}
{/if}
<input type="text" name="email" id="email" class="{$class}"
value="{$emailvalue|stripslashes|wp_specialchars:true}" /></p>
<p><label class="textlabel" for="url">{$lang.contact.www}</label><br />
<input type="text" name="url" id="url" {$error.url|notempty:'class="field-error"'}
value="{$values.url|stripslashes|wp_specialchars:true}" /></p>
{if isset($error) && isset($error.url) && !empty($error.url)}
{assign var=class value="field-error"}
{else}
{assign var=class value=""}
{/if}
{if isset($values) && isset($values.url) && !empty($values.url)}
{assign var=urlvalue value=$values.url}
{else}
{assign var=urlvalue value=""}
{/if}
<input type="text" name="url" id="url" class="{$class}"
value="{$urlvalue|stripslashes|wp_specialchars:true}" /></p>
{comment_form}
@ -30,8 +60,18 @@
<fieldset><legend>{$lang.contact.fieldset2}</legend>
<p><label for="content">{$lang.contact.comment}</label><br />
<textarea name="content" id="content" {$error.content|notempty:'class="field-error"'}
rows="10" cols="74">{$values.content|stripslashes|wp_specialchars:true}</textarea></p>
{if isset($error) && isset($error.content) && !empty($error.content)}
{assign var=class value="field-error"}
{else}
{assign var=class value=""}
{/if}
{if isset($values) && isset($values.content) && !empty($values.content)}
{assign var=contentvalue value=$values.content}
{else}
{assign var=contentvalue value=""}
{/if}
<textarea name="content" id="content" class="{$class}"
rows="10" cols="74">{$contentvalue|stripslashes|wp_specialchars:true}</textarea></p>
</fieldset>

View File

@ -4,7 +4,7 @@
<title>{$flatpress.title}</title>
<link>{$flatpress.www}</link>
<description><![CDATA[{$flatpress.subtitle}]]></description>
<copyright>Copyright {$smarty.now|date_format:"$Y"}, {$flatpress.author}</copyright>
<copyright>Copyright {'Y'|date}, {$flatpress.author}</copyright>
{*<managingEditor>{$flatpress.email} ({$flatpress.author})</managingEditor>*}
<language>{$fp_config.locale.lang}</language>
<atom:link rel="self" href="{'rss2'|theme_feed_link}" type="application/rss+xml" />
@ -23,9 +23,11 @@
<pubDate>{'r'|date:$date}</pubDate>
<comments>{$id|link:comments_link}</comments>
{foreach from=$enclosure item=encl}
<enclosure url="{$encl.url}" length="{$encl.length}" type="{$encl.type}" />
{/foreach}
{if isset($enclosure)}
{foreach from=$enclosure item=encl}
<enclosure url="{$encl.url}" length="{$encl.length}" type="{$encl.type}" />
{/foreach}
{/if}
</item>
{/entry}

View File

@ -14,6 +14,7 @@
</fieldset>
<fieldset><legend>{$lang.search.fset3}</legend>
{if !isset($categories)} {assign var=categories value=""} {/if}
{list_categories type="radio" selected=$categories}
<p>{$lang.search.catdescr}</p>
</fieldset>

View File

@ -1,4 +1,4 @@
{if $noresults}
{if isset($noresults)}
<p>{$smarty.request.q|string_format:$lang.search.descrnores}</p>
{else}
<p>{$smarty.request.q|string_format:$lang.search.descrres}</p>