site/cgi-bin/modules/BSE/Util/Valid.pm
site/cgi-bin/modules/BSE/Version.pm
site/cgi-bin/modules/Constants.pm
+site/cgi-bin/modules/DevHelp/HTML.pm
site/cgi-bin/modules/DevHelp/Tags.pm
site/cgi-bin/modules/Generate.pm
site/cgi-bin/modules/Generate/Article.pm
# site/htdocs/shop created by the Makefile
site/templates/1/shop_multicat.tmpl
site/templates/1/sitemap.tmpl
-site/templates/admin/add_product.tmpl
+# site/templates/admin/add_product.tmpl
site/templates/admin/article_img.tmpl
site/templates/admin/catalog.tmpl # embedded in the shopadmin catalog/product display
site/templates/admin/edit_0.tmpl
site/templates/admin/showuserart.tmpl
site/templates/admin/showuser_del.tmpl
site/templates/admin/showuser_glob.tmpl
-site/templates/admin/subs/add.tmpl
+# site/templates/admin/subs/add.tmpl
site/templates/admin/subs/edit.tmpl
site/templates/admin/subs/list.tmpl
site/templates/admin/subs/send_form.tmpl
-VERSION=0.12_22
+VERSION=0.12_23
DISTNAME=bse-$(VERSION)
DISTBUILD=$(DISTNAME)
DISTTAR=../$(DISTNAME).tar
listed smallint not null default 1,
-- date last modified
lastModified date not null,
+
+ -- flags specified via the config file
+ -- used by code and templates
+ flags varchar(80) not null default '',
+
PRIMARY KEY (id),
-- if we keep id in the indexes MySQL will sometimes be able to
or die "Could not drop old table: ", $dbh->errstr;
}
-system "/usr/local/mysql/bin/mysql -u$un -p$pw $db <$dist"
+system "mysql -u$un -p$pw $db <$dist"
and die "Error loading database";
$tl = $dbh->prepare("show tables")
eval {
require $file;
};
- return if $@;
+ if ($@) {
+ print STDERR "Loading $class: $@\n";
+ return;
+ }
return $class->new(cfg=>$cfg, db=>BSE::DB->single);
}
title=>5,
body=>3,
keyword=>4,
+ file_description => 0,
);
+for my $name (keys %scores) {
+ my $score = $cfg->entry('search index scores', $name);
+ if (defined($score) && $score =~ /^\d+$/) {
+ $scores{$name} = $score;
+ }
+}
+
# if the level of the article is higher than this, store it's parentid
# instead
my $max_level = $SEARCH_LEVEL;
until ($articles->EOF) {
# find the section
my $article = $articles->getNext;
+ next unless ($article->{listed} || $article->{flags} =~ /I/);
my $section = $article;
while ($section->{parentid} >= 1) {
$section = $articles->getByPkey($section->{parentid});
next if $dont_search{$sectionid};
for my $field (sort { $scores{$b} <=> $scores{$a} } keys %scores) {
+
+ next unless $scores{$field};
# strip out markup
- my $text = $article->{$field};
+ my $text;
+ if (exists $article->{$field}) {
+ $text = $article->{$field};
+ }
+ else {
+ if ($field eq 'file_description') {
+ my @files = $article->files;
+ $text = join "\n", map { @$_{qw/displayName description/} } @files;
+ }
+ }
#next if $text =~ m!^\<html\>!i; # I don't know how to do this (yet)
if ($field eq 'body') {
Generate->remove_block(\$text);
else {
$html .= $blank;
}
+ $html =~ tr/\n//d;
return $html;
},
script=>sub { $ENV{SCRIPT_NAME} },
else {
$html .= $blank;
}
+ $html =~ tr/\n//d;
return $html;
},
);
else {
$html .= $blank;
}
+ $html =~ tr/\n//d;
return $html;
},
ifShowStepKids => sub { $session->{showstepkids} },
else {
$html .= $blank;
}
+ $html =~ tr/\n//d;
return $html;
},
ifStepcatPossibles => sub { @stepcat_possibles },
return '';
}
},
+ ifNew => !defined($sub),
);
if ($sub) {
$acts{subscription} =
$req->user_can('subs_add')
or return list($q, $req, $cfg, "You dont have access to add subscriptions");
- sub_form($q, $req, $cfg, 'admin/subs/add', undef, 0);
+ sub_form($q, $req, $cfg, 'admin/subs/edit', undef, 0);
}
sub validate {
[level names]
0=Your Site
-1=Section
-2=Subsect Lev1
-3=Subsect Lev2
-4=Subsect Lev3
-5=Subsect Lev4
+1=Page Lev1
+2=Page Lev2
+3=Page Lev3
+4=Page Lev4
+5=Page Lev5
[articles]
shop=3
help=Full access to the article and it's decendants. The user can modify all modifiable fields for this article or product.
permissions=edit_*,regen_*
descendants=1
+
+[article flags]
+I=Index even if hidden
+
+[article 1]
+extra_templates=index.tmpl
+
+[article 2]
+extra_templates=index2.tmpl
return qw/id parentid displayOrder title titleImage body
thumbImage thumbWidth thumbHeight imagePos
release expire keyword template link admin threshold
- summaryLength generator level listed lastModified/;
+ summaryLength generator level listed lastModified flags/;
}
sub step_parents {
(
Articles => 'select * from article',
replaceArticle =>
- 'replace article values (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)',
+ 'replace article values (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)',
addArticle =>
- 'insert article values (null, ?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)',
+ 'insert article values (null, ?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)',
deleteArticle => 'delete from article where id = ?',
getArticleByPkey => 'select * from article where id = ?',
$article{body} = '';
$article{listed} = 0;
$article{generator} = $self->generator;
+ $article{flags} = '';
return $self->low_edit_form($req, \%article, $articles, $msg);
}
my @dirs = $self->template_dirs($article);
my @templates;
- my $basedir = $self->{cfg}->entryVar('paths', 'templates');
- for my $dir (@dirs) {
- my $path = File::Spec->catdir($basedir, $dir);
- if (-d $path) {
- if (opendir TEMPLATE_DIR, $path) {
- push(@templates, sort map "$dir/$_",
- grep -f "$path/$_" && /\.(tmpl|html)$/i, readdir TEMPLATE_DIR);
- closedir TEMPLATE_DIR;
+ my @basedirs = BSE::Template->template_dirs($self->{cfg});
+ for my $basedir (@basedirs) {
+ for my $dir (@dirs) {
+ my $path = File::Spec->catdir($basedir, $dir);
+ if (-d $path) {
+ if (opendir TEMPLATE_DIR, $path) {
+ push(@templates, sort map "$dir/$_",
+ grep -f "$path/$_" && /\.(tmpl|html)$/i, readdir TEMPLATE_DIR);
+ closedir TEMPLATE_DIR;
+ }
}
}
}
+
+ # eliminate any dups, and order it nicely
+ my %seen;
+ @templates = sort { lc($a) cmp lc($b) }
+ grep !$seen{$_}++, @templates;
+
return (@templates, $self->extra_templates($article));
}
else {
$html .= $blank;
}
+ $html =~ tr/\n//d;
return $html;
}
else {
$html .= $blank;
}
+ $html =~ tr/\n//d;
return $html;
}
else {
$html .= $nomove;
}
+ $html =~ tr/\n//d;
return $html;
}
}
}
+sub iter_flags {
+ my ($self) = @_;
+
+ $self->flags;
+}
+
+sub tag_if_flag_set {
+ my ($article, $arg, $acts, $funcname, $templater) = @_;
+
+ my @args = DevHelp::Tags->get_parms($arg, $acts, $templater);
+ @args or return;
+
+ return index($article->{flags}, $args[0]) >= 0;
+}
+
sub low_edit_tags {
my ($self, $acts, $request, $article, $articles, $msg, $errors) = @_;
default => [ \&tag_default, $self, $request, $article ],
articleType => [ \&tag_art_type, $article->{level}, $cfg ],
parentType => [ \&tag_art_type, $article->{level}-1, $cfg ],
- ifnew => [ \&tag_if_new, $article ],
+ ifNew => [ \&tag_if_new, $article ],
list => [ \&tag_list, $self, $article, $articles, $cgi, $request ],
script => $ENV{SCRIPT_NAME},
level => $article->{level},
error_img => [ \&tag_error_img, $self, $errors ],
ifFieldPerm => [ \&tag_if_field_perm, $request, $article ],
parent => [ \&tag_hash, $parent ],
+ DevHelp::Tags->make_iterator2
+ ([ \&iter_flags, $self ], 'flag', 'flags' ),
+ ifFlagSet => [ \&tag_if_flag_set, $article ],
);
}
sub _validate_common {
my ($self, $data, $articles, $errors) = @_;
- if (defined $data->{parentid} && $data->{parentid} =~ /^(?:-1|\d+)$/) {
- unless ($data->{parentid} == -1 or
- $articles->getByPkey($data->{parentid})) {
- $errors->{parentid} = "Selected parent article doesn't exist";
- }
- }
- else {
- $errors->{parentid} = "You need to select a valid parent";
+# if (defined $data->{parentid} && $data->{parentid} =~ /^(?:-1|\d+)$/) {
+# unless ($data->{parentid} == -1 or
+# $articles->getByPkey($data->{parentid})) {
+# $errors->{parentid} = "Selected parent article doesn't exist";
+# }
+# }
+# else {
+# $errors->{parentid} = "You need to select a valid parent";
+# }
+ if (exists $data->{title} && $data->{title} !~ /\S/) {
+ $errors->{title} = "Please enter a title";
}
if (exists $data->{template} && $data->{template} =~ /\.\./) {
}
sub validate {
- my ($self, $data, $articles, $rmsg, $errors) = @_;
+ my ($self, $data, $articles, $errors) = @_;
$self->_validate_common($data, $articles, $errors);
}
sub validate_old {
- my ($self, $article, $data, $articles, $rmsg, $errors) = @_;
+ my ($self, $article, $data, $articles, $errors) = @_;
$self->_validate_common($data, $articles, $errors);
$data{$name} = $cgi->param($name)
if defined $cgi->param($name);
}
+ $data{flags} = join '', sort $cgi->param('flags');
my $msg;
my %errors;
- $self->validate(\%data, $articles, \$msg, \%errors)
+ $self->validate(\%data, $articles, \%errors)
or return $self->add_form($req, $articles, $msg, \%errors);
my $parent;
if defined($cgi->param($name)) and $name ne 'id' && $name ne 'parentid'
&& $req->user_can("edit_field_edit_$name", $article);
}
+ # possibly this needs tighter error checking
+ $data{flags} = join '', sort $cgi->param('flags')
+ if $req->user_can("edit_field_edit_flags", $article);
my %errors;
$self->validate_old($article, \%data, $articles, \%errors)
or return $self->edit_form($req, $article, $articles, undef, \%errors);
}
sub show_images {
- my ($self, $req, $article, $articles, $msg) = @_;
+ my ($self, $req, $article, $articles, $msg, $errors) = @_;
my %acts;
- %acts = $self->low_edit_tags(\%acts, $req, $article, $articles, $msg);
+ %acts = $self->low_edit_tags(\%acts, $req, $article, $articles, $msg, $errors);
my $template = 'admin/article_img';
return BSE::Template->get_response($template, $req->cfg, \%acts);
my $image = $cgi->param('image');
unless ($image) {
return $self->show_images($req, $article, $articles,
- 'Enter or select the name of an image file on your machine');
+ 'Enter or select the name of an image file on your machine',
+ { image => 'Please enter an image filename' });
}
if (-z $image) {
return $self->show_images($req, $article, $articles,
- 'Image file is empty');
+ 'Image file is empty',
+ { image => 'Image file is empty' });
}
my $imagename = $image;
$imagename .= ''; # force it into a string
use Util 'generate_article';
generate_article($articles, $article) if $Constants::AUTO_GENERATE;
- return $self->refresh($article, $req->cgi, undef, undef, '&showimage=1');
+ return $self->refresh($article, $req->cgi, undef, undef, '&showimages=1');
}
sub move_img_down {
use Util 'generate_article';
generate_article($articles, $article) if $Constants::AUTO_GENERATE;
- return $self->refresh($article, $req->cgi, undef, undef, '&showimage=1');
+ return $self->refresh($article, $req->cgi, undef, undef, '&showimages=1');
}
sub get_article {
}
sub filelist {
- my ($self, $req, $article, $articles, $msg) = @_;
+ my ($self, $req, $article, $articles, $msg, $errors) = @_;
my %acts;
- %acts = $self->low_edit_tags(\%acts, $req, $article, $articles, $msg);
+ %acts = $self->low_edit_tags(\%acts, $req, $article, $articles, $msg, $errors);
my $template = 'admin/filelist';
return BSE::Template->get_response($template, $req->cfg, \%acts);
my $file = $cgi->param('file');
unless ($file) {
return $self->filelist($req, $article, $articles,
- "Enter or select the name of a file on your machine");
+ "Enter or select the name of a file on your machine",
+ { file => 'Please enter a filename' });
}
if (-z $file) {
return $self->filelist($req, $article, $articles,
- message=>"File is empty");
+ "File is empty",
+ { file => 'File is empty' });
}
unless ($file{contentType}) {
return '';
}
+sub flag_sections {
+ return ( 'article flags' );
+}
+
+sub flags {
+ my ($self) = @_;
+
+ my $cfg = $self->{cfg};
+
+ my @sections = $self->flag_sections;
+
+ my %flags = map $cfg->entriesCS($_), reverse @sections;
+ my @valid = grep /^\w$/, keys %flags;
+
+ return map +{ id => $_, desc => $flags{$_} },
+ sort { lc($flags{$a}) cmp lc($flags{$b}) }@valid;
+}
+
1;
=head1 NAME
my ($self, $article) = @_;
my @extras = $self->SUPER::extra_templates($article);
- my $basedir = $self->{cfg}->entry('paths', 'templates', $Constants::TMPLDIR);
+ my $basedir = $self->{cfg}->entryVar('paths', 'templates');
push @extras, 'catalog.tmpl' if -f "$basedir/catalog.tmpl";
return @extras;
return $self->SUPER::default_template($article, $cfg, $templates);
}
+sub flag_sections {
+ my ($self) = @_;
+
+ return ( 'catalog flags', $self->SUPER::flag_sections );
+}
+
1;
my ($self, $article, $cgi) = @_;
return $self->{cfg}->entry('admin templates', 'add_product',
- 'admin/add_product');
+ 'admin/edit_product');
}
sub validate_parent {
}
sub validate {
- my ($self, $data, $articles, $rmsg, $errors) = @_;
+ my ($self, $data, $articles, $errors) = @_;
- my $ok = $self->SUPER::validate($data, $articles, $rmsg, $errors);
+ my $ok = $self->SUPER::validate($data, $articles, $errors);
$self->_validate_common($data, $articles, $errors);
for my $field (qw(title summary body)) {
}
sub validate_old {
- my ($self, $article, $data, $articles, $rmsg, $errors) = @_;
+ my ($self, $article, $data, $articles, $errors) = @_;
- $self->SUPER::validate($data, $articles, $rmsg, $errors)
+ $self->SUPER::validate($data, $articles, $errors)
or return;
return !keys %$errors;
}
}
}
+ if (exists $src->{options}) {
+ $data->{options} = $src->{options};
+ }
}
sub fill_new_data {
return $self->SUPER::can_remove($req, $article, $articles, $rmsg);
}
+sub flag_sections {
+ my ($self) = @_;
+
+ return ( 'product flags', $self->SUPER::flag_sections );
+}
+
1;
use strict;
use HTML::Entities;
use DevHelp::Tags;
+use DevHelp::HTML;
sub _get_parms {
my ($acts, $args) = @_;
sub {
my ($value, $fmt) = @_;
if ($fmt eq 'u') {
- return CGI::escape($value);
+ return escape_uri($value);
}
elsif ($fmt eq 'h') {
- return CGI::escapeHTML($value);
+ return escape_html($value);
}
return $value;
},
$CGI_URI = "/cgi-bin";
# level defaults
-%LEVEL_DEFAULTS =
+%LEVEL_DEFAULTS =
(
0=>{
display=>"Your Site",
},
-
+
1=>{
threshold=>1,
template=>'common/default.tmpl',
- display=>'Section',
+ display=>'Page Lev1',
},
2=>{
threshold=>1,
template=>'common/default.tmpl',
- display=>'Subsect Lev1',
+ display=>'Page Lev2',
},
3=>{
threshold=>1,
template=>'common/default.tmpl',
- display=>'Subsect Lev2',
+ display=>'Page Lev3',
},
4=>{
threshold=>1,
template=>'common/default.tmpl',
- display=>'Subsect Lev3',
+ display=>'Page Lev4',
},
5=>{
threshold=>1,
template=>'common/default.tmpl',
- display=>"Subsect Lev4",
+ display=>"Page Lev5",
},
);
--- /dev/null
+package DevHelp::HTML;
+use strict;
+use Carp qw(confess);
+
+require Exporter;
+use vars qw(@EXPORT_OK @EXPORT @ISA);
+@EXPORT_OK = qw(escape_html escape_uri unescape_html unescape_uri popup_menu);
+@EXPORT = qw(escape_html escape_uri unescape_html unescape_uri);
+@ISA = qw(Exporter);
+
+use HTML::Entities ();
+
+sub escape_html {
+ HTML::Entities::encode(shift, '<>&"\x7F-\xFF');
+}
+
+sub unescape_html {
+ HTML::Entities::decode(shift);
+}
+
+sub escape_uri {
+ URI::Escape::uri_escape(shift);
+}
+
+sub unescape_uri {
+ URI::Escape::uri_unescape(shift);
+}
+
+sub popup_menu {
+ my (%opts) = @_;
+
+ exists $opts{'-name'}
+ or confess "No -name parameter";
+
+ my $html = '<select name="' . escape_html($opts{"-name"}) . '">';
+ my $labels = $opts{"-labels"} || {};
+ my $values = $opts{"-values"};
+ my $default = $opts{"-default"};
+ for my $value (@$values) {
+ my $option = "<option";
+ my $label = $labels->{$value};
+ if (defined $label) {
+ $option .= ' value="' . escape_html($value) . '"';
+ $option .= ' checked' if defined($default) && $default eq $value;
+ $option .= '>' . escape_html($label);
+ }
+ else {
+ $option .= ' checked' if defined($default) && $default eq $value;
+ $option .= '>' . escape_html($value);
+ }
+ $html .= $option . "\n";
+ }
+ $html .= "</select>";
+}
+
+1;
package Generate;
use strict;
use Articles;
-use CGI ();
use Constants qw($IMAGEDIR $LOCAL_FORMAT $BODY_EMBED
$EMBED_MAX_DEPTH $HAVE_HTML_PARSER);
use BSE::Custom;
use DevHelp::Tags;
+use DevHelp::HTML;
my $excerptSize = 300;
# the input text has already been escaped, so we need to unescape it
# too bad if you want [] in your html (but you can use entities)
sub _make_html {
- return CGI::unescapeHTML($_[0]);
+ return unescape_html($_[0]);
}
sub _embed_low {
# }
my $im = $images->[$index-1];
$text = qq!<img src="/images/$im->{image}" width="$im->{width}"!
- . qq! height="$im->{height}" alt="! . CGI::escapeHTML($im->{alt}).'"'
+ . qq! height="$im->{height}" alt="! . escape_html($im->{alt}).'"'
. qq! border="0"!;
$text .= qq! align="$align"! if $align && $align ne 'center';
$text .= qq! />!;
$url = $im->{url};
}
if ($url) {
- $text = qq!<a href="! . CGI::escapeHTML($url) . qq!">$text</a>!;
+ $text = qq!<a href="! . escape_html($url) . qq!">$text</a>!;
}
}
return $text;
return substr($body, 6) if $body =~ /^<html>/i;
# clean up any possible existing markup
- $body = CGI::escapeHTML($body);
+ $body = escape_html($body);
# I considered replacing these with single character codes and replacing
# them later with the tags, to avoid having to check for the middle of
}
},
level1 => sub {
- return CGI::escapeHTML($sections[$section_index]{$_[0]});
+ return escape_html($sections[$section_index]{$_[0]});
},
# used to generate a list of subsections for the side-menu
iterate_level3 => sub {
return ++$level3_index < @level3;
},
- level3 => sub { CGI::escapeHTML($level3[$level3_index]{$_[0]}) },
+ level3 => sub { escape_html($level3[$level3_index]{$_[0]}) },
ifLevel3 => sub { scalar @level3 },
# generate an admin or link url, depending on admin state
return qq!<img src="/images/titles/!.$image .qq!" border=0>!
}
else {
- return CGI::escapeHTML($text);
+ return escape_html($text);
}
},
DevHelp::Tags->make_iterator2
use Images;
use vars qw(@ISA);
use Generate;
-use CGI (); # for escapeHTML()
use Util qw(generate_button);
use BSE::Util::Tags;
use ArticleFiles;
@ISA = qw/Generate/;
+use DevHelp::HTML;
my $excerptSize = 300;
for my $attr (split /&/, $query) {
my ($name, $value) = split /=/, $attr, 2;
# I'm assuming none of the values are uri escaped
- $value = CGI::escapeHTML($value);
+ $value = escape_html($value);
$form .= qq!<input type=hidden name="$name" value="$value">!
}
}
- $form .= qq!<input type=submit value="!.CGI::escapeHTML($text).'">';
+ $form .= qq!<input type=submit value="!.escape_html($text).'">';
$form .= "</form>";
return $form;
my %acts =
(
$self->SUPER::baseActs($articles, $acts, $article, $embedded),
- article=>sub { CGI::escapeHTML($article->{$_[0]}) },
+ article=>sub { escape_html($article->{$_[0]}) },
ifTitleImage =>
sub {
my $which = shift || 'article';
},
child =>
sub {
- return CGI::escapeHTML($children[$child_index]{$_[0]});
+ return escape_html($children[$child_index]{$_[0]});
},
- section=>sub { CGI::escapeHTML($section->{$_[0]}) },
+ section=>sub { escape_html($section->{$_[0]}) },
# these are mostly obsolete, use moveUp and moveDown instead
# where possible
},
crumbs =>
sub {
- return CGI::escapeHTML($work_crumbs[$crumb_index]{$_[0]});
+ return escape_html($work_crumbs[$crumb_index]{$_[0]});
},
ifCrumbs =>
sub {
# access to parent
ifParent => sub { $parent },
parent =>
- sub { return $parent && CGI::escapeHTML($parent->{$_[0]}) },
+ sub { return $parent && escape_html($parent->{$_[0]}) },
# for rearranging order in admin mode
moveDown=>
sub {
@children > 1 or return '';
if ($self->{admin} && $child_index < $#children) {
- return <<HTML;
+ 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="absbottom"></a>
HTML
+ chop $html;
+ return $html;
} else {
return $blank;
}
sub {
@children > 1 or return '';
if ($self->{admin} && $child_index > 0) {
- return <<HTML;
+ 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="absbottom"></a>
HTML
+ chop $html;
+ return $html;
} else {
return $blank;
}
my $html = '';
return '' unless $self->{admin};
return '' unless @allkids > 1;
- my $refreshto = CGI::escape($ENV{SCRIPT_NAME}
- ."?id=$article->{id}");
+ my $refreshto = escape_uri($ENV{SCRIPT_NAME} . "?id=$article->{id}");
if ($allkids_index < $#allkids) {
$html .= <<HTML
<a href="$CGI_URI/admin/move.pl?stepparent=$article->{id}&d=swap&id=$allkids[$allkids_index]{id}&other=$allkids[$allkids_index+1]{id}&refreshto=$refreshto"><img src="$IMAGES_URI/admin/move_down.gif" width="17" height="13" border="0" alt="Move Down" align="absbottom"></a>
else {
$html .= $blank;
}
+ $html =~ tr/\n//d;
return $html;
},
ifCurrentPage=>
}
my $html;
if ($align && exists $im->{$align}) {
- $html = CGI::escapeHTML($im->{$align});
+ $html = escape_html($im->{$align});
}
else {
$html = qq!<img src="/images/$im->{image}" width="$im->{width}"!
- . qq! height="$im->{height}" alt="! . CGI::escapeHTML($im->{alt});
+ . qq! height="$im->{height}" alt="! . escape_html($im->{alt})
+ . qq!"!;
$html .= qq! align="$align"! if $align && $align ne '-';
unless (defined($rest) && $rest =~ /\bborder=/i) {
$html .= ' border="0"';
}
$html .= " $rest" if defined $rest;
- $html .= qq!" />!;
+ $html .= qq! />!;
if ($im->{url}) {
$html = qq!<a href="$im->{url}">$html</a>!;
}
use Constants qw($CGI_URI $IMAGES_URI $ADMIN_URI);
use Util qw(generate_button);
use OtherParents;
+use DevHelp::HTML;
sub generate_low {
my ($self, $template, $article, $articles, $embedded) = @_;
%acts =
(
$self->baseActs($articles, \%acts, $article, $embedded),
- article => sub { CGI::escapeHTML($article->{$_[0]}) },
+ article => sub { escape_html($article->{$_[0]}) },
iterate_products =>
sub {
return ++$product_index < @products;
},
- product=> sub { CGI::escapeHTML($products[$product_index]{$_[0]}) },
+ product=> sub { escape_html($products[$product_index]{$_[0]}) },
ifProducts => sub { @products },
admin =>
sub {
<td><form action="$CGI_URI/admin/add.pl">
<input type=hidden name="parentid" value="$article->{id}">
<input type=hidden name="type" value="Catalog">
-<input type=submit value="Add product"></form></td>
+<input type=submit value="Add Sub-catalog"></form></td>
HTML
}
$html .= <<HTML;
moveDown=>
sub {
if ($self->{admin} && $product_index < $#products) {
- return <<HTML;
+ 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>
HTML
+ chop $html;
+ return $html;
}
else {
return '';
moveUp=>
sub {
if ($self->{admin} && $product_index > 0) {
- return <<HTML;
+ 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>
HTML
+ chop $html;
+ return $html;
}
else {
return '';
},
iterate_allprods_reset => sub { $allprod_index = -1 },
iterate_allprods => sub { ++$allprod_index < @allprods },
- allprod => sub { CGI::escapeHTML($allprods[$allprod_index]{$_[0]}) },
+ allprod => sub { escape_html($allprods[$allprod_index]{$_[0]}) },
moveallprod =>
sub {
return '' unless $self->{admin};
else {
$html .= $blank;
}
+ $html =~ tr/\n//d;
return $html;
},
- ifAnyProds => sub { CGI::escapeHTML(@allprods) },
+ ifAnyProds => sub { escape_html(@allprods) },
iterate_stepprods_reset => sub { $stepprod_index = -1 },
iterate_stepprods => sub { ++$stepprod_index < @stepprods; },
- stepprod => sub { CGI::escapeHTML($stepprods[$stepprod_index]{$_[0]}) },
+ stepprod => sub { escape_html($stepprods[$stepprod_index]{$_[0]}) },
ifStepProds => sub { @stepprods },
iterate_catalogs_reset => sub { $category_index = -1 },
iterate_catalogs => sub { ++$category_index < @subcats },
catalog =>
- sub { CGI::escapeHTML($subcats[$category_index]{$_[0]}) },
+ sub { escape_html($subcats[$category_index]{$_[0]}) },
ifSubcats => sub { @subcats },
);
my $oldurl = $acts{url};
use base qw(Generate::Article);
use Constants qw(:shop $CGI_URI $ADMIN_URI);
use Carp qw(confess);
+use DevHelp::HTML;
sub edit_link {
my ($self, $id) = @_;
my $stepcat_index;
my @options =
map { +{ id=>$_, %{$SHOP_PRODUCT_OPTS{$_}} } }
+ grep $SHOP_PRODUCT_OPTS{$_},
split /,/, $product->{options};
my $option_index;
return
(
$self->SUPER::baseActs($articles, $acts, $product, $embedded),
- product=> sub { CGI::escapeHTML($product->{$_[0]}) },
+ product=> sub { escape_html($product->{$_[0]}) },
admin =>
sub {
return '' unless $self->{admin};
);
push(@args, -labels=>$option->{labels}) if $option->{labels};
push(@args, -default=>$option->{default}) if $option->{default};
- return CGI::popup_menu(@args);
+ return DevHelp::HTML::popup_menu(@args);
}
else {
- return CGI::escapeHTML($options[$option_index]{$_[0]})
+ return escape_html($options[$option_index]{$_[0]})
}
},
ifOptions => sub { @options },
iterate_stepcats_reset => sub { $stepcat_index = -1 },
iterate_stepcats => sub { ++$stepcat_index < @stepcats },
- stepcat => sub { CGI::escapeHTML($stepcats[$stepcat_index]{$_[0]}) },
+ stepcat => sub { escape_html($stepcats[$stepcat_index]{$_[0]}) },
ifStepCats => sub { @stepcats },
);
}
=head1 CHANGES
+=head2 0.12_23
+
+=over
+
+=item *
+
+the list of templates in the drop down on the article edit page didn't
+reflect the local_templates config option correctlt.
+
+=item *
+
+validation errors weren't always reported (or acted upon) correctly
+
+=item *
+
+when an invalid product options string was stored a 500 error was
+produced when generating the page
+
+=item *
+
+the image tag wasn't including a closing " at the end of the alt
+attribute
+
+=item *
+
+the article generation code no longer relies upon CGI.pm functions for
+escaping HTML, URIs or producing product option popups, this should
+make it possible to use gen.pl from cron jobs without getting prompts
+for CGI parameters
+
+=item *
+
+catalogs had two buttons labelled "Add product", but one added
+catalogs. Relabelled the one that adds catalogs to "Add Sub-catalog".
+
+=item *
+
+the ifnew tag on edit templates is no longer available, use ifNew
+instead (this was true as of 0.12_22)
+
+=item *
+
+added a flags field to articles, this is used for both BSE internal
+flags and for site specific flags.
+
+=item *
+
+the search index builder will now only index articles that are listed,
+or have the "Index even if hidden" (I) flag set. Changed the simple
+search test to search for a non-hidden article.
+
+=item *
+
+the title field of all articles are now validated to include at least
+one non-space character
+
+=item *
+
+validation failures on images and files are now available via the
+error_img tag
+
+=item *
+
+the move image up/down action on the images manager were refreshing to
+the wrong page after reordering the images
+
+=item *
+
+changed default level names in Constants.pm and bse.cfg
+
+=item *
+
+changed tests to use the new level names
+
+=back
+
=head2 0.12_22
=over
a different content type by adding an entry to this section. The key
is the template name, and the value is the full content type.
+=head2 [search index scores]
+
+This section is used when generating the search index to override the
+default scores for each field in the articles.
+
+The default scores are:
+
+ Field Score
+ ----- -----
+ title 5
+ body 3
+ keyword 4
+
+A special key C<file_description> can be used here to set the score
+for indexing downloadable file descriptions, which aren't indexed by
+default. A good value is probably 2 or 1.
+
+=head2 [article flags]
+
+=head2 [product flags]
+
+=head2 [catalog flags]
+
+Flags that can be set for articles, products and catalogs
+respectively. Note that flags for articles are also visible in
+products and catalogs.
+
+All flag Ids are single letters or digits. Uppercase letters are
+reserved for use by BSE internally, leaving lower-case letters and
+digits for your own use.
+
+Use the id of the flag as the key, and a description of the flag as
+it's value.
+
=head1 AUTHOR
Tony Cook <tony@develop-help.com>
(<:alloptions:>) </td>
<td bgcolor="#FFFFFF"><:help product options:></td>
</tr>
+ <tr>
+ <th nowrap bgcolor="#FFFFFF" align="left">Flags:</th>
+ <td bgcolor="#FFFFFF" width="100%"><:iterator begin flags:><:if FieldPerm flags:><input type=checkbox name=flags value="<:flag id:>" <:ifFlagSet [flag id]:>checked<:or:><:eif:>><:or FieldPerm:><:ifFlagSet [flag id]:>Yes<:or:>No<:eif:><:eif FieldPerm:><:flag desc:><:iterator end flags:></td>
+ <td bgcolor="#FFFFFF"><:help edit listed:></td>
+ </tr>
<tr>
<th nowrap align="left" bgcolor="#FFFFFF" valign="top">Thumbnail image:</th>
<td nowrap bgcolor="#FFFFFF">
<td>
<table cellpadding="6" border="0" cellspacing="1">
<tr>
- <th valign="top" bgcolor="#FFFFFF" colspan="3">First Image Position</th>
+ <th valign="top" bgcolor="#FFFFFF" colspan="4">First Image Position</th>
</tr>
<tr>
- <td bgcolor="#FFFFFF" colspan="3">
+ <td bgcolor="#FFFFFF" colspan="4">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="100%" align="center"><input type="radio" name="imagePos" value="tl" <: ifEq [article imagePos] "tl":>checked<:or:><:eif:>
</td>
</tr>
<tr bgcolor="#FFFFFF">
- <th colspan="3">Image</th>
+ <th colspan="4">Image</th>
</tr>
<: iterator begin images :>
<tr bgcolor="#FFFFFF">
- <td align="center" colspan="3"> <img src="/images/<: image image :>" alt="<: image alt :>" width="<:
+ <td align="center" colspan="4"> <img src="/images/<: image image :>" alt="<: image alt :>" width="<:
image width :>" height="<: image height :>"></td>
</tr>
<tr bgcolor="#FFFFFF">
<th> Alt Text</th>
<th width="50%"> URL</th>
<th nowrap> Modify</th>
+ <th nowrap> Move</th>
</tr>
<tr bgcolor="#FFFFFF">
<td valign="top">
<:ifUserCan edit_images_save:article:><input type="text" name="url" value="<: image url :>" size="32"><:or:><: image url :><:eif:>
</td>
<td valign="bottom" nowrap>
- <:ifUserCan edit_images_delete:article:><b><a href="<:script:>?level=<: level :>&parentid=<: article parentid :>&id=<:article id:>&imgtype=<: articleType :>&removeimg_<: image id :>" onClick="return window.confirm('Are you sure you want to delete this Image')">Delete</a></b><:or:><:eif:>
-<:imgmove:> </td>
+ <:ifUserCan edit_images_delete:article:><b><a href="<:script:>?level=<: level :>&parentid=<: article parentid :>&id=<:article id:>&imgtype=<: articleType :>&removeimg_<: image id :>" onClick="return window.confirm('Are you sure you want to delete this Image')">Delete</a></b><:or:><:eif:></td>
+ <td><:imgmove:></td>
</tr>
<: iterator separator images :>
<tr bgcolor="#FFFFFF">
- <td colspan="3"> </td>
+ <td colspan="4"> </td>
</tr>
<: iterator end images :>
<:ifUserCan edit_images_save:article:>
<tr>
- <td align="right" bgcolor="#FFFFFF" colspan="3">
+ <td align="right" bgcolor="#FFFFFF" colspan="4">
<input type="submit" name="process" value="Save changes">
</td>
</tr>
<th width="70%">Summary</th>
<th>Listed</th>
<th nowrap>Modify</th>
+ <th nowrap>Move</th>
</tr>
<:if UserCan edit_reorder_children:>
<tr>
- <td colspan="4" bgcolor="#FFFFFF">Reorder child articles: <a href="/cgi-bin/admin/reorder.pl?parentid=<:article id:>&sort=title&refreshto=/cgi-bin/admin/add.pl?id=<:article id:>">by
+ <td colspan="5" bgcolor="#FFFFFF">Reorder child articles: <a href="/cgi-bin/admin/reorder.pl?parentid=<:article id:>&sort=title&refreshto=/cgi-bin/admin/add.pl?id=<:article id:>">by
title</a> | <a href="/cgi-bin/admin/reorder.pl?parentid=<:article id:>&sort=date&refreshto=/cgi-bin/admin/add.pl?id=<:article id:>">by
date</a> | <a href="/cgi-bin/admin/reorder.pl?parentid=<:article id:>&reverse=1&refreshto=/cgi-bin/admin/add.pl?id=<:article id:>">reverse
order</a></td>
<td width="70%"><: summary child body :></td>
<td bgcolor="#FFFFFF" align="center"><: is child listed :></td>
<td nowrap> <a href="/cgi-bin/admin/add.pl?id=<:child id:>">Edit</a>
- <:if UserCan edit_delete_article:child:><a href="/cgi-bin/admin/add.pl?id=<:child id:>&remove=1" onClick="return window.confirm('Are you sure you want to delete this Section')">Delete</a> <:or UserCan:><:eif UserCan:>
- <:movechild:> </td>
+ <:if UserCan edit_delete_article:child:><a href="/cgi-bin/admin/add.pl?id=<:child id:>&remove=1" onClick="return window.confirm('Are you sure you want to delete this Section')">Delete</a> <:or UserCan:><:eif UserCan:></td>
+ <td nowrap><:movechild:></td>
</tr>
<:iterator separator children:> <:iterator end children:>
</table>
<:or children:>
<:eif children:>
<:if HaveChildType:>
-<:if new:>
-<:or new:>
+<:if New:>
+<:or New:>
<form action="/cgi-bin/admin/add.pl" method="POST">
<input type=hidden name="parentid" value="<:article id:>">
<p><input type=submit value="Add <:childtype:>"></p>
</form>
-<p><:eif new:> <:or HaveChildType:> <:eif HaveChildType:></p>
+<p><:eif New:> <:or HaveChildType:> <:eif HaveChildType:></p>
<p><font size="-1">BSE Release <:release:></font></p>
-</body
-></html>
+</body></html>
<head>
<title>
- Administration - <: ifnew :>New<: or :>Edit<: eif :> <:articleType:>
+ Administration - <: ifNew :>New<: or :>Edit<: eif :> <:articleType:>
</title>
<link rel="stylesheet" type="text/css" href="/css/admin.css">
<h1>Administration Page</h1>
<:ifMessage:>
<p><b><:message:></b></p>
-<:or:><:eif:>
-<p>| <a href="/cgi-bin/admin/menu.pl">Admin menu</a> | <:ifnew:><:or:><:if Eq [article id] 3:><a href="<:article admin:>">See
- shop</a><:or Eq:><a href="<:article admin:>">See article</a><:eif Eq:> | <:eif:><:editParent:>
- <:if Eq [article id] 3:><a href="/cgi-bin/admin/shopadmin.pl">Manage catalogs</a>
- |<:or Eq:><:eif Eq:><:if new:><:or new:> <a href="<:script:>?id=<:article id:>&_t=steps">Manage
- step children/parents</a> | <:eif new:></p>
+<:or:><:eif:>
+<p>| <a href="/cgi-bin/admin/menu.pl">Admin menu</a> | <:ifNew:><:or:><:if Eq
+ [article id] [cfg articles shop]:><a href="<:article admin:>">See shop</a><:or
+ Eq:><a href="<:article admin:>">See article</a><:eif Eq:> | <:eif:><:editParent:>
+ <:if Eq [article id] [cfg articles shop]:><a href="/cgi-bin/admin/shopadmin.pl">Manage
+ catalogs</a> |<:or Eq:><:eif Eq:><:if New:><:or New:> <a href="<:script:>?id=<:article id:>&_t=steps">Manage
+ step children/parents</a> | <:eif New:></p>
<h2><:articleType:> Details</h2>
-<:ifnew:><:or:>
+<:ifNew:><:or:>
<:if Or [iadminuser_count] [iadmingroup_count]:>
<form action="/cgi-bin/admin/adminusers.pl">
<input type=hidden name=id value="<: article id:>">
<th nowrap bgcolor="#FFFFFF" align="left"> Release date: </th>
<td bgcolor="#FFFFFF" width="100%">
<:if FieldPerm release:><input type="text" name="release" value="<: date "%d/%m/%Y" article release :>" size="10" maxlength="10">
- (dd/mm/yyyy<: ifnew :> - default is today<: or :><: eif :>)<:or FieldPerm:><: date "%d/%m/%Y" article release :><:eif FieldPerm:></td>
+ (dd/mm/yyyy<: ifNew :> - default is today<: or :><: eif :>)<:or FieldPerm:><: date "%d/%m/%Y" article release :><:eif FieldPerm:></td>
<td bgcolor="#FFFFFF"><:help edit release:></td>
</tr>
<tr>
<th nowrap bgcolor="#FFFFFF" align="left"> Expiry date: </th>
<td bgcolor="#FFFFFF" width="100%">
<:if FieldPerm expire:><input type="text" name="expire" value="<: date "%d/%m/%Y" article expire :>" size="10" maxlength="10">
- (dd/mm/yyyy - <: ifnew :>default is never, <: or :><: eif :>blank
+ (dd/mm/yyyy - <: ifNew :>default is never, <: or :><: eif :>blank
for never expires)<:or FieldPerm:><: date "%d/%m/%Y" article expire :><:eif FieldPerm:></td>
<td bgcolor="#FFFFFF"><:help edit expire:></td>
</tr>
<th nowrap bgcolor="#FFFFFF" align="left"> Summary length: </th>
<td bgcolor="#FFFFFF" width="100%">
<:if FieldPerm summaryLength:><input type="text" name="summaryLength" size="10" maxlength="10" value="<: article summaryLength :>">
- (in characters - <: ifnew :>default inherited from <:parentType:>, <: or :><: eif :>
+ (in characters - <: ifNew :>default inherited from <:parentType:>, <: or :><: eif :>
zero for no summary)<:or FieldPerm:><: article summaryLength :><:eif FieldPerm:></td>
<td bgcolor="#FFFFFF"><:help edit summary:></td>
</tr>
<td bgcolor="#FFFFFF" width="100%"> <:if FieldPerm listed:><:list listed:><:or FieldPerm:><:if Article listed:><:ifEq [article listed] "1":>Yes<:or:>In Sections, but not menu<:eif:><:or Article:>No<:eif Article:><:eif FieldPerm:> </td>
<td bgcolor="#FFFFFF"><:help edit listed:></td>
</tr>
+ <tr>
+ <th nowrap bgcolor="#FFFFFF" align="left">Flags:</th>
+ <td bgcolor="#FFFFFF" width="100%"><:iterator begin flags:><:if FieldPerm flags:><input type=checkbox name=flags value="<:flag id:>" <:ifFlagSet [flag id]:>checked<:or:><:eif:>><:or FieldPerm:><:ifFlagSet [flag id]:>Yes<:or:>No<:eif:><:eif FieldPerm:><:flag desc:><:iterator end flags:></td>
+ <td bgcolor="#FFFFFF"><:help edit listed:></td>
+ </tr>
<tr>
<th nowrap bgcolor="#FFFFFF" align="left" valign="top">Thumbnail image:</th>
<td bgcolor="#FFFFFF" width="100%">
</tr>
</table>
- <p><: ifnew :>
+ <p><: ifNew :>
<input type="submit" name="save" value=" Add New <: articleType:> ">
<:or:>
<:if UserCan edit_save:article:><input type="submit" name="save" value=" Update <: articleType:> "><:or UserCan:><:eif UserCan:>
<:eif:></p>
</form>
-<:if children:> <:ifEq [article id] 3:>
+<:if children:> <:ifEq [article id] [cfg articles shop]:>
<h2>Catalogs</h2>
<:or:>
<h2><: childtype :></h2>
<th width="70%">Summary</th>
<th>Listed</th>
<th nowrap>Modify</th>
+ <th nowrap>Move</th>
</tr>
<:if UserCan edit_reorder_children:article:>
<tr>
- <td colspan="4" bgcolor="#FFFFFF">Reorder child articles: <a href="/cgi-bin/admin/reorder.pl?parentid=<:article id:>&sort=title&refreshto=/cgi-bin/admin/add.pl?id=<:article id:>">by
+ <td colspan="5" bgcolor="#FFFFFF">Reorder child articles: <a href="/cgi-bin/admin/reorder.pl?parentid=<:article id:>&sort=title&refreshto=/cgi-bin/admin/add.pl?id=<:article id:>">by
title</a> | <a href="/cgi-bin/admin/reorder.pl?parentid=<:article id:>&sort=date&refreshto=/cgi-bin/admin/add.pl?id=<:article id:>">by
date</a> | <a href="/cgi-bin/admin/reorder.pl?parentid=<:article id:>&reverse=1&refreshto=/cgi-bin/admin/add.pl?id=<:article id:>">reverse
order</a></td>
<td width="70%"><: summary child body :></td>
<td align="center"><: is child listed :></td>
<td nowrap> <a href="/cgi-bin/admin/add.pl?id=<:child id:>">Edit</a>
- <:if UserCan edit_delete_article:child:><a href="/cgi-bin/admin/add.pl?id=<:child id:>&remove=1" onClick="return window.confirm('Are you sure you want to delete this <:ifEq [article id] 3:>Catalog<:or:><: childtype :><:eif:>')">Delete</a><:or UserCan:><:eif UserCan:>
- <:movechild:> </td>
+ <:if UserCan edit_delete_article:child:><a href="/cgi-bin/admin/add.pl?id=<:child id:>&remove=1" onClick="return window.confirm('Are you sure you want to delete this <:ifEq [article id] 3:>Catalog<:or:><: childtype :><:eif:>')">Delete</a><:or UserCan:><:eif UserCan:></td>
+ <td nowrap><:movechild:></td>
</tr>
<:iterator separator children:> <:iterator end children:>
</table>
<:or children:>
<:eif children:>
<:if HaveChildType:>
-<:if new:>
-<:or new:>
+<:if New:>
+<:or New:>
<:if UserCan edit_add_child:article:><form action="/cgi-bin/admin/add.pl">
<input type=hidden name="parentid" value="<:article id:>">
<p>
- <input type=submit value="Add <:ifEq [article id] 3:>Catalog<:or:><: childtype :><:eif:>">
+ <input type=submit value="Add <:ifEq [article id] [cfg articles shop]:>Catalog<:or:><: childtype :><:eif:>">
</p>
</form><:or UserCan:><:eif UserCan:>
-<:eif new:> <:or HaveChildType:> <:eif HaveChildType:>
+<:eif New:> <:or HaveChildType:> <:eif HaveChildType:>
<p><font size="-1">BSE Release <:release:></font></p>
</body></html>
<head>
<title>
- Administration - <: ifnew :>New<: or :>Edit<: eif :> <:articleType:>
+ Administration - <: ifNew :>New<: or :>Edit<: eif :> <:articleType:>
</title>
<link rel="stylesheet" type="text/css" href="/css/admin.css">
<h1>Administration Page</h1>
<:ifMessage:>
<p><b><:message:></b></p>
-<:or:><:eif:>
-<p>| <a href="/cgi-bin/admin/menu.pl">Admin menu</a> | <:ifnew:><:or:><:if Eq [article id] 3:><a href="<:article admin:>">See
- shop</a><:or Eq:><a href="<:article admin:>">See article</a><:eif Eq:> | <:eif:><:editParent:>
- <:if Eq [article id] 3:><a href="/cgi-bin/admin/shopadmin.pl">Manage catalogs</a>
- |<:or Eq:><:eif Eq:><:if new:><:or new:> <a href="<:script:>?id=<:article id:>&_t=steps">Manage
- step children/parents</a> | <:eif new:></p>
+<:or:><:eif:>
+<p>| <a href="/cgi-bin/admin/menu.pl">Admin menu</a> | <:ifNew:><:or:><:if Eq
+ [article id] [cfg articles shop]:><a href="<:article admin:>">See shop</a><:or
+ Eq:><a href="<:article admin:>">See article</a><:eif Eq:> | <:eif:><:editParent:>
+ <:if Eq [article id] [cfg articles shop]:><a href="/cgi-bin/admin/shopadmin.pl">Manage
+ catalogs</a> |<:or Eq:><:eif Eq:><:if New:><:or New:> <a href="<:script:>?id=<:article id:>&_t=steps">Manage
+ step children/parents</a> | <:eif New:></p>
<h2><:articleType:> Details</h2>
-<:ifnew:><:or:>
+<:ifNew:><:or:>
<:if Or [iadminuser_count] [iadmingroup_count]:>
<form action="/cgi-bin/admin/adminusers.pl">
<input type=hidden name=id value="<: article id:>">
<th nowrap bgcolor="#FFFFFF" align="left"> Release date: </th>
<td bgcolor="#FFFFFF" width="100%">
<:if FieldPerm release:><input type="text" name="release" value="<: date "%d/%m/%Y" article release :>" size="10" maxlength="10">
- (dd/mm/yyyy<: ifnew :> - default is today<: or :><: eif :>)<:or FieldPerm:><: date "%d/%m/%Y" article release :><:eif FieldPerm:></td>
+ (dd/mm/yyyy<: ifNew :> - default is today<: or :><: eif :>)<:or FieldPerm:><: date "%d/%m/%Y" article release :><:eif FieldPerm:></td>
<td bgcolor="#FFFFFF"><:help edit release:></td>
</tr>
<tr>
<th nowrap bgcolor="#FFFFFF" align="left"> Expiry date: </th>
<td bgcolor="#FFFFFF" width="100%">
<:if FieldPerm expire:><input type="text" name="expire" value="<: date "%d/%m/%Y" article expire :>" size="10" maxlength="10">
- (dd/mm/yyyy - <: ifnew :>default is never, <: or :><: eif :>blank
+ (dd/mm/yyyy - <: ifNew :>default is never, <: or :><: eif :>blank
for never expires)<:or FieldPerm:><: date "%d/%m/%Y" article expire :><:eif FieldPerm:></td>
<td bgcolor="#FFFFFF"><:help edit expire:></td>
</tr>
<th nowrap bgcolor="#FFFFFF" align="left"> Summary length: </th>
<td bgcolor="#FFFFFF" width="100%">
<:if FieldPerm summaryLength:><input type="text" name="summaryLength" size="10" maxlength="10" value="<: article summaryLength :>">
- (in characters - <: ifnew :>default inherited from <:parentType:>, <: or :><: eif :>
+ (in characters - <: ifNew :>default inherited from <:parentType:>, <: or :><: eif :>
zero for no summary)<:or FieldPerm:><: article summaryLength :><:eif FieldPerm:></td>
<td bgcolor="#FFFFFF"><:help edit summary:></td>
</tr>
<td bgcolor="#FFFFFF" width="100%"> <:if FieldPerm listed:><:list listed:><:or FieldPerm:><:if Article listed:><:ifEq [article listed] "1":>Yes<:or:>In Sections, but not menu<:eif:><:or Article:>No<:eif Article:><:eif FieldPerm:> </td>
<td bgcolor="#FFFFFF"><:help edit listed:></td>
</tr>
+ <tr>
+ <th nowrap bgcolor="#FFFFFF" align="left">Flags:</th>
+ <td bgcolor="#FFFFFF" width="100%"><:iterator begin flags:><:if FieldPerm flags:><input type=checkbox name=flags value="<:flag id:>" <:ifFlagSet [flag id]:>checked<:or:><:eif:>><:or FieldPerm:><:ifFlagSet [flag id]:>Yes<:or:>No<:eif:><:eif FieldPerm:><:flag desc:><:iterator end flags:></td>
+ <td bgcolor="#FFFFFF"><:help edit listed:></td>
+ </tr>
<tr>
<th nowrap bgcolor="#FFFFFF" align="left" valign="top">Thumbnail image:</th>
<td bgcolor="#FFFFFF" width="100%">
</tr>
</table>
- <p><: ifnew :>
+ <p><: ifNew :>
<input type="submit" name="save" value=" Add New <: articleType:> ">
<:or:>
<:if UserCan edit_save:article:><input type="submit" name="save" value=" Update <: articleType:> "><:or UserCan:><:eif UserCan:>
<:eif:></p>
</form>
-<:if children:> <:ifEq [article id] 3:>
+<:if children:> <:ifEq [article id] [cfg articles shop]:>
<h2>Catalogs</h2>
<:or:>
<h2><: childtype :></h2>
<th width="70%">Summary</th>
<th>Listed</th>
<th nowrap>Modify</th>
+ <th nowrap>Move</th>
</tr>
<:if UserCan edit_reorder_children:article:>
<tr>
- <td colspan="4" bgcolor="#FFFFFF">Reorder child articles: <a href="/cgi-bin/admin/reorder.pl?parentid=<:article id:>&sort=title&refreshto=/cgi-bin/admin/add.pl?id=<:article id:>">by
+ <td colspan="5" bgcolor="#FFFFFF">Reorder child articles: <a href="/cgi-bin/admin/reorder.pl?parentid=<:article id:>&sort=title&refreshto=/cgi-bin/admin/add.pl?id=<:article id:>">by
title</a> | <a href="/cgi-bin/admin/reorder.pl?parentid=<:article id:>&sort=date&refreshto=/cgi-bin/admin/add.pl?id=<:article id:>">by
date</a> | <a href="/cgi-bin/admin/reorder.pl?parentid=<:article id:>&reverse=1&refreshto=/cgi-bin/admin/add.pl?id=<:article id:>">reverse
order</a></td>
<td width="70%"><: summary child body :></td>
<td align="center"><: is child listed :></td>
<td nowrap> <a href="/cgi-bin/admin/add.pl?id=<:child id:>">Edit</a>
- <:if UserCan edit_delete_article:child:><a href="/cgi-bin/admin/add.pl?id=<:child id:>&remove=1" onClick="return window.confirm('Are you sure you want to delete this <:ifEq [article id] 3:>Catalog<:or:><: childtype :><:eif:>')">Delete</a><:or UserCan:><:eif UserCan:>
- <:movechild:> </td>
+ <:if UserCan edit_delete_article:child:><a href="/cgi-bin/admin/add.pl?id=<:child id:>&remove=1" onClick="return window.confirm('Are you sure you want to delete this <:ifEq [article id] 3:>Catalog<:or:><: childtype :><:eif:>')">Delete</a><:or UserCan:><:eif UserCan:></td>
+ <td nowrap><:movechild:></td>
</tr>
<:iterator separator children:> <:iterator end children:>
</table>
<:or children:>
<:eif children:>
<:if HaveChildType:>
-<:if new:>
-<:or new:>
+<:if New:>
+<:or New:>
<:if UserCan edit_add_child:article:><form action="/cgi-bin/admin/add.pl">
<input type=hidden name="parentid" value="<:article id:>">
<p>
- <input type=submit value="Add <:ifEq [article id] 3:>Catalog<:or:><: childtype :><:eif:>">
+ <input type=submit value="Add <:ifEq [article id] [cfg articles shop]:>Catalog<:or:><: childtype :><:eif:>">
</p>
</form><:or UserCan:><:eif UserCan:>
-<:eif new:> <:or HaveChildType:> <:eif HaveChildType:>
+<:eif New:> <:or HaveChildType:> <:eif HaveChildType:>
<p><font size="-1">BSE Release <:release:></font></p>
</body></html>
<head>
<title>
- <: ifnew :>New<: or :>Edit<: eif :> Catalog - Shop Administration
+ <: ifNew :>New<: or :>Edit<: eif :> Catalog - Shop Administration
</title>
<link rel="stylesheet" type="text/css" href="/css/admin.css">
<:ifMessage:>
<p><b><:message:></b></p>
<:or:><:eif:>
-<p>| <a href="/cgi-bin/admin/menu.pl">Admin menu</a> | <:ifnew:><:or:><a href="<:article admin:>">See
+<p>| <a href="/cgi-bin/admin/menu.pl">Admin menu</a> | <:ifNew:><:or:><a href="<:article admin:>">See
catalog</a> | <:eif:><:editParent:> <a href="/cgi-bin/admin/shopadmin.pl">Manage
- catalogs</a> | <:if new:><:or new:><a href="<:script:>?id=<:article id:>&_t=steps">Manage
- step children/parents</a> | <:eif new:></p>
+ catalogs</a> | <:if New:><:or New:><a href="<:script:>?id=<:article id:>&_t=steps">Manage
+ step children/parents</a> | <:eif New:></p>
<h2>Catalog Details</h2>
-<:ifnew:><:or:>
+<:ifNew:><:or:>
<:if Or [iadminuser_count] [iadmingroup_count]:>
<form action="/cgi-bin/admin/adminusers.pl">
<input type=hidden name=id value="<: article id:>">
<th bgcolor="#FFFFFF" nowrap align="left"> Release date: </th>
<td bgcolor="#FFFFFF" width="100%">
<:if FieldPerm release:><input type="text" name="release" value="<: date "%d/%m/%Y" article release :>" size="10" maxlength="10">
- (dd/mm/yyyy<: ifnew :> - default is today<: or :><: eif :>)<:or FieldPerm:><: date "%d/%m/%Y" article release :><:eif FieldPerm:></td></td>
+ (dd/mm/yyyy<: ifNew :> - default is today<: or :><: eif :>)<:or FieldPerm:><: date "%d/%m/%Y" article release :><:eif FieldPerm:></td></td>
<td bgcolor="#FFFFFF"><:help catalog release:></td>
</tr>
<tr>
<th bgcolor="#FFFFFF" nowrap align="left"> Expiry date: </th>
<td bgcolor="#FFFFFF" width="100%">
<:if FieldPerm expire:><input type="text" name="expire" value="<: date "%d/%m/%Y" article expire :>" size="10" maxlength="10">
- (dd/mm/yyyy - <: ifnew :>default is never, <: or :><: eif :>blank
+ (dd/mm/yyyy - <: ifNew :>default is never, <: or :><: eif :>blank
for never expires)<:or FieldPerm:><: date "%d/%m/%Y" article expire :><:eif FieldPerm:></td>
<td bgcolor="#FFFFFF"><:help catalog expire:></td>
</tr>
<td bgcolor="#FFFFFF" width="100%"> <:if FieldPerm listed:><:list listed:><:or FieldPerm:><:if Article listed:><:ifEq [article listed] "1":>Yes<:or:>In Sections, but not menu<:eif:><:or Article:>No<:eif Article:><:eif FieldPerm:> </td>
<td bgcolor="#FFFFFF"><:help catalog list:></td>
</tr>
+ <tr>
+ <th nowrap bgcolor="#FFFFFF" align="left">Flags:</th>
+ <td bgcolor="#FFFFFF" width="100%"><:iterator begin flags:><:if FieldPerm flags:><input type=checkbox name=flags value="<:flag id:>" <:ifFlagSet [flag id]:>checked<:or:><:eif:>><:or FieldPerm:><:ifFlagSet [flag id]:>Yes<:or:>No<:eif:><:eif FieldPerm:><:flag desc:><:iterator end flags:></td>
+ <td bgcolor="#FFFFFF"><:help edit listed:></td>
+ </tr>
<tr>
<th bgcolor="#FFFFFF" nowrap align="left" valign="top">Thumbnail image:</th>
<td bgcolor="#FFFFFF" width="100%">
</tr>
</table>
- <p><: ifnew :>
+ <p><: ifNew :>
<input type="submit" name="save"
value=" Add New Catalog ">
<: or :>
<th width="70%">Summary</th>
<th>Listed</th>
<th nowrap>Modify</th>
+ <th nowrap>Move</th>
</tr>
<:if UserCan edit_reorder_children:article:>
<tr>
- <td colspan="4" bgcolor="#FFFFFF">Reorder child articles: <a href="/cgi-bin/admin/reorder.pl?parentid=<:article id:>&sort=title&refreshto=/cgi-bin/admin/add.pl?id=<:article id:>">by
+ <td colspan="5" bgcolor="#FFFFFF">Reorder child articles: <a href="/cgi-bin/admin/reorder.pl?parentid=<:article id:>&sort=title&refreshto=/cgi-bin/admin/add.pl?id=<:article id:>">by
title</a> | <a href="/cgi-bin/admin/reorder.pl?parentid=<:article id:>&sort=date&refreshto=/cgi-bin/admin/add.pl?id=<:article id:>">by
date</a> | <a href="/cgi-bin/admin/reorder.pl?parentid=<:article id:>&reverse=1&refreshto=/cgi-bin/admin/add.pl?id=<:article id:>">reverse
order</a></td>
<td width="30%"><a href="<:child admin:>"><:child title:></a></td>
<td width="70%"><: summary child body :></td>
<td align="center"><: is child listed :></td>
- <td nowrap> <: edit child Edit :> <:if UserCan edit_delete_article:child:><a href="/cgi-bin/admin/add.pl?id=<:child id:>&remove=1" onClick="return window.confirm('Are you sure you want to delete this <:ifMatch [child generator] "Product":>Product<:or:>Sub-catalog<:eif:>')">Delete</a><:or UserCan:><:eif UserCan:>
- <:movechild:> </td>
+ <td nowrap> <: edit child Edit :> <:if UserCan edit_delete_article:child:><a href="/cgi-bin/admin/add.pl?id=<:child id:>&remove=1" onClick="return window.confirm('Are you sure you want to delete this <:ifMatch [child generator] "Product":>Product<:or:>Sub-catalog<:eif:>')">Delete</a><:or UserCan:><:eif UserCan:></td>
+ <td nowrap><:movechild:></td>
</tr>
<:iterator separator children:> <:iterator end children:>
</table>
<:or children:>
<:eif children:>
<:if HaveChildType:>
-<:if new:>
-<:or new:>
+<:if New:>
+<:or New:>
<:if UserCan edit_add_child:article:>
<p>
<form action="/cgi-bin/admin/add.pl" method="POST">
<input type=hidden name="parentid" value="Product">
<input type=submit value="Add Product">
</form><:or UserCan:><:eif UserCan:></p>
-<:eif new:> <:or HaveChildType:> <:eif HaveChildType:>
+<:eif New:> <:or HaveChildType:> <:eif HaveChildType:>
<p><font size="-1">BSE Release <:release:></font></p>
</body
></html>
<td bgcolor="#FFFFFF" width="100%"> <:if FieldPerm listed:><:list listed:><:or FieldPerm:><:if Article listed:><:ifEq [article listed] "1":>Yes<:or:>In Sections, but not menu<:eif:><:or Article:>No<:eif Article:><:eif FieldPerm:> </td>
<td bgcolor="#FFFFFF"><:help edit listed:></td>
</tr>
+ <tr>
+ <th nowrap bgcolor="#FFFFFF" align="left">Flags:</th>
+ <td bgcolor="#FFFFFF" width="100%"><:iterator begin flags:><:if FieldPerm flags:><input type=checkbox name=flags value="<:flag id:>" <:ifFlagSet [flag id]:>checked<:or:><:eif:>><:or FieldPerm:><:ifFlagSet [flag id]:>Yes<:or:>No<:eif:><:eif FieldPerm:><:flag desc:><:iterator end flags:></td>
+ <td bgcolor="#FFFFFF"><:help edit listed:></td>
+ </tr>
<tr>
<th nowrap align="left" bgcolor="#FFFFFF" valign="top">Thumbnail image:</th>
<td nowrap bgcolor="#FFFFFF">
catalogs</a> | <a href="/cgi-bin/admin/add.pl?id=<:article id:>">Edit
product</a><:or:><a href="/cgi-bin/admin/add.pl?id=<:article id:>"><:if Eq [article
parentid] 3:>Edit catalog<:or Eq:>Edit article<:eif Eq:></a><:eif:> |</p>
-<:if new:><:or new:> <:if Match [article generator] "Product":><:or Match:>
+<:if New:><:or New:> <:if Match [article generator] "Product":><:or Match:>
<h2><a name="step"></a>Step children</h2>
<table border="0" cellspacing="0" cellpadding="0" bgcolor='#000000' width="100%" class="table">
<tr><td>
<th>Release</th>
<th>Expire</th>
<th>Modify</th>
+ <th>Move</th>
</tr>
<:if Kids:>
<tr bgcolor="#FFFFFF">
- <td colspan="5" align="center">Note: Delete only removes the stepchild
+ <td colspan="6" align="center">Note: Delete only removes the stepchild
relationship. It does not delete the article.</td>
</tr>
<:if UserCan edit_reorder_children:article:>
<tr>
- <td colspan="5" bgcolor="#FFFFFF">Reorder stepchild articles: <a href="/cgi-bin/admin/reorder.pl?stepparent=<:article id:>&sort=title&refreshto=/cgi-bin/admin/add.pl?id=<:article id:>%26_t=steps%23step">by
+ <td colspan="6" bgcolor="#FFFFFF">Reorder stepchild articles: <a href="/cgi-bin/admin/reorder.pl?stepparent=<:article id:>&sort=title&refreshto=/cgi-bin/admin/add.pl?id=<:article id:>%26_t=steps%23step">by
title</a> | <a href="/cgi-bin/admin/reorder.pl?stepparent=<:article id:>&sort=date&refreshto=/cgi-bin/admin/add.pl?id=<:article id:>%26_t=steps%23step">by
date</a> | <a href="/cgi-bin/admin/reorder.pl?stepparent=<:article id:>&reverse=1&refreshto=/cgi-bin/admin/add.pl?id=<:article id:>%26_t=steps%23step">reverse
order</a></td>
<td nowrap><:ifStepKid:>
<:if UserCan edit_stepkid_save:article,edit_stepparent_save:[stepkid childId]:><input type="text" name="expire_<:stepkid childId:>" value="<:date "%d/%m/%Y" stepkid expire:>" size=10><:or UserCan:><:date "%d/%m/%Y" stepkid expire:><:eif UserCan:>
<:or:> <:eif:></td>
- <td nowrap><:edit kid Edit:> <:ifStepKid:><:if UserCan edit_stepkid_delete:article,edit_stepparent_delete:[stepkid childId] :><a href="<:script:>?del_stepkid=1&id=<:stepkid parentId:>&stepkid=<:stepkid childId:>&_t=steps" onClick="return window.confirm('Are you sure you want to delete this Step child')">Delete</a><:or UserCan:><:eif UserCan:><:or:><:eif:>
- <:movestepkid:></td>
+ <td nowrap><:edit kid Edit:> <:ifStepKid:><:if UserCan edit_stepkid_delete:article,edit_stepparent_delete:[stepkid childId] :><a href="<:script:>?del_stepkid=1&id=<:stepkid parentId:>&stepkid=<:stepkid childId:>&_t=steps" onClick="return window.confirm('Are you sure you want to delete this Step child')">Delete</a><:or UserCan:><:eif UserCan:><:or:><:eif:> </td>
+ <td nowrap><:movestepkid:></td>
</tr>
<:iterator end kids:>
<:if UserCan edit_stepkid_save:article :>
<tr bgcolor="#FFFFFF">
- <td colspan="5" align="center">
+ <td colspan="6" align="center">
<input type="submit" name="save_stepkids" value="Save Changes">
</td>
</tr>
<:or UserCan:><:eif UserCan:>
<:or Kids:>
<tr bgcolor="#FFFFFF">
- <td colspan="5" align="center">No children</td>
+ <td colspan="6" align="center">No children</td>
</tr>
<:eif Kids:>
</form>
<td>
<input type="text" name="expire" value="31/12/2999" size="10">
</td>
- <td>
+ <td colspan="2">
<input type="submit" name="add_stepkid" value="Add Stepchild">
</td>
</tr>
<:or Possibles:><:eif Possibles:>
</table>
</td></tr></table>
-<:eif Match:> <:eif new:> <a name="stepparents"></a>
+<:eif Match:> <:eif New:> <a name="stepparents"></a>
<h2>Step parents</h2>
<table border="0" cellspacing="0" cellpadding="0" bgcolor='#000000' width="100%" class="table">
<tr><td>
<th>Release</th>
<th>Expire</th>
<th>Modify</th>
+ <th>Move</th>
</tr>
<:if StepParents:>
<tr bgcolor="#FFFFFF">
- <td colspan="5" align="center">Note: Delete only removes the stepparent
+ <td colspan="6" align="center">Note: Delete only removes the stepparent
relationship. It does not delete the article.</td>
</tr>
<:if UserCan edit_reorder_stepparents:article :>
<tr bgcolor="#FFFFFF">
- <td colspan="5">Reorder stepparent articles: <a href="/cgi-bin/admin/reorder.pl?stepchild=<:article id:>&sort=title&refreshto=/cgi-bin/admin/add.pl?id=<:article id:>%26_t=steps%23stepparents">by
+ <td colspan="6">Reorder stepparent articles: <a href="/cgi-bin/admin/reorder.pl?stepchild=<:article id:>&sort=title&refreshto=/cgi-bin/admin/add.pl?id=<:article id:>%26_t=steps%23stepparents">by
title</a> | <a href="/cgi-bin/admin/reorder.pl?stepchild=<:article id:>&sort=date&refreshto=/cgi-bin/admin/add.pl?id=<:article id:>%26_t=steps%23stepparents">by
date</a> | <a href="/cgi-bin/admin/reorder.pl?stepchild=<:article id:>&reverse=1&refreshto=/cgi-bin/admin/add.pl?id=<:article id:>%26_t=steps%23stepparents">reverse
order</a></td>
<:if UserCan edit_stepparent_save:article,edit_stepkid_save:[stepparent parentId]:><input type="text" name="expire_<:stepparent parentId:>" value="<:date "%d/%m/%Y" stepparent expire:>" size="10"><:or UserCan:><:date "%d/%m/%Y" stepparent expire:><:eif UserCan:>
</td>
<td nowrap><a href="/cgi-bin/admin/add.pl?id=<:stepparent parentId:>">Edit</a>
- <:if UserCan edit_stepkid_delete:[stepparent parentId],edit_stepparent_delete:article :><a href="<:script:>?del_stepparent=1&id=<:stepparent childId:>&stepparent=<:stepparent parentId:>&_t=steps" onClick="return window.confirm('Are you sure you want to delete this Step parent')">Delete</a> <:or UserCan:><:eif UserCan:>
- <:movestepparent:></td>
+ <:if UserCan edit_stepkid_delete:[stepparent parentId],edit_stepparent_delete:article :><a href="<:script:>?del_stepparent=1&id=<:stepparent childId:>&stepparent=<:stepparent parentId:>&_t=steps" onClick="return window.confirm('Are you sure you want to delete this Step parent')">Delete</a> <:or UserCan:><:eif UserCan:></td>
+ <td nowrap><:movestepparent:></td>
</tr>
<:iterator end stepparents:>
<:if UserCan edit_stepparent_save:article :>
<tr bgcolor="#FFFFFF">
- <td colspan="5" align="center">
+ <td colspan="6" align="center">
<input type="submit" name="save_stepparents" value="Save Changes">
</td>
</tr>
</form>
<:or StepParents:>
<tr bgcolor="#FFFFFF">
- <td colspan="5" align="center">No step parents</td>
+ <td colspan="6" align="center">No step parents</td>
</tr>
<:eif StepParents:> <:if StepparentPossibles:>
<form action="<:script:>" method="POST">
<td>
<input type="text" name="expire" value="31/12/2999" size="10">
</td>
- <td>
+ <td colspan="2">
<input type="submit" name="add_stepparent" value="Add Stepparent">
</td>
</tr>
</form>
<:or StepparentPossibles:>
<tr bgcolor="#FFFFFF">
- <td colspan="5" align="center">No more possible catalogs to add.</td>
+ <td colspan="6" align="center">No more possible catalogs to add.</td>
</tr>
<:eif StepparentPossibles:>
</table>
</td></tr>
</table>
<p><font size="-1">BSE Release <:release:></font></p>
-</body
-></html>
+</body></html>
catalogs</a> | <a href="<:script:>?order_list=1">Manage orders</a> | <a href="<:script:>?order_list=1&template=order_list_unfilled">Unfilled
orders</a> | <a href="<:script:>?order_list=1&template=order_list_filled">Filled
orders</a> |</p>
-<h2>Order details</h2>
+<h2>Order details - No: #<:order id:></h2>
<table cellpadding="6" cellspacing="1" border="0">
- <tr><td>E-mail:</td><td><a href="mailto:<:order emailAddress:>"><:order emailAddress:></a></td></tr>
- <tr><td>Date:</td><td><:date order orderDate:></td></tr>
-<tr>
- <td>Delivery:</td>
- <td><:order delivFirstName:> <:order delivLastName:></td>
- <td rowspan=4> </td>
- <td>Billing:</td>
- <td><:order billFirstName:> <:order billLastName:></td>
-</tr>
-<tr>
- <td rowspan=3> </td>
- <td><:order delivStreet:></td>
- <td rowspan=3> </td>
- <td><:order billStreet:></td>
-</tr>
-<tr>
- <td><:order delivSuburb:> <:order delivState:> <:order delivPostCode:></td>
- <td><:order billSuburb:> <:order billState:> <:order billPostCode:></td>
-</tr>
-<tr>
- <td><:order delivCountry:></td>
- <td><:order billCountry:></td>
-</tr>
+ <tr>
+ <td align="left"><b>E-mail:</b></td>
+ <td><a href="mailto:<:order emailAddress:>"><:order emailAddress:></a></td>
+ <td> </td>
+ <td align="left"><b>Phone:</b></td>
+ <td><:order telephone:></td>
+ <!--<td rowspan=3> </td>-->
+ </tr>
+ <tr>
+ <td align="left"><b>Date:</b></td>
+ <td><:date order orderDate:></td>
+ </tr>
+ <tr>
+ <td align="left"><b>Delivery:</b></td>
+ <td><:order delivFirstName:> <:order delivLastName:></td>
+ <td rowspan=4> </td>
+ <td align="left"><b>Billing:</b></td>
+ <td><:order billFirstName:> <:order billLastName:></td>
+ </tr>
+ <tr>
+ <td rowspan=3> </td>
+ <td><:order delivStreet:></td>
+ <td rowspan=3> </td>
+ <td><:order billStreet:></td>
+ </tr>
+ <tr>
+ <td><:order delivSuburb:> <:order delivState:> <:order delivPostCode:></td>
+ <td><:order billSuburb:> <:order billState:> <:order billPostCode:></td>
+ </tr>
+ <tr>
+ <td><:order delivCountry:></td>
+ <td><:order billCountry:></td>
+ </tr>
</table>
<br>
thumbHeight=>0,
level=>1,
listed=>0,
+ flags=>'',
},
{
# the invisible subsection for what's hot
thumbHeight=>0,
level=>2,
listed=>2,
+ flags=>'',
},
{
id=>3,
thumbHeight=>0,
level=>1,
listed=>1,
+ flags=>'',
},
{
id=>4,
thumbHeight=>0,
level=>2,
listed=>2,
+ flags=>'',
},
{
id=>5,
thumbHeight=>0,
level=>2,
listed=>0,
+ flags=>'',
},
{
id=>6,
thumbHeight=>0,
level=>3,
listed=>0,
+ flags=>'',
},
{
id=>7,
thumbHeight=>0,
level=>3,
listed=>0,
+ flags=>'',
},
{
id=>8,
thumbHeight=>0,
level=>3,
listed=>1,
+ flags=>'',
},
);
"All\\s+lower\\s+case");
fetch_ok($ua, "failed search", "$baseurl/cgi-bin/search.pl?q=blargle",
"No\\s+documents\\s+were\\s+found");
-fetch_ok($ua, "good search", "$baseurl/cgi-bin/search.pl?q=title",
- qr!My\s+site(?:'|&\#39;)s\s+title.*\[formatting\s+guide!s);
+fetch_ok($ua, "good search", "$baseurl/cgi-bin/search.pl?q=shop",
+ qr!You\s+can\s+buy!s);
fetch_ok($ua, "user logon page", "$baseurl/cgi-bin/user.pl",
qr!User\s+Logon!s);
fetch_ok($ua, "shop admin page", "$baseurl/cgi-bin/admin/shopadmin.pl",
qr!Shop\s+administration!s);
fetch_ok($ua, "add article form", "$baseurl/cgi-bin/admin/add.pl",
- qr!New\s+Subsect\sLev2!s);
+ qr!New\s+Page\sLev3!s);
fetch_ok($ua, "add catalog form", "$baseurl/cgi-bin/admin/add.pl?type=Catalog",
qr!New\s+Catalog!s);
fetch_ok($ua, "add product form", "$baseurl/cgi-bin/admin/add.pl?type=Product",
qr!Add\s+product!s);
fetch_ok($ua, "edit article form", "$baseurl/cgi-bin/admin/add.pl?id=1",
- qr!Section\sDetails!s);
+ qr!Edit\s+Page\s+Lev1!s);
fetch_ok($ua, "edit catalog form", "$baseurl/cgi-bin/admin/add.pl?id=4",
qr!Catalog\sDetails!s);
fetch_ok($ua, "user list", "$baseurl/cgi-bin/admin/adminusers.pl",
.*
common/default.tmpl
.*
- Add\s+New\s+Section
+ Add\s+New\s+Page\s+Lev1
!xs);
check_form($ua->{content},
"edit form",
imagePos => 'tr', release=>sql_datetime(time-86400), expire=>'2999-12-31',
keyword=>'', template=>'common/default.tmpl', link=>'', admin=>'',
threshold => 5, summaryLength => 100, generator=>'Generate::Article',
- level => 1, listed=>1, lastModified => sql_datetime(time),
+ level => 1, listed=>1, lastModified => sql_datetime(time), flags=>'',
);
for my $key (%defaults) {
unless (exists $parms{$key}) {