iwla

iwla Git Source Tree

Root/plugins/display/referers_diff.py

1# -*- coding: utf-8 -*-
2#
3# Copyright Grégory Soutadé 2015
4
5# This file is part of iwla
6
7# iwla is free software: you can redistribute it and/or modify
8# it under the terms of the GNU General Public License as published by
9# the Free Software Foundation, either version 3 of the License, or
10# (at your option) any later version.
11#
12# iwla is distributed in the hope that it will be useful,
13# but WITHOUT ANY WARRANTY; without even the implied warranty of
14# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15# GNU General Public License for more details.
16#
17# You should have received a copy of the GNU General Public License
18# along with iwla. If not, see <http://www.gnu.org/licenses/>.
19#
20
21from iwla import IWLA
22from .istats_diff import IWLADisplayStatsDiff
23from display import *
24
25"""
26Display hook
27
28Enlight new and updated key phrases in in all_key_phrases.html
29
30Plugin requirements :
31 display/referers
32
33Conf values needed :
34 None
35
36Output files :
37 None
38
39Statistics creation :
40 None
41
42Statistics update :
43 None
44
45Statistics deletion :
46 None
47"""
48
49class IWLADisplayReferersDiff(IWLADisplayStatsDiff):
50 def __init__(self, iwla):
51 super(IWLADisplayReferersDiff, self).__init__(iwla)
52 self.API_VERSION = 1
53 self.requires = ['IWLADisplayReferers']
54 self.month_stats_key = 'key_phrases'
55 self.filename = 'key_phrases.html'
56 self.block_name = self.iwla._(u'Key phrases')
57
58 def load(self):
59 if not self.iwla.getConfValue('create_all_key_phrases_page', True):
60 return False
61 return super(IWLADisplayReferersDiff, self).load()

Archive Download this file

Branches

Tags