home *** CD-ROM | disk | FTP | other *** search
/ The Datafile PD-CD 5 / DATAFILE_PDCD5.iso / utilities / a / addheader / !AddHeader / !Help next >
Text File  |  1997-03-05  |  7KB  |  138 lines

  1.             _  ___      _     _   _    _                _           
  2.            | |/ _ \    | |   | | | |  | |              | |          
  3.            | | |_| | __| | __| | | |__| | ___  __ _  __| | ___ _ __ 
  4.            | |  _  |/ _` |/ _` | |  __  |/ _ \/ _` |/ _` |/ _ \ '__|
  5.            |_| | | | (_| | (_| | | |  | |  __/ (_| | (_| |  __/ |   
  6.            (_)_| |_|\__,_|\__,_| |_|  |_|\___|\__,_|\__,_|\___|_|   
  7.            =========================================================
  8.  
  9. © Werewolf Software & Gilbert the Hamster Software 1996
  10. Written by Dane Koekoek & Quintin Parker
  11. Version 1.00 (08-Apr-96)
  12.  
  13. Introduction
  14. ~~~~~~~~~~~~
  15. !AddHeader is a little program to add a header to filelists generated by ArmBBS.
  16.  
  17. As it stands, ArmBBS allows the user to create a filelist on-the-spot by a press of a key. However there is no way to add headers automatically as it generates filelists for the user in real time. ArmBBS sends down the line a file called something like FScratch_0 and the user, calling various BBS's ends up with 5 of these files, all called the same with no identification as to which BBS has which files! He gives up and deletes all the lists and never calls those BBS's again.
  18.  
  19. !AddHeader solves this problem by taking the filelist created by ArmBBS and adding your BBS's customised header and the date & time it was created, along with renaming the file to something like your BBS's name, so the user can store them away easily and can simply find which BBS each of the filelists come from! He/she'll know which BBS to call again to pickup and upload those files to!
  20.  
  21. Using !AddHeader
  22. ~~~~~~~~~~~~~~~~
  23. Right, enough chat. What you're all waiting to find out is how to use !AddHeader.
  24.  
  25. The first step is to copy !AddHeader out of this archive to another place with the rest of your ArmBBS utilities. I have it stored in a directory inside !ArmBBS called Support.
  26.  
  27. Inside !AddHeader is a directory called Headers. Inside here are three files - Current, Full and New. They are the three different types of filelist a user can create with the default ArmBBS setup - filelist of the Current filearea, the Full filelist and the New files list since last logon. Edit these till they're ready to go on top of your BBS's filelists. I add a little line describing which type of filelist the user has chosen on my system, but you may prefer to have a completely different style header for every type, or the same throughout.
  28.  
  29. Next load up the Config file inside into your favourite text editor. It'll look something like this:
  30. ===================================================================================
  31. Full Header Path:<AddHeader$Dir>.Headers.Full
  32. New Header Path:<AddHeader$Dir>.Headers.New
  33. Curr Header Path:<AddHeader$Dir>.Headers.Current
  34. Filelist Path:<ArmBBS$Dir>.Temp.FScratch_
  35. Full Path:<ArmBBS$Dir>.Temp.WerewolfFL
  36. ===================================================================================
  37. The first three lines should be self explanatory - the paths of the three different headers. The forth line gives the path of the filelist created by ArmBBS, minus the port number on the end. The fifth line shows the output path of where the combined header+filelist will be outputted to. I've chosen to call mine WerewolfFL, which is an easy description of what the file is to the user. It is stored inside !ArmBBS, in a directory called Temp. Note that the file's name should NOT exceed 10 characters, unless you're using something like LongFiles.
  38.  
  39. Do not try to run !AddHeader as it will not run unless being loaded straight from an ArmBBS script file with the right parameters.
  40.  
  41. Once they're all customised, on with the script file settings for inside ArmBBS. The following is a section out of my !ArmBBS.Menus.Filebase.Special file script:
  42. ===================================================================================
  43.   defitem D
  44.   display `Create and download new-files filelist`
  45.   help `Create and download a new-files filelist from when you last called`
  46.   [
  47.     log `>Downloading nf filelist!`
  48.     doing `Downloading nf filelist`
  49.     filereset `G N #0`
  50.     filelist Q
  51.     if RET=0
  52.       oscli `Wimptask Run <ArmBBS$Dir>.Support.!AddHeader -N ¤line¤`
  53.       sendfile ¤var5¤ <ArmBBS$Dir>.Temp.WerewolfFL
  54.     else
  55.       print `\10No new files\10`
  56.     endif
  57.     anykey
  58.   ]
  59.   enditem
  60.  
  61.   defitem L
  62.   display `Create and download FULL filelist`
  63.   help `Create and download the FULL filelist on-the-spot`
  64.   [
  65.     log `>Downloading filelist!`
  66.     doing `Downloading filelist`
  67.     filereset `G #0`
  68.     filelist Q
  69.     if RET=0
  70.       oscli `Wimptask Run <ArmBBS$Dir>.Support.!AddHeader -F ¤line¤`
  71.       sendfile ¤var5¤ <ArmBBS$Dir>.Temp.WerewolfFL
  72.     else
  73.       print `\10No files!\10`
  74.     endif
  75.     anykey
  76.   ]
  77.   enditem
  78.  
  79.   defitem C
  80.   display `Create and download local filelist`
  81.   help `Create and download a filelist for the current filearea`
  82.   [
  83.     log `>Downloading local filelist!`
  84.     doing `Downloading local filelist`
  85.     fg 3
  86.     print `\10Downloading filelist for area ¤fileareaname¤\10`
  87.     filereset
  88.     filelist Q
  89.     if RET=0
  90.       oscli `Wimptask Run <ArmBBS$Dir>.Support.!AddHeader -C ¤line¤`
  91.       sendfile ¤var5¤ <ArmBBS$Dir>.Temp.WerewolfFL
  92.     else
  93.       print `\10No files!\10`
  94.     endif
  95.     anykey
  96.   ]
  97.   enditem
  98. ===================================================================================
  99. Basically, this is exactly the same as the default, apart from the fact that when it comes to sending the file down the line, it runs !AddHeader with a parameter. -C is for Current filelist, -F is for the Full filelist, and -N if for the New files filelist. After that comes the parameter ¤line¤ which passes on which line the user is on, and thus what the file FScratch_x will be called. Then the file WerewolfFL inside !ArmBBS.Temp is sent down the line, which is the finished product.
  100.  
  101. Problems
  102. ~~~~~~~~
  103. If you've got any problems with !AddHeader, or have any comments or suggestions, then just contact me in any of the ways listed below.
  104.  
  105. The only problem I've come across is if there isn't enough free memory to load the filelist and the header, and then it only brings up an error box which should be acknowledged by NoError quite easily.
  106.  
  107. Credits
  108. ~~~~~~~
  109. For the idea of this must surely go to me!
  110.  
  111. For knocking up a small bit of code to merge the two files in 2 minutes after mentioning the idea on the phone goes to Quintin Parker.
  112.  
  113. For messing about with loads of code to increase and decrease memory allocation, and eventulally giving up and rewritting it in a completely different way goes to Quintin Parker.
  114.  
  115. For the truly whacky sprite, Quintin Parker also gets the praise.
  116.  
  117. For the truly configuarable application with a config file for different headers, goes to myself.
  118.  
  119. For the truly great example headers, goes to myself.
  120.  
  121. For this help file detailing how to set !AddHeader up, goes to myself too.
  122.  
  123. Contacting me
  124. ~~~~~~~~~~~~~
  125. You can contact me in any of the following ways:
  126. Email:
  127.   Dane Koekoek (#1) on The Werewolf BBS (+44-181-289 6003 * 24 hours * 33k6)
  128.   Dane Koekoek@2:254/310 on FidoNet
  129.   dane@werewlf.demon.co.uk
  130. Snail Mail:
  131.   Dane Koekoek
  132.   23 The Spinneys,
  133.   Bromley,
  134.   Kent BR1 2NT.
  135.   England.
  136.  
  137. You can contact Quintin Parker on The Werewolf BBS.
  138.