I've just started out with Drupal. I'm still alpha testing my site, found out the hard way regarding using the correct module versions, and already dreading future upgrades.
My suggestion is for a way to know the version numbers, particularly of modules and your Drupal installation, without going looking through the files themselves, which in most cases mean ftp. Of course, if you maintain the site, the onus is to keep a note of them. What I do is to keep the downloads of the gzip files so I can tell which versions I have.
But what happens if you lose them, or take over somebody else's installation. Ftp downloading and reading text files are a chore.
Let me apologize first as I haven't done any major php coding (only changed a line here or there, or code-copied), or if this is being worked on, but I hopefully can point someone in the right direction.
In well-coded files, the second line usually contain the Id's so I think this is the only location for the version numbers. The system database also holds the info on the modules. I can think of 3 ways on how to get the numbers from the browser interface:
1. A script to read the second line from each module, either one-by-one (quick) if you make the link from the module settings page, or the whole gamut (lots of file lookups). Reading the text files however doesn't sound like good security, and would take lots of php filters to get to the number.
2. A change to the system database to add the Id column. Then it would be easy to make a script to lookup the database. I guess the place to start is in module.inc when it loads the module, but this would be a version step. And still you need to read the text file.
3. Introduce a new variable for version to be included in every module so that it can be loaded into and from the database (hmm, Drupal 5.0?).
As for Drupal version number, shouldn't it have been easily found (its own database or variable perhaps).
You can also extend this to inc or tpl files but that would be too much.
Having another variable like url would be useful too so that you can easily jump to the relevant page in drupal. I keep going to drupal>>downloads>>modules, scroll down, click 'find out more', go to the module's page to check any info, issues, new versions, etc. Wouldn't it be easy if you could jump to it straight from administer>>modules :)
Comments
Script
I've come up with a simple script based on just a few weeks of php familiarisation, that can list versions by reading the module files:
In a similar fashion, you could also get the Drupal version:
Some thoughts on this:
Now my question is, where should I put this code? I tested in on an unused node template (thank god for XAMPP). I can create it as a page but it would be nicer if it was a template or module itself rather than a node content, but I'm not sure how to do that.
Id, not version
Silly me, I'd expected that the Id's would have shown the version but unfortunately it didn't. Still, it's a starting point.
Could have made it to read the other text files, like readme, license, or install, but it's not uniform and personally, I don't save them on the web to conserve space.
Changelog read was OK.