Author
Topic: Package SDK, anyone? (Read 451522 times)

House Mixes | Mixcloud | Any Intelligent fool can make things bigger, more complex, and more violent.It takes a touch of genius - and a lot of courage - to move in the opposite direction. - Albert Einstein

rudoka

Unfortunately there are very few things on the forum about how to actually write a package or modification. Really, nothing specific. While this is a very good start and surely helpful on getting an idea of what a package is, I'm not sure it can help anyone write a complete package (from the scratch).

Take me, for example. I thought that I did a fairly simple modifications, yet reading this *basic* SDK I can't even start to put my package together. Now, maybe I'm being a bit slow, and I the intent behind my criticism is to be constructive.

So, here are my questions about packaging, with some ideas to include in the SDK.

First, my veyr first issue was how to modify the database, alter a table in it. I think there are quite afew mods that add, alter tables in the databes. So it seems it's a quite basic part of a packaging. After looking at some already written mods, I found a tag <code> in the package-info.xml. This is something that is never mentioned in the SDK, and doesn't appears nowhere in the examples. I think it would be a good idea to add it to the SDK, with some explanation on what it does. (I know that I have to use this to alter the database )

The next issue, would be with the themes, avatars and such. Mainly the themes. My mod is relying mainly on creating a theme. At least half of my modification can be done using a theme, and modifying only one template. My question follows. The <require-file> just copies the file to the destination or it installs the theme too? Because it seems that simply creating a folder and copying files in the thmees directory doesn't makes the SMF to "see" it as such. It needs to be installed by the SMF, from the admin section. So it's not clear to me what is happening there. How can I effecively add (NOT to replace the default!) a theme?

The third issue, regards the uninstallation. I saw someone mentioning the changings to be reverseable or not. So how can I tell what is "reverseable" and what is not? Knowing a little more on how the uninstallation works, what happens then would be helpful I think. Of course following the reveresed logic, I suppsoe that if I search for A and replace with B, then at uninstallation the package system would search for B and replace with A. OK, the same with adding code. But let's get back to the database. What if I alter a table in database, with an ALTER query. I guess I should write a "cleanup" code for this. So, I think that at least some warnings should be issued about uninstallation already in the basic SDK. And who knows some advanced explanations would not hurt either, maybe in some *advanced* version.

I refer back to what [Unknown] said in the first post. That this is for package *authors*. Even if I unerstand that "author" is meant as every average joe (making the modding accessible to everyone out there), the a Develompent Kit should be more inclusive.

As a last thing, before everyone jumps on me. I understand that this is a preliminary version, put together in a hurry(maybe not?), and also understand that it takes time to do such thing. So really, I just tried to point out the areas where I'm in difficulty writing the package, and what info could help me (and others) to have an easier job. Of course, I do search around and use my head. I wouldn't know what to complain about, if not.

rudoka

oops Somehow I missed that one. And the add_setting.php too. Somehow didn't suggested me the name of databases.I guess I was a little too hasty. My fault.

Still, some explanations on the tags would be handy. Eve if it's a one liner. Just for the folks to know what is what. Maybe a quick-reference in the end?I still don't know how could I miss that one? After I saw in one mod I looked carefully the SDK ... and saw nothing. :'(

Anyway, If things go straight, maybe I can put together my package in the course of this week. Maybe an 0.1 alfa version? haha

rudoka

So, how do I install a theme?I mean the package it's ready, everything works fine, installs and uninstalls perfectly (on a clean SMF), but it requires that the Display.template.php to be modified for the "thing" to be visible.. I have two options here. One is to modify the default template file, through the modification. The second is to create a new theme, with this file.

Obviously I like more the second option. I would leave the default as it is, and "install" a new one (as part of my modification, through the package). This would makes the things more customizeable, I think. people could still stick with the old "look", if they don't like the new one (won't be forced for all users to use it that way).

So. You can install avatars, smilies, and language files with packages, but you CAN'T install themes??!! Why is that, what's the problem with the themes? Why couldn't the package manager handle themes? It would be possible even to upgrade them.

If the boardmod style is depreciated now, why are the official forum updates in that format?

Logged

"Never imagine yourself not to be otherwise than what it might appear to others that what you were or might have been was not otherwise than what you had been would have appeared to them to be otherwise."

Do you create this?url/index.php?package-list&language=blah&ref=their forum

I'm creating a mod site for all my mods and I can't get the thing to connect. How do I make it visible? Can comeonet ell me hte php code or give me an index.php file that reads the XML? I'm a little lazy right now lol.