SLAC PEP-II
BABAR
SLAC<->RAL
Babar logo
HEPIC E,S & H Databases PDG HEP preprints
Organization Detector Computing Physics Documentation
Personnel Glossary Sitemap Search Hypernews
Unwrap page!
Comp. Search
Who's who?
Meetings
FAQ Homepage
Archive
Environment
Administration
New User Info.
Web Info/Tools
Monitoring
Training
Tools & Utils
Programming
C++ Standard
SRT, AFS, CVS
QA and QC
Remedy
Histogramming
Operations
PromptReco
Simulation Production
Online SW
Dataflow
Detector Control
Evt Processing
Run Control
Calibration
Databases
Offline
Workbook
Coding Standards
Simulation
Reconstruction
Prompt Reco.
BaBar Grid
Data Distribution
Beta & BetaTools
Kanga & Root
Analysis Tools
RooFit Toolkit
Data Management
Data Quality
Event display
Event Browser
Code releases
Databases
Check this page for HTML 4.01 Transitional compliance with the
W3C Validator
(More checks...)

The new BaBar web

Introduction

On the 10th of February 1999, after a period of testing, the new BaBar web was finally released. This web page contains instructions on:

Features of the new web are also outlined, along with a note on the new web's future.

If you have any questions, or you find any problems, then please contact the WebMaster via e-mail or use our hypernews forum. The WebTeam would like to thank all those who provided feedback on the trial version of the web.

The BaBar web banner and navigation sidebar (a.k.a. the "wrapper" or "header")

Most BaBar web pages contain a banner that runs across the top of the page and a navigation sidebar that runs down the left-hand side of the page. The top banner's purpose is to make it easier to navigate between the main branches of the BaBar web (Physics, Detector, Computing, Organization, etc.), to switch between the RAL mirror site and the SLAC site, and to provide access to a few other commonly-used links. The purpose of the left-hand sidebar is to provide easier navigation within a particular branch of the web. The banner is the same on all pages, but the content of the sidebar varies, depending upon which major branch the page resides in, and possibly where in that branch.

The process of adding the banner and navigation sidebar to a page is called "wrapping". See below for details on how to add, remove, or update the wrapper on a single page (but read the discussion in the next paragraph regarding the automatic wrapping script that runs every night).

Automated Wrapping Script
The banner and navigation sidebar are automatically updated on the SLAC site from master copies each night. The next synchronization of the RAL mirror will then migrate the updates to RAL. A trscrontab job at SLAC, running under userid "rfc", performs the automatic update, starting at 21:00 local (Pacific) time. The automatic update performs the following:

  • Adds the banner/sidebar to any new files that have appeared.
  • Replaces the banner/sidebar on any existing pages that have been edited since the last time the wrapper script inspected the page.
  • Updates the banner/sidebar on each page whenever the corresponding master copy of the header has been modified.
  • Preserves timestamps of files during the wrapping process (otherwise date-sorted search engine results would be meaningless, as all pages would have the date of the latest change to the banner, not the date of the latest change to the content).
Changes to the master header files should be coordinated with the BaBar webmaster, Ray Cowan, or with Charlotte Hee. Note in particular that changes made to the banner/sidebar text as it appears in a particular webpage's file will be lost when the automatic update script runs that evening, as it will re-insert the header from the master copy. Changes should be coordinated with the webmaster to make sure they are applied to the master copies.

Broken Web Pages and the Wrapping Script
Some pages are not wrapped, or may contain very outdated versions of the header, because of HTML syntax errors in the file. The wrapper script has to be able to reliably identify the head and body content of the page. If the page is missing certain basic HTML tags, or they are incorrectly placed, the wrapper script will abort and leave the page unchanged. When you edit BaBar web pages, be careful to follow proper HTML syntax. The most common ways pages become broken are:

  • Using an existing, broken page as a template for a new page. This propagates the problem to a new page.
  • Using Microsoft Office (MSO) products to edit web pages. Although our header HTML code passes validation by the W3C validator, some versions of Microsoft Office products, such as Word and FrontPage, will still corrupt the header. They frequently will insert large numbers unneeded HTML tags that provide support for some MSO features (e.g., "<o:p>" and "<mso:...>"). Sometimes they introduce other errors in the existing header code (such as uncommenting HTML comments, or commenting out portions of active HTML code) that break the page and make it unwrappable by anything other than human hands.

    To prevent problems with MSO products, it is recommended that before editing any BaBar web page using a Microsoft product, the web page be unwrapped before editing, and re-wrapped when returned to the BaBar web. (When returning the edited page to the web, you could also just leave the page unwrapped and let the automated script take care of it the next time it runs.) To unwrap the page, issue the command "WEBwrap -rh mypage.html" from a Babar unix account. To restore the header, use the same command, but specify the option "-ah" instead of "-rh". These represent "add header" and "remove header", respectively.

