iwla/plugins/display/referers_diff.py

62 lines
1.6 KiB
Python
Raw Permalink Normal View History

2014-12-21 15:36:39 +01:00
# -*- coding: utf-8 -*-
#
# Copyright Grégory Soutadé 2015
# 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
2020-10-30 14:42:56 +01:00
from .istats_diff import IWLADisplayStatsDiff
2014-12-21 15:36:39 +01:00
from display import *
"""
Display hook
Enlight new and updated key phrases in in all_key_phrases.html
Plugin requirements :
display/referers
Conf values needed :
None
Output files :
None
Statistics creation :
None
Statistics update :
None
Statistics deletion :
None
"""
2014-12-31 14:22:46 +01:00
class IWLADisplayReferersDiff(IWLADisplayStatsDiff):
2014-12-21 15:36:39 +01:00
def __init__(self, iwla):
super(IWLADisplayReferersDiff, self).__init__(iwla)
self.API_VERSION = 1
self.requires = ['IWLADisplayReferers']
2014-12-31 14:22:46 +01:00
self.month_stats_key = 'key_phrases'
self.filename = 'key_phrases.html'
self.block_name = self.iwla._(u'Key phrases')
2014-12-21 15:36:39 +01:00
def load(self):
if not self.iwla.getConfValue('create_all_key_phrases_page', True):
return False
2014-12-31 14:22:46 +01:00
return super(IWLADisplayReferersDiff, self).load()