mirror of
https://framagit.org/fiat-tux/hat-softwares/lutim.git
synced 2026-06-19 17:44:48 +02:00
Add possibility to display a message on all LUTIm pages
This commit is contained in:
@@ -55,6 +55,7 @@ vi lutim.conf
|
||||
* https: 1 if you want to provide secure images URLs (default is 0) ;
|
||||
* stats\_day\_num: when you generate statistics with `script/lutim cron stats`, you will have stats for the last `stats_day_num` days (default is 365) ;
|
||||
* keep\_ip\_during: when you delete IP addresses of image's senders with `script/lutim cron cleanbdd`, the IP addresses of images older than `keep_ip_during` days will be deleted (default is 365) ;
|
||||
* broadcast\_message: put some string (not HTML) here and this message will be displayed on all LUTIm pages (not in JSON responses)
|
||||
|
||||
##Usage
|
||||
```
|
||||
@@ -125,6 +126,14 @@ If the files directory go under quota, the `stop-upload` file is deleted. If you
|
||||
carton exec script/lutim cron watch
|
||||
```
|
||||
|
||||
##Broadcast message
|
||||
Set a string in the `broadcast_message` option of `lutim.conf` and reload the server with:
|
||||
```shell
|
||||
carton exec hypnotoad script/lutim
|
||||
```
|
||||
|
||||
It may take a few reload before the message is displayed.
|
||||
|
||||
##Shutter integration
|
||||
See where Shutter (<http://en.wikipedia.org/wiki/Shutter_%28software%29>) keeps its plugins on your computer.
|
||||
On my computer, it's in `/usr/share/shutter/resources/system/upload_plugins/upload`.
|
||||
|
||||
@@ -20,4 +20,5 @@
|
||||
#keep_ip_during => 365, # optional, number of days, after that delay, the IP addresses of image creators will be deleted (used with script/lutim cron cleanbdd)
|
||||
#max_total_size => 10*1024*1024*1024, # optional, maximum total size of the files directory (used with script/lutim cron watch)
|
||||
#policy_when_full => 'warn', # optional, policy when files directory is over max_total_size. Valid values are 'warn', 'stop-upload' and 'delete'. See README.
|
||||
#broadcast_message => 'Maintenance', #optional, the broadcast_message is displayed on all pages of LUTIm (but no in json response)
|
||||
};
|
||||
|
||||
@@ -60,6 +60,11 @@
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
% if (defined($config->{broadcast_message})) {
|
||||
<div class="alert alert-info">
|
||||
<strong><%= $config->{broadcast_message} %></strong>
|
||||
</div>
|
||||
% }
|
||||
% if (defined(stash('stop_upload'))) {
|
||||
<div class="alert alert-danger">
|
||||
<strong><%= stash('stop_upload') %></strong>
|
||||
|
||||
Reference in New Issue
Block a user