It can be disabled on an article basis.
It can be disabled on a global basis.
It can be defaulted to disabled for new articles.
Life is good.
+BSE 0.22 - unreleased
+========
+
+ - automatic image insertion can now be disabled globally or on a
+ per-article basis.
+ https://rt4.develop-help.com/Ticket/Display.html?id=1331
+
BSE 0.21 - 07 Mar 2012
========
use List::Util qw(first);
use constant MAX_FILE_DISPLAYNAME_LENGTH => 255;
-our $VERSION = "1.022";
+our $VERSION = "1.023";
=head1 NAME
my $cgi = $req->cgi;
my $image_pos = $cgi->param('imagePos');
if ($image_pos
- && $image_pos =~ /^(?:tl|tr|bl|br)$/
+ && $image_pos =~ /^(?:tl|tr|bl|br|xx)$/
&& $image_pos ne $article->{imagePos}) {
$article->{imagePos} = $image_pos;
$article->save;
use base 'BSE::ThumbLow';
use base 'BSE::TagFormats';
-our $VERSION = "1.005";
+our $VERSION = "1.006";
my $excerptSize = 300;
# we don't format named images
my @images = grep $_->{name} eq '', @$images;
- if ($auto_images && @images) {
+ if ($auto_images
+ && @images
+ && $self->{cfg}->entry('basic', 'auto_images', 1)
+ && $imagePos ne 'xx') {
# the first image simply goes where we're told to put it
# the imagePos is [tb][rl] (top|bottom)(right|left)
my $align = $imagePos =~ /r/ ? 'right' : 'left';
cache, if any. Depending on the configured cache this may slow things
down. Default: disabled.
+=item auto_images
+
+By default, if the author doesn't use any image tags, BSE will insert
+any unnamed article images into the body text of an article. You can
+disable this on a per-article basis in the image tool, or disable it
+globally by setting C<auto_images> to 0.
+
+An alternative is to set C<imagePos> in C<[article defaults]> to
+C<xx> which will default articles to not auto-inserting images.
+
=back
=head2 [mail]
<h2>Manage images</h2>
<table class="editform images">
- <:if Images:><:if Eq [article id] "-1":><:or Eq:><tr>
+ <:if Images:><:if Eq [article id] "-1":><:or Eq:><:if Cfg basic auto_images 1:><tr>
<th colspan="5">First Image Position</th>
</tr>
<tr>
<td colspan="5">
-<input type="radio" name="imagePos" value="tl" <: ifEq [article imagePos] "tl":>checked<:or:><:eif:>
- />Top Left <input type="radio" name="imagePos" value="tr" <: ifEq [article imagePos] "tr":>checked<:or:><:eif:>
- />Top Right <input type="radio" name="imagePos" value="bl" <: ifEq [article imagePos] "bl":>checked<:or:><:eif:>
- />Bottom Left <input type="radio" name="imagePos" value="br" <: ifEq [article imagePos] "br":>checked<:or:><:eif:>
- />Bottom Right <:help image position:>
+<input type="radio" name="imagePos" value="tl" <: ifEq [article imagePos] "tl":>checked<:eif:> />Top Left
+<input type="radio" name="imagePos" value="tr" <: ifEq [article imagePos] "tr":>checked<:eif:> />Top Right
+<input type="radio" name="imagePos" value="bl" <: ifEq [article imagePos] "bl":>checked<:eif:> />Bottom Left
+<input type="radio" name="imagePos" value="br" <: ifEq [article imagePos] "br":>checked<:eif:> />Bottom Right
+<input type="radio" name="imagePos" value="xx" <: ifEq [article imagePos] "xx":>checked<:eif:> />Don't automatically insert images
+
+<:help image position:>
</td>
- </tr><:eif Eq:>
+ </tr><:eif Cfg:><:eif Eq:>
<:if Thumbs:>
<tr>
<th>Image</th>