iwla/plugins/display/top_pages_diff.py
Gregory Soutade bb268114b2 Make backup before compressing (low memory servers)
Fix error : Call post hook plugins even in display only mode
Don't compute unordered hits (remove pasts if they are found after current)
Remove tags in stats diff
Don't do geolocalisation is visitor is not valid
Don't try to find search engine on robots
Update robot check rules
Add top_pages_diff plugin
2019-08-30 07:50:54 +02:00

62 lines
1.6 KiB
Python

# -*- coding: utf-8 -*-
#
# Copyright Grégory Soutadé 2018
# This file is part of iwla
# iwla 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 3 of the License, or
# (at your option) any later version.
#
# iwla 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 iwla. If not, see <http://www.gnu.org/licenses/>.
#
from iwla import IWLA
from istats_diff import IWLADisplayStatsDiff
from display import *
"""
Display hook
Enlight new and updated pages in in top_pages.html
Plugin requirements :
display/top_pages
Conf values needed :
None
Output files :
None
Statistics creation :
None
Statistics update :
None
Statistics deletion :
None
"""
class IWLADisplayTopPagesDiff(IWLADisplayStatsDiff):
def __init__(self, iwla):
super(IWLADisplayTopPagesDiff, self).__init__(iwla)
self.API_VERSION = 1
self.requires = ['IWLADisplayTopPages']
self.month_stats_key = u'top_pages'
self.filename = u'top_pages.html'
self.block_name = self.iwla._(u'All Pages')
def load(self):
if not self.iwla.getConfValue('create_all_pages_page', True):
return False
return super(IWLADisplayTopPagesDiff, self).load()