Previously it was handled inconsistently.
This also consistently uses the images uri configured in the config file.
You can also configure a separate base uri for the images included with
BSE as [uri].dist_images.
DATADIR is also now configurable as [paths].data
#$con =~ s/(^\$DBCLASS = ')[^']*/$1 . BSE::Test::test_dbclass()/me;
#$con =~ s/(^\$UN = ')[^']*/$1$dbuser/m;
#$con =~ s/(^\$PW = ')[^']*/$1$dbpass/m;
-$con =~ s/(^\$BASEDIR = ')[^']+/$1 . BSE::Test::base_dir/me;
+#$con =~ s/(^\$BASEDIR = ')[^']+/$1 . BSE::Test::base_dir/me;
#$con =~ s/(^\$URLBASE = ["'])[^'"]+/$1 . BSE::Test::base_url/me;
#$con =~ s/(^\$SECURLBASE = ["'])[^'"]+/$1 . BSE::Test::test_securl/me;
$con =~ s/(^\$SESSION_CLASS = [\"\'])[^\'\"]+/$1 . BSE::Test::test_sessionclass()/me;
my %conf;
$conf{site}{url} = BSE::Test::base_url();
$conf{site}{secureurl} = BSE::Test::base_securl();
-my $uploads = "$instbase/uploads";
-$conf{paths}{downloads} = $uploads;
-my $templates = "$instbase/templates";
-$conf{paths}{templates} = $templates;
-$conf{paths}{public_html} = "$instbase/htdocs";
+$conf{paths}{siteroot} = $instbase;
+#my $uploads = "$instbase/uploads";
+#$conf{paths}{downloads} = $uploads;
+#my $templates = "$instbase/templates";
+#$conf{paths}{templates} = $templates;
+#$conf{paths}{public_html} = "$instbase/htdocs";
open TESTCONF, "< $conffile"
or die "Could not open config file $conffile: $!";
while (<TESTCONF>) {
$conf{lc $1}{lc $2} = $3;
}
-$uploads = $conf{paths}{downloads};
+#$uploads = $conf{paths}{downloads};
# create installation config
$conf{db}{class} = BSE::Test::test_dbclass();
close CFG;
--d $uploads
- or mkdir $uploads, 0777
- or die "Cannot find or create upload directory: $!";
+#-d $uploads
+# or mkdir $uploads, 0777
+# or die "Cannot find or create upload directory: $!";
# build the database
use strict;
use FindBin;
use lib "$FindBin::Bin/../modules";
+use BSE::API qw(bse_init);
use BSE::TB::Images;
use Articles;
-use Constants qw($IMAGEDIR);
+use BSE::CfgInfo qw(cfg_image_dir);
+use File::Spec::Functions qw(catfile);
+
+bse_init("..");
my %articleIds = ( -1 => 1 );
my $images = BSE::TB::Images->new;
print "\nRemoving unused images\n";
-opendir IMG, $IMAGEDIR
- or do { print "Cannot open $IMAGEDIR: $!\n"; exit };
+my $image_dir = cfg_image_dir();
+opendir IMG, $image_dir
+ or do { print "Cannot open $image_dir: $!\n"; exit };
while (defined(my $file = readdir IMG)) {
if ($file =~ /^\d{8}/) {
print ".";
- unless ($names{$file} || !-f "$IMAGEDIR$file") {
+ unless ($names{$file} || !-f catfile($image_dir, $file)) {
print "x";
-
- unlink $IMAGEDIR.$file
- or print "\nCould not remove $IMAGEDIR$file: $!\n";
+
+ unlink catfile($image_dir, $file)
+ or print "\nCould not remove $image_dir$file: $!\n";
}
}
}
=head1 WARNING
-This will remove B<any> images in $IMAGEDIR that have names starting
-with 8 or more digits if they don't exist in the C<image> table as a
-record with a current article number.
+This will remove B<any> images in the configured managed images
+directory that have names starting with 8 or more digits if
+they don't exist in the C<image> table as a record with a current
+article number.
If you need image names of this form, put them elsewhere, or
-reconfigure $IMAGEDIR.
+reconfigure the managed images directory.
=head1 DESCRIPTION
=item
-you may have deleted articles with images under an older version, which would have left the image records (and the image files)
+you may have deleted articles with images under an older version,
+which would have left the image records (and the image files)
=back
[paths]
; the following needs to be set to a path writable by the BSE processes
-downloads = /somewhere
-siteuser_images = $(paths/downloads)
-dynamic_cache=$(paths/downloads)/../cache
-backgroundlogs=$(downloads)/../backlogs
+; set [paths].siteroot
+downloads = $(siteroot)/uploads
+siteuser_images = $(downloads)
+dynamic_cache=$(siteroot)/cache
+backgroundlogs=$(siteroot)/backlogs
+public_html=$(siteroot)/htdocs
public_files=$(public_html)/managed_assets
+images=$(public_html)/managed_assets
+data=($siteroot)/data
+templates=$(siteroot)/templates
+
+[uri]
+images=/managed_assets
[pregenerate]
package BSE::Arrows;
use strict;
use BSE::Util::HTML;
+use BSE::CfgInfo qw(cfg_dist_image_uri);
-our $VERSION = "1.000";
+our $VERSION = "1.001";
use base 'Exporter';
my $section = $type ? "$type arrows" : "arrows";
my $prefix = $cfg->entry($section, "prefix", $type);
- my $images_uri = $cfg->entry('uri', 'images', '/images');
+ my $images_uri = cfg_dist_image_uri();
my $html = '';
my $want_xhtml = $cfg->entryBool('basic', 'xhtml', 1);
my $extra_attr = "";
$extra_attr .= qq(width="$image_width" height="$image_height" );
}
- my $nomove = qq'<img src="/images/trans_pixel.gif" alt="" $extra_attr/>';
+ my $nomove = qq'<img src="$images_uri/trans_pixel.gif" alt="" $extra_attr/>';
if ($down_url) {
my $down_img = $cfg->entry($section, "downimg", "$images_uri/admin/${prefix}move_down.gif");
$down_url .= "&r=".escape_uri($refresh) if $refresh;
package BSE::CfgInfo;
use strict;
-our $VERSION = "1.000";
+our $VERSION = "1.001";
use vars qw(@ISA @EXPORT_OK);
require Exporter;
@ISA = qw(Exporter);
-@EXPORT_OK = qw(custom_class admin_base_url cfg_image_dir credit_card_class product_options bse_default_country);
+@EXPORT_OK = qw(custom_class admin_base_url cfg_image_dir cfg_image_uri cfg_dist_image_uri cfg_data_dir credit_card_class product_options bse_default_country);
=head1 NAME
return $base;
}
+=item cfg_image_dir()
+
+Return the directory configured for storage of managed images.
+
+=cut
+
sub cfg_image_dir {
my ($cfg) = @_;
- $cfg->entry('paths', 'images', $Constants::IMAGEDIR);
+ $cfg ||= BSE::Cfg->single;
+
+ return $cfg->entryIfVar('paths', 'images', $Constants::IMAGEDIR);
+}
+
+=item cfg_image_uri()
+
+Return the configured base URI for managed images.
+
+This should correspond to the directory specified by [paths].images
+
+Configured with [uri].images
+
+=cut
+
+sub cfg_image_uri {
+ my ($cfg) = @_;
+
+ $cfg ||= BSE::Cfg->single;
+
+ require Constants;
+ return $cfg->entryIfVar('uri', 'images', $Constants::IMAGES_URI);
+}
+
+=item cfg_dist_image_uri()
+
+Return the configured base URI for images distributed with BSE.
+
+This imcludes images such as F<trans_pixel.gif> and C<admin/error.gif>.
+
+Must not include a trailing C</>.
+
+Configured with [uri].dist_images
+
+=cut
+
+sub cfg_dist_image_uri {
+ my ($cfg) = @_;
+
+ $cfg ||= BSE::Cfg->single;
+
+ return $cfg->entryIfVar('uri', 'dist_images', "/images");
+}
+
+=item cfg_data_dir()
+
+Returns the directory configured for storage of files such as
+F<stopwords.txt>.
+
+Configured with [paths].data
+
+=cut
+
+sub cfg_data_dir {
+ my ($cfg) = @_;
+
+ $cfg ||= BSE::Cfg->single;
+
+ return $cfg->entryIfVar('paths', 'data', $Constants::DATADIR);
}
=item credit_card_class
use BSE::Permissions;
use BSE::Util::HTML qw(:default popup_menu);
use BSE::Arrows;
-use BSE::CfgInfo qw(custom_class admin_base_url cfg_image_dir);
+use BSE::CfgInfo qw(custom_class admin_base_url cfg_image_dir cfg_dist_image_uri cfg_image_uri);
use BSE::Util::Iterate;
use BSE::Template;
use BSE::Util::ContentType qw(content_type);
use List::Util qw(first);
use constant MAX_FILE_DISPLAYNAME_LENGTH => 255;
-our $VERSION = "1.026";
+our $VERSION = "1.027";
=head1 NAME
$urladd = '' unless defined $urladd;
my $cgi_uri = $self->{cfg}->entry('uri', 'cgi', '/cgi-bin');
- my $images_uri = $self->{cfg}->entry('uri', 'images', '/images');
+ my $images_uri = cfg_dist_image_uri();
my $html = '';
my $url = $ENV{SCRIPT_NAME} . "?id=$article->{id}";
if ($cgi->param('_t')) {
$urladd = '' unless defined $urladd;
my $cgi_uri = $self->{cfg}->entry('uri', 'cgi', '/cgi-bin');
- my $images_uri = $self->{cfg}->entry('uri', 'images', '/images');
+ my $images_uri = cfg_dist_image_uri();
my $urlbase = admin_base_url($req->cfg);
my $refresh_url = "$urlbase$ENV{SCRIPT_NAME}?id=$article->{id}";
my $t = $req->cgi->param('_t');
$changes{$id}{image} = $image_name;
$changes{$id}{storage} = 'local';
- $changes{$id}{src} = "/images/$image_name";
+ $changes{$id}{src} = cfg_image_uri() . "/" . $image_name;
$changes{$id}{width} = $width;
$changes{$id}{height} = $height;
$changes{$id}{ftype} = $self->_image_ftype($type);
displayOrder=>time,
name => $imageref,
storage => 'local',
- src => '/images/' . $filename,
+ src => cfg_image_uri() . '/' . $filename,
ftype => $self->_image_ftype($type),
);
require BSE::TB::Images;
}
my $imagedir = cfg_image_dir($req->cfg);
- unlink "$imagedir$image->{image}";
$image->remove;
generate_article($articles, $article) if $Constants::AUTO_GENERATE;
my $geometry_id = $cgi->param('g');
defined $geometry_id or $geometry_id = 'editor';
my $geometry = $cfg->entry('thumb geometries', $geometry_id, 'scale(200x200)');
- my $imagedir = $cfg->entry('paths', 'images', $Constants::IMAGEDIR);
+ my $imagedir = cfg_image_dir();
my $error;
($data, $type) = $thumb_obj->thumb_data
}
else {
# grab the nothumb image
- my $uri = $cfg->entry('editor', 'default_thumbnail', '/images/admin/nothumb.png');
+ my $uri = $cfg->entry('editor', 'default_thumbnail', cfg_dist_image_uri() . '/admin/nothumb.png');
my $filebase = $cfg->content_base_path;
if (open IMG, "<$filebase/$uri") {
binmode IMG;
$image->{width} = $width;
$image->{height} = $height;
$image->{storage} = 'local'; # not on the remote store yet
- $image->{src} = '/images/' . $image_name;
+ $image->{src} = cfg_image_uri() . '/' . $image_name;
$image->{ftype} = $self->_image_ftype($type);
}
else {
use BSE::Util::HTML;
use Carp 'confess';
-our $VERSION = "1.003";
+our $VERSION = "1.004";
use base 'DevHelp::Formatter';
sub image_url {
my ($self, $im) = @_;
- $im->{src} || "/images/$im->{image}"
+ return $im->{src}
+ if $im->src;
+
+ require BSE::CfgInfo;
+
+ return BSE::CfgInfo::cfg_image_uri() . "/" . $im->{image};
}
sub _image {
use strict;
use base 'BSE::Index::Base';
use BSE::DB;
-use Constants qw($DATADIR $MAXPHRASE);
+use Constants qw($MAXPHRASE);
+use BSE::CfgInfo qw(cfg_data_dir);
-our $VERSION = "1.001";
+our $VERSION = "1.002";
sub new {
my ($class, %opts) = @_;
sub start_index {
my $self = shift;
- my $stopwords = "$DATADIR/stopwords.txt";
+ my $data_dir = cfg_data_dir();
+ my $stopwords = "$data_dir/stopwords.txt";
# load the stop words
open STOP, "< $stopwords"
use strict;
use BSE::Storage::LocalBase;
our @ISA = qw(BSE::Storage::LocalBase);
+use BSE::CfgInfo qw(cfg_image_uri);
-our $VERSION = "1.000";
+our $VERSION = "1.001";
sub store {
my ($self, $path, $basename) = @_;
# nothing to do
- return '/images/' . $basename;
+ return cfg_image_uri() . '/' . $basename;
}
sub url {
my ($self, $basename) = @_;
- '/images/' . $basename;
+
+ return cfg_image_uri() . '/' . $basename;
}
1;
use vars qw/@ISA/;
@ISA = qw/Squirrel::Row/;
-our $VERSION = "1.001";
+our $VERSION = "1.002";
sub columns {
return qw/id name title description frequency keyword archive
my @cols = Article->columns;
shift @cols;
my $article = Articles->add(@article{@cols});
- use Constants qw(:edit $CGI_URI $IMAGES_URI $ARTICLE_URI $LINK_TITLES);
+ use Constants qw(:edit $CGI_URI $ARTICLE_URI $LINK_TITLES);
my $link = "$ARTICLE_URI/$article->{id}.html";
if ($LINK_TITLES) {
(my $extra = lc $article->{title}) =~ tr/a-z0-9/_/sc;
@ISA = qw/Squirrel::Row BSE::ThumbCommon/;
use Carp qw(confess);
-our $VERSION = "1.003";
+our $VERSION = "1.004";
sub columns {
return qw/id articleId image alt width height url displayOrder name
}
}
+sub remove {
+ my ($self) = @_;
+
+ unlink $self->full_filename;
+ return $self->SUPER::remove();
+}
+
sub update {
my ($image, %opts) = @_;
@ISA = qw(Squirrel::Table);
use BSE::TB::Image;
-our $VERSION = "1.002";
+our $VERSION = "1.003";
sub rowClass {
return 'BSE::TB::Image';
Traditionally C</images/>, but it's meant to be configurable.
+This includes a trailing C</> unlike L<BSE::CfgInfo/cfg_image_uri()>.
+
=cut
sub base_uri {
- return BSE::Cfg->single->entryIfVar("site", "images", "/images/");
+ require BSE::CfgInfo;
+ return BSE::CfgInfo::cfg_image_uri() . "/";
}
=item get_ftype($is_type)
use strict;
use Carp qw(confess);
-our $VERSION = "1.005";
+our $VERSION = "1.006";
=head1 NAME
sub remove_images {
my ($self, $cfg) = @_;
+ $cfg ||= BSE::Cfg->single;
my @images = $self->images;
my $mgr;
- my $imagedir = $cfg->entry('paths', 'images', $Constants::IMAGEDIR);
+ require BSE::CfgInfo;
+ my $imagedir = BSE::CfgInfo::cfg_image_dir($cfg);
for my $image (@images) {
if ($image->{storage} ne 'local') {
unless ($mgr) {
$mgr->unstore($image->{image}, $image->{storage});
}
- unlink("$imagedir/$image->{image}");
$image->remove();
}
}
use BSE::TB::Orders;
use BSE::TB::OrderItems;
use BSE::Template;
-#use Squirrel::ImageEditor;
use Constants qw(:shop $SHOPID $PRODUCTPARENT
- $SHOP_URI $CGI_URI $IMAGES_URI $AUTO_GENERATE);
+ $SHOP_URI $CGI_URI $AUTO_GENERATE);
use BSE::TB::Images;
use Articles;
use BSE::Sort;
use BSE::Util::HTML qw(:default popup_menu);
use BSE::Arrows;
use BSE::Shop::Util qw(:payment order_item_opts nice_options payment_types);
+use BSE::CfgInfo qw(cfg_dist_image_uri);
-our $VERSION = "1.015";
+our $VERSION = "1.016";
my %actions =
(
grep $_->{generator} eq 'Generate::Catalog',
Articles->children($catalog->{id});
- my $blank = qq!<img src="$IMAGES_URI/trans_pixel.gif" width="17" height="13" border="0" align="absbottom" />!;
+ my $image_uri = cfg_dist_image_uri();
+ my $blank = qq!<img src="$image_uri/trans_pixel.gif" width="17" height="13" border="0" align="absbottom" />!;
my %acts;
%acts =
$products->getBy(parentid => $shopid);
my $product_index;
- my $blank = qq!<img src="$IMAGES_URI/trans_pixel.gif" width="17" height="13" border="0" align="absbottom" />!;
+ my $image_uri = cfg_dist_image_uri();
+ my $blank = qq!<img src="$image_uri/trans_pixel.gif" width="17" height="13" border="0" align="absbottom" />!;
my $it = BSE::Util::Iterate->new;
# if $product->{id};
my $image_index;
- my $blank = qq!<img src="$IMAGES_URI/trans_pixel.gif" width="17" height="13" border="0" align="absbottom" />!;
+ my $image_uri = cfg_dist_image_uri();
+ my $blank = qq!<img src="$image_uri/trans_pixel.gif" width="17" height="13" border="0" align="absbottom" />!;
my %acts;
%acts =
@ISA = qw(Exporter);
require Exporter;
-our $VERSION = "1.021";
+our $VERSION = "1.022";
sub _get_parms {
my ($acts, $args) = @_;
return '' unless @$msg > $num && $msg->[$num];
$msg = $msg->[$num];
}
- my $images_uri = $cfg->entry('uri', 'images', '/images');
+ my $images_uri = BSE::CfgInfo::cfg_dist_image_uri($cfg);
my $image = $cfg->entry('error_img', 'image', "$images_uri/admin/error.gif");
my $width = $cfg->entry('error_img', 'width', 16);
my $height = $cfg->entry('error_img', 'height', 16);
package Generate;
use strict;
use Articles;
-use Constants qw($IMAGEDIR $LOCAL_FORMAT $BODY_EMBED
+use Constants qw($LOCAL_FORMAT $BODY_EMBED
$EMBED_MAX_DEPTH $HAVE_HTML_PARSER);
use DevHelp::Tags;
use BSE::Util::HTML;
use BSE::Util::Tags qw(tag_article);
-use BSE::CfgInfo qw(custom_class);
+use BSE::CfgInfo qw(custom_class cfg_image_dir cfg_image_uri);
use BSE::Util::Iterate;
use BSE::TB::Site;
use BSE::Variables;
use base 'BSE::ThumbLow';
use base 'BSE::TagFormats';
-our $VERSION = "1.009";
+our $VERSION = "1.010";
my $excerptSize = 300;
titleImage=>
sub {
my ($image, $text) = split ' ', $_[0];
- if (-e $IMAGEDIR."/titles/".$image) {
- return qq!<img src="/images/titles/!.$image .qq!" border=0>!
+
+ my $image_dir = cfg_image_dir();
+ if (-e "$image_dir/titles/$image") {
+ my $image_uri = cfg_image_uri();
+ return qq!<img src="$image_uri/titles/!.$image .qq!" border=0>!
}
else {
return escape_html($text);
=item titleImage I<imagename> I<text>
Generates an IMG tag if the given I<imagename> is in the title image
-directory ($IMAGEDIR/titles). If it doesn't exists, produces the
-I<text>.
+directory (F<titles> in the managed images directory). If it doesn't
+exist, produce I<text>.
=item embed I<which>
package Generate::Article;
use strict;
use BSE::Template;
-use Constants qw(%LEVEL_DEFAULTS $CGI_URI $ADMIN_URI $IMAGES_URI
+use Constants qw(%LEVEL_DEFAULTS $CGI_URI $ADMIN_URI
$UNLISTED_LEVEL1_IN_CRUMBS);
use BSE::TB::Images;
use vars qw(@ISA);
use BSE::Arrows;
use Carp 'confess';
use BSE::Util::Iterate;
+use BSE::CfgInfo qw(cfg_dist_image_uri);
-our $VERSION = "1.005";
+our $VERSION = "1.006";
my $excerptSize = 300;
}
if ($im) {
- my $src = $im->{src} || "/images/$im->{image}";
+ my $src = $im->image_url;
$src = escape_html($src);
return qq!<img src="$src" width="$im->{width}"!
. qq! height="$im->{height}" alt="$title" class="bse_image_title" />!;
BSE::TB::ArticleFiles->getBy(articleId=>$article->{id});
my @files = grep !$_->{hide_from_list}, @all_files;
- my $blank = qq!<img src="$IMAGES_URI/trans_pixel.gif" width="17" height="13" border="0" align="absbottom" alt="" />!;
+ my $image_uri = cfg_dist_image_uri();
+ my $blank = qq!<img src="$image_uri/trans_pixel.gif" width="17" height="13" border="0" align="absbottom" alt="" />!;
my $top = $self->{top} || $article;
my $abs_urls = $self->abs_urls($article);
(my $image = $templater->perform($acts, $which, 'thumbImage'))) {
my $width = $templater->perform($acts, $which, 'thumbWidth');
my $height = $templater->perform($acts, $which, 'thumbHeight');
- my $result = '<img src="/images/'.$image
+ my $image_uri = cfg_image_uri();
+ my $result = qq(<img src="$image_uri/$image")
.'" width="'.$width
.'" height="'.$height.'"';
$result .= qq! class="$class"! if $class;
@children > 1 or return '';
if ($self->{admin} && $child_index < $#children) {
my $html = <<HTML;
-<a href="$CGI_URI/admin/move.pl?id=$children[$child_index]{id}&d=down"><img src="$IMAGES_URI/admin/move_down.gif" width="17" height="13" border="0" alt="Move Down" align="bottom" /></a>
+<a href="$CGI_URI/admin/move.pl?id=$children[$child_index]{id}&d=down"><img src="$image_uri/admin/move_down.gif" width="17" height="13" border="0" alt="Move Down" align="bottom" /></a>
HTML
chop $html;
return $html;
@children > 1 or return '';
if ($self->{admin} && $child_index > 0) {
my $html = <<HTML;
-<a href="$CGI_URI/admin/move.pl?id=$children[$child_index]{id}&d=up"><img src="$IMAGES_URI/admin/move_up.gif" width="17" height="13" border="0" alt="Move Up" align="bottom" /></a>
+<a href="$CGI_URI/admin/move.pl?id=$children[$child_index]{id}&d=up"><img src="$image_uri/admin/move_up.gif" width="17" height="13" border="0" alt="Move Up" align="bottom" /></a>
HTML
chop $html;
return $html;
package Generate::Catalog;
-our $VERSION = "1.003";
+our $VERSION = "1.004";
use strict;
use Generate;
use Products;
use base 'Generate::Article';
use BSE::Template;
-use Constants qw($CGI_URI $IMAGES_URI $ADMIN_URI);
+use Constants qw($CGI_URI $ADMIN_URI);
use BSE::Regen qw(generate_button);
use OtherParents;
use DevHelp::HTML;
use BSE::Arrows;
use BSE::Util::Iterate;
+use BSE::CfgInfo qw(cfg_dist_image_uri);
sub _default_admin {
my ($self, $article, $embedded) = @_;
my $it = BSE::Util::Iterate->new;
my $cfg = $self->{cfg};
my $art_it = BSE::Util::Iterate::Article->new(cfg => $cfg);
+ my $image_uri = cfg_dist_image_uri();
my %work =
(
$self->SUPER::baseActs($articles, $acts, $article, $embedded),
sub {
if ($self->{admin} && $product_index < $#products) {
my $html = <<HTML;
- <a href="$CGI_URI/admin/move.pl?id=$products[$product_index]{id}&d=down"><img src="$IMAGES_URI/admin/move_down.gif" width="17" height="13" border="0" alt="Move Down" align="absbottom" /></a>
+ <a href="$CGI_URI/admin/move.pl?id=$products[$product_index]{id}&d=down"><img src="$image_uri/admin/move_down.gif" width="17" height="13" border="0" alt="Move Down" align="absbottom" /></a>
HTML
chop $html;
return $html;
sub {
if ($self->{admin} && $product_index > 0) {
my $html = <<HTML;
- <a href="$CGI_URI/admin/move.pl?id=$products[$product_index]{id}&d=up"><img src="$IMAGES_URI/admin/move_up.gif" width="17" height="13" border="0" alt="Move Up" align="absbottom" /></a>
+ <a href="$CGI_URI/admin/move.pl?id=$products[$product_index]{id}&d=up"><img src="$image_uri/admin/move_up.gif" width="17" height="13" border="0" alt="Move Up" align="absbottom" /></a>
HTML
chop $html;
return $html;
my $can_move_up = $allprod_index > 0;
my $can_move_down = $allprod_index < $#allprods;
return '' unless $can_move_up || $can_move_down;
- my $blank = '<img src="/images/trans_pixel.gif" width="17" height="13" border="0" align="absbotton" alt="" />';
+ my $blank = qq(<img src="$image_uri/trans_pixel.gif" width="17" height="13" border="0" align="absbotton" alt="" />);
my $myid = $allprods[$allprod_index]{id};
my $top = $self->{top} || $article;
my $refreshto = "$CGI_URI/admin/admin.pl?id=$top->{id}$urladd";
-
=head1 NAME
config.pod - documents BSE configuration file options
=over
+=item articles
+
=item cgi
The URI to the CGI directory. Default: /cgi-bin
+=item dist_images
+
+The URI where images included with BSE can be found.
+
+This includes images such as F<trans_pixel.gif> and C<admin/error.gif>.
+
+Default: C</images>
+
=item images
-The URI where images are kept. Default: /images
+The URI where managed images are kept which should correspond to
+C<images> in C<[paths]>.
-=item shop
+Default: C</images> (from C<$Constants::IMAGES_URI>)
-=item articles
+=item shop
=back
=item titleImage I<imagename> I<text>
Generates an IMG tag if the given I<imagename> is in the title image
-directory ($IMAGEDIR/titles). If it doesn't exists, produces the
-I<text>.
+directory (F<titles> in the configured image directory). If it
+doesn't exists, produces the I<text>.
=item embed I<which>