1

Topic: Module Download from a New Theme

I'm posting this in the General forum because I'm not sure which direction it will go yet... I found a small problem with downloading modules when running a new theme the other day. It's pretty trivial I suppose, but it is irritating and for a user who's not experienced in LS it would be a big game breaker.

Since the sites listed in the Module Installer with a fresh setup don't have the latest versions, I've been using http://www.shellfront.org/modules/ to get them. Since ShellFront is hosted using a Linux box (pretty obvious if you look at the way the modules are ordered: upper-case letters take preference over lower-case), and since it looks like the Module Installer puts through all download requests in lower-case, a request for 'xhotspot-0.1.2.zip' will fail to download the file called 'xHotspot-0.1.2.zip'. Linux is, after all, case sensitive by default.

Currently, to get any of these modules installed, they must be downloaded manually, and then either selected by their .ZIP file when trying to install, or simply extracted to the modules folder directly. Even for users accustomed to LS, I'm pretty sure this would get quite irritating.

So, I propose one of two solutions..
- First idea is to rename the files themselves to all lower case, which would greatly simplify the module download process and won't break any previous versions of LS.
- Second idea is to update the Module Installer to send request through with the module name in the same case as it was typed in the theme's RC files, which could be quite nice for greater module control further down the line, but won't do anything to help people with the current Installer.

What do you guys think...?

Win7 Ultimate x64 + Logitech MX-1000 + LiteStep 0.25 == *very big grin*

2

Re: Module Download from a New Theme

I'm not familiar with what this "Module Installer" is. Is it not the old ls module installer/downloader module that has been used for years to download modules? That one was case sensitive.. so you just made sure to use the right case.

I can easily rename all module files to lower case, but I don't want to do this if it breaks other things already in place.

using LS since 1998. Old FPN site operator, owner of ShellFront, keeper of other LS domains
State of the Step 2011

3

Re: Module Download from a New Theme

rootrider wrote:

I'm not familiar with what this "Module Installer" is. Is it not the old ls module installer/downloader module that has been used for years to download modules? That one was case sensitive.. so you just made sure to use the right case.

I can easily rename all module files to lower case, but I don't want to do this if it breaks other things already in place.

When loading a theme that uses *NetLoadModule, if a module is not already installed, a small window is shown with a simple list of the required modules, and 'Download' and 'Cancel' buttons. Installing required modules can be done manually from here by right-clicking a module in the list and choosing a file instead of relying on the automatic download.

Just for clarification, I'm not referring to the fully-fledged Module Manager, that works just fine for downloading modules from the ShellFront list.

Hope that helps clarify it a bit. smile I'm at work at the moment, I don't have LS on my work PC and I won't be going back home until tomorrow, so I can't provide a screenshot at the moment.

Win7 Ultimate x64 + Logitech MX-1000 + LiteStep 0.25 == *very big grin*

4

Re: Module Download from a New Theme

ok.. I haven't seen NetLoadModule since the very beginning. So, you're saying that it is trying to download everything using lower case only? That's lame..

using LS since 1998. Old FPN site operator, owner of ShellFront, keeper of other LS domains
State of the Step 2011

5 (edited by ZaLiTHkA 2012-06-30 16:20:41 pm)

Re: Module Download from a New Theme

rootrider wrote:

ok.. I haven't seen NetLoadModule since the very beginning. So, you're saying that it is trying to download everything using lower case only? That's lame..

Not entirely sure if you're saying LiteStep's problem with the installer is lame, or my problem with the installer is lame... But either way, here's a proper example of the problem in action.

Here you can see xPaintClass-a.1.0 is not currently installed, but is most definitely available for download:
https://dl.dropbox.com/u/87335398/LS%20Module%20Installer/LS%20Module%20Installer%20%281%29.png

Select the module, and select to "Install checked module(s) via !NetInstallModule" (which opens the same popup window as *NetLoadModule in a theme.rc file does for missing modules):
https://dl.dropbox.com/u/87335398/LS%20Module%20Installer/LS%20Module%20Installer%20%282%29.png

Here is what happens with simply clicking "Download":
https://dl.dropbox.com/u/87335398/LS%20Module%20Installer/LS%20Module%20Installer%20%283%29.png

To get it to install, you need to download the zip file, "Select file..." through the downloader/installer:
https://dl.dropbox.com/u/87335398/LS%20Module%20Installer/LS%20Module%20Installer%20%284%29.png

...then manually select the file:
https://dl.dropbox.com/u/87335398/LS%20Module%20Installer/LS%20Module%20Installer%20%285%29.png

Then when you click "Download" again it fetches it from the locally selected file and installs successfully:
https://dl.dropbox.com/u/87335398/LS%20Module%20Installer/LS%20Module%20Installer%20%286%29.png

This happens with every module that is hosted with any capital letters on Linux hosting. I can't imagine how many potential LS users have been turned away because they couldn't get the modules they needed for a theme to work correctly, surely this is something worth fixing?

Edit: Moved the screenshots to my DropBox folder, my VPS is getting a new IP in a few hours and I won't be around later to update the URIs.

Win7 Ultimate x64 + Logitech MX-1000 + LiteStep 0.25 == *very big grin*

6

Re: Module Download from a New Theme

ZaLiTHkA wrote:

Not entirely sure if you're saying LiteStep's problem with the installer is lame, or my problem with the installer is lame...

I was saying that using lower case only is lame. 90% of all web servers are based on Unix or Linux and are case sensitive. It's poor program design to switch everything to lower case.

ZaLiTHkA wrote:

I can't imagine how many potential LS users have been turned away because they couldn't get the modules they needed for a theme to work correctly, surely this is something worth fixing?

