Vanilla 1.1.4 is a product of Lussumo. More Information: Documentation, Community Support.
Help keep Vanilla free:<?php
/*
Extension Name: Redirect Categories
Extension Url: n/a
Description: n/a
Version: 0.3
Author: Timothy Walters Kleinert
Author Url: n/a
*/
$Context->SetDefinition('REDIRECTCATEGORIES_Notice', 'You do not have permission to view this category.
To view this category, please <a href="people.php">sign in</a>.
<br />You will be automatically re-directed in just a moment.');
if ($Context->Session->UserID == 0 && $Context->SelfUrl == 'index.php') {
$CategoryID = ForceIncomingInt('CategoryID', 0);
if (in_array($CategoryID, array(1, 2, 3))) { // list all CategoryIDs you don't want guests viewing
$NoticeCollector->AddNotice($Context->GetDefinition('REDIRECTCATEGORIES_Notice'));
header('refresh: 4, url='.GetUrl($Context->Configuration, 'index.php'));
}
}
?>
1 to 2 of 2