1 |
gregoa |
160 |
nanoblogger_plugins - additional plugins for nanoblogger |
2 |
|
|
======================================================== |
3 |
|
|
|
4 |
|
|
Author: Gregor Herrmann <gregor+debian@comodo.priv.at> |
5 |
|
|
Licence: GPL |
6 |
|
|
|
7 |
|
|
1) weblog_visits.sh |
8 |
|
|
------------------- |
9 |
|
|
Function: |
10 |
|
|
Counts hits on blog from apache access logs. |
11 |
|
|
|
12 |
|
|
Configuration: |
13 |
|
|
Set ACCESS_LOG in your configuration, e.g. |
14 |
|
|
ACCESS_LOG="/var/log/apache-ssl/vhosts/comodo-access.log*" |
15 |
|
|
Attention: The user running nb most have reading permissions on the file(s), |
16 |
|
|
e.g. be member of the adm group |
17 |
|
|
|
18 |
|
|
Usage: |
19 |
|
|
Put $TOTAL_VISITS into your templates, e.g. |
20 |
|
|
<div class="calendar"> |
21 |
|
|
Total visits (last year): $TOTAL_VISITS |
22 |
|
|
</div> |
23 |
|
|
|
24 |
|
|
|
25 |
|
|
2) calendar_prev.sh |
26 |
|
|
------------------- |
27 |
|
|
Function: |
28 |
|
|
Creates a nice calendar table but for last month. |
29 |
|
|
|
30 |
|
|
Configuration: |
31 |
|
|
Set CAL_ARGS_PREV in your config, e.g. |
32 |
|
|
CAL_ARGS_PREV="-m `date --date "$(date +%Y-%m-15) 1 months ago" +'%B %Y'`" |
33 |
|
|
|
34 |
|
|
Usage: |
35 |
|
|
Put $NB_Calendar_prev into your templates, e.g. |
36 |
|
|
<div class="side"> |
37 |
|
|
$NB_Calendar_prev |
38 |
|
|
</div> |