<xs:element name="hasFixedParent" type="woltlab_boolean" minOccurs="0" />
<xs:element name="requireObjectID" type="woltlab_boolean" minOccurs="0" />
<xs:element name="availableDuringOfflineMode" type="woltlab_boolean" minOccurs="0" />
+ <xs:element name="allowSpidersToIndex" type="woltlab_boolean" minOccurs="0" />
<xs:element name="cssClassName" type="woltlab_varchar" minOccurs="0" />
</xs:choice>
</xs:extension>
<name language="en">Members</name>
<permissions>user.profile.canViewMembersList</permissions>
<options>module_members_list</options>
+ <allowSpidersToIndex>1</allowSpidersToIndex>
<content language="en">
<title>Members</title>
<name language="de">Letzte Aktivitäten</name>
<name language="en">Recent Activities</name>
<parent>com.woltlab.wcf.MembersList</parent>
+ <allowSpidersToIndex>1</allowSpidersToIndex>
<content language="en">
<title>Recent Activities</title>
<parent>com.woltlab.wcf.MembersList</parent>
<permissions>user.profile.canViewUsersOnlineList</permissions>
<options>module_users_online</options>
+ <allowSpidersToIndex>1</allowSpidersToIndex>
<content language="en">
<title>Users Online</title>
<parent>com.woltlab.wcf.MembersList</parent>
<permissions>user.profile.canViewMembersList</permissions>
<options>module_team_page</options>
+ <allowSpidersToIndex>1</allowSpidersToIndex>
<content language="en">
<title>Team</title>
<name language="en">User Profile</name>
<parent>com.woltlab.wcf.MembersList</parent>
<requireObjectID>1</requireObjectID>
+ <allowSpidersToIndex>1</allowSpidersToIndex>
</page>
<page identifier="com.woltlab.wcf.ArticleList">
<pageType>system</pageType>
<name language="de">Artikel-Liste</name>
<name language="en">Article List</name>
<options>module_article</options>
+ <allowSpidersToIndex>1</allowSpidersToIndex>
<content language="en">
<title>Articles</title>
<options>module_article</options>
<parent>com.woltlab.wcf.ArticleList</parent>
<requireObjectID>1</requireObjectID>
+ <allowSpidersToIndex>1</allowSpidersToIndex>
</page>
<page identifier="com.woltlab.wcf.Article">
<pageType>system</pageType>
<parent>com.woltlab.wcf.CategoryArticleList</parent>
<hasFixedParent>1</hasFixedParent>
<requireObjectID>1</requireObjectID>
+ <allowSpidersToIndex>1</allowSpidersToIndex>
</page>
<!-- static -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="format-detection" content="telephone=no">
-{if $allowSpidersToIndexThisPage|empty}<meta name="robots" content="noindex,nofollow">{/if}
+{if $allowSpidersToIndexThisPage|empty && ($__wcf->getActivePage() == null || !$__wcf->getActivePage()->allowSpidersToIndex)}<meta name="robots" content="noindex,nofollow">{/if}
{implode from=$__wcf->getMetaTagHandler() item=__metaTag glue="\n"}{@$__metaTag}{/implode}
{event name='metaTags'}
</dd>
</dl>
+ <dl>
+ <dt></dt>
+ <dd>
+ <label><input type="checkbox" id="allowSpidersToIndex" name="allowSpidersToIndex" value="1"{if $allowSpidersToIndex} checked{/if}> {lang}wcf.acp.page.allowSpidersToIndex{/lang}</label>
+ </dd>
+ </dl>
+
{event name='dataFields'}
</div>
</div>
*/
public $availableDuringOfflineMode = 0;
+ /**
+ * true if the page is accessible for search spiders
+ * @var boolean
+ */
+ public $allowSpidersToIndex = 1;
+
/**
* @inheritDoc
*/
public function readFormParameters() {
parent::readFormParameters();
+ $this->allowSpidersToIndex = 0;
if (isset($_POST['parentPageID'])) $this->parentPageID = intval($_POST['parentPageID']);
if (isset($_POST['name'])) $this->name = StringUtil::trim($_POST['name']);
if (isset($_POST['cssClassName'])) $this->cssClassName = StringUtil::trim($_POST['cssClassName']);
if (isset($_POST['isDisabled'])) $this->isDisabled = 1;
if (isset($_POST['isLandingPage'])) $this->isLandingPage = 1;
if (isset($_POST['availableDuringOfflineMode'])) $this->availableDuringOfflineMode = 1;
+ if (isset($_POST['allowSpidersToIndex'])) $this->allowSpidersToIndex = 1;
if (isset($_POST['applicationPackageID'])) $this->applicationPackageID = intval($_POST['applicationPackageID']);
if (isset($_POST['customURL']) && is_array($_POST['customURL'])) $this->customURL = array_map('mb_strtolower', ArrayUtil::trim($_POST['customURL']));
'isDisabled' => $this->isDisabled ? 1 : 0,
'isLandingPage' => 0,
'availableDuringOfflineMode' => $this->availableDuringOfflineMode,
+ 'allowSpidersToIndex' => $this->allowSpidersToIndex,
'applicationPackageID' => $this->applicationPackageID,
'lastUpdateTime' => TIME_NOW,
'isMultilingual' => $this->isMultilingual,
'isDisabled' => $this->isDisabled,
'isLandingPage' => $this->isLandingPage,
'availableDuringOfflineMode' => $this->availableDuringOfflineMode,
+ 'allowSpidersToIndex' => $this->allowSpidersToIndex,
'isMultilingual' => $this->isMultilingual,
'applicationPackageID' => $this->applicationPackageID,
'customURL' => $this->customURL,
'lastUpdateTime' => TIME_NOW,
'parentPageID' => $this->parentPageID ?: null,
'applicationPackageID' => $this->applicationPackageID,
- 'availableDuringOfflineMode' => $this->availableDuringOfflineMode
+ 'availableDuringOfflineMode' => $this->availableDuringOfflineMode,
+ 'allowSpidersToIndex' => $this->allowSpidersToIndex
];
if ($this->pageType == 'system') {
if ($this->page->isLandingPage) $this->isLandingPage = 1;
if ($this->page->isDisabled) $this->isDisabled = 1;
if ($this->page->availableDuringOfflineMode) $this->availableDuringOfflineMode = 1;
+ if ($this->page->allowSpidersToIndex) $this->allowSpidersToIndex = 1;
foreach ($this->page->getPageContents() as $languageID => $content) {
$this->title[$languageID] = $content->title;
* @property-read integer $lastUpdateTime timestamp at which the page has been updated the last time
* @property-read string $cssClassName css class name(s) of the page
* @property-read string $availableDuringOfflineMode is `1` if the page is available during offline mode, otherwise `0`
+ * @property-read string $allowSpidersToIndex is `1` if the page is accessible for search spiders, otherwise `0`
* @property-read string $permissions comma separated list of user group permissions of which the active user needs to have at least one to access the page
* @property-read string $options comma separated list of options of which at least one needs to be enabled for the page to be accessible
*/
namespace wcf\page;
use wcf\data\article\AccessibleArticleList;
use wcf\system\request\LinkHandler;
-use wcf\system\WCF;
/**
* Shows a list of cms articles.
$this->canonicalURL = LinkHandler::getInstance()->getLink('ArticleList', [], ($this->pageNo > 1 ? 'pageNo=' . $this->pageNo : ''));
}
-
- /**
- * @inheritDoc
- */
- public function assignVariables() {
- parent::assignVariables();
-
- WCF::getTPL()->assign([
- 'allowSpidersToIndexThisPage' => true
- ]);
- }
}
'commentObjectTypeID' => $this->commentObjectTypeID,
'lastCommentTime' => $this->commentList ? $this->commentList->getMinCommentTime() : 0,
'likeData' => (MODULE_LIKE && $this->commentList) ? $this->commentList->getLikeData() : [],
- 'articleLikeData' => $this->articleLikeData,
- 'allowSpidersToIndexThisPage' => true
+ 'articleLikeData' => $this->articleLikeData
]);
}
}
WCF::getTPL()->assign([
'categoryID' => $this->categoryID,
- 'category' => $this->category,
- 'allowSpidersToIndexThisPage' => true
+ 'category' => $this->category
]);
}
}
'contentLanguageID' => $this->languageID,
'page' => $this->page,
'pageID' => $this->pageID,
- 'activePageLanguage' => $this->languageID ? LanguageFactory::getInstance()->getLanguage($this->languageID) : null,
- 'allowSpidersToIndexThisPage' => true
+ 'activePageLanguage' => $this->languageID ? LanguageFactory::getInstance()->getLanguage($this->languageID) : null
]);
}
}
WCF::getTPL()->assign([
'letters' => str_split(self::$availableLetters),
'letter' => $this->letter,
- 'searchID' => $this->searchID,
- 'allowSpidersToIndexThisPage' => true
+ 'searchID' => $this->searchID
]);
if (count($this->objectList) === 0) {
WCF::getTPL()->assign([
'eventList' => $this->eventList,
- 'lastEventTime' => $this->eventList->getLastEventTime(),
- 'allowSpidersToIndexThisPage' => true
+ 'lastEventTime' => $this->eventList->getLastEventTime()
]);
}
}
// add breadcrumbs
if (MODULE_MEMBERS_LIST) PageLocationManager::getInstance()->addParentLocation('com.woltlab.wcf.MembersList');
}
-
- /**
- * @inheritDoc
- */
- public function assignVariables() {
- parent::assignVariables();
-
- WCF::getTPL()->assign([
- 'allowSpidersToIndexThisPage' => true
- ]);
- }
}
'followingCount' => $this->followingList->countObjects(),
'visitors' => $this->visitorList !== null ? $this->visitorList->getObjects() : [],
'visitorCount' => $this->visitorList !== null ? $this->visitorList->countObjects() : 0,
- 'allowSpidersToIndexThisPage' => true,
'isAccessible' => UserGroup::isAccessibleGroup($this->user->getGroupIDs())
]);
}
}
}
- /**
- * @inheritDoc
- */
- public function assignVariables() {
- parent::assignVariables();
-
- WCF::getTPL()->assign([
- 'allowSpidersToIndexThisPage' => true
- ]);
- }
-
/**
* @inheritDoc
*/
'permissions' => isset($data['elements']['permissions']) ? $data['elements']['permissions'] : '',
'hasFixedParent' => ($pageType == 'system' && !empty($data['elements']['hasFixedParent'])) ? 1 : 0,
'cssClassName' => isset($data['elements']['cssClassName']) ? $data['elements']['cssClassName'] : '',
- 'availableDuringOfflineMode' => (!empty($data['elements']['availableDuringOfflineMode'])) ? 1 : 0
+ 'availableDuringOfflineMode' => (!empty($data['elements']['availableDuringOfflineMode'])) ? 1 : 0,
+ 'allowSpidersToIndex' => (!empty($data['elements']['allowSpidersToIndex'])) ? 1 : 0
];
}
<item name="wcf.acp.page.url"><![CDATA[URL]]></item>
<item name="wcf.acp.page.cssClassName"><![CDATA[CSS-Klassen]]></item>
<item name="wcf.acp.page.availableDuringOfflineMode"><![CDATA[Seite ist im Wartungsmodus aufrufbar]]></item>
+ <item name="wcf.acp.page.allowSpidersToIndex"><![CDATA[Seite darf von Suchmaschinen-Robotern indiziert werden]]></item>
</category>
<category name="wcf.acp.paidSubscription">
<item name="wcf.acp.page.url"><![CDATA[URL]]></item>
<item name="wcf.acp.page.cssClassName"><![CDATA[CSS Class Name]]></item>
<item name="wcf.acp.page.availableDuringOfflineMode"><![CDATA[Page is available during maintenance mode]]></item>
+ <item name="wcf.acp.page.allowSpidersToIndex"><![CDATA[Allow search spiders to index this page]]></item>
</category>
<category name="wcf.paidSubscription">
lastUpdateTime INT(10) NOT NULL DEFAULT 0,
cssClassName VARCHAR(255) NOT NULL DEFAULT '',
availableDuringOfflineMode TINYINT(1) NOT NULL DEFAULT 0,
+ allowSpidersToIndex TINYINT(1) NOT NULL DEFAULT 0,
permissions TEXT NULL,
options TEXT NULL
);