Skip to content

Commit 43d3a04

Browse files
committed
make default image width configurable
1 parent 8f3ce96 commit 43d3a04

File tree

4 files changed

+4
-1
lines changed

4 files changed

+4
-1
lines changed

conf/default.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@
33
$conf['edit_content_only'] = 0;
44
$conf['use_dataresolve'] = 1;
55
$conf['rownumbers'] = 0;
6+
$conf['image_width'] = 40;

conf/metadata.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@
33
$meta['edit_content_only'] = array('onoff');
44
$meta['use_dataresolve'] = array('onoff');;
55
$meta['rownumbers'] = array('onoff');
6+
$meta['image_width'] = array('string');

helper.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,7 @@ function _formatData($column, $value, Doku_Renderer_xhtml $R) {
319319
if(substr($type, 0, 3) == 'img') {
320320
$width = (int) substr($type, 3);
321321
if(!$width) {
322-
$width = 40;
322+
$width = $this->getConf('image_width');
323323
}
324324

325325
list($mediaid, $title) = explode('|', $val, 2);

lang/en/settings.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@
55
// https://github.com/splitbrain/dokuwiki-plugin-data/commit/8a16166886238906c21c7babc44bccf49c7f50a1
66
$lang['use_dataresolve'] = 'Use DATARESOLVE calls for LIKE statements';
77
$lang['rownumbers'] = 'Enable "rownumbers" by default in all tables';
8+
$lang['image_width'] = 'Default width for images';

0 commit comments

Comments
 (0)