The webmaster will be happy to provide a list of broken pages if you are concerned that a page you are interested in is so affected. You can check a specific page yourself to see if it is broken by running the W3C Validator (linked at the bottom of the left-hand sidebar) or by running the testhtml program from a BaBar unix account, giving the filespec of the webpage as an argument (e.g., "testhtml -e mypage.html". Warnings are ok, but if it reports errors, the page is broken).

Some pages in certain areas of the BaBar web are also not wrapped by prior arrangement with the webmaster. These include pages that are generated automatically by other scripts for which the wrapping process may cause problems. Other exceptions are in a few specific areas of the web that have a different appearance for a specific reason, or in certain other cases. However, most pages are wrapped to enhance navigation, provide a similar look-and-feel to the whole of the BaBar web, and hold to a minimum the number of sub-webs springing up of varying designs.

Moving to the new web

How to change your bookmarks/favourites files:

  • If you use Internet Explorer then you will first of all need to convert your favourites file to Netscape-type bookmarks file using the free favourites-to-bookmarks two-way converter available from Microsoft.

  • Copy your bookmarks to a backup file (e.g. oldbookmarks.html) and use the bookmarks-changing tool on your bookmarks.html file - i.e. type:

    $BFROOT/www/Computing/WebTeamPages/tools/bin/FixBookmarks bookmarks.html
    
  • Check to see whether your new bookmarks file works by closing down Netscape, copying your converted bookmarks.html to your .netscape directory and clicking around.

  • Internet explorers can convert their new bookmarks file back to favourites if they wish to.

How to find your pages and update your originals:

  • If you can't find your pages on the new web, look in the locations database. E.g to find where the Physics home page has moved to type:
    cd $BFROOT/www/Computing/WebTeamPages/tools/bin/
    grep "/BFROOT/doc/www/Physics/Physics.html" LocationDB.txt
    
  • If you maintain your pages in CVS, or within a web-authoring tool such as FrontPage on your own machine, then you will either have to:
    • copy the new versions of your pages under $BFROOT (minus navigation bars if you prefer) to your area;
    • move your pages on your machine to fit in with the new directory structure; or
    • use the locations database to change the links on your files. Unless you do this then you run the risk of overwriting the updated files and the altered links therein.

How to create and wrap new pages on the web:

  • If you are experienced in writing HTML then create a new page by saving and editing the template web page, or, if you are inexperienced or unsure, use the example web page which contains detailed instructions.
  • Copy your new page to a suitable directory under $BFROOT/www/ on the SLAC server (which contains a header.inc file) and wrap it with BaBar navigation bars using the page-wrapping tool. E.g.
    WEBwrap -ah mypage.html
    

    To wrap all the files starting from a root directory ,<ROOTDIR>, type:

    WEBwrap -ah -d <ROOTDIR>
    

  • Test the validity of your HTML using our testhtml tool. E.g.
    $BFROOT/www/Computing/WebTeamPages/tools/bin/testhtml -e mypage.html
    

    Another more comprehensive way to check your HTML is to use the HTML validator at validator.w3.org. selecting "HTML Transitional 4.01" as the document type, and "iso-8859-1" as the character encoding. You can add these to the page directly, by placing

      <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
    
    at the top of the file, before the "<html>" tag, and
      <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    
    between the <head>...</head> tags. These tags are included in the example web page mentioned above.

  • Test the links in your web page, list of pages, or pages within a directory and its subdirectories using our CheckLinks tool. E.g.
    To check the links in mypage.html, type:
    CheckLinks mypage.html
    
    To check the links in all pages within a directory <ROOTDIR> type:
    CheckLinks <ROOTDIR>*.htm*
    
    To check all pages within and below a directory <ROOTDIR> type:
    CheckLinks -d <ROOTDIR>
    
  • Review the guidelines and tips for present and future web authors.

