Standards & Tools for Web Publishers

  • Templates
  • PHP Templating
    • All new PHP development should use the HTML_TEMPLATE_ITX method which helps keep code manageable and sustainable. See: wiki documentation

  • Essential Library Web Elements
    • Header Title in this format: "Topic :: Brown University Library"
    • Screen & print CSS links
      <link href="http://dl.lib.brown.edu/libweb/common/common.css" rel="stylesheet" type="text/css" media="screen, projection">
      <link href="http://dl.lib.brown.edu/libweb/common/common_print.css" rel="stylesheet" type="text/css" media="print">
    • All directories must have an index page
    • All php pages must work with register_globals turned off
      To test, add php_flag register_globals off to an .htaccess file
    • All josiah links must point to: <josiah.brown.edu> (not <library.brown.edu>)

  • Version Control
    • Do not include files that contain passwords or any other sensitive information. Anything added to the repository is there *forever*.
    • Internal library subversion repository is at: https://svn.brown.edu/svn/library/brown/
    • Public library subversion repository is at: /svn/library/public/ directory
    • Brown Subversion Repository
    • ZygVersion subversion client

  • Validation Services
  • Scripts
    • open small window
      in <head> tag:
      <script type="text/javascript">
      function MM_openBrWindow(theURL,winName,features)
      { //v2.0
      window.open(theURL,winName,features);
      }
      </script>
      link structure: (change height & width as needed)
      <a href="javascript:;" onClick="MM_openBrWindow('[file path]','[filename]','scrollbars=yes,resizable=yes,width=400,height=360')">
    • get real-time josiah data with majax
      in <head> tag:
      <script type="text/javascript" src="http://josiah.brown.edu/screens/majax.js"></script>
      place <span> tags in your document where you want the dynamic data to appear, for example:
      <span class="majax-showholdings-div" title=".bxxxxxxx"></span>
      For a list of options see: http://libx.org/majax/majaxtest4.html
      For documentation see: http://josiah.brown.edu/screens/majax.html

      Example: Given a list of bib numbers, majax pulls in the title from josiah: http://dl.lib.brown.edu/gateway/ej_test.php?id=11

    • PHP page redirect: - place this code in the file which is to be redirected
      <?
      Header( "HTTP/1.1 301 Moved Permanently" );
      Header( "Location: [new location]/" );
      ?>
    • WEBPUB page redirects: - Add a line to .htaccess file at Library Web root:
      Redirect 301 /Facilities/University_Library/libs/art/ http://dl.lib.brown.edu/libweb/about/asl/

      [There should be no line breaks in this line.]
  • Tests
  • Upload Directory .htaccess File
    • The following .htaccess file needs to go into any directory where web-auth is being used AND file uploads are occurring. The errors that this should fix are intermittent login problems, lost HTTP requests w/uploads, etc. - the exact problem seems poorly understood (including by CIS) and various architectures may be involved.

      # .htaccess file
      #

      AuthType Basic
      #PerlSetVar BrownTicketAuthzMessage "You don't belong to the Brown community. Access is denied."
      PerlAuthenHandler Apache::BrownTicketChecker
      PerlSetVar BrownTicketErrorDocument https://web-auth.brown.edu:443/
      #PerlSetVar BrownAuthzInfo "GROUPER:Kerberos.*:::::COMMUNITY.ALL"
      #PerlAuthzHandler Apache::BrownAuthz
      require valid-user
      AuthName BrownAuth_35594

 

Comments