I agree. My only concern is that such a change might affect something else that's depending on the capitalization of the filenames, which hasn't changed in over a decade (I started maintaining that module archive in 1999).

I'm trying to remember how NLM works. Doesn't it only try to download the modules that are specified by the theme? So, is it the theme creator's fault for using lower case with everything, or does the theme (correctly) use mixed case and then NLM converts everything to lower case? If so, I know that wasn't the case when NLM was first released, so I'm wondering what has happened since?

As I've said.. I'm all for making a change as long as it doesn't break other things. I need at least one other person to confirm that nothing else depends on the mixed case forms of the filenames on shellfront.org/modules

using LS since 1998. Old FPN site operator, owner of ShellFront, keeper of other LS domains
State of the Step 2011

7

Re: Module Download from a New Theme

rootrider wrote:

I'm trying to remember how NLM works. Doesn't it only try to download the modules that are specified by the theme? So, is it the theme creator's fault for using lower case with everything, or does the theme (correctly) use mixed case and then NLM converts everything to lower case? If so, I know that wasn't the case when NLM was first released, so I'm wondering what has happened since?

I must admit I've been out of the LiteStep scene for quite a while, so I might not remember this correctly, but I'm pretty sure I have run into this problem before..

Testing it now, it seems the file case as entered in the theme.rc file doesn't make any difference. If, for example, I remove the xHotspot-0.1.2 module DLL (which my current theme uses, listed as "xHotspot-0.1.2" in my rc file) and recycle LS, the small module installer window pops up giving me a chance to download the missing module. From that point, it seems to be listed in straight lower case.

https://dl.dropbox.com/u/87335398/LS%20Module%20Installer/LS%20Module%20Installer%20%287%29.png

To be honest, changing LS to follow the case as set in theme.rc files for every module will probably cause more problems for existing themes... Not all the modules seem to be camel-case (xLikeThis), so this would probably make theme creators' lives more difficult. Suddenly now my original suggestion seems really stupid to me as well, I'm still convinced there must be some way to improve this though.

I don't consider myself a programmer, I'm a scripter (PHP and JS are more my scene), but perhaps the module installer could be altered slightly to get around this without breaking anything?

For example, it could first check for a module with the exact same case as the requested module in the theme.rc and try download it. If that fails, it could then check for the same name in lower-case and try download it. Something along those lines should in theory add better module download support without breaking any existing functionality. Don't we all love theory though. smile

rootrider wrote:

As I've said.. I'm all for making a change as long as it doesn't break other things. I need at least one other person to confirm that nothing else depends on the mixed case forms of the filenames on shellfront.org/modules

Completely understandable, I work quite closely without the software development team at my daytime job (I write user manuals), so I am familiar with the process of software dev.

By the way, thanks veryy much for keeping up the LS modules... Especially considering the two module directories that come predefined in a fresh of LiteStep no longer seem to be working ("http://www.modules.ls-universe.info/modules" and "http://www.modules.nbi-studio.com/"), only the ShellFront URL still works. smile

Anyway, I'm just throwing my ideas out there, it might be very helpful to get some input from other users as well at some point.

Win7 Ultimate x64 + Logitech MX-1000 + LiteStep 0.25 == *very big grin*

8

Re: Module Download from a New Theme

*sigh*.. no other thoughts eh?

using LS since 1998. Old FPN site operator, owner of ShellFront, keeper of other LS domains
State of the Step 2011

9

Re: Module Download from a New Theme

I noticed this myself a while ago. I don't know if NLM follows exact type, or what. I would think it'd be relatively easy to go into its source-code and alter it so that it's case insensitive.

Do we even have NLM's sourcecode?

10

Re: Module Download from a New Theme

Case sensativity might also be on the web server side if it is hosted on a *nix server.  The best solution might be to run a script on the webservers to use tolower() and then rewrite NLM to always request in lower.

11

Re: Module Download from a New Theme

rootrider wrote:

I'm trying to remember how NLM works. Doesn't it only try to download the modules that are specified by the theme? So, is it the theme creator's fault for using lower case with everything, or does the theme (correctly) use mixed case and then NLM converts everything to lower case? If so, I know that wasn't the case when NLM was first released, so I'm wondering what has happened since?

Also: I'm of the opinion that case shouldn't matter in a theme. LiteStep itself doesn't care. I can have a setting written LikeThis, LIKETHIS, LiKeThIs, or likethis, and LiteStep isn't the worse for wear because of it. Neither the themer nor the user should stress about whether the module to be downloaded is written in proper case.

12

Re: Module Download from a New Theme

I'm pretty sure you can already tell from my previous posts that I'm all for the case-sensitive idea, But there's still one thing about that that worries me.... For the sake of the users who are not terribly computer literate, this could cause more problems than it solves...

Imagine downloading an older theme from DeviantArt (or Customize.org, or various other sites), installs it, and then finding it doesn't get the missing modules as it's supposed to do via NLM... As a "new" or "inexperienced: LS user, what would you do? After freaking out and throwing a couple unfriendly words at the theme author, of course... smile

If the source itself is changed, I'd suggest (at least in the mean time) that if a request is made for module called xLabel that NLM checks for a file called either "xlabel" or "xLabel", in other words, the actual file name, regardless of case.

If any of the coding needs to be done on a PHP or JS side of things, I'm very willing and able to help. smile

Win7 Ultimate x64 + Logitech MX-1000 + LiteStep 0.25 == *very big grin*

13

Re: Module Download from a New Theme

While LS and NLM can be case insensative...a *nix web server can not.  Since NLM just goes after a specific directory listing to see if a file exists by just appending the module name on the end of the provided URL...we really need to fix the hosting servers as well as the source.  Otherwise you would have to try millions of requests to guess which letter may or may not be capitalized in the filename.