First commit in 2021 \o/
Fixed more template errors in order to get everything running with PHP 8.0.
This commit is contained in:
parent
5ee2cce5df
commit
eba24702df
@ -122,7 +122,7 @@ class admin_entry_commentcenter extends AdminPanelAction {
|
||||
$smarty->assign('pl_conf', $conf);
|
||||
|
||||
$conf=$plugin->getConf();
|
||||
if($conf['akismet_check']) {
|
||||
if(isset($conf) && array_key_exists('akismet_check', $conf) && $conf['akismet_check']) {
|
||||
$akismet=$plugin->akismetLoad();
|
||||
if(is_numeric($akismet)) {
|
||||
$error=$lang['admin']['entry']['commentcenter']['akismet_errors'][$akismet];
|
||||
|
@ -2,6 +2,9 @@
|
||||
{html_form}
|
||||
<h2>{$plang.configure}</h2>
|
||||
<p>{$plang.desc_conf}</p>
|
||||
{if !isset($pl_conf)}
|
||||
{assign var=pl_conf value=""}
|
||||
{/if}
|
||||
|
||||
<dl class="option-set">
|
||||
<dt><label for="log_all">{$plang.log_all}</label></dt>
|
||||
@ -25,12 +28,22 @@
|
||||
</dd>
|
||||
<dt class="akismet_opts"><label for="akismet_key">{$plang.akismet_key}</label></dt>
|
||||
<dd class="akismet_opts">
|
||||
<input type="text" name="akismet_key" id="akismet_key" value="{$pl_conf.akismet_key}" /><br />
|
||||
{if isset($pl_conf.akismet_key)}
|
||||
{assign var=akismet_key value=$pl_conf.akismet_key}
|
||||
{else}
|
||||
{assign var=akismet_key value=""}
|
||||
{/if}
|
||||
<input type="text" name="akismet_key" id="akismet_key" value="{$akismet_key}" /><br />
|
||||
{$plang.akismet_key_long}
|
||||
</dd>
|
||||
<dt class="akismet_opts"><label for="akismet_url">{$plang.akismet_url}</label></dt>
|
||||
<dd class="akismet_opts">
|
||||
<input type="text" name="akismet_url" id="akismet_url" value="{$pl_conf.akismet_url}" /><br />
|
||||
{if isset($pl_conf.akismet_url)}
|
||||
{assign var=akismet_url value=$pl_conf.akismet_url}
|
||||
{else}
|
||||
{assign var=akismet_url value=""}
|
||||
{/if}
|
||||
<input type="text" name="akismet_url" id="akismet_url" value="{$akismet_url}" /><br />
|
||||
{$plang.akismet_url_long|sprintf:$smarty.const.BLOG_BASEURL}
|
||||
</dd>
|
||||
</dl>
|
||||
|
@ -1,34 +1,36 @@
|
||||
<table class="entrylist">
|
||||
<thead><tr>
|
||||
{if !$delete}<th></th>{/if}
|
||||
{if !isset($delete)}<th></th>{/if}
|
||||
<th>{$plang.app_date}</th>
|
||||
<th>{$plang.app_content}</th>
|
||||
<th>{$plang.app_author}</th>
|
||||
<th>{$plang.app_email}</th>
|
||||
<th>{$plang.app_ip}</th>
|
||||
{if !$delete}<th>{$plang.app_actions}</th>{/if}
|
||||
{if !isset($delete)}<th>{$plang.app_actions}</th>{/if}
|
||||
</tr></thead>
|
||||
<tbody>
|
||||
{assign var="i" value=0}
|
||||
{foreach from=$entries key=entryid item=entry}
|
||||
{if count($entry.$fetch)>0 && !$is_managing}<tr><td colspan="{if $delete}5{else}7{/if}">{$entryid|idToSubject} ({$entryid})</td></tr>
|
||||
{if count($entry.$fetch)>0 && !$is_managing}<tr><td colspan="{if isset($delete)}5{else}7{/if}">{$entryid|idToSubject} ({$entryid})</td></tr>
|
||||
{/if}
|
||||
{foreach from=$entry.$fetch item=comm key=comm_id}
|
||||
{assign var="i" value=$i+1}
|
||||
<tr>
|
||||
{if !$delete}<td class="td_select_{$fetch}"><input type="checkbox" name="select[e{$entryid}_c{$comm_id}]" /></td>{/if}
|
||||
{if !isset($delete)}<td class="td_select_{$fetch}"><input type="checkbox" name="select[e{$entryid}_c{$comm_id}]" /></td>{/if}
|
||||
<td>{$comm.date|date_format:"%D, %T"}</td>
|
||||
<td class="main_cell">
|
||||
{$comm.content|strip_tags}
|
||||
{if $delete}<input type="hidden" value="on" name="select[e{$entryid}_c{$comm_id}]" />
|
||||
{if isset($delete)}<input type="hidden" value="on" name="select[e{$entryid}_c{$comm_id}]" />
|
||||
|
||||
{/if}
|
||||
</td>
|
||||
<td>{if $comm.url}<a href="{$comm.url|wp_specialchars}">{$comm.name|wp_specialchars}</a>{else}{$comm.name|wp_specialchars}{/if}</td>
|
||||
<td>{if isset($comm.url)}<a href="{$comm.url|wp_specialchars}">{$comm.name|wp_specialchars}</a>{else}{$comm.name|wp_specialchars}{/if}</td>
|
||||
<td><a href="mailto:{$comm.email|wp_specialchars}">{$comm.email|wp_specialchars}</a></td>
|
||||
<td>{$comm.ip-address}</td>
|
||||
{if !$delete}<td>
|
||||
{if $is_managing && $use_akismet}
|
||||
{* a bit hackish: {$comm.ip-adress} would lead to $this->_tpl_vars['comm']['ip']-$this->_tpl_vars['ddress']; *}
|
||||
{assign var=ipadress value="ip-address"}
|
||||
<td>{$comm.$ipadress}</td>
|
||||
{if !isset($delete)}<td>
|
||||
{if isset($is_managing) && isset($use_akismet)}
|
||||
<a href="{$action_url|cmd_link:commspam:"e`$entryid`_c`$comm_id`"}" title="{$plang.man_spam}"><img src="{$plugin_url}imgs/spam.png" alt="{$plang.man_spam}" /></a>
|
||||
{elseif !$is_managing}
|
||||
<a href="{$action_url|cmd_link:publishcomm:"e`$entryid`_c`$comm.id`"}" title="{$plang.app_publish}"><img src="{$plugin_url}imgs/publish.png" alt="{$plang.app_publish}" /></a>
|
||||
@ -48,10 +50,10 @@
|
||||
{/foreach}
|
||||
{/foreach}
|
||||
{if $i==0}
|
||||
<tr><td colspan="{if $delete}5{else}7{/if}">{$plang.app_nocomms}</td></tr>{/if}
|
||||
<tr><td colspan="{if isset($delete)}5{else}7{/if}">{$plang.app_nocomms}</td></tr>{/if}
|
||||
</tbody>
|
||||
</table>
|
||||
{if !$delete}
|
||||
{if !isset($delete)}
|
||||
<div class="commentcenter_select" style="display: none;">
|
||||
<a href="#" rel="selectAll[td_select_{$fetch}]">{$plang.select_all}</a>
|
||||
<a href="#" rel="deselectAll[td_select_{$fetch}]">{$plang.deselect_all}</a>
|
||||
|
@ -1,18 +1,18 @@
|
||||
<table id="commencenter-table">
|
||||
<thead id="commencenter-table-head">
|
||||
<tr>
|
||||
{if !$delete} <th style="width: 10%;">{$plang.select}</th>{/if}
|
||||
{if !isset($delete)} <th style="width: 10%;">{$plang.select}</th>{/if}
|
||||
<th class="main-cell">{$plang.criteria}</th>
|
||||
<th style="width: 20%;">{$plang.behavoir}</th>
|
||||
{if !$delete} <th style="width: 25%;">{$plang.options}</th>{/if}
|
||||
{if !isset($delete)} <th style="width: 25%;">{$plang.options}</th>{/if}
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="commencenter-table-body">
|
||||
{foreach name=policies from=$policies key=id item=policy}
|
||||
<tr class="tr_policy{$id}">
|
||||
{if !$delete} <td class="td_select"><input type="checkbox" name="select[{$id}]" /></td>{/if}
|
||||
{if !isset($delete)} <td class="td_select"><input type="checkbox" name="select[{$id}]" /></td>{/if}
|
||||
<td class="main-cell">
|
||||
{if $delete}<input type="hidden" name="del_policy[]" value="{$id}" />
|
||||
{if isset($delete)}<input type="hidden" name="del_policy[]" value="{$id}" />
|
||||
{/if}
|
||||
{if $policy.is_all}
|
||||
{$plang.all_entries}
|
||||
@ -45,7 +45,7 @@
|
||||
{elseif $policy.do==-1}
|
||||
<td>{$plang.block}</td>
|
||||
{/if}
|
||||
{if !$delete} <td>
|
||||
{if !isset($delete)} <td>
|
||||
<a href="{$action_url|cmd_link:polup:$id}" title="{$plang.up}" rel="polup[{$id}]"><img src="{$plugin_url}imgs/up.png" alt="{$plang.up}" /></a>
|
||||
<a href="{$action_url|cmd_link:poldown:$id}" title="{$plang.down}" rel="poldown[{$id}]"><img src="{$plugin_url}imgs/down.png" alt="{$plang.down}" /></a>
|
||||
<a href="{$action_url|cmd_link:poledit:$id}" title="{$plang.edit}"><img src="{$plugin_url}imgs/edit.png" alt="{$plang.edit}" /></a>
|
||||
@ -54,7 +54,7 @@
|
||||
</tr>
|
||||
{foreachelse}
|
||||
<tr>
|
||||
<td colspan="{if $delete}2{else}4{/if}">{$plang.nopolicies}</td>
|
||||
<td colspan="{if isset($delete)}2{else}4{/if}">{$plang.nopolicies}</td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
</tbody>
|
||||
|
@ -2,6 +2,9 @@
|
||||
{html_form}
|
||||
<h2>{$plang.man_searcht}</h2>
|
||||
<p>{$plang.man_searchd}</p>
|
||||
{if !isset($entry_id)}
|
||||
{assign var=entry_id value=""}
|
||||
{/if}
|
||||
<p><input type="text" name="entry" value="{$entry_id}" />
|
||||
{html_submit name="entry_search" id="entry_search" value=$plang.man_search}</p>
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user