


       **  To be used in conjunction with the original KFBspeedup **

** To use without this, see the section right at the end (late addition) **


                           KFB speedup 'hack' #2
                           ~~~~~~~~~~~~~~~~~~~~~

          (C) Colin Wilson  Amiga Phoenix BBS +44 (0)151 252 1282

      Permission to use this program free is hereby granted to anyone who
      may be remotely interested :-}

      It shouldn't cause any loss of data of any sort, but just in case,
      don't blame me ( please, I get upset easily :-} )


          This program operates via any key that quits a file menu.

     The KFBdownload door is also replaced to use the 'new' marked list.


It works by reading the user's datafile in KFB:users/ and then scans the fast
data files made by the original KFBspeedup program (in KFB:dat/)

The marked file data retrieved from the user's data file is used as a pointer
within the door, which then gets the proper filename for the offset from the
FBxx single-area file, and dumps it to a text in RAM:

NOTE: all marked files are lost when you log off / drop carrier - I may make
another door if requested to replace the logoff, where I can maybe save the
marked files as kfb:users/username_ (adding a _ to the name), and another
you can run on login where you will be asked if you still want them.
                   Feedback will help that decision :-)

If you're lost at this point, don't worry - the way KFB stores it's marked
files is by the offset from the start of the kfb.data - the original
KFBspeedup program speeded up the listing of files tremendously for smaller
areas, but it also trashed the file offsets, so if you marked files, moved
area, marked some more, then tried to download, it'd have corrupt offsets
to play with, show the wrong files, and sometimes crashed...

You don't lose any data except the marked files people had stored, and you
don't have to alter ALL your menus to give it a try - set it up on one menu
first if you like, and see what you think...

You can force the KFBdownloadfix into 'working' by making a text in RAM:
like this, giving the path and filename (one per line), without installing
anything else :

---SNIP---
FB36:maxsbbs.lha
FB21:ppshow.lzx
---SNIP---


This update consists of three programs :

1)   KFBclearUserData.exe  <-- Needs to be ran only once when you have the
                               other bits set up in your config

2)   KFBchangemenu         <-- Does the real work of updating pointers

3)   KFBdownloadfix        <-- Works with the new download pointers


OK, to go through it in more detail now...


1)  KFBclearUserData.exe

      This program should only ever have to be run once. What it does is
      read all the KFB:user/ files and removes any reference to marked
      files. All current stats etc. should remain.

2)  KFBchangemenu

      This needs two parameters :

            KFBchangemenu 17 00

                           ^  ^
      File area you are   /    \  The menu you want to go to
      looking at                  after updating the links


      The file area parameter should be a two digit parameter the same as you
      pass to the normal KFBlist door. If you set it to 00 (linked) the links
      will be based on the normal KFB:kfb.data file, otherwise, it will look
      at the speedup data in KFB:dat/FBxx (where xx is the area you are in)

      The menu parameter is also a two digit field, and allows you to vary
      menu jumps, ie. <P> to file menu, and <Q> to go back to main menu.

      This program makes a file in RAM: called download.list - it is plain
      text, giving the file area, and filename of each marked file.

3)  KFBdownloadfix

      This looks at the new download.list file, gives the user the option to
      download, clear all marked, delete one file at a time, or quit out.

      NOTE: this doesn't update the total files downloaded by a user in the
      kfb:users/ data files.



                                Installation
                                ~~~~~~~~~~~~

      First, make sure you know what all your file areas are known as, ie.
the KFB area number (every file area will actually have it in, because the
KFBlist program needs the same parameter).


1)    Go to each file menu in turn, and add the line :

      z     34    0     5     10000       kfb:kfbchangemenu xx yy

      (z - key press required) (xx - file area number) (yy - menu to jump to)

                   (change the access levels to suit your BBS)

      If you have two options for quitting an area, you may want to add the
      line twice, giving the different menu numbers to jump to.

      NOTE: You will need to *REMOVE* the download key from every area,
            because the links are only updated when you change menus.
            The ideal place to put the download key is on the main file
            menu where you choose what area to look at, or on main menu


