From 8f03410e5d6cbba2d7ee53affcce76a094223d43 Mon Sep 17 00:00:00 2001 From: Alex Schroeder Date: Fri, 11 Nov 2005 02:15:32 +0000 Subject: [PATCH] Initial public release --- modules/plainsite.pl | 66 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 modules/plainsite.pl diff --git a/modules/plainsite.pl b/modules/plainsite.pl new file mode 100644 index 00000000..23c59e3e --- /dev/null +++ b/modules/plainsite.pl @@ -0,0 +1,66 @@ +# Copyright (C) 2005 Fletcher T. Penney +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the +# Free Software Foundation, Inc. +# 59 Temple Place, Suite 330 +# Boston, MA 02111-1307 USA + +$ModulesDescription .= '

$Id: plainsite.pl,v 1.1 2005/11/11 02:15:32 fletcherpenney Exp $

'; + +*OldGetFooterLinks = *GetFooterLinks; +*GetFooterLinks = *PlainSiteGetFooterLinks; + +sub PlainSiteGetFooterLinks { + return if (GetParam('action','') eq 'static'); + if (UserIsAdmin() or UserIsEditor()) { + return OldGetFooterLinks(@_); + } else { + return; + } +} + +*OldGetFooterTimestamp = *GetFooterTimestamp; +*GetFooterTimestamp = *PlainSiteGetFooterTimestamp; + +sub PlainSiteGetFooterTimestamp { + return if (GetParam('action','') eq 'static'); + if (UserIsAdmin() or UserIsEditor()) { + return OldGetFooterTimestamp(@_); + } else { + return; + } +} + +*OldGetRcRss = *GetRcRss; +*GetRcRss = *PlainSiteGetRcRss; + +sub PlainSiteGetRcRss { + # Have Rss point to HomePage rather than RecentChanges, since we want + # to avoid drawing visitors to RecentChanges + $RCName = $HomePage; + OldGetRcRss(@_); +} + +*DoRc = *PlainSiteDoRc; + +sub PlainSiteDoRc { + # must load before clustermap module if used + return; +} + +*GetNearLinksUsed = *PlainSiteGetNearLinksUsed; + +sub PlainSiteGetNearLinksUsed { + return; +} \ No newline at end of file