|
Post by kniteowl on Feb 17, 2007 13:05:18 GMT 7
This message is really for Omega but will help with anyone else trying to make modules also. Like most programmers I know, I "borrower" the codes from Omega's INFO module to make a simple module. During the testing and going through the source code, I found something. Omega already found part of the problem already in that the properties page does not work without having to install the IMGDUP module and editing the getform.htm file. Apparently part of the Thecus code is broken. Found something even simpler or better ;D which ever way you want to call it, just changing 3 lines of code and the IMGDUP module and editing is no longer necessary. I have tested it with the INFO and JINZORA modules and they work great. Omega, when you get a chance, if you can make the small changes listed here and then bump the version number of all your modules. The changes are to the "install.rdf" file. Change this: To this: That's it and everything works great. Teng
|
|
|
Post by omega on Feb 17, 2007 19:54:17 GMT 7
Hi Teng, thank you for this suggestion..... ... but I'm not convinced that it would be a good idea to create a new version of all the modules and place the link in the install.rdf file. Let me explain my position: Thecus already know that the getform.html file is missing the module property page support and they confirmed that it'll be fixed in the next release. As a workaround you can use the IMGDUP module and fix the script. Agreed, the IMGDUP module for some other reasons is somehow difficult to handle, so even then if you don't want to use it, you just can enter the correct path into your web browser yourself. So just create a bookmark for all the modules property page and you're set. If I change all the modules now I have to change them back after the next release and because there are at least two workarounds described above available I don't see the urge to change it in your way. But I'm open for discussion and maybe there are more reasons to think about.... Andreas
|
|
|
Post by kniteowl on Feb 18, 2007 4:01:15 GMT 7
Actually, I thought about that also, but that is why there is 3 lines that are changed. There are two type of modules that are allowed, "Official Thecus" modules and "User Created" modules. The definition of which module type it is, is stored in this section of the install.rdb file. The way that the modules are currently defined, they are defined as "Thecus" modules. This is the part that is broken and is what they have admitted to and are looking at fixing. The definition for "User" modules are working fine. Since these modules are user created, it seems like it would be more valid to actually define them as such. Although, you are right, in that either way should work. If we wait long enough, they will fix the tools to support both the "User" and "Thecus" and all this will be a moot point. At the time being, for those that don't want/need to install the IMGDUP module, but still want the properties page to function correctly, you can make these changes to the modules before installing and they will work fine. As a side item, I typically don't create links to pages, I have a habit of just typing it in when I need it. When the modules are defined as a "User" module, you can access the properties page by going directly to the URL using the following formatted address. "User Module" like this: http://<N5200 Address>/modules/INFO/www/index.htm This was much easier for me to remember and type than when using the "Thecus" module type. "Thecus Module" like this: http://<N5200 Address>/adm/getform.html?name=../modules/INFO/www/index I am not sure if the address is valid when in the "Thecus" mode also, I never tested it, so if someone can test and post info, it would be good to know. Teng
|
|
|
Post by omega on Feb 18, 2007 6:50:07 GMT 7
Hi Teng, Why do you change the <md:Mode> value from "Admin" to "User": I've checked the code I as far as I can see the value isn't used yet. Can you tell me where this value is used? You're right, there are two modes for the module interface available. I've chosen the Thecus mode so I can reuse the Thecus UI - that means they provide the common headers and footers, they already build the table structure and I can use their CSS styles. All the current module index.htm pages depend on that, so if I want to switch to User style modules I need to redo all of the index.htm files in order to get an appealing look. About your question: sure it is possible just to use the link http://n5200/modules/INFO/www/index.htm in the current version of the modules (without your changes). You'll then see exactly what you see after doing your proposed changes. So in a way you're right: as soon as we defined a good HTML + CSS framework to present the module property pages we could switch to User style modules - but for me this is a required prerequisite. You're welcome to generate an example for one or two modules.... Andreas
|
|
|
Post by kniteowl on Feb 18, 2007 14:19:31 GMT 7
Omega, You are right, should never read code when it is late and I am tire. I don't even remember, what I was reading, but I am going to say that I probably read what I wanted the code to say and not exactly what the code really did say I see what you mean by the UI, I didn't even pay attention to that. I know, you tried to explain it to me, but I was too hard headed to accept it, had to go reread things again just to prove that I was wrong Anyway, I'll try to keep my mouth shut, till I get thing verify. I was just too excited. Teng
|
|
|
Post by omega on Feb 18, 2007 17:55:08 GMT 7
Teng, IMHO you're drawing the wrong conclusions.... You brought a very right point which I've never thought about. From the very beginning I've created Thecus style modules and didn't find out that there are User style modules. So you gave me a good hint. I was only discussing your suggestion to switch all modules to User style using your simple edits and stated that it's unfortunately not that easy. But your basic idea is right and the more I think about it the more I think we should migrate the modules in the future.... But as I said, we then need to ceate our own HTML pages for the module property page... volunteers are highly welcome... And Teng, please continue to post good ideas... Andreas
|
|