r0.11.15 commit
authorTony Cook <tony@develop-help.com>
Thu, 28 Mar 2002 04:05:16 +0000 (04:05 +0000)
committertony <tony@45cb6cf1-00bc-42d2-bb5a-07f51df49f94>
Thu, 28 Mar 2002 04:05:16 +0000 (04:05 +0000)
29 files changed:
.cvsignore
Artistic [new file with mode: 0644]
COPYING [new file with mode: 0644]
MANIFEST
Makefile
README
nswfitc.cfg [new file with mode: 0644]
site/cgi-bin/admin/add.pl
site/cgi-bin/modules/BSE/.cvsignore [new file with mode: 0644]
site/cgi-bin/modules/BSE/Cfg.pm
site/cgi-bin/modules/BSE/FileEditor.pm
site/cgi-bin/modules/BSE/Util/Tags.pm
site/cgi-bin/modules/Generate.pm
site/cgi-bin/modules/Generate/Article.pm
site/cgi-bin/shop.pl
site/docs/TODO.pod
site/docs/bse.pod
site/docs/config.pod
site/docs/templates.pod
site/htdocs/admin/help/edit.html [new file with mode: 0644]
site/templates/admin/edit_0.tmpl
site/templates/admin/edit_1.tmpl
site/templates/admin/edit_2.tmpl
site/templates/admin/edit_catalog.tmpl
site/templates/admin/edit_product.tmpl
site/templates/admin/edit_steps.tmpl [new file with mode: 0644]
site/templates/common/defsteps.tmpl
t/BSE/Test.pm
test.cfg [new file with mode: 0644]

index 99085716d6dec10fb596456955e66f281a5cc2ff..e225142ca59883bf61a9dbd283a11154cac048aa 100644 (file)
@@ -1,3 +1,2 @@
 INSTALL.html
 INSTALL.txt
