<form method="post" action="{link controller='SitemapEdit'}objectType={$objectType->objectType}{/link}">
<div class="section">
- <dl{if $errorField == 'priority'} class="formError"{/if}>
- <dt><label for="priority">{lang}wcf.acp.sitemap.priority{/lang}</label></dt>
- <dd>
- <input type="number" id="priority" name="priority" step="0.1" min="0" max="1" value="{$priority}" class="short"/>
- {if $errorField == 'priority'}
- <small class="innerError">
- {lang}wcf.acp.sitemap.priority.error.{$errorType}{/lang}
- </small>
- {/if}
- <small>{lang}wcf.acp.sitemap.priority.description{/lang}</small>
- </dd>
- </dl>
-
<dl{if $errorField == 'changeFreq'} class="formError"{/if}>
<dt><label for="changeFreq">{lang}wcf.acp.sitemap.changeFreq{/lang}</label></dt>
<dd>
*/
public $objectType;
- /**
- * The priority for this sitemap object.
- * @var float
- */
- public $priority = 0.5;
-
/**
* The changeFreq for this sitemap object.
* @var string
$sitemapData = @\unserialize($sitemapData);
if (\is_array($sitemapData)) {
- $this->priority = $sitemapData['priority'];
$this->changeFreq = $sitemapData['changeFreq'];
$this->rebuildTime = $sitemapData['rebuildTime'];
$this->isDisabled = $sitemapData['isDisabled'];
} else {
- if ($this->objectType->priority !== null) {
- $this->priority = $this->objectType->priority;
- }
if ($this->objectType->changeFreq !== null) {
$this->changeFreq = $this->objectType->changeFreq;
}
{
parent::readFormParameters();
- if (isset($_POST['priority'])) {
- $this->priority = \round(\floatval($_POST['priority']), 1);
- }
if (isset($_POST['changeFreq'])) {
$this->changeFreq = $_POST['changeFreq'];
}
{
parent::validate();
- if ($this->priority > 1 || $this->priority < 0) {
- throw new UserInputException('priority', 'invalid');
- }
-
if (!\in_array($this->changeFreq, $this->validChangeFreq)) {
throw new UserInputException('changeFreq');
}
'com.woltlab.wcf',
SitemapRebuildWorker::REGISTRY_PREFIX . $this->objectTypeName,
\serialize([
- 'priority' => $this->priority,
'changeFreq' => $this->changeFreq,
'rebuildTime' => $this->rebuildTime,
'isDisabled' => $this->isDisabled,
WCF::getTPL()->assign([
'objectType' => $this->objectType,
- 'priority' => $this->priority,
'changeFreq' => $this->changeFreq,
'rebuildTime' => $this->rebuildTime,
'validChangeFreq' => $this->validChangeFreq,
<category name="wcf.acp.sitemap">
<item name="wcf.acp.sitemap"><![CDATA[Sitemap]]></item>
<item name="wcf.acp.sitemap.priority"><![CDATA[Priorität]]></item>
- <item name="wcf.acp.sitemap.priority.description"><![CDATA[{if LANGUAGE_USE_INFORMAL_VARIANT}Gebe{else}Geben Sie{/if} hier die Priorität der Einträge in dieser Sitemap an. Gültige Werte liegen zwischen 0,0 und 1,0.]]></item>
- <item name="wcf.acp.sitemap.priority.error.invalid"><![CDATA[Der Wert muss zwischen 0,0 und 1,0 liegen.]]></item>
<item name="wcf.acp.sitemap.changeFreq"><![CDATA[Änderungsfrequenz]]></item>
<item name="wcf.acp.sitemap.changeFreq.always"><![CDATA[Immer]]></item>
<item name="wcf.acp.sitemap.changeFreq.hourly"><![CDATA[Stündlich]]></item>
<category name="wcf.acp.sitemap">
<item name="wcf.acp.sitemap"><![CDATA[Sitemap]]></item>
<item name="wcf.acp.sitemap.priority"><![CDATA[Priority]]></item>
- <item name="wcf.acp.sitemap.priority.description"><![CDATA[The priority of the sitemap items. The value must be between 0.0 and 1.0.]]></item>
- <item name="wcf.acp.sitemap.priority.error.invalid"><![CDATA[The value must be between 0.0 and 1.0.]]></item>
<item name="wcf.acp.sitemap.changeFreq"><![CDATA[Change Frequency]]></item>
<item name="wcf.acp.sitemap.changeFreq.always"><![CDATA[Always]]></item>
<item name="wcf.acp.sitemap.changeFreq.hourly"><![CDATA[Hourly]]></item>