corz.org uses cookies to remember that you've seen this notice explaining that corz.org uses cookies, okay!
corz distro machine pro
distribution for busy humans
(c) 2004->tomorrow! cor + corz.org ;o)
Thanks to everyone who gave feedback on the betas!
itstory..
0.9.4 [current beta]
+ More responsive layout, better document view footer and site footer
integration.
+ Added the "root" to the dynamic path links. The folder links also now
correctly display as "folder/" instead of "/folder", the former being
more conventional and intuitive. The spacing is also more natural.
+ The distro machine will now automatically search up the tree for
matching paths when asked to display a menu for a non-existent
directory, so if you asked for /foo/bar/foobar, and /foo/bar/ exists
you will get that menu instead of the root menu.
This functionality extends to the "switch" menu, also. If you are
viewing source/documents in /source/foo/bar/stuff/docs/, and there
is no corresponding /download/foo/bar/stuff/docs/, the distro machine
will search up: /download/foo/bar/stuff/, /download/foo/bar/, and so on
until it finds a matching path, right up to the root.
Obviously this functionality is only activated if you use the distro
machine's source/download twinning features.
* Fixed a (potential) bug in the Seek-And-Serve™, which would present
itself if you used custom "download" and "source" locations (no one does
this!) and provided an incorrect download link. It would not be
automatically corrected.
* Fixed a minor bug in embedded php source highlighted output, it was
specifying the wrong class name, so depending on your style sheet,
you may have got extra space in the putput.
0.9.3.2 [current release]
+ Multiple style updates. Feel free to use the corz.org version of the
machine styles which sport a beautiful button-like CSS gradient,
available in multiple color schemes!
+ Added a workaround for mobile browsers that do funky things with
download requests (passing them off to handlers and such). Basically,
we allow them three hits on a single file (the third one is the actual
download - *grr*)
+ The "download/source" title above the distro machine is now live,
enabling users to switch between the modes, if you use that.
+ You can now choose whether or not to display the switch menu under the
machine menu. With the title set to live, and this disabled, the view is
much neater IMHO.
0.9.25
+ Added ability to display modified times along with file sizes (in the
ToolTip)
0.9.24
+ Improved titles - they now contain the full path of the object, as well
as which mode we are in, either download or source.
0.9.23
+ Added an option for the user to reset their downloading session in the
event of them having previously downloaded the same file. This is on
the same page as the message with the email link.
In the preferences section, you can set the limit for the number of
times a user is allowed to reset their downloading session. The default
is 10 resets.
If the reset count reaches *twice* this number, the page simply dies.
The user can still go back and access the distro machine just fine, so
long as they don't attempt any more funny business.
0.9.22
+ Added a preference for "cookie-less" hot-linking for approved download
sites; basically a list of domains (or full URLs) which you allow to
bypass the hot-link and cookie protection.
This is handy if you promote your software via the big download sites,
most of which will simply link back to your (distro machine) download
location.
0.9.21
* Fixed a bug in the non-php source viewing (I was in too much of a rush
last time I updated the distro machine, throwing features in) AutoIt
scripts, for instance, would throw up an empty page - the raw view
worked fine. This also fixed the php-viewed-as-other bug I'd
introduced.
* Fixed the cookies issue which prevented downloads from embedded menus
and external links, if "insist_on_cookies" was set to true - which it
was in my corz.org test version - always the latest version running
live at the org!)
* Increased number of built-in supported source types.
0.9.20b
* Fixed occasional root path quirks, where in the absence of
corresponding source/download folders, the switch-to link could throw
up spurious "./" and "." prependments. This in no way affected the
distro machine's functions, but did mean that you could potentially
create two identical menus, available via different URI's, which could
have possible SEO repercussions, as well as cause confusion.
There should also be no more "/." links in the section menu if you
have switched to a root directory menu.
* Fixed an issue where spaces in the file name would cause downloaded
file names to be truncated to the first word, so "a sample file.zip"
would land up in your downloads folder as "a". I apologize for taking
so long to get around to this; I've known about it for ages, but for
some reason had gotten into the habit of not using spaces, and
believing that it would be tremendously difficult to fix. When I sat
down and looked at it, I coded the solution in around 1.4 seconds.
ho-hum ... :/
* Added a preference for "always attach", which is useful if you are
running the distro machine in multimedia mode - certain files can
*always* be sent as proper attachments (e.g. zip files), ensuring they
stupid browsers don't attempt to display then, or save them with weird
names.
Be careful enabling multimedia downloading - if a user downloads an
audio file, or image to their browser, then views something else, then
comes back to the original file - they won't get to download it again.
If multimedia downloading is disabled, it will be in their downloads
folder. I may do a pref to allow multiple downloads of a file if
running in multimedia mode - let me know what you think.
* All preferences with file extensions are no longer arrays(), but simple
lists, separated by commas.
* Added a new preference, "insist on cookies", which, as well as ensuring
certain evil spidering entities don't go scooping all your files,
ensures that the overload protection works in all cases.
All web browsers can do cookies. If they want your resources, they can
easily enable them for your site. Most sane people have then enabled.
* Fixed a potential issue where the name of previously-downloaded files
wasn't being stored with the full path, just the name. This would have
made it impossible to download a second file with the exact same name
as a previously downloaded file. The full path is now stored, so this
is no longer possible.
0.9.19b
* I've noticed for some time that folk occasionally download the same
file more than once. I guess this is because the distro machine,
unlike many web download facilities, sends the correct mime types and
attachment headers, and the download is most likely being dumped
straight into their download folder, automatically, as it should be.
So now we have Overload Protection..
The distro machine will now thoughfully inform users that they have
already downloaded that file, and ask them to check their downloads
folder.
This has been on my mind to do for a few weeks, but after some fool
decided to download three thousand copies of ffe the other day, I
figured it was about time to move it up the list. I guess my h4x0R
devblog pissed someone off! haha!
But I guess other distro machine users might not have a T3 and
unlimited bandwidth, so this will prevent any fools from eating up
your monthly allowance.
0.9.18b
* greatly improved the search code. this now uses the same search
routine as corzoogle/404/links machine; it's robust and accurate.
It doesn't matter if you request download or source, the distro
machine will locate the file, wherever it is, and redirect the
browser to the new location. Yes, I mean a real 301 redirect, so
spiders and so-on will get automatically updated with your new
links, too. Pretty neat.
You can move whole sections around, and any links around your site,
and other folks' sites will continue to work fine.
0.9.17b
* added separate styles for "clean" embedded source, which fixes the
top-spacing issue.
regular style.. -->> style when embedded..
"textview-body" -->> "clean-textview-body"
"machine-sourceview" -->> "clean-machine-sourceview"
0.9.16b
Fixed potential issue where a few instances of "array_key_exists" had
somehow been replaced with simply "key_exists". Everything was still
working fine (because of the way the conditions evaluated), though I'm
fairly sure there isn't a php function called "key_exists". ;o)
0.9.15b
Minor internal code efficiency improvements in machine-functions.php
0.9.14b
Added an automatic scores backup facility..
Every time a write operation is requested, the distro machine makes a
backup of the scores file. If your scores ever experience a zero-byte
situation (gets wiped, for some unknown reason), the distro machine will
automatically restore from this backup, and make a timed and dated copy
of the current restoration point for your reference.
This hasn't been needed, nor requested. I just got a kick to do it.
To facilitate this, the folder called "bax" (or whatever) will need to be
be writable by the server process, either chmod 777 (for php module), or
chmod 644 (for phpsuexec(cgi)) use.
0.9.13b
First official XHTML release.
Fixed a couple of minor issues with the path title in the stats page
Made the "powered by" link open in a fresh window, so you don't lose
your visitors to corz.org!
NOTE: in the release, the source menu is disabled, as I figure that's
how most people will want to use it. If you need source menus, simply
enable that in the prefs.
0.9.12b
Fixed embedded text highlighting (non-php) where extra formatting was
being applied. this feature was a freebie after adding the text
highlighting code, I just fixed it up.
improved a couple of other features of the non-php highlighting, and
added specifics for a couple more types, autoit code and batch files.
the text highlighting services can handle any extensions, simply add
or remove them in the prefs.
Improved hot-link protection - added "strict" option for extra security.
Added a couple of example active hot-link messages you might like
Upgraded the distro machine web pages to XHTML, at last!
http:
0.9.11b
Added Hot-Link Protection.
0.9.10b
Fixed the embedding features functionality (which I'd disabled during the
recent updating). Works great. I'm using the (new) download page as a demo
of the various available embedding combinations..
http:
0.9.9b
added pajamas login capability. this is only for admin functions (by design)
the "secure area" uses a different authentication mechanism.
Note: you can use an existing pajamas installation, if you have one.
Only the comments script to go, and I have a site-wide login! w00t!
0.9.8b
distro machine can now automatically re-route to moved source files
it performs a scan of its folders, and returns the frst matching target.
So long as the file name hasn't changed, the user won't even realize
it was moved.
0.9.1 - 0.9.7
XHTML re-work
Where to begin on how much better this is? Forget it!
Simply put, it's clean, it's clear, and you can do funky stuff like switch
the panes around by doin no more than switching "left" for right, and
vica-versa, in your css. MY machine is all transparent and cool orange,
because it's here, but YOUR distro machine could be anything you want.
It's now trivial to create pages that have wee boxes with download menus in
them, scattered anywhere on your page. Joy of CSS!
0.9b1 - no releases for a while until I get the other features in.
added depth infinity..
you can now put folders inside folders inside folders and so on, and the
distro machine will keep on doing its thing. if you are using a custom css
file, please note the additional URL styles for .menu_title because the
title is now a series of links along the path you have travelled, which is
nifty.
also the changes to the .sub_sections_title style, which is now a link to
the corresponding "other" section; if you have a downloads section called
"foo", and a source section called "foo", the powerbar title will become a
link enabling users to toggle between the corresponding sections, so long as
they occupy the same locations, relative to their own "root" folder be it
"download" or "source".
--- >> Enter distro machine pro << ---
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
v0.8rc8
End of the line for distro machine FREE!
Fixed a couple of small but fairly important security holes.
All users are urged to upgrade immediately.
Thanks to PCheese for the vulnarability warning.
v0.8rc7
Further improvements to the file-locking code. plugged both ends now, hopefully that's
the last blank score file, ever!
Added preferences for page background image. Thanks to Sad :( for noticing this!
v0.8rc6
improved the titles. these are important. the title now describes the current
content of the distro machine, be it menus or files.
v0.8rc5
add "switch" capability. if a user is inside a download menu, they can switch to
the source menu by simply clicking the section title. they can switch back and
forth like this. saves having to go *back* to the main menu, then *jump* to the
other (source/download) section, then *enter* the sub-section. cool.
this functionality only activates if the target folder exists. otherwise the
section title is normal text, not a link.
v0.8rc4
the distro machine now prevents users from attempting "multi-part" downloads.
why some folks would want to download a 50k zip file in five parts is beyond me,
anyway, the first part will work fine, any subsequent attempts will get a wee
message instead. in this event, the user also has an opportunity to reset their
download session maunually (just in case) by pressing a button.
v0.8rc3
added "show all files" option. this bypasses your extensions prefs and shows
*everything*. i needed this for something.
added an admin logout button for menu pages. as it stood, you could be logged
onto a secure machine as admin, and so automatically cleared for access to the
secure area, there was no indicator that this was because you were logged in as
an admin, which could potentially lead to confusion ;o)
added direct link to the admin/stats page from the secure area login page. this
saves you having to login twice, and prevents a double logout too! the link
operates like, and is controlled by the same settings as, the "stats link".
v0.8rc2
fixed a bug in the source view page where the download link was mixing up the
seperators (I forgot to add a "thingie" section when I reordered those)
v0.8rc1(release candidate one)
Improved the overall logic of the html structures, they were confusing even
to me. the embedded output, as ever, is a self-contained table which will
take up 90% (you can change this) of whatever width you give it. the powerbar's
squishing is now greatly improved, and it will appear even if nothing is available.
some css improvements, removed background white in the jump bar (oops),
underlining in the links, etc. for both in-built & external green.css
improved some error/user-error handling. attempting to embed from a distro
machine running in secure mode produces an embedded user message, for instance.
the name of the subsection you are in is now displayed if you get a "nothing
available" page. also works when embedded.
added various options for embedded custom text, menus and titles. you can
even embed top-level menus; the machine will deliver the sub-sections in a
pop-up window. you can set a few options from the embedding URL now, see the
install page for more information.
added prefs for a few things, machine widths among them.
made it easy for you to syndicate your downloads to other sites, they can embed
your machines on their pages!
some internal restructuring; with all the new features, things were starting
to get a bit inneficient. the table generation is becoming modularised, which
should hopefully make things simpler for me, and folks who want to hack the php,
editing one place instead of three or four.
v0.7b10
fixed a bug where the downloading link on the source page gave an incorrect URL
greatly expanded the machine's list of mime-types. whatever you need to share
is probably covered now.
added "multimedia" downloading switch. useful if you use the distro machine
to distribute images/media files/etc, the user gets the file in their
browser as opposed to their download manager, in theory. you'd probably be
better off with something like QDig for image files, though.
squished a bug I introduced in the last beta - php error when no custom
text file was present.
finally moved the source highlighting colours out of the .htaccess and into
the script itself. Apache throws up errors of level warning at the .htaccess
versions and advises that we use quotes around the values, even though we
already effin did! it was starting to annoy me, not least all that pointless
server-side error logging. clearly this makes them easier to change, too.
I think I wanted folks to "discover" them, which is just plain silly.
cleaned up the counter code, removed some duplication, that sort of thing.
improved the safety of the scores file, again. there was a (very very slim)
possibility that one machine process could attempt to read the scores at the
exact moment a parallel machine process had the file locked for reading. no
more.
custom text can now be displayed in the "nothing available" page. not on
"clean" embedded pages, though.
fixed bug where stats link was appearing on embedded pages (see, you should
hide that baby!)
v0.7b9
Fixed a minor bug where "special links" for source files weren't being
correctly parsed, instead the generic link was showing.
v0.7b8
Cleaned up the formatting of the embedded menu when nothing was available,
it shouldn't mess with your page too much now.
Fixed a browser-dependant issue where editing scores directly wouldn't work,
the javascript was inserting a literal "&amp;" instead of the encoded &
I just removed it. so much for standards.
v0.7b7 (latest release version)
Fixed a serious security flaw allowing users to potentially view system
files running on the server. all users are recommended to upgrade to
this version IMMEDIATELY!
NOW!
made the $_SERVER['DOCUMENT_ROOT'] statements into a variable ($root)
so you can hack that manually if need be (someone needed this).
v0.7b6
fixed up the stats page for more browsers, and moved the messages to the
top. they won't overlap the stats now.
encoded all the &'s I'd missed. At least, I think I've got them all now.
v0.7b5
fixed the urlencoding of the sections part of the request. this should
prevent certain browsers sending a "bad request".
v0.7b4
re-arranged the order of the GET variables, hopefully the URL's will seem
more logical now, ie.. /machine?section=whatever&file=somefile.zip, as
opposed to being back-to-front, like they were before. If you have any
hard links in pages that use the old order, they will still work just
fine.
made the admin login form look the same as the cute area login form.
links are now rawurlencoded, so you can use "+" and "&" and stuff in your
filenames without "unexpected" results, in theory.
the name of the sub-section is now displayed in the title bar
some css improvements. by the way, you specify alternative css for embedded
menus by adding an argument to your URL, like this.. &css=green.css
v0.7b3
more work on the internal download handling, specifically, we now disable
zlib compression right at the start, rather than just before the
download.
in the distribution, this has also been set in the .htaccess file, as
some (at least my web host) server's still seem to mess with the output.
a few other output buffering tweaks, this and that.
v0.7b2
expanded the editing functions in the stats page. as well as nudging
things up and down, you can just edit scores straight in. this will
assist while I track down why one of my onsite score file reset itself.
fortunately I had a backup from the previous day, but you might not!
.. either it was something nefarious, in which case I have a hole in the
security somewhere, or more likely; there was a real busy spell and the
server tried to do too many things with the one flat-file all-at-once.
by the way, if it was something nefarious, and it was *you* that did it,
could you please do it again, say, every day for a week, so I can get to
the bottom of it!
anyway, the machine now puts an exclusive lock on the file for the
duration of the write operation, all three microseconds of it, or
thereabouts. we'll see how it goes. if you get a wiped score file,
please report it to me!
completed the title customisation. if you specify "info" as the title
for your source area, for instance, that will be used throughout,
mostly.
you can now specify an alternative css file for your "clean" embedded
menus. see the distro machine download page, which includes two embedded
menus from two separate distro machines, each using a different native
css file, yet on the page, both using the same, as specified by that
page.
removed the "download which file?.." message from embedded menus. I
reckon your own titles are better for these.
improved the downloading still further, and almost by accident. it's all
snapped into focus. I figured it might be better to get all the
score-file stuff out of the way before sending the file to the user. I
was right!
v0.7b1
switched the default colour scheme to blue. I use this more myself, and
this is purely to save me having to edit the three separate
distromachines onsite that use the blue scheme. I upgrade my machines
more than anyone, of course.
v0.7b
new: secure area. I wanted this for my "friends" folder. it's neater,
and a wee bit more secure than the old http authorisation methods, which
apparently, some browsers aren't doing any more; seems like a smart
idea. We are using POST variables to send our password, which is held as
a 32 byte md5, in a temporary session cookie. even the worst case
browser scenario should only have the md5 flying around the wires. In
other words, it's fairly secure.
users are presented with a simple (and quite cute) password dialog. once
logged in they can access all your menu systems, files, whatever.
don't use your password-protected machine to deliver back-end menu
services; it won't. (it's so easy to just chuck another one somewhere
for this)
new: the name of the sections is now displayed in the menu itself. you
can also now (optionally) have your custom text displayed inside the
menu, too, which fills that space on the right!
new: expanded list of downloadables. we now check for, and send
mime-types, so mp3's, ogg's, excel spreadsheets, and such things can be
delivered easily with the machine. I'll expand this list as I go along,
no doubt. so far..
doc, xls, htm, html, jpg, png, pdf, txt, ogg, mp3,m3u, zip, rar, sit,
sitx, tgz, gzip, bz2, arc, bzip, pict, mpg, mov, and others.
if you use the machine to distribute, say, mp3's, this should cause
whatever the user's operating system is set to do with these filetypes,
i.e. open the mp3 player. they can still right-click and "save as", of
course.
new: made a few more things customisable. stuff like the main titles.
you can have a "foo viewer" menu now, or whatever.
I also improved the overall download handling, there should be less
browser stalling, and associated weirdness. we DO send size headers now,
too.
I dropped in the code for all this pretty quick, so it's into the beta
folder for a bit, until it's had some field testing, any feedback on the
new secure area features are especially welcome.
have fun!
v0.6.4.5
new: added "special link" capability to the source viewer page.
What this means is, instead of the "try out this script" link taking the
user to the script itself, it can send them to a different link. I
wanted this for my bbcode parser, instead of playing with the one in the
scripts folder, I wanted to send folks to the cbparser demo page, which
has user comments and stuff on it.
other scripts just won't work unless they are in a specific location,
I'm thinking right now that I'll send users to the real rdf newsfeeds
for my blog, for instance, instead of the blank page they'd get clicking
the "try out this script" link from the source page. neat!
to use:
Simply add a [links] ini section at the end of your readme.txt (or
whatever you call it) file, like this (from my "corz function library"
folder)..
a growing collection of handy functions for php types
[links]
corzblog bbcode parser.php = /blog/inc/cbparser.php
email-hider.php = http:
; you can leave comments, too, underneath, with semicolons.
I invented the second entry to show that full, valid URL's are okay too,
even linking to another site. I might link to a nuke installation that
uses my nuke-rss script, for instance.
you can enter special links for all, or any, or none of your source
files. if there's no entry, the "try out" link leads to the source file,
as usual.
if you create a blank entry, the "try-out" link will lead to the
source-view page itself, effectively disabling the "try-out" mechanism
for that file, a good idea for files that will just gronk at you unless
they are living in some special location, or have no output to speak of.
if you need variables in your link, enclose it in quotes, like this..
[links]
important.txt = "/beta?download=menu&section=wire"
hmm: I used to use readme.html files for apache raw directories, which
override the readme.txt files (used by the distro machine), but now I
just leave the readme.txt file itself in the folder, and the raw
directory viewer..
http:
shows the preformatted distro machine message, along with the [links]
section underneath. cool. most users will figure out that these are
links that relate in some way to the scripts they "=" equal!
This also goes down in history as being the first time I conceived,
coded and tested a feature in one of my distros and *it just worked*. I
even remembered all my semicolons! heh
to need no debugging
is coding heaven
fix: following the "back to the source menu" link at the foot of the
source-viewer pages now takes you back to the section you were in, as
opposed to the main menu. that was poor gui.
fix: the slashes thing in the source viewer, maybe last time I broke,
rather than fixed this. I put it back, anyhow. If I find the file source
that originally led me to believe there was a bug in the first place, I
may delve more deeply into it.
in short, sometimes the php source highlighting function adds slashes
where there should be none, or else removes them where they should
remain. it's all my fault, of course, and another good reason why users
should click the download link rather than copy-and-paste the source
from the pages, which I'm fairly sure everyone does, so no harm done.
the reason this version info entry is so long is because I have decided
to start putting all my version.info entries into my blog, keep folks
up-to-date. or will do, when I'm finished this.
oh, I am!
0.6.4.2
minor improvements to interface, particularly for situations where you
have more sections than files in your download/source folders. now looks
less incongruous.
0.6.4.1
Fixed a bug where a download link would show on the source page, even
though there wasn't a corresponding zip file available. Thanks to
cheshire for spotting that.
0.6.4
improved the print-friendly compatibility, should be no problems
printing source pages, and embedded source views won't interfere with
the print-friendly versions of the pages they are embedded inside. btw,
my print-friendly script uses <!--printstart-->
<!--printend--> tags to mark the printable areas.
added a "download" link to the *top* of the source view page. this
simply directs the user to the tool bar at the foot, where the *real*
download link is. some people are too impatient to scroll all the way
down to the foot, even on short pages!
fixed bug with slashes in source viewer
0.6.3.1
fixed a couple of minor style issues on the admin/stats page
removed the "logout" button from stats page when it is loaded without
admin login (if you have set the password to blank ('') so anyone can
see stats)
note: the edit/delete links are absent when the page is viewed this way,
too though that was coded up for 0.6.3
0.6.3
added admin capabilities; you can now delete files from the stats list.
there is a javascript confirmation for this, so you'll need javascript
enabled in your browser to easily use this features.
to achieve this manually and *without* confirmation, simply add
"&del=file.zip" (no quotes), to your URL, replacing "file.zip" with the
name of the file you want to delete from the list.
note: this does not delete the file, only the counter score for that
file, removing it from the list. the moment someone downloads it, it
will appear again on the list. effectively, we are zero-ing the counter.
you can also edit the download counters themselves. a '-' and '+' sign
appear next to the scores. clicking '-' decreases the counter by one,
clicking '+' increases it by one. simple. this capability isn't so we
can rig our download stats, but so we can remove "test" downloads from
the list, making the figures accurate again.
ask yourself: which is the better program? one with five downloads and
five users? or one with a thousand downloads and five users?
fixed up the css, and especially the blue.css, stuff I'd been messing
with and left in place, a few other css things throughout the script,
missed styles, that sort of thing.
0.6.1
added rudimentary admin capabilities to the stats page. you can now
login and stay logged in with a session cookie. you can also logout!
more to come.
if you have multiple machines running onsite, logging into one logs you
into them all, if they all have the same admin password. handy.
0.6
added "stats" page.
there is now (optionally) a "stats" link at the foot of the page (it
can also be hidden), where you can go to a page of download
statistics. this is (optionally) password protected.
I wrote this initially for my (rudimentary) site admin page, works
great.
added missing file handling
while the distro machine and its embedded menus won't ever display
links to missing files, it's possible that your static pages could
have direct links which are invalid. perhaps you took the file
offline.
rather than just send the user an empty file, the distro machine
will output a short message asking the user to inform the webmaster
that the file is missing.
added "bytes" into the pop-up titles
I decided to drop the do_nice_size() function into my onsite
function library, and then realised that while it did a neat job
with anything over 1024 bytes, returning whatever KB or MB, it
simply ignored anything under 1024 bytes. we care about the little
files.
then I gave this functionality back to the distro machine's pop-up
titles
0.5.2
after discovering php's error_reporting(E_ALL) I've cleaned up all the
undefined variables, that sort of thing. would have been good to know
about that sooner. while I was at it, I did a few minor tweaks, cleaned
up the pop-up titles, replaced an & with &amp;amp;, one I'd missed.
stuff like that.
0.5.1
something I thought I'd already done, but hadn't entirely finished; you
now can use a "short" path, a-la mod_rewrite, and the machine will use
this for all the links, this goes for back-end menus, too. previously it
always used the "real" link, no matter how it got called originally.
will keep the short link in the user's browser address bar, looks
neater.
I've included an example line in the script. I use '/engine' myself
if you want to know how to do short links, see the onsite FAQ..
http:
the only time the user will see a "real" link using this method, is when
they choose the "try out this script" link from a source-view page.
with these internal changes, you do not now need a second line in your
.htaccess file to get the "try out this script" link to work fully. you
can still use that second line, allowing folks short url direct access
to source folders. your call.
when you hover the mouse over a link, the file size now pops-up in the
title
0.5
added "sections"..
you can now split your download or source folder into subsections,
just make some folders inside! call the folders whatever you like,
they will instantly appear in a "sections" menu (you can configure
the name). sections cannot have more sub-sections, though you can
chuck machines all over the place, so this really isn't much of a
limitation.
don't forget to pass &section=whatever if you are using backend
functions in a subfolder. also don't forget to put downloads inside
corresponding subfolders if you want the "download" link on the
source view page to appear. i.e. source/dev/du.php , I'm thinking
about a dynamic zipper for source files, but I do like being able to
have two *slightly* different versions of a file, one to see and
play with, and another to download. often, too, the download version
will be a package, or a folder, with extra stuff, readme's,
whatever.the one to see (and run onsite) often has debug lines, for
instance, or, like pda, might have some site-only mechanism, like a
history file.
we now check if there is a corresponding zip file for whatever source
the user is viewing. if there isn't one, we don't show the download
link.
you can now disable the source menu, yet still use the same machine to
provide backend source-highlighting services. in other words, disabling
the menu, doesn't disable the services. they have a separate setting
now.
the default mode in the distribution is now "download", and (if I
remember when I zip it) source menu disabled. this is what most people
need, and if you are skilled enough to have php source to view, you'll
surely figure out how to switch it on in the prefs.
added custom text capability. you can put a file called "readme.txt" (or
whatever you lke) inside any of the folders, and it will appear as a
caption at the foot of the page, just like those readme.txt files in
old-school dirs.
put all styling into css, easier for you to edit now.
fixed up the link URL encoding, and a few other wee markup fixes
simplified the layout a bit, and some other things, too, made more
simple.
added "clean" menu's to the mix. now you can have the distro machine
provide backend menu's too! again, pass "clean=true" onto the url and
pop wee download/ source menus into your pages. some css is loaded with
the menu to keep your style within the page. while it's unlikely that
any of my chosen style names will coincide with yours, if you get any
style weirdness, this will be the likely cause. just edit on of the
names.
note: in this mode, the distro machine will show *only* downloads or
source items, no sections, custom text messages, or anything else which
could cause another page to load inside your own page.
get a menu into your page like this..
<span style="color:> <?php readfile('http://'. $_SERVER['HTTP_HOST']
.'/machine.php?download=menu&section=wire&clean=true'); ?> </span>
or like this..
<span style="color:> <iframe width="100%" height=260 border=0
src="/machine.php?download=menu&section=wire&clean=true">
</iframe> </span>
the whole thing comes in its own table, so you can slap it in a
<td> or something. for a demo of this functionality, see..
http:
note too, in this mode the menu fills 90% of area given to it. normally,
when by itself on a page, it fills 50% of the space.
added facility to use external stylesheets, and did a blue version as an
example. you can see it at the above link, and download it here..
http:
0.4
added "" (double-quotes) around colour directives in .htaccess
file. although it didn't cause any problems, it did throw up warnings in
apache access logs.
added backend source-viewing capability. you can use the distro machine
to provide source highlighting facilities for your website. just add
"&clean=true" to the end of your source request, something like..
<span style="color:> <?php readfile('http://'. $_SERVER['HTTP_HOST']
.'/engine?source=sample.php&clean=true'); ?> </span>
will return the source page *without* your usual header and footer. see
the corz distro machine install page at corz.org for an example.
0.3
the distro machine will now specifically ask for "menu" in its
request, this should prevent problems on certain servers with safe_mode
and stuff like that enabled. it will still show its default menu just
fine if this is absent. i.e a request for index.php will show the same
page as.. index.php?download=menu (if you have download set as your
default menu system)
0.2
added preferences
webmasters can choose which parts of the machine they need. the distro
machine has a "default" mode now, so that unspecific requests always
show whichever menu you set as default. you can also disable both menus
now and use the machine purely as a backend download handler
0.1
we now have source and download menus, and users can easily
switch between them. the download engine now takes a full filename in
the request and so can function as a general site download handler for
whatever files you throw at it (and throw into its "download" folder)
0.0
first there was the source viewer, and it was good.
then I needed to count downloads from corzoogle download page, so put
together a simple download handler which I tacked into the corzoogle
page.
then I realised that I wanted all my downloads handled like this, and
counted too, and also that it would be cool to have a downloads menu
that was automatically created from whatever I happened to throw into
some folder, and when I had done that I thought..
what I got here is a nice distribution system, wouldn't it be cool to
make the whole thing self contained so folks could just drop it in a
folder as an automatic handling service with automagic menus and han- ..
so I merged the whole thing into a single file and corz distro machine
was born.
note: many changes just don't get noted in the early stages, all rapid
creation.