-test.cfg
diff --git a/Artistic b/Artistic
new file mode 100644 (file)
index 0000000..5f22124
--- /dev/null
+++ b/Artistic
@@ -0,0 +1,131 @@
+
+
+
+
+                        The "Artistic License"
+
+                               Preamble
+
+The intent of this document is to state the conditions under which a
+Package may be copied, such that the Copyright Holder maintains some
+semblance of artistic control over the development of the package,
+while giving the users of the package the right to use and distribute
+the Package in a more-or-less customary fashion, plus the right to make
+reasonable modifications.
+
+Definitions:
+
+       "Package" refers to the collection of files distributed by the
+       Copyright Holder, and derivatives of that collection of files
+       created through textual modification.
+
+       "Standard Version" refers to such a Package if it has not been
+       modified, or has been modified in accordance with the wishes
+       of the Copyright Holder as specified below.
+
+       "Copyright Holder" is whoever is named in the copyright or
+       copyrights for the package.
+
+       "You" is you, if you're thinking about copying or distributing
+       this Package.
+
+       "Reasonable copying fee" is whatever you can justify on the
+       basis of media cost, duplication charges, time of people involved,
+       and so on.  (You will not be required to justify it to the
+       Copyright Holder, but only to the computing community at large
+       as a market that must bear the fee.)
+
+       "Freely Available" means that no fee is charged for the item
+       itself, though there may be fees involved in handling the item.
+       It also means that recipients of the item may redistribute it
+       under the same conditions they received it.
+
+1. You may make and give away verbatim copies of the source form of the
+Standard Version of this Package without restriction, provided that you
+duplicate all of the original copyright notices and associated disclaimers.
+
+2. You may apply bug fixes, portability fixes and other modifications
+derived from the Public Domain or from the Copyright Holder.  A Package
+modified in such a way shall still be considered the Standard Version.
+
+3. You may otherwise modify your copy of this Package in any way, provided
+that you insert a prominent notice in each changed file stating how and
+when you changed that file, and provided that you do at least ONE of the
+following:
+
+    a) place your modifications in the Public Domain or otherwise make them
+    Freely Available, such as by posting said modifications to Usenet or
+    an equivalent medium, or placing the modifications on a major archive
+    site such as uunet.uu.net, or by allowing the Copyright Holder to include
+    your modifications in the Standard Version of the Package.
+
+    b) use the modified Package only within your corporation or organization.
+
+    c) rename any non-standard executables so the names do not conflict
+    with standard executables, which must also be provided, and provide
+    a separate manual page for each non-standard executable that clearly
+    documents how it differs from the Standard Version.
+
+    d) make other distribution arrangements with the Copyright Holder.
+
+4. You may distribute the programs of this Package in object code or
+executable form, provided that you do at least ONE of the following:
+
+    a) distribute a Standard Version of the executables and library files,
+    together with instructions (in the manual page or equivalent) on where
+    to get the Standard Version.
+
+    b) accompany the distribution with the machine-readable source of
+    the Package with your modifications.
+
+    c) give non-standard executables non-standard names, and clearly
+    document the differences in manual pages (or equivalent), together
+    with instructions on where to get the Standard Version.
+
+    d) make other distribution arrangements with the Copyright Holder.
+
+5. You may charge a reasonable copying fee for any distribution of this
+Package.  You may charge any fee you choose for support of this
+Package.  You may not charge a fee for this Package itself.  However,
+you may distribute this Package in aggregate with other (possibly
+commercial) programs as part of a larger (possibly commercial) software
+distribution provided that you do not advertise this Package as a
+product of your own.  You may embed this Package's interpreter within
+an executable of yours (by linking); this shall be construed as a mere
+form of aggregation, provided that the complete Standard Version of the
+interpreter is so embedded.
+
+6. The scripts and library files supplied as input to or produced as
+output from the programs of this Package do not automatically fall
+under the copyright of this Package, but belong to whoever generated
+them, and may be sold commercially, and may be aggregated with this
+Package.  If such scripts or library files are aggregated with this
+Package via the so-called "undump" or "unexec" methods of producing a
+binary executable image, then distribution of such an image shall
+neither be construed as a distribution of this Package nor shall it
+fall under the restrictions of Paragraphs 3 and 4, provided that you do
+not represent such an executable image as a Standard Version of this
+Package.
+
+7. C subroutines (or comparably compiled subroutines in other
+languages) supplied by you and linked into this Package in order to
+emulate subroutines and variables of the language defined by this
+Package shall not be considered part of this Package, but are the
+equivalent of input as in Paragraph 6, provided these subroutines do
+not change the language in any way that would cause it to fail the
+regression tests for the language.
+
+8. Aggregation of this Package with a commercial distribution is always
+permitted provided that the use of this Package is embedded; that is,
+when no overt attempt is made to make this Package's interfaces visible
+to the end user of the commercial distribution.  Such use shall not be
+construed as a distribution of this Package.
+
+9. The name of the Copyright Holder may not be used to endorse or promote
+products derived from this software without specific prior written permission.
+
+10. THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR
+IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+
+                               The End
diff --git a/COPYING b/COPYING
new file mode 100644 (file)
index 0000000..e77696a
--- /dev/null
+++ b/COPYING
@@ -0,0 +1,339 @@
+                   GNU GENERAL PUBLIC LICENSE
+                      Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.
+                          675 Mass Ave, Cambridge, MA 02139, USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+                           Preamble
+
+  The licenses for most software are designed to take away your
+freedom to share and change it.  By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users.  This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it.  (Some other Free Software Foundation software is covered by
+the GNU Library General Public License instead.)  You can apply it to
+your programs, too.
+
+  When we speak of free software, we are referring to freedom, not
+price.  Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+  To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+  For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have.  You must make sure that they, too, receive or can get the
+source code.  And you must show them these terms so they know their
+rights.
+
+  We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+  Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software.  If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+  Finally, any free program is threatened constantly by software
+patents.  We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary.  To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+  The precise terms and conditions for copying, distribution and
+modification follow.
+\f
+                   GNU GENERAL PUBLIC LICENSE
+   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+  0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License.  The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language.  (Hereinafter, translation is included without limitation in
+the term "modification".)  Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope.  The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+  1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+  2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+    a) You must cause the modified files to carry prominent notices
+    stating that you changed the files and the date of any change.
+
+    b) You must cause any work that you distribute or publish, that in
+    whole or in part contains or is derived from the Program or any
+    part thereof, to be licensed as a whole at no charge to all third
+    parties under the terms of this License.
+
+    c) If the modified program normally reads commands interactively
+    when run, you must cause it, when started running for such
+    interactive use in the most ordinary way, to print or display an
+    announcement including an appropriate copyright notice and a
+    notice that there is no warranty (or else, saying that you provide
+    a warranty) and that users may redistribute the program under
+    these conditions, and telling the user how to view a copy of this
+    License.  (Exception: if the Program itself is interactive but
+    does not normally print such an announcement, your work based on
+    the Program is not required to print an announcement.)
+\f
+These requirements apply to the modified work as a whole.  If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works.  But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+  3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+    a) Accompany it with the complete corresponding machine-readable
+    source code, which must be distributed under the terms of Sections
+    1 and 2 above on a medium customarily used for software interchange; or,
+
+    b) Accompany it with a written offer, valid for at least three
+    years, to give any third party, for a charge no more than your
+    cost of physically performing source distribution, a complete
+    machine-readable copy of the corresponding source code, to be
+    distributed under the terms of Sections 1 and 2 above on a medium
+    customarily used for software interchange; or,
+
+    c) Accompany it with the information you received as to the offer
+    to distribute corresponding source code.  (This alternative is
+    allowed only for noncommercial distribution and only if you
+    received the program in object code or executable form with such
+    an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it.  For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable.  However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+\f
+  4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License.  Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+  5. You are not required to accept this License, since you have not
+signed it.  However, nothing else grants you permission to modify or
+distribute the Program or its derivative works.  These actions are
+prohibited by law if you do not accept this License.  Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+  6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions.  You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+  7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License.  If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all.  For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices.  Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+\f
+  8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded.  In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+  9. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time.  Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number.  If the Program
+specifies a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation.  If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+  10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission.  For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this.  Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+                           NO WARRANTY
+
+  11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+  12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+                    END OF TERMS AND CONDITIONS
+\f
+           How to Apply These Terms to Your New Programs
+
+  If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+  To do so, attach the following notices to the program.  It is safest
+to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+    <one line to give the program's name and a brief idea of what it does.>
+    Copyright (C) 19yy  <name of author>
+
+    This program is free software; you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation; either version 2 of the License, or
+    (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this program; if not, write to the Free Software
+    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+Also add information on how to contact you by electronic and paper mail.
+
+If the program is interactive, make it output a short notice like this
+when it starts in an interactive mode:
+
+    Gnomovision version 69, Copyright (C) 19yy name of author
+    Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+    This is free software, and you are welcome to redistribute it
+    under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License.  Of course, the commands you use may
+be called something other than `show w' and `show c'; they could even be
+mouse-clicks or menu items--whatever suits your program.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the program, if
+necessary.  Here is a sample; alter the names:
+
+  Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+  `Gnomovision' (which makes passes at compilers) written by James Hacker.
+
+  <signature of Ty Coon>, 1 April 1989
+  Ty Coon, President of Vice
+
+This General Public License does not permit incorporating your program into
+proprietary programs.  If your program is a subroutine library, you may
+consider it more useful to permit linking proprietary applications with the
+library.  If this is what you want to do, use the GNU Library General
+Public License instead of this License.
index 7179d0a60d4da93e8819a85e415b179041b9b443..840ecab9dd9ecf87242d92b6b3870cd2e3d651c1 100644 (file)
--- a/MANIFEST
+++ b/MANIFEST
@@ -1,3 +1,5 @@
+Artistic
+COPYING
 INSTALL.html
 INSTALL.pod
 INSTALL.txt
@@ -57,6 +59,7 @@ site/cgi-bin/modules/BSE/Util/SQL.pm
 site/cgi-bin/modules/BSE/Util/Secure.pm
 site/cgi-bin/modules/BSE/Util/Tags.pm
 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/Generate.pm
 site/cgi-bin/modules/Generate/Article.pm
@@ -115,6 +118,7 @@ site/docs/upgrade_mysql.html
 site/htdocs/a/.htaccess
 site/htdocs/admin/advanced.html
 site/htdocs/admin/help/body.html
+site/htdocs/admin/help/edit.html
 site/htdocs/admin/help/file.html
 site/htdocs/admin/help/subs.html
 site/htdocs/admin/help/subssend.html
@@ -154,6 +158,7 @@ site/templates/admin/edit_4.tmpl
 site/templates/admin/edit_5.tmpl
 site/templates/admin/edit_catalog.tmpl
 site/templates/admin/edit_product.tmpl
+site/templates/admin/edit_steps.tmpl
 site/templates/admin/filelist.tmpl
 site/templates/admin/order_detail.tmpl
 site/templates/admin/order_list.tmpl
index 45702d8f0c5095d391f69498b7d112d3cb7a21ef..c191c910cae1a55f282eea226a1c0c48f5038e96 100755 (executable)
--- a/Makefile
+++ b/Makefile
@@ -1,4 +1,4 @@
-VERSION=0.11_14
+VERSION=0.11_15
 DISTNAME=bse-$(VERSION)
 DISTBUILD=$(DISTNAME)
 DISTTAR=../$(DISTNAME).tar
@@ -11,6 +11,10 @@ help:
        @echo make distdir - build distribution directory
        @echo make docs - build documentation
 
+foo:
+       echo cvs tag r`echo $(VERSION) | tr . _`
+
+
 # this target needs to be modified so that the output directory includes
 # the release number
 dist: cleantree $(DISTTGZ)
@@ -36,7 +40,7 @@ $(DISTTGZ): distdir
 
 #      tar czf $(DISTFILE) -C .. bse --exclude '*~' --exclude '*,v' --exclude 'pod2html-*cache'
 
-distdir: docs dbinfo
+distdir: docs dbinfo version
        -perl -MExtUtils::Command -e rm_rf $(DISTBUILD)
        perl -MExtUtils::Manifest=manicopy,maniread -e "manicopy(maniread(), '$(DISTBUILD)')"
        mkdir $(DISTBUILD)/site/htdocs/shop
@@ -70,6 +74,18 @@ dbinfo: site/util/mysql.str
 site/util/mysql.str: schema/bse.sql
        perl schema/mysql_build.pl >site/util/mysql.str
 
+version: site/cgi-bin/modules/BSE/Version.pm
+
+site/cgi-bin/modules/BSE/Version.pm: Makefile
+       echo 'package BSE::Version;' >site/cgi-bin/modules/BSE/Version.pm
+       echo 'use strict;' >>site/cgi-bin/modules/BSE/Version.pm
+       echo  >>site/cgi-bin/modules/BSE/Version.pm
+       echo 'my $$VERSION = "$(VERSION)";' >>site/cgi-bin/modules/BSE/Version.pm
+       echo  >>site/cgi-bin/modules/BSE/Version.pm
+       echo 'sub version { $$VERSION }' >>site/cgi-bin/modules/BSE/Version.pm
+       echo  >>site/cgi-bin/modules/BSE/Version.pm
+       echo '1;' >>site/cgi-bin/modules/BSE/Version.pm
+
 # this is very rough
 testinst: distdir
        perl localinst.perl $(DISTBUILD)
diff --git a/README b/README
index 0b597076619e41c83e86eb2c1e480148148b1438..08a29b3a5c16d45e934d61d52e272679f0b586e4 100755 (executable)
--- a/README
+++ b/README
@@ -19,4 +19,7 @@ For version information please see site/docs/bse.pod
 Installation documentation can be found in INSTALL.* and plenty of
 other documentation can be found in site/docs/
 
+BSE is distributed under your choice of either the Artistic or GNU
+Public License, just as Perl is.
+
 Tony Cook <tony@develop-help.com>
diff --git a/nswfitc.cfg b/nswfitc.cfg
new file mode 100644 (file)
index 0000000..72fe8cd
--- /dev/null
@@ -0,0 +1,13 @@
+# where to install the site
+base_url = http://nswfitc.develop-help.com
+securl = http://nswfitc.develop-help.com:80
+# where to install the site
+base_dir = /home/httpd/nswfitc
+# the database user/password/dsn
+dbuser = nswfitc
+dbpass = nswfitc
+dsn = dbi:mysql:nswfitc
+dbclass = BSE::DB::Mysql
+sessionclass = Apache::Session::MySQL
+# the location of mysql
+mysql = /usr/local/mysql/bin/mysql
index af5b23d27a96ce98c7ee0fa9a046d6382487385e..89cdcc017784c2969c7d435df7997b0713e336d8 100755 (executable)
@@ -28,8 +28,6 @@ my $securlbase = $cfg->entryVar('site', 'secureurl');
 use Constants qw(%LEVEL_DEFAULTS $SHOPID $PRODUCTPARENT $LINK_TITLES);
 my %levels = %LEVEL_DEFAULTS;
 
-my %level_cache;
-
 # what to do
 my %steps =
   (
@@ -187,12 +185,6 @@ if ($parent && $parent->{id}) {
   }
 }
 
-unless ($level_cache{$level}{edit}) {
-  my $checkfor = "admin/edit_$level";
-  $level_cache{$level}{edit} = -e "$TMPLDIR/${checkfor}.tmpl" ? $checkfor :
-    $levels{$level}{edit};
-}
-
 my @files;
 if ($article->{id} && $article->{id} > 0) {
   require 'ArticleFiles.pm';
@@ -306,8 +298,12 @@ HTML
    movestepkid =>
    sub {
      my $html = '';
-     my $refreshto = CGI::escape($ENV{SCRIPT_NAME}
-                                ."?id=$article->{id}#step");
+     my $url = $ENV{SCRIPT_NAME} . "?id=$article->{id}";
+     if (param('_t')) {
+       $url .= "&_t=".param('_t');
+     }
+     $url .= "#step";
+     my $refreshto = CGI::escape($url);
      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>
@@ -363,8 +359,12 @@ HTML
    movestepparent =>
    sub {
      my $html = '';
-     my $refreshto = CGI::escape($ENV{SCRIPT_NAME}
-                                ."?id=$article->{id}#stepparents");
+     my $url = $ENV{SCRIPT_NAME} . "?id=$article->{id}";
+     if (param('_t')) {
+       $url .= "&_t=".param('_t');
+     }
+     $url .= "#stepparents";
+     my $refreshto = CGI::escape($url);
      if ($stepparent_index < $#stepparents) {
         $html .= <<HTML;
 <a href="$CGI_URI/admin/move.pl?stepchild=$article->{id}&id=$stepparents[$stepparent_index]{parentId}&d=swap&other=$stepparents[$stepparent_index+1]{parentId}&refreshto=$refreshto&all=1"><img src="$IMAGES_URI/admin/move_down.gif" width="17" height="13" border="0" alt="Move Down" align="absbottom"></a>
@@ -413,12 +413,20 @@ start();
 sub start {
   $message = shift if @_;
   # just substitute empty defaults into the blank page
+  my $base;
   if (should_be_catalog($article, $parent, $articles)) {
-    page('admin/edit_catalog.tmpl');
+    $base = 'catalog';
   }
   else {
-    page($level_cache{$level}{edit}.".tmpl");
+    $base = $level;
   }
+  if (param('_t')) {
+    $base = param('_t');
+    $base =~ s/\W//g;
+  }
+  my $template = $cfg->entry('admin templates', $base, 
+                           "admin/edit_$base.tmpl");
+  page($template);
 }
 
 sub save_new_article {
@@ -680,8 +688,7 @@ sub add_stepkid {
     $message = $@;
     return start();
   }
-  print "Refresh: 0; url=\"$urlbase$ENV{SCRIPT_NAME}?id=$article->{id}#step\"\n";
-  print "Content-type: text/html\n\n<HTML></HTML>\n";
+  refresh('step');
 }
 
 sub del_stepkid {
@@ -773,7 +780,7 @@ sub add_stepparent {
   };
   $@ and return refresh('step', $@);
 
-  return refresh('step');
+  return refresh('stepparents');
 }
 
 sub del_stepparent {
@@ -837,7 +844,11 @@ sub refresh {
 
   my $url = "$urlbase$ENV{SCRIPT_NAME}?id=$article->{id}";
   $url .= "&message=" . CGI::escape($message) if $message;
+  if (param('_t')) {
+    $url .= "&_t=".CGI::escape(param('_t'));
+  }
   $url .= "#$name" if $name;
+  print STDERR "Url $url\n";
 
   print "Refresh: 0; url=\"$url\"\n";
   print "Content-type: text/html\n\n<HTML></HTML>\n";
diff --git a/site/cgi-bin/modules/BSE/.cvsignore b/site/cgi-bin/modules/BSE/.cvsignore
new file mode 100644 (file)
index 0000000..a7f0136
--- /dev/null
@@ -0,0 +1 @@
+Version.pm
index 6ca1c955c91b70c7d1a4abe5b78235ffbc4e5825..fafb6d26f134efe7a78da7e318e5418e7bb05788 100644 (file)
@@ -50,7 +50,7 @@ sub new {
   return $class->_load_cfg($file);
 }
 
-=item entry($section, $key)
+=item entry($section, $key, $def)
 
 Returns the value of the given $key from section $section.
 
@@ -59,10 +59,15 @@ If the section or key doesn not exist, return undef.
 =cut
 
 sub entry {
-  my ($self, $section, $key) = @_;
+  my ($self, $section, $key, $def) = @_;
 
-  $self->{config}{lc $section} 
-    && $self->{config}{lc $section}{values}{lc $key};
+  if (exists $self->{config}{lc $section} 
+      && exists $self->{config}{lc $section}{values}{lc $key}) {
+    return $self->{config}{lc $section}{values}{lc $key}
+  }
+  else {
+    return $def;
+  }
 }
 
 =item entries($section)
index a1206932097af3135d362db3903740ee61708eff..038d4e2762e158147e1b0c00a55250beb2aa8828 100644 (file)
@@ -252,7 +252,15 @@ sub filedel {
 
     if ($file) {
       my $downloadPath = $self->{cfg}->entryErr('paths', 'downloads');
-      unlink $downloadPath . "/" . $file->{filename};
+      my $filename = $downloadPath . "/" . $file->{filename};
+      my $debug_del = $self->{cfg}->entryBool('debug', 'file_unlink', 0);
+      if ($debug_del) {
+       unlink $filename
+         or print STDERR "Error deleting $filename: $!\n";
+      }
+      else {
+       unlink $filename;
+      }
       $file->remove();
     }
   }
index 075fda0fe07efef4666b937f6b9e820d344d33e3..be3ec7560320f3b323337282a022a87f0ab6cb83 100644 (file)
@@ -117,6 +117,11 @@ sub static {
          return $value;
        }
      },
+     release =>
+     sub {
+       require BSE::Version;
+       BSE::Version->version;
+     },
      _format => 
      sub {
        my ($value, $fmt) = @_;
index 5319d311aacbbe74617b2bbcaad57face3c55a8a..863dde9f171e76eaa09945078ae2e855430f36c4 100644 (file)
@@ -801,100 +801,14 @@ pages.
 
 This is probably better documented in L<templates.pod>.
 
-=head1 TAGS
-
-=over 4
-
-=item ifAdmin
-
-Conditional tag, true if generating in admin mode.
-
-=item iterator ... level1
-
-Iterates over the listed level 1 articles.
-
-=item level1 I<name>
-
-The value of the I<name> field of the current level 1 article.
-
-=item iterator ... level2
-
-Iterates over the listed level 2 children of the current level 1 article.
-
-=item level2 I<name>
-
-The value of the I<name> field of the current level 2 article.
-
-=item ifLevel2 I<name>
-
-Conditional tag, true if the current level 1 article has any listed
-level 2 children.
-
-=item iterator ... level3
-
-Iterates over the listed level 3 children of the current level 2 article.
-
-=item level3 I<name>
-
-The value of the I<name> field of the current level 3 article.
-
-=item ifLevel3 I<name>
-
-Conditional tag, true if the current level 2 article has any listed
-level 3 children.
-
-=item url I<which>
-
-Returns a link to the specified article .  Due to the way the action
-list is built, this can be article types defined in derived classes of
-Generate, like the C<parent> article in Generate::Article.
-
-=item money I<data tag>
-
-Formats the given value as a monetary value.  This does not include a
-currency symbol.  Internally BSE stores monetary values as integers to
-prevent the loss of accuracy inherent in floating point numbers.  You
-need to use this tag to display any monetary value.
-
-=item ifInMenu I<which>
-
-Conditional tag, true if the given item can appear in a menu.
-
-=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>.
-
-=item embed I<which>
-
-=item embed I<which> I<template>
-
-=item embed I<which> I<template> I<maxdepth>
-
-=item embed child
+=head1 COMMON TAGS
 
-Embeds the article specified by which using either the specified
-template or the articles template.
-
-In this case I<which> can also be an article ID.
-
-I<template> is a filename relative to the templates directory.  If
-this is "-" then the articles template is used (so you can set
-I<maxdepth> without setting the template.)  If I<template> contains a
-C<$> sign it will be replaced with the name of the original template.
-
-If I<maxdepth> is supplied and is less than the current maximum depth
-then it becomes the new maximum depth.  This can be used with ifCanEmbed.
+These tags can be used anywhere, including in admin templates.  It's
+possible some admin code has been missed, if you find a place where
+these cannot be used let us know.
 
-=item embed start ... embed end
-
-Marks the range of text that would be embedded in a parent that used
-C<embed child>.
-
-=item ifEmbedded
 
-Conditional tag, true if the current article is being embedded.
+=over
 
 =item kb I<data tag>
 
@@ -1038,6 +952,107 @@ Retrieves a value from the BSE configuration file.
 
 If you don't supply a default then a default will be the empty string.
 
+=item release
+
+The release number of BSE.
+
+=back
+
+=head1 TAGS
+
+=over 4
+
+=item ifAdmin
+
+Conditional tag, true if generating in admin mode.
+
+=item iterator ... level1
+
+Iterates over the listed level 1 articles.
+
+=item level1 I<name>
+
+The value of the I<name> field of the current level 1 article.
+
+=item iterator ... level2
+
+Iterates over the listed level 2 children of the current level 1 article.
+
+=item level2 I<name>
+
+The value of the I<name> field of the current level 2 article.
+
+=item ifLevel2 I<name>
+
+Conditional tag, true if the current level 1 article has any listed
+level 2 children.
+
+=item iterator ... level3
+
+Iterates over the listed level 3 children of the current level 2 article.
+
+=item level3 I<name>
+
+The value of the I<name> field of the current level 3 article.
+
+=item ifLevel3 I<name>
+
+Conditional tag, true if the current level 2 article has any listed
+level 3 children.
+
+=item url I<which>
+
+Returns a link to the specified article .  Due to the way the action
+list is built, this can be article types defined in derived classes of
+Generate, like the C<parent> article in Generate::Article.
+
+=item money I<data tag>
+
+Formats the given value as a monetary value.  This does not include a
+currency symbol.  Internally BSE stores monetary values as integers to
+prevent the loss of accuracy inherent in floating point numbers.  You
+need to use this tag to display any monetary value.
+
+=item ifInMenu I<which>
+
+Conditional tag, true if the given item can appear in a menu.
+
+=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>.
+
+=item embed I<which>
+
+=item embed I<which> I<template>
+
+=item embed I<which> I<template> I<maxdepth>
+
+=item embed child
+
+Embeds the article specified by which using either the specified
+template or the articles template.
+
+In this case I<which> can also be an article ID.
+
+I<template> is a filename relative to the templates directory.  If
+this is "-" then the articles template is used (so you can set
+I<maxdepth> without setting the template.)  If I<template> contains a
+C<$> sign it will be replaced with the name of the original template.
+
+If I<maxdepth> is supplied and is less than the current maximum depth
+then it becomes the new maximum depth.  This can be used with ifCanEmbed.
+
+=item embed start ... embed end
+
+Marks the range of text that would be embedded in a parent that used
+C<embed child>.
+
+=item ifEmbedded
+
+Conditional tag, true if the current article is being embedded.
+
 =back
 
 =head1 BUGS
index f1c3cfb09736589cd58ed02875e744d8450582b1..efe05963ce7a0b9d0adb61a2e5e18353cb3c24a7 100644 (file)
@@ -98,6 +98,7 @@ sub baseActs {
     @allkids     = $article->all_visible_kids;
     @stepparents  = $article->step_parents;
   }
+  my $allkids_index;
   # separate these so the closures can see %acts
   my %acts =
     (
@@ -147,10 +148,11 @@ sub baseActs {
        }
 
        my $count;
-       if ($_[0] eq 'stepkids') {
+       my $what = $_[0] || '';
+       if ($what eq 'stepkids') {
         $count = @stepkids;
        }
-       elsif ($_[0] eq 'allkids') {
+       elsif ($what eq 'allkids') {
         $count = @allkids;
        }
        else {
@@ -299,6 +301,24 @@ HTML
          return '';
        }
      },
+     movestepkid =>
+     sub {
+       my $html = '';
+       return '' unless $self->{admin};
+       my $refreshto = CGI::escape($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>
+HTML
+       }
+       if ($allkids_index > 0) {
+        $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_up.gif" width="17" height="13" border="0" alt="Move Up" align="absbottom"></a>
+HTML
+       }
+       return $html;
+     },
      ifCurrentPage=>
      sub {
        my $arg = shift;
@@ -344,7 +364,7 @@ HTML
      ifImages => sub { @images },
      BSE::Util::Tags->make_iterator(\@files, 'file', 'files'),
      BSE::Util::Tags->make_iterator(\@stepkids, 'stepkid', 'stepkids'),
-     BSE::Util::Tags->make_iterator(\@allkids, 'allkid', 'allkids'),
+     BSE::Util::Tags->make_iterator(\@allkids, 'allkid', 'allkids', \$allkids_index),
      BSE::Util::Tags->make_iterator(\@stepparents, 'stepparent', 'stepparents'),
     );
 
index 7a728eb993ec45aeba866b06b405bca6b863c905..59aa2b51d9ea6fa8649218b3b4866652a2abb8ab 100755 (executable)
@@ -720,19 +720,22 @@ sub send_order {
     !$@ or die $@;
     my $encrypter = $crypto_class->new;
 
+    my $debug = $cfg->entryBool('debug', 'mail_encryption', 0);
+    my $sign = $cfg->entryBool('basic', 'sign', 1);
+
     # encrypt and sign
     my %opts = 
       (
-       sign=> $cfg->entryBool('basic', 'sign', 1),
+       sign=> $sign,
        passphrase=> $passphrase,
        stripwarn=>1,
-       #debug=>1,
+       debug=>$debug,
       );
+    
     $opts{secretkeyid} = $signing_id if $signing_id;
     $opts{pgp} = $pgp if $pgp;
     $opts{gpg} = $gpg if $gpg;
     $opts{pgpe} = $pgpe if $pgpe;
-    #$opts{home} = '/home/bodyscoop';
     my $recip = "$toName $toEmail";
 
     my $crypted = $encrypter->encrypt($recip, $ordertext, %opts )
index eb995ce7b78722f4417a9c9aa84c16fabd32b087..2998ec22918603034cd7d74335666453ae083f15 100644 (file)
@@ -135,6 +135,23 @@ Java applet WYSIWYG body text editor (adrian)
 
 have the image cleanup tool cleanup downloads too (adrian)
 
+=item *
+
+Can we display allKids in the sitemap
+
+=item *
+
+Ability to reorder files from browse mode (the files attached to an
+article)
+
+=item *
+
+Clean up unreferenced files (like imageclean)
+
+=item *
+
+Split the step kids admin off to a separate admin page.
+
 =back
 
 =cut
index e02a2591c8b936771702c95f36703499fc33f2fb..3170d89c93c4cbe2a7f1eb662911a2cf0c6007ba 100644 (file)
@@ -10,6 +10,64 @@ Maybe I'll add some other bits here.
 
 =head1 CHANGES
 
+=head2 0.11_15
+
+=over
+
+=item *
+
+moved step kids/step parents management to their own page (if you use
+the old edit templates you can keep them on the same page.)
+
+=item *
+
+added file_unlink option to [debug] in bse.cfg
+
+=item *
+
+added mail_encryption option to [debug] in bse.cfg
+
+=item *
+
+minor reorganization of mail encryption to avoid a "Odd number of
+elements in hash assignment" error in some circumstances.
+
+=item *
+
+added help to the article editor pages
+
+=item *
+
+added license
+
+=item *
+
+added <:movestepkid:> tag to the Generate::Article set of tags
+
+=item *
+
+added the BSE::Version class and the <:release:> tag
+
+=item *
+
+more admin templates (most of the edit_*.tmpl) can now be controlled
+from the config file.
+
+=item *
+
+fixed a broken in-page link from the refresh after adding a stepparent
+
+=item *
+
+fixed an uninitialized value warning introduced in 0.11_14
+
+=item *
+
+changed the misleading "Uploaded files" to "Uploaded images" on the
+edit pages.
+
+=back
+
 =head2 0.11_14
 
 =over
index 48de5583b2ccadd7cebd842d698fee75c76cdf99..0a0327d7da19707a65eee0338c1155e2bb3fa8c4 100644 (file)
@@ -83,6 +83,26 @@ In each case the default is the name with a C<.tmpl> extension.
 
 article file wizard
 
+=item catalog
+
+Catalog editor page.  Default admin/edit_catalog.tmpl
+
+=item 1
+
+=item 2
+
+=item 3
+
+=item 4
+
+=item 5
+
+Article edit pages.  Default admin/edit_<number>.tmpl
+
+=item steps
+
+Step child/parent management page.  Default admin/edit_steps.tmpl
+
 =back
 
 =head2 [html]
@@ -325,7 +345,20 @@ logon form was triggered on the secure side of the site (possibly from
 the shop) or on the insecure side.  Since CGI doesn't necessarily give
 us all the information required, it's possible it will guess wrong.
 
-Setting this option to 1 will enable debugging information sent to standard error, which will be sent to the error log on Apache.  This probably isn't useful on IIS.
+Setting this option to 1 will enable debugging information sent to
+standard error, which will be sent to the error log on Apache.  This
+probably isn't useful on IIS.
+
+=item file_unlink
+
+Reports errors to STDERR (hence to the error log on Apache) if there
+is a problem deleting the actual file when an attached file is
+removed.
+
+=item mail_encryption
+
+Reports debugging information to standard error while encrypting your
+mail.
 
 =back
 
index 2923737466b09aa0427dfebff59783659e458980..4c34529c0d1924e8268b5dfa1a7c17f9d04f6c89 100644 (file)
@@ -486,103 +486,13 @@ any other tag which is valid for the current page which retrieves
 article or product attributes, such as C<section>, C<parent> or
 C<article> itself.
 
-=head2 Base tags
-
-These tags can be used in any article, catalog, product or
-pre-generated template, such as the checkout or search template.
-
-=over 4
-
-=item ifAdmin
-
-Conditional tag, true if generating in admin mode.
-
-=item iterator ... level1
-
-Iterates over the listed level 1 articles.
-
-=item level1 I<name>
-
-The value of the I<name> field of the current level 1 article.
-
-=item iterator ... level2
-
-Iterates over the listed level 2 children of the current level 1 article.
-
-=item level2 I<name>
-
-The value of the I<name> field of the current level 2 article.
-
-=item ifLevel2 I<name>
-
-Conditional tag, true if the current level 1 article has any listed
-level 2 children.
-
-=item iterator ... level3
-
-Iterates over the listed level 3 children of the current level 2 article.
-
-=item level3 I<name>
-
-The value of the I<name> field of the current level 3 article.
-
-=item ifLevel3 I<name>
-
-Conditional tag, true if the current level 2 article has any listed
-level 3 children.
-
-=item url I<which>
-
-Returns a link to the specified article .  Due to the way the action
-list is built, this can be article types defined in derived classes of
-Generate, like the C<parent> article in Generate::Article.
+=head2 Common Tags
 
-=item money I<data tag>
-
-Formats the given value as a monetary value.  This does not include a
-currency symbol.  Internally BSE stores monetary values as integers to
-prevent the loss of accuracy inherent in floating point numbers.  You
-need to use this tag to display any monetary value.
-
-=item ifInMenu I<which>
-
-Conditional tag, true if the given item can appear in a menu.
-
-=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>.
-
-=item embed I<which>
-
-=item embed I<which> I<template>
-
-=item embed I<which> I<template> I<maxdepth>
-
-=item embed child
-
-Embeds the article specified by which using either the specified
-template or the articles template.
-
-In this case I<which> can also be an article ID.
+These tags can be used anywhere, including in admin templates.  It's
+possible some admin code has been missed, if you find a place where
+these cannot be used let us know.
 
-I<template> is a filename relative to the templates directory.  If
-this is "-" then the articles template is used (so you can set
-I<maxdepth> without setting the template.)  If I<template> contains a
-C<$> sign it will be replaced with the name of the original template.
-
-If I<maxdepth> is supplied and is less than the current maximum depth
-then it becomes the new maximum depth.  This can be used with ifCanEmbed.
-
-=item embed start ... embed end
-
-Marks the range of text that would be embedded in a parent that used
-C<embed child>.
-
-=item ifEmbedded
-
-Conditional tag, true if the current article is being embedded.
+=over
 
 =item kb I<data tag>
 
@@ -726,6 +636,110 @@ Retrieves a value from the BSE configuration file.
 
 If you don't supply a default then a default will be the empty string.
 
+=item release
+
+The release number of BSE.
+
+=back
+
+=head2 Base tags
+
+These tags can be used in any article, catalog, product or
+pre-generated template, such as the checkout or search template.
+
+=over 4
+
+=item ifAdmin
+
+Conditional tag, true if generating in admin mode.
+
+=item iterator ... level1
+
+Iterates over the listed level 1 articles.
+
+=item level1 I<name>
+
+The value of the I<name> field of the current level 1 article.
+
+=item iterator ... level2
+
+Iterates over the listed level 2 children of the current level 1 article.
+
+=item level2 I<name>
+
+The value of the I<name> field of the current level 2 article.
+
+=item ifLevel2 I<name>
+
+Conditional tag, true if the current level 1 article has any listed
+level 2 children.
+
+=item iterator ... level3
+
+Iterates over the listed level 3 children of the current level 2 article.
+
+=item level3 I<name>
+
+The value of the I<name> field of the current level 3 article.
+
+=item ifLevel3 I<name>
+
+Conditional tag, true if the current level 2 article has any listed
+level 3 children.
+
+=item url I<which>
+
+Returns a link to the specified article .  Due to the way the action
+list is built, this can be article types defined in derived classes of
+Generate, like the C<parent> article in Generate::Article.
+
+=item money I<data tag>
+
+Formats the given value as a monetary value.  This does not include a
+currency symbol.  Internally BSE stores monetary values as integers to
+prevent the loss of accuracy inherent in floating point numbers.  You
+need to use this tag to display any monetary value.
+
+=item ifInMenu I<which>
+
+Conditional tag, true if the given item can appear in a menu.
+
+=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>.
+
+=item embed I<which>
+
+=item embed I<which> I<template>
+
+=item embed I<which> I<template> I<maxdepth>
+
+=item embed child
+
+Embeds the article specified by which using either the specified
+template or the articles template.
+
+In this case I<which> can also be an article ID.
+
+I<template> is a filename relative to the templates directory.  If
+this is "-" then the articles template is used (so you can set
+I<maxdepth> without setting the template.)  If I<template> contains a
+C<$> sign it will be replaced with the name of the original template.
+
+If I<maxdepth> is supplied and is less than the current maximum depth
+then it becomes the new maximum depth.  This can be used with ifCanEmbed.
+
+=item embed start ... embed end
+
+Marks the range of text that would be embedded in a parent that used
+C<embed child>.
+
+=item ifEmbedded
+
+Conditional tag, true if the current article is being embedded.
+
 =back
 
 =head2 Article tags
diff --git a/site/htdocs/admin/help/edit.html b/site/htdocs/admin/help/edit.html
new file mode 100644 (file)
index 0000000..d23eead
--- /dev/null
@@ -0,0 +1,119 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+  <head>
+    <title>Article Editor - BSE</title>
+    <link rel="stylesheet" href="/css/admin.css">
+  </head>
+<body>
+<h1>Article Editor</h1>
+<div>
+<h2><a name="section">Section</h2>
+
+<p>The section this article will be placed under..</p>
+
+</div>
+
+<div>
+<h2><a name="title">Title</h2>
+
+<p>The title of the article.</p>
+
+</div>
+
+<div>
+<h2><a name="template">Template</h2>
+
+<p>The template used to present this article.</p>
+
+</div>
+<div>
+<h2><a name="body">Body</h2>
+
+<p>The content of your article.  There are a number of <a
+href="body.html">tags</a> you can use to markup your article text.</p>
+
+</div>
+
+<div>
+<h2><a name="release">Release Date</h2>
+
+<p>The date that your article is release to the world.  Your article
+will only appear in menus after this date and before the expiry date.
+If you don't enter a release date it will default to the current
+date.</p>
+
+<p><b>Note</b>: Unreleased articles can be accessed via a direct URL to
+the article.</p>
+
+</div>
+
+<div>
+<h2><a name="expire">Expire Date</h2>
+
+<p>The date from which you don't want the article to appear on your site.</p>
+
+<p><b>Note:</b> Expired articles can be found through the search engine.</p>
+
+</div>
+
+<div>
+<h2><a name="summaryLength">Summary length</h2>
+
+<p>The length of the summary displayed for child articles by the
+&lt;:summary:&gt; tag.</p>
+
+</div>
+
+<div>
+<h2><a name="threshold">Display Threshold</h2>
+
+<p>This is used by the &lt;:if UnderThreshold :&gt; conditional tag.
+If the number of children is less than this value the condition is
+true.</p>
+
+<p>Typically your templates will embed child articles if there are
+fewer than this number of child articles, otherwise a menu of child
+articles will be displayed.</p>
+
+</div>
+
+<div>
+<h2><a name="keywords">Keywords</h2>
+
+<p>This is a comma-separated list of extra keywords used by the search
+engine.</p>
+
+</div>
+
+<div>
+<h2><a name="listed">List Article</h2>
+
+<p>Choose how the article is listed in the sidebar menus, or in lists
+of child articles in the parent.</p>
+
+</div>
+
+<div>
+<h2><a name="thumb">Thumbnail</h2>
+
+<p>An image that can be used with the &lt;:thumbnail:&gt; tag to
+display a small image for the article in menus2.</p>
+
+</div>
+
+<div>
+<h2><a name="files">Files</h2>
+
+<p>Files attached to the article.  This isn't available until the
+article has been created.</p>
+
+</div>
+
+<div>
+<h2><a name="images">Uploaded Images</h2>
+
+<p>Images attached to the article.</p>
+
+</div>
+
+</body></html>
\ No newline at end of file
index e41845b88a6ed7a0ab96416b79bcb7f05a148f58..a00483a69eb898da4133a7bde62cdac216a5afd0 100644 (file)
@@ -52,5 +52,6 @@
 <p><input type=submit value="Add <:childtype:>"></p>
 </form>
 <p><:eif new:> <:or HaveChildType:> <:eif HaveChildType:></p>
+<p><font size="-1">BSE Release <:release:></font></p>
 </body
 ></html>
index 7cb65392eae62d8310abc786ac54bb3ba8a9d6c7..328c8af6ad5af48e61f1f2f394f2f3a9ca0ed5b7 100644 (file)
@@ -27,6 +27,7 @@
   <h2><:articleType:> Details</h2>
 
   <p><:message:> | <a href="/admin/">Admin menu</a> | <:ifnew:><:or:><a href="<:article admin:>">See article</a> | <:eif:><:editParent:>
+  <:if new:><:or new:><a href="<:script:>?id=<:article id:>&_t=steps">Manage stepchildren/stepparents</a> | <:eif new:>
 <input type="hidden" name="level" value="<: level :>">
     <input type="hidden" name="id" value="<: article id :>">
 
@@ -37,7 +38,7 @@
 
         <table cellpadding="6" border="0" cellspacing="1">
           <tr> 
-            <th> <:parentType:>: </th>
+            <th> <:parentType:>: <:help edit section:></th>
             <td bgcolor="#FFFFFF"> 
               <select name="parentid">
                 <option value="">Please select a Section <: ifart :><: 
@@ -46,7 +47,7 @@
             </td>
           </tr>
           <tr> 
-            <th> <:articleType:> Title: </th>
+            <th> <:articleType:> Title: <:help edit title:></th>
             <td bgcolor="#FFFFFF"> 
               <input type="text" name="title" maxlength="<:cfg fields title_size 255:>" size="64" value="<: article title :>">
             </td>
@@ -57,7 +58,7 @@
               directory) </td>
           </tr>
           <tr> 
-            <th> Template: </th>
+            <th> Template: <:help edit template:></th>
             <td bgcolor="#FFFFFF"> 
               <:templates:>
             </td>
@@ -69,7 +70,7 @@
             </td>
           </tr>
           <tr> 
-            <th> Release Date: </th>
+            <th> Release Date: <:help edit release:></th>
             <td bgcolor="#FFFFFF"> 
               <input type="text" name="release" value="<: article release :>" size="10" maxlength="10">
               (dd/mm/yyyy<: ifnew :> - default is today<: or :><: eif :>)</td>
           
           
           <tr> 
-            <th> Expire Date: </th>
+            <th> Expire Date: <:help edit expire:></th>
             <td bgcolor="#FFFFFF"> 
               <input type="text" name="expire" value="<: article expire :>" size="10" maxlength="10">
               (dd/mm/yyyy - <: ifnew :>default is never, <: or :><: eif :>blank 
               for never expires)</td>
           </tr>
           <tr> 
-            <th> Summary Length: </th>
+            <th> Summary Length: <:help edit summaryLength:></th>
             <td bgcolor="#FFFFFF"> 
               <input type="text" name="summaryLength" size="10" maxlength="10" value="<: article summaryLength :>">
               (in characters - <: ifnew :>default inherited from section<: if art :> or sub-section<: 
           </tr>
           
           <tr> 
-            <th> Display threshold: </th>
+            <th> Display threshold: <:help edit threshold:></th>
             <td bgcolor="#FFFFFF"> 
               <input type="text" name="threshold" size="10" maxlength="10" value="<: article threshold :>">
             </td>
           </tr>
           <tr> 
-            <th> Keywords: </th>
+            <th> Keywords: <:help edit keywords:></th>
             <td bgcolor="#FFFFFF"> 
               <input type="text" name="keyword" maxlength="255" size="60" value="<: article keyword :>">
                (comma separated)
             </td>
           </tr>
           
-          
-          
-          
-          
           <tr> 
-            <th>List article:</th>
+            <th>List article:<:help edit listed:></th>
             <td bgcolor="#FFFFFF">
               <:list listed:> </td>
           </tr>
           <tr> 
-            <th>Thumbnails:</th>
+            <th>Thumbnails:<:help edit thumb:></th>
             <td bgcolor="#FFFFFF"> 
               <input type=file name=thumbnail>
               <:ifArticle thumbImage:><img src="/images/<:article thumbImage:>"> <input type=checkbox name="remove_thumb"> Remove<:or:><:eif:></td>
           </tr>
           <:if Article id:>
           <tr>
-            <th nowrap align="left"><a name="files"></a>Files:</th>
+            <th><a name="files"></a>Files:<:help edit files:></th>
             <td nowrap bgcolor="#FFFFFF">
 <:if Files:>
               <table>
           </tr>
           <:or Article:><:eif Article:>
           <tr> 
-            <th valign="top"> Uploaded files: </th>
+            <th valign="top"> Uploaded images: <:help edit images:></th>
             <td align="center" bgcolor="#FFFFFF"> <: iterator begin images :> <img src="/images/<: image image :>" alt="<:image alt :>" width=<:image width:> height=<:image height:>> <: iterator separator images 
               :> 
               <hr noshade size="1">
 <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>
-<:if new:><:or new:>
-<h2><a name="step"></a>Step Children</h2>
-<table border="0" cellspacing="0" cellpadding="0" bgcolor='#000000'>
-<tr><td>
-      <table border="0" cellpadding="6" cellspacing="1">
-        <tr>
-  <th>Id</th>
-  <th>Title</th>
-  <th>Release</th>
-  <th>Expire</th>
-  <th>&nbsp;</th>
-</tr>
-<:if Kids:>
-        <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:>%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:>%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:>%23step">reverse 
-            order</a></td>
-        </tr>
-<form action="<:script:>" method="POST"><input type="hidden" name="id" value="<:article id:>">
-<:iterator begin kids:>
-        <tr bgcolor="#FFFFFF"> 
-          <td><:kid id:></td>
-          <td><:kid title:></td>
-          <td><:ifStepKid:> 
-            <input type="text" name="release_<:stepkid childId:>" value="<:date stepkid release:>" size=10><:or:>&nbsp;<:eif:></td>
-          <td><:ifStepKid:> 
-            <input type="text" name="expire_<:stepkid childId:>" value="<:date stepkid expire:>" size=10><:or:>&nbsp;<:eif:></td>
-          <td><:movestepkid:> <b><:ifStepKid:><a href="<:script:>?del_stepkid=1&id=<:stepkid parentId:>&stepkid=<:stepkid childId:>">Delete</a><:or:><:eif:> 
-            <:edit kid Edit:></b></td>
-</tr>
-<:iterator end kids:>
-        <tr bgcolor="#FFFFFF"> 
-          <td colspan="5" align="center"> 
-            <input type="submit" name="save_stepkids" value="Save Changes"></td>
-</tr>
-<:or Kids:>
-        <tr bgcolor="#FFFFFF"> 
-          <td colspan="5" align="center">No children</td>
-</tr>
-<:eif Kids:>
-</form>
-<:if Possibles:>
-<form action="<:script:>"><input type="hidden" name="id" value="<:article id:>">
-          <tr bgcolor="#FFFFFF"> 
-            <td colspan="2"><:possible_stepkids:></td>
-            <td> 
-              <input type="text" name="release" value="01/01/2000" size="10"></td>
-            <td> 
-              <input type="text" name="expire" value="31/12/2999" size="10"></td>
-            <td> 
-              <input type="submit" name="add_stepkid" value="Add Stepkid"></td>
-</tr>
-</form>
-<:or Possibles:><:eif Possibles:>
-</table>
-</td></tr></table>
-<:eif new:>
-<a name="stepparents"></a><h3>Step parents</h3>
-<table border="0" cellspacing="0" cellpadding="0" bgcolor='#000000'>
-<tr><td>
-      <table border=0 cellpadding="6" cellspacing="1">
-        <tr> 
-          <th>Id</th>
-          <th>Title</th>
-          <th>Release</th>
-          <th>Expire</th>
-          <th>&nbsp;</th>
-        </tr>
-        <:if StepParents:> 
-        <tr bgcolor="#FFFFFF"> 
-          <td colspan="5" align="center">Note: Delete only removes the stepchild 
-            relationship. It does not delete the article.</td>
-        </tr>
-        <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:>%23stepparents">by 
-            title</a> | <a href="/cgi-bin/admin/reorder.pl?stepchild=<:product id:>&sort=date&refreshto=/cgi-bin/admin/add.pl?id=<:article id:>%23stepparents">by 
-            date</a> | <a href="/cgi-bin/admin/reorder.pl?stepchild=<:product id:>&reverse=1&refreshto=/cgi-bin/admin/add.pl?id=<:article id:>%23stepparents">reverse 
-            order</a></td>
-        </tr>
-        <form action="<:script:>">
-          <input type="hidden" name="id" value="<:article id:>">
-          <:iterator begin stepparents:> 
-          <tr bgcolor="#FFFFFF"> 
-            <td align="center"><a href="<:stepparent_targ admin:>"><:stepparent parentId:></a></td>
-            <td><:stepparent_targ title:></td>
-            <td> 
-              <input type="text" name="release_<:stepparent parentId:>" value="<:date stepparent release:>" size="10">
-            </td>
-            <td> 
-              <input type="text" name="expire_<:stepparent parentId:>" value="<:date stepparent expire:>" size="10">
-            </td>
-            <td><:movestepparent:> <b><a href="<:script:>?del_stepparent=1&id=<:stepparent childId:>&stepparent=<:stepparent parentId:>">Delete</a> 
-              <a href="/cgi-bin/admin/add.pl?id=<:stepparent parentId:>">Edit</a></b></td>
-          </tr>
-          <:iterator end stepparents:> 
-          <tr bgcolor="#FFFFFF"> 
-            <td colspan="5" 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>
-        </tr>
-        <:eif StepParents:> <:if StepparentPossibles:> 
-        <form action="<:script:>">
-          <input type="hidden" name="id" value="<:article id:>">
-          <tr bgcolor="#FFFFFF"> 
-            <td colspan=2><:stepparent_possibles:></td>
-            <td> 
-              <input type="text" name="release" value="01/01/2000" size="10">
-            </td>
-            <td> 
-              <input type="text" name="expire" value="31/12/2999" size="10">
-            </td>
-            <td> 
-              <input type="submit" name="add_stepparent" value="Add!">
-            </td>
-          </tr>
-        </form>
-        <:or StepparentPossibles:> 
-        <tr bgcolor="#FFFFFF"> 
-          <td colspan="5" align="center">No more possible catalogs to add.</td>
-        </tr>
-        <:eif StepparentPossibles:> 
-      </table>
-</td></tr>
-</table>
+<:eif new:> <:or HaveChildType:> <:eif HaveChildType:>
+<p><font size="-1">BSE Release <:release:></font></p>
 </body></html>
index dbc3bf1f210a25c320547a45068d5f10a5ed3fad..6ec3c665665f7c464792d0440c842d51a34ade3b 100644 (file)
@@ -26,7 +26,9 @@
 
   <h2><:articleType:> Details</h2>
 
-  <p><:message:> | <a href="/admin/">Admin menu</a> | <:ifnew:><:or:><a href="<:article admin:>">See article</a> | <:eif:><:editParent:>
+  <:ifMessage:><p><b><:message:></p></p><:or:><:eif:>
+<p> | <a href="/admin/">Admin menu</a> | <:ifnew:><:or:><a href="<:article admin:>">See article</a> | <:eif:><:editParent:>
+  <:if new:><:or new:><a href="<:script:>?id=<:article id:>&_t=steps">Manage stepchildren/stepparents</a> | <:eif new:>
 <input type="hidden" name="level" value="<: level :>">
     <input type="hidden" name="id" value="<: article id :>">
 
@@ -37,7 +39,7 @@
 
         <table cellpadding="6" border="0" cellspacing="1">
           <tr> 
-            <th> <:parentType:>: </th>
+            <th> <:parentType:>: <:help edit section:></th>
             <td bgcolor="#FFFFFF"> 
               <select name="parentid">
                 <option value="">Please Select a <: parentType :> <: ifart :><: 
             </td>
           </tr>
           <tr> 
-            <th> <:articleType:> Title: </th>
+            <th> <:articleType:> Title: <:help edit title:></th>
             <td bgcolor="#FFFFFF"> 
               <input type="text" name="title" maxlength="<:cfg fields title_size 255:>" size="64" value="<: article title :>">
             </td>
           </tr>
           <tr> 
-            <th> Template: </th>
+            <th> Template: <:help edit template:></th>
             <td bgcolor="#FFFFFF"> 
               <:templates:>
             </td>
@@ -64,7 +66,7 @@
             </td>
           </tr>
           <tr> 
-            <th> Release Date: </th>
+            <th> Release Date: <:help edit release:></th>
             <td bgcolor="#FFFFFF"> 
               <input type="text" name="release" value="<: article release :>" size="10" maxlength="10">
               (dd/mm/yyyy<: ifnew :> - default is today<: or :><: eif :>)</td>
           
           
           <tr> 
-            <th> Expire Date: </th>
+            <th> Expire Date: <:help edit expire:></th>
             <td bgcolor="#FFFFFF"> 
               <input type="text" name="expire" value="<: article expire :>" size="10" maxlength="10">
               (dd/mm/yyyy - <: ifnew :>default is never, <: or :><: eif :>)</td>
           </tr>
           <tr> 
-            <th> Summary Length: </th>
+            <th> Summary Length: <:help edit summaryLength:></th>
             <td bgcolor="#FFFFFF"> 
               <input type="text" name="summaryLength" size="10" maxlength="10" value="<: article summaryLength :>">
               (in characters - <: ifnew :>default inherited from section<: if art :> or sub-section<: 
           </tr>
           
           <tr> 
-            <th> Display threshold: </th>
+            <th> Display threshold: <:help edit threshold:></th>
             <td bgcolor="#FFFFFF"> 
               <input type="text" name="threshold" size="10" maxlength="10" value="<: article threshold :>">
             </td>
           </tr>
           <tr> 
-            <th> Keywords: </th>
+            <th> Keywords: <:help edit keywords:></th>
             <td bgcolor="#FFFFFF"> 
               <input type="text" name="keyword" maxlength="255" size="60" value="<: article keyword :>">
                (comma separated)
             </td>
           </tr>
           <tr> 
-            <th>List article:</th>
+            <th>List article:<:help edit listed:></th>
             <td bgcolor="#FFFFFF">
               <:list listed:> </td>
           </tr>
           <tr> 
-            <th>Thumbnails:</th>
+            <th>Thumbnails:<:help edit thumb:></th>
             <td bgcolor="#FFFFFF"> 
               <input type=file name=thumbnail>
               <:ifArticle thumbImage:><img src="/images/<:article thumbImage:>"> <input type=checkbox name="remove_thumb"> Remove<:or:><:eif:></td>
           </tr>
           <:if Article id:>
           <tr>
-            <th><a name="files"></a>Files:</th>
+            <th><a name="files"></a>Files:<:help edit files:></th>
             <td nowrap bgcolor="#FFFFFF">
 <:if Files:>
               <table>
           </tr>
           <:or Article:><:eif Article:>
           <tr> 
-            <th valign="top"> Uploaded files: </th>
+            <th valign="top"> Uploaded images: <:help edit images:></th>
             <td align="center" bgcolor="#FFFFFF"> <: iterator begin images :> <img src="/images/<: image image :>" alt="<:image alt :>" width=<:image width:> height=<:image height:>> <: iterator separator images 
               :> 
               <hr noshade size="1">
 <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>
-<:if new:><:or new:>
-<h2><a name="step"></a>Step Products</h2>
-<table border="0" cellspacing="0" cellpadding="0" bgcolor='#000000'>
-<tr><td>
-      <table border="0" cellpadding="6" cellspacing="1">
-        <tr>
-  <th>Id</th>
-  <th>Title</th>
-  <th>Release</th>
-  <th>Expire</th>
-  <th>&nbsp;</th>
-</tr>
-<:if Kids:>
-        <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:>%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:>%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:>%23step">reverse 
-            order</a></td>
-        </tr>
-<form action="<:script:>" method="POST"><input type="hidden" name="id" value="<:article id:>">
-<:iterator begin kids:>
-        <tr bgcolor="#FFFFFF"> 
-          <td><:kid id:></td>
-          <td><:kid title:></td>
-          <td><:ifStepKid:> 
-            <input type="text" name="release_<:stepkid childId:>" value="<:date stepkid release:>" size=10><:or:>&nbsp;<:eif:></td>
-          <td><:ifStepKid:> 
-            <input type="text" name="expire_<:stepkid childId:>" value="<:date stepkid expire:>" size=10><:or:>&nbsp;<:eif:></td>
-          <td><:movestepkid:> <b><:ifStepKid:><a href="<:script:>?del_stepkid=1&id=<:stepkid parentId:>&stepkid=<:stepkid childId:>">Delete</a><:or:><:eif:> 
-            <:edit kid Edit:></b></td>
-</tr>
-<:iterator end kids:>
-        <tr bgcolor="#FFFFFF"> 
-          <td colspan="5" align="center"> 
-            <input type="submit" name="save_stepkids" value="Save Changes"></td>
-</tr>
-<:or Kids:>
-        <tr bgcolor="#FFFFFF"> 
-          <td colspan="5" align="center">No children</td>
-</tr>
-<:eif Kids:>
-</form>
-<:if Possibles:>
-<form action="<:script:>"><input type="hidden" name="id" value="<:article id:>">
-          <tr bgcolor="#FFFFFF"> 
-            <td colspan="2"><:possible_stepkids:></td>
-            <td> 
-              <input type="text" name="release" value="01/01/2000" size="10"></td>
-            <td> 
-              <input type="text" name="expire" value="31/12/2999" size="10"></td>
-            <td> 
-              <input type="submit" name="add_stepkid" value="Add Stepkid"></td>
-</tr>
-</form>
-<:or Possibles:><:eif Possibles:>
-</table>
-</td></tr></table>
-<:eif new:>
-<a name="stepparents"></a><h3>Step parents</h3>
-<table border="0" cellspacing="0" cellpadding="0" bgcolor='#000000'>
-<tr><td>
-      <table border=0 cellpadding="6" cellspacing="1">
-        <tr> 
-          <th>Id</th>
-          <th>Title</th>
-          <th>Release</th>
-          <th>Expire</th>
-          <th>&nbsp;</th>
-        </tr>
-        <:if StepParents:> 
-        <tr bgcolor="#FFFFFF"> 
-          <td colspan="5" align="center">Note: Delete only removes the stepchild 
-            relationship. It does not delete the article.</td>
-        </tr>
-        <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:>%23stepparents">by 
-            title</a> | <a href="/cgi-bin/admin/reorder.pl?stepchild=<:product id:>&sort=date&refreshto=/cgi-bin/admin/add.pl?id=<:article id:>%23stepparents">by 
-            date</a> | <a href="/cgi-bin/admin/reorder.pl?stepchild=<:product id:>&reverse=1&refreshto=/cgi-bin/admin/add.pl?id=<:article id:>%23stepparents">reverse 
-            order</a></td>
-        </tr>
-        <form action="<:script:>">
-          <input type="hidden" name="id" value="<:article id:>">
-          <:iterator begin stepparents:> 
-          <tr bgcolor="#FFFFFF"> 
-            <td align="center"><a href="<:stepparent_targ admin:>"><:stepparent parentId:></a></td>
-            <td><:stepparent_targ title:></td>
-            <td> 
-              <input type="text" name="release_<:stepparent parentId:>" value="<:date stepparent release:>" size="10">
-            </td>
-            <td> 
-              <input type="text" name="expire_<:stepparent parentId:>" value="<:date stepparent expire:>" size="10">
-            </td>
-            <td><:movestepparent:> <b><a href="<:script:>?del_stepparent=1&id=<:stepparent childId:>&stepparent=<:stepparent parentId:>">Delete</a> 
-              <a href="/cgi-bin/admin/add.pl?id=<:stepparent parentId:>">Edit</a></b></td>
-          </tr>
-          <:iterator end stepparents:> 
-          <tr bgcolor="#FFFFFF"> 
-            <td colspan="5" 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>
-        </tr>
-        <:eif StepParents:> <:if StepparentPossibles:> 
-        <form action="<:script:>">
-          <input type="hidden" name="id" value="<:article id:>">
-          <tr bgcolor="#FFFFFF"> 
-            <td colspan=2><:stepparent_possibles:></td>
-            <td> 
-              <input type="text" name="release" value="01/01/2000" size="10">
-            </td>
-            <td> 
-              <input type="text" name="expire" value="31/12/2999" size="10">
-            </td>
-            <td> 
-              <input type="submit" name="add_stepparent" value="Add!">
-            </td>
-          </tr>
-        </form>
-        <:or StepparentPossibles:> 
-        <tr bgcolor="#FFFFFF"> 
-          <td colspan="5" align="center">No more possible catalogs to add.</td>
-        </tr>
-        <:eif StepparentPossibles:> 
-      </table>
-</td></tr>
-</table>
+<:eif new:> <:or HaveChildType:> <:eif HaveChildType:>
+<p><font size="-1">BSE Release <:release:></font></p>
 </body
 ></html>
index 1243bbba268f294c7a3d0641e2b766b3976a4b18..0fdf44a10b4d8e4dba7e42089863c2141a6f1782 100644 (file)
@@ -29,7 +29,8 @@
 
   <h2>Catalog Details</h2>
 
-  <p><:message:> | <a href="/admin/">Admin menu</a> | <:ifnew:><:or:><a href="<:article admin:>">See article</a> | <:eif:><:editParent:>
+  <p><:message:> | <a href="/admin/">Admin menu</a> | <:ifnew:><:or:><a href="<:article admin:>">See article</a> | <:eif:><:editParent:> |
+  <:if new:><:or new:><a href="<:script:>?id=<:article id:>&_t=steps">Manage stepchildren/stepparents</a> | <:eif new:>
 <input type="hidden" name="level" value="<: level :>">
     <input type="hidden" name="id" value="<: article id :>">
   
index 2db0fb0ded428990a7436193383e05f26f757a0b..1e16fd4f2855e4b96d2290d5dc7e8e11fd12a303 100644 (file)
@@ -8,7 +8,7 @@
   <a href="<:script:>?id=<:product id:>&product_detail=1">Product details</a> 
   <:if Product listed:> | <a href="<:script:>?id=<:product id:>&delete_product=1">Hide</a> 
   |<:or Product:> | <a href="<:script:>?id=<:product id:>&undelete_product=1">Show</a> 
-  |<:eif Product:> <:hiddenNote:></p>
+  |<:eif Product:> <a href="/cgi-bin/admin/add.pl?id=<:product id:>&_t=steps">Manage stepparents</a> |<:hiddenNote:></p>
 
 <form action="<:script:>" enctype="multipart/form-data" method="POST"><p><input type=submit name=showimages value="Image Wizard"></p>
 
   <p><input type=submit name="save_product" value="Save"></p>
 </form>
 
-<a name="step"></a><h3>Step parents</h3>
-<table border="0" cellspacing="0" cellpadding="0" bgcolor='#000000'>
-<tr><td>
-      <table border=0 cellpadding="6" cellspacing="1">
-        <tr> 
-          <th>Id</th>
-          <th>Title</th>
-          <th>Release</th>
-          <th>Expire</th>
-          <th>&nbsp;</th>
-        </tr>
-        <:if Stepcats:> 
-        <tr bgcolor="#FFFFFF"> 
-          <td colspan="5" align="center">Note: Delete only removes the stepchild 
-            relationship. It does not delete the catalog.</td>
-        </tr>
-        <tr bgcolor="#FFFFFF"> 
-          <td colspan="5">Reorder stepparent articles: <a href="/cgi-bin/admin/reorder.pl?stepchild=<:product id:>&sort=title&refreshto=/cgi-bin/admin/shopadmin.pl?edit_product=1%26id=<:product id:>%23step">by 
-            title</a> | <a href="/cgi-bin/admin/reorder.pl?stepchild=<:product id:>&sort=date&refreshto=/cgi-bin/admin/shopadmin.pl?edit_product=1%26id=<:product id:>%23step">by 
-            date</a> | <a href="/cgi-bin/admin/reorder.pl?stepchild=<:product id:>&reverse=1&refreshto=/cgi-bin/admin/shopadmin.pl?edit_product=1%26id=<:product id:>%23step">reverse 
-            order</a></td>
-        </tr>
-        <form action="<:script:>">
-          <input type="hidden" name="id" value="<:product id:>">
-          <:iterator begin stepcats:> 
-          <tr bgcolor="#FFFFFF"> 
-            <td align="center"><a href="<:stepcat_targ admin:>"><:stepcat parentId:></a></td>
-            <td><:stepcat_targ title:></td>
-            <td> 
-              <input type="text" name="release_<:stepcat parentId:>" value="<:date stepcat release:>" size="10">
-            </td>
-            <td> 
-              <input type="text" name="expire_<:stepcat parentId:>" value="<:date stepcat expire:>" size="10">
-            </td>
-            <td><:movestepcat:> <b><a href="<:script:>?del_stepcat=1&id=<:stepcat childId:>&stepcat=<:stepcat parentId:>">Delete</a> 
-              <a href="/cgi-bin/admin/add.pl?id=<:stepcat parentId:>">Edit</a></b></td>
-          </tr>
-          <:iterator end stepcats:> 
-          <tr bgcolor="#FFFFFF"> 
-            <td colspan="5" align="center"> 
-              <input type="submit" name="save_stepcats" value="Save Changes">
-            </td>
-          </tr>
-        </form>
-        <:or Stepcats:> 
-        <tr bgcolor="#FFFFFF"> 
-          <td colspan="5" align="center">No step parents</td>
-        </tr>
-        <:eif Stepcats:> <:if StepcatPossibles:> 
-        <form action="<:script:>">
-          <input type="hidden" name="id" value="<:product id:>">
-          <tr bgcolor="#FFFFFF"> 
-            <td colspan=2><:stepcat_possibles:></td>
-            <td> 
-              <input type="text" name="release" value="01/01/2000" size="10">
-            </td>
-            <td> 
-              <input type="text" name="expire" value="31/12/2999" size="10">
-            </td>
-            <td> 
-              <input type="submit" name="add_stepcat" value="Add!">
-            </td>
-          </tr>
-        </form>
-        <:or StepcatPossibles:> 
-        <tr bgcolor="#FFFFFF"> 
-          <td colspan="5" align="center">No more possible catalogs to add.</td>
-        </tr>
-        <:eif StepcatPossibles:> 
-      </table>
-</td></tr>
-</table>
-
 </body>
 </html>
diff --git a/site/templates/admin/edit_steps.tmpl b/site/templates/admin/edit_steps.tmpl
new file mode 100644 (file)
index 0000000..dbad671
--- /dev/null
@@ -0,0 +1,156 @@
+<html>
+<head>
+
+  <title>
+    Manage step<:ifMatch [article generator] "Product":><:or:> children/<:eif:>parents
+  </title>
+
+  <link rel="stylesheet" type="text/css" href="/css/admin.css">
+
+</head>
+
+<body>
+
+  <input type="button" onclick="history.go(0);" value="  Refresh  ">
+
+  <h1>Manage step<:ifMatch [article generator] "Product":><:or:> children/<:eif:>parents</h1>
+
+<p>| <a href="/admin/">Admin menu</a> | <:ifMatch [article generator] "Product":><a href="/cgi-bin/admin/shopadmin.pl">Products list</a> | <a href="/cgi-bin/admin/shopadmin.pl?id=<:article id:>&edit_product=1">Edit Product</a><:or:><a href="/cgi-bin/admin/add.pl?id=<:article id:>">Edit Article</a><:eif:> |</p>
+<: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'>
+<tr><td>
+      <table border="0" cellpadding="6" cellspacing="1">
+        <tr>
+  <th>Id</th>
+  <th>Title</th>
+  <th>Release</th>
+  <th>Expire</th>
+  <th>&nbsp;</th>
+</tr>
+<:if Kids:>
+        <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 
+            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>
+        </tr>
+<form action="<:script:>" method="POST"><input type="hidden" name="id" value="<:article id:>">
+         <input type="hidden" name="_t" value="steps">
+<:iterator begin kids:>
+        <tr bgcolor="#FFFFFF"> 
+          <td><:kid id:></td>
+          <td><:kid title:></td>
+          <td><:ifStepKid:> 
+            <input type="text" name="release_<:stepkid childId:>" value="<:date stepkid release:>" size=10><:or:>&nbsp;<:eif:></td>
+          <td><:ifStepKid:> 
+            <input type="text" name="expire_<:stepkid childId:>" value="<:date stepkid expire:>" size=10><:or:>&nbsp;<:eif:></td>
+          <td><:movestepkid:> <b><:ifStepKid:><a href="<:script:>?del_stepkid=1&id=<:stepkid parentId:>&stepkid=<:stepkid childId:>&_t=steps">Delete</a><:or:><:eif:> 
+            <:edit kid Edit:></b></td>
+</tr>
+<:iterator end kids:>
+        <tr bgcolor="#FFFFFF"> 
+          <td colspan="5" align="center"> 
+            <input type="submit" name="save_stepkids" value="Save Changes"></td>
+</tr>
+<:or Kids:>
+        <tr bgcolor="#FFFFFF"> 
+          <td colspan="5" align="center">No children</td>
+</tr>
+<:eif Kids:>
+</form>
+<:if Possibles:>
+<form action="<:script:>"><input type="hidden" name="id" value="<:article id:>">         
+          <input type="hidden" name="_t" value="steps">
+          <tr bgcolor="#FFFFFF"> 
+            <td colspan="2"><:possible_stepkids:></td>
+            <td> 
+              <input type="text" name="release" value="01/01/2000" size="10"></td>
+            <td> 
+              <input type="text" name="expire" value="31/12/2999" size="10"></td>
+            <td> 
+              <input type="submit" name="add_stepkid" value="Add Stepkid"></td>
+</tr>
+</form>
+<:or Possibles:><:eif Possibles:>
+</table>
+</td></tr></table>
+<:eif Match:>
+<:eif new:>
+<a name="stepparents"></a><h3>Step parents</h3>
+<table border="0" cellspacing="0" cellpadding="0" bgcolor='#000000'>
+<tr><td>
+      <table border=0 cellpadding="6" cellspacing="1">
+        <tr> 
+          <th>Id</th>
+          <th>Title</th>
+          <th>Release</th>
+          <th>Expire</th>
+          <th>&nbsp;</th>
+        </tr>
+        <:if StepParents:> 
+        <tr bgcolor="#FFFFFF"> 
+          <td colspan="5" align="center">Note: Delete only removes the stepchild 
+            relationship. It does not delete the article.</td>
+        </tr>
+        <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 
+            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>
+        </tr>
+        <form action="<:script:>">
+          <input type="hidden" name="id" value="<:article id:>">
+         <input type="hidden" name="_t" value="steps">
+          <:iterator begin stepparents:> 
+          <tr bgcolor="#FFFFFF"> 
+            <td align="center"><a href="<:stepparent_targ admin:>"><:stepparent parentId:></a></td>
+            <td><:stepparent_targ title:></td>
+            <td> 
+              <input type="text" name="release_<:stepparent parentId:>" value="<:date stepparent release:>" size="10">
+            </td>
+            <td> 
+              <input type="text" name="expire_<:stepparent parentId:>" value="<:date stepparent expire:>" size="10">
+            </td>
+            <td><:movestepparent:> <b><a href="<:script:>?del_stepparent=1&id=<:stepparent childId:>&stepparent=<:stepparent parentId:>&_t=steps">Delete</a> 
+              <a href="/cgi-bin/admin/add.pl?id=<:stepparent parentId:>">Edit</a></b></td>
+          </tr>
+          <:iterator end stepparents:> 
+          <tr bgcolor="#FFFFFF"> 
+            <td colspan="5" 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>
+        </tr>
+        <:eif StepParents:> <:if StepparentPossibles:> 
+        <form action="<:script:>">
+          <input type="hidden" name="id" value="<:article id:>">
+          <input type="hidden" name="_t" value="steps">
+          <tr bgcolor="#FFFFFF"> 
+            <td colspan=2><:stepparent_possibles:></td>
+            <td> 
+              <input type="text" name="release" value="01/01/2000" size="10">
+            </td>
+            <td> 
+              <input type="text" name="expire" value="31/12/2999" size="10">
+            </td>
+            <td> 
+              <input type="submit" name="add_stepparent" value="Add!">
+            </td>
+          </tr>
+        </form>
+        <:or StepparentPossibles:> 
+        <tr bgcolor="#FFFFFF"> 
+          <td colspan="5" align="center">No more possible catalogs to add.</td>
+        </tr>
+        <:eif StepparentPossibles:> 
+      </table>
+</td></tr>
+</table>
+</body
+></html>
index b94750aeb012875f39eb55189b111f9d6a7663f2..5759f8c499bee6f06d06cf677a101bc55e8c8398 100644 (file)
@@ -74,10 +74,10 @@ Allkids:>
 <:or Allkids:><:eif Allkids:><:or:><:eif:><:if UnderThreshold allkids:><:iterator begin 
 allkids:><:ifAdmin:> 
 <hr noshade size="1">
-<:or:><:eif:><:moveDown:><:moveUp:><:embed allkid:><:iterator separator allkids:><br>
+<:or:><:eif:><:movestepkid:><:embed allkid:><:iterator separator allkids:><br>
 <:iterator end allkids:> <:or UnderThreshold:><:iterator begin allkids:> 
 <p><a href="<:url allkid:>"><b><font face="Verdana, Arial, Helvetica, sans-serif" size="3"><:allkid 
-  title:></font></b></a><br>
+  title:></font></b></a><:movestepkid:><br>
   <:if Allkid summaryLength:><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><:summary allkid:></font><:or 
   Allkid:><:eif Allkid:></p>
 <:iterator separator allkids:><:iterator end allkids:><:eif UnderThreshold:>
index 21ad394e55b82004d3caee9d43eb8f6bc760fc24..1152c02a751abfbae431f4f7ae763afd2449f838 100644 (file)
@@ -9,7 +9,9 @@ require 'Exporter.pm';
 
 my %conf;
 
-open TESTCFG, "< test.cfg" or die "Cannot open test.cfg: $!";
+my $conffile = $ENV{BSETEST} || 'test.cfg';
+
+open TESTCFG, "< $conffile" or die "Cannot open $conffile: $!";
 while (<TESTCFG>) {
   next if /^\s*[\#;]/;
   chomp;
@@ -21,7 +23,7 @@ close TESTCFG;
 sub base_url { $conf{base_url} or die "No base_url in test config" }
 
 sub base_securl { 
-  $conf{securl} or $conf{base_url} or die "No securl or base_url in test.cfg"
+  $conf{securl} or $conf{base_url} or die "No securl or base_url in $conffile"
 }
 
 sub base_dir { $conf{base_dir} or die "No base_dir in test config" }
diff --git a/test.cfg b/test.cfg
new file mode 100644 (file)
index 0000000..5fa1f99
--- /dev/null
+++ b/test.cfg
@@ -0,0 +1,13 @@
+# where to install the site
+base_url = http://bsetest.develop-help.com
+securl = http://shop.bsetest.develop-help.com:80
+# where to install the site
+base_dir = /home/httpd/bsetest
+# the database user/password/dsn
+dbuser = bsetest
+dbpass = bsetest
+dsn = dbi:mysql:bsetest
+dbclass = BSE::DB::Mysql
+sessionclass = Apache::Session::MySQL
+# the location of mysql
+mysql = /usr/local/mysql/bin/mysql