How to unwrap and print web pages:

From your browser you can load in a page and click the "View printable page" button in the navigation bar, which uses a CGI script to remove the wrapper from a page so you can print just its content. Alternatively, you can print a page called "mypage.html" without the navigation bars by typing:
$BFROOT/www/Computing/WebTeamPages/tools/bin/WEBprint mypage.html

N.B. Images on the page are not printed with this version of the tool.

How to protect web pages:

Web page protection is done on a directory basis wherein a .htaccess file is required. Until recently, protected web pages used a .htaccess file which restricted access to users such as babar, techbd, and execbd which have well-known passwords. This method has been discontinued. Now use the HyperNews method to protect a directory as follows:

To get Hypernews password protection:

cd <Directory to be protected>
ln -s /afs/slac.stanford.edu/g/babar/www/internal/.htaccess .htaccess
To make directory visible only from SLAC machines but without the password protection:
cd <Directory to be protected>
ln -s /afs/slac.stanford.edu/g/babar/www/internal/.htaccess.SLAC .htaccess
IMPORTANT NOTE: in both the above examples, you must use /afs/slac.stanford.edu/... and NOT /afs/slac/... Otherwise the RAL mirror site directories will not be protected!

Note that this only protects the files from unauthorized web access. All files in the directory with the .htaccess file and all its subdirectories should also be protected from normal file system access by AFS users. The AFS command 'fs sa' can be used to protect each of the directories. Typically, from the directory where you placed the .htaccess file, you will need to run:

find . -type d -exec fs sa {} system:slac l system:authuser l \;

This gives general SLAC AFS users list-only access. If you do not want others to see the file names, replace "l" with "none" above.

Unfortunately, the above procedure denies access to the web servers. To re-enable access to the web servers run:


find . -type d -exec fs sa {} g-babar:host-www rl g-www:hosts-servers rl \;

Please note this critical difference between web and AFS directory protection. The .htaccess file for web security protects the directory it is in and all subdirectories beneath it. Changes to the .htaccess file affect all these directories. In AFS, changes to the ACLs of a parent directory do not affect the ACLs of its subdirectories. New subdirectories do inherit the ACLs of its parent though.

How to make web documentation print page-by-page

If you want some text in your BaBar web page to appear on its own page when printed then put the text inbetween the following pairs of html tags as follows:
<!-- WIT page size table start one -->
<!-- WIT page size table start two -->

TEXT PUT HERE WILL APPEAR ON ITS OWN PAGE WHEN PRINTED

<!-- WIT page size table end one -->
<!-- WIT page size table end two -->
If you load the resultant web page, wrapped with standard navigation bars, and then click on the "View Printable page" button, you get a page with no navigation bars, of course, but also the text you surrounded with the tags is placed on its own page when printed.

Features of the new web

The new BaBar web has the following features which should make it easier to navigate around, and to find the information you require:
  1. A streamlined directory structure under $BFROOT/www/.
  2. No (or very few) broken links. (With your help we have fixed many broken links so they point to the intended URLs, but, certain formerly broken links now point to a token page in the new web, because the intended URLs are still unknown.)
  3. No symbolic links within the new file structure.
  4. An archive web area under $BFROOT/old-www/ with the same file structure as $BFROOT/www/.
  5. Navigation bars on every page from which the main BaBar areas and topics relating to the page you are on are just a click away.
  6. A much improved search engine available from every page with the ability to search only that part of the Babar web space you are interested in.
  7. A sitemap for the web available from every page.
  8. A subscription form on every page so you can receive e-mail when the pages you frequent are moved or updated.
  9. A link on each page to both the SLAC original and the mirror image of the page at RAL.
  10. No frames: all frames have been replaced have been replaced by tailor-made header files which contain the same information as the frames. Furthermore, all links to the frames have been replaced. The various reasons for this policy are described in the authorship guidelines.

Future of the BaBar web

The web improvement is an ongoing process - carried out by the Webmaster, but requiring a great deal of cooperation from BaBar web authors - with the aim of providing a well organized web in which information is up-to-date, easy to read and easy to find.
Page Maintainer: BaBar WebMaster Page Creator: Mark Ian Williams
Last significant update: MAR-10-2005 Expiry date: SEP-01-2001