Setting Up Downloads


The Administration menugateway to so much else in PHP-Nukecontains an item for Downloads that enables you to manage the downloads on your site.

Start by adding a main category for downloads. Unlike some other areas of PHP-Nuke, you can't have any downloads until you've created some categories for the downloads to live in. Once you've created at least one main category, you can start creating downloads. Figure 13.1 shows the Add a New Download section of the Downloads Administration screen.

Figure 13.1. Adding a new download.


Before I continue, I should point out that you can also add subcategories to further organize your content. Again, you'll have to create a main category before PHP-Nuke will let you add any subcategories.

Adding a download requires you to enter several pieces of information:

  • Program name. This is basically just the title of your download; it doesn't have to be the actual program name. Make this descriptive because it's what shows up in the list of downloads on your site.

  • File link. This must be a complete URL, including the http:// prefix, to the downloadable file.

  • Category. Choose the main category or subcategory that you want this download to be listed under.

    UNDER THE HOOD

    It's actually more confusing than that. Brace yourself.

    Goahead and accept as a fact that, with regard to disk storage, things proceed in increments of 1,000: A kilobyte is 1,000 bytes, a megabyte is 1,000KB, and so forth. It's different with computer memory, where the magic number is 1,204, but forget about that for now.

    TheWindows File Properties dialog box will actually list two sizes: Size and Size on Disk. The actual size of the file is its Size, as shown by Windows. The Size on Disk, however, can be much larger and represents how much room the file takes up on disk.

    This is going to sound silly, but that's just the way it works. See, when Windowsand other operating systems, for that mattergoes tostore things on disk, it must do so in certain increments. It's like buying minutes for a prepaid cell phone: You can't buy 5 minutes; you have to buy 50 (or whatever). When Windows stores files on disks, it does so in these specific increments, which on my system is 8KB. So if I store a 4KB file, it still takes up 8KB, with half of that space essentially wasted. If I store a 9KB file, it takes up 16KBtwo "blocks," so to speakwasting about 7KB.

    I know, it's crazy. But for the purposes of finding a file size for your Downloads module, just use the Size figure Windows gives you, not Size on Disk. Users will have to download only as many bytes as listed under Size, regardless of how much room that file will actually consume on their hard drives.


  • Description. You have up to 255 characters (about 50 words) to describe the download.

  • Author's name. List the author's name here, if it's known.

  • Author's e-mail. If you know the author's e-mail address and are allowed to share it, you can list it here. If not, just leave this blank.

  • File size. You can leave this blank, but if you know how large the download is (in bytes), list it because doing so can help your users decide whether to go ahead and download it. One way to get the file size is to download the file yourself and then right-click it in Windows and select Properties from the pop-up menu. One of the properties will be for file size, and Windows will list it in bytes for you.

    Just for your reference, remember that a kilobyte (KB) is 1,000 bytes; a megabyte (MB) is 1,000,000 bytes. That's with regard to file size, at least; for some reason, kilo- and megabytes are different when you're talking about computer memory rather than storage. It's all very confusing.

  • Version. If the download has an associated version number, list it. Otherwise, don't. It doesn't matterthis is just informational so your users can distinguish between two different downloads that point to different versions of the same file.

  • Home page. If the download is on another Web site, list that Web site's URL here. That way, users know where to go to learn more about the download, get help for it, and so forth.

  • Hits. This is a way to cheat. PHP-Nuke tracks how many people download each of your downloads and uses that information to compile its Top 10 lists and other statistics. You can fake it out by putting in a specific number of hits here, making a download seem more popular than it really is. Or, you can edit an existing download and reduce its number of hits, to make it seem less popular, you nefarious person, you.



    PHP-Nuke Garage
    PHP-Nuke Garage
    ISBN: 0131855166
    EAN: 2147483647
    Year: 2006
    Pages: 235
    Authors: Don Jones

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net