2)    Go to the main file menu (and / or main menu) and add :

      D     34    0     5     10000       kfb:kfbdownloadfix


3)    From WORKBENCH, run the KFBclearUserData.exe program

      This simply reads all the datafiles and removes any old marked files
      It pauses for a second when it starts, don't panic :-)

      (You MUST have the LIST command in your C: directory)


4)    It would help if your logoff script included :

            c:delete ram:download.list

      Just in case the previous caller left files marked without downloading
      so the next caller doesn't inherit his crap...


5)    Copy the new programs to KFB: and give it a whirl :-}

      With any luck, as long as you don't have thousands of file areas, it
      shouldn't take you more than say, half an hour to do everything.

      Reading this doc probably took you longer than it would to install...



         Feel free to give me feedback - phoenixbbs@cableinet.co.uk


                   My current favourite (sick) website....

                          www.wornpanties.co.uk



Greets fly to (in no particular order) :


      Kryten - my guinea pig / coding buddy :-)  OI - WHERES MY PINT ???

      Geoff Hewitt - a mate who always gets an hello :-) ( he went PC :-/ )

      Badmuts - for being one of two people who registered for my CD door

      Richard Dron - for spotting lame ass mistakes when I had the download
                     door set at the wrong access :-) and giving me a laugh
                     because he solders worse than me !

      Glen Martin - because he's still around, that's all that counts :-}

      Anthony Barratt - without his work i'd have a life (but no BBS s/ware)

      Ari Tsironis - for the AmosPro / Maxs library - WHERE ARE YOU NOW ???



\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/


                            ** LATE ADDITION **


      I had a thought... there's basically sod all needed from the
      original speedup program to get this working, so I may as well
      try to add it into this archive....

      The majority of the work done by the earlier speedup relied on
      a hex edited version of the download and list programs

      The KFBlist program will STILL BE REQUIRED to use this hack, but
      the download function has been completely replaced, so extras in
      this archive include the kfb.data file splitter, and the program
      to make KFBLISTxx programs, where xx is the file area to look at.

      The KFBLISTxx maker relied on another program I wrote (from what
      I remember.... duh) which scanned the large data file and made a 
      file in RAM: called kfblister.work (uses a single byte per file
      in your filebase, so 3000 files = 3k)



                        To install the earlier stuff :
                        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~


  1)  Make a directory called KFB:DAT/

  2)  Run the KFBcreate_data

  3)  Run the split_kfb_areas ( this will make files in KFB:dat/ )

  4)  Run the make_kfblist_patches (this will make a new copy of the KFBlist)
                                   (program called KFBlistxx where xx is the)
                                   (file area it will look at in KFB:dat/   )

                ** all the above are WB progs, not doors **

  5)  Change all the KFBlist calls in you config (except for the linked list)
      to use the new patched version

  6)  Give it a go.....  ( I don't think i've missed anything :-} )


      KFBcreate_data should be ran via a script in your fido config
      daily, along with the KFB updater (this updates the fast KFB:dat/
      files with any new uploads, it doesn't normally take long to do)

      This is my script, see if it gives you any ideas...
      (it also includes my filelist generator)


------->8 SNIP 8<-------

BBS:KFBcreate_data                   <--- you'll need this
BBS:kfbguide_&_list

      if exists bbs:filelist.lha
            delete bbs:filelist.lha
            endif
      lha -N -q a bbs:filelist.lha bbs:filelist.text

      if exists bbs:guidelist.lha
            delete bbs:guidelist.lha
            endif
      lha -N -q a bbs:guidelist.lha bbs:filelist.guide#?

bbs:kfb_fast_update_changed          <--- and this

------->8 SNIP 8<-------

