Advertisement:

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

Offline The Burglar!

  • SMF Hero
  • ******
  • Posts: 7,111
  • Gender: Male
    • hermans.mixen on Facebook
    • TheBurglar on GitHub
    • Herman's Mixen
Re: Package SDK, anyone?
« Reply #40 on: May 04, 2005, 02:51:37 PM »
this is solved now !
Met vriendelijke groet, The Burglar!

 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

Former Godfather of our dutch community ;)

Offline AtariKid

  • Jr. Member
  • **
  • Posts: 194
  • Gender: Male
Re: Package SDK, anyone?
« Reply #41 on: May 26, 2005, 12:37:19 AM »
Flag to: AtariKid, nwowatcher

Ha!  Flagged myself and a buddy for future reference.   :P

- noteworthy
Rawk on dude!
SMF 1.1 RC1 | MKP 1.1 Rc1

rudoka

  • Guest
Re: Package SDK, anyone?
« Reply #42 on: June 02, 2005, 01:57:49 PM »
   OK, so I am thinking on writing a package, and I ended up here.
   
   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.  :-\

Respectfully,
Rudolf
« Last Edit: June 02, 2005, 02:00:33 PM by rudoka »

Offline Rik©

  • Full Member
  • ***
  • Posts: 605
  • Gender: Male
    • SimpleTweaks
Re: Package SDK, anyone?
« Reply #43 on: June 02, 2005, 04:35:17 PM »
Well... if you take a good look at the sample package-info.xml and the package-info_advanced.xml you can see a line with the <code> tag.
Quote from: package-info.xml
   <!-- Installation, the key part of this file. -->
   <install>
      <readme>readme.txt</readme>
      <modification>install.xml</modification>
      <code>add_settings.php</code>
   </install>
And the (example) add_settings.php drops the data into your database....
All can be found in the SDK

Uninstalling the settings/data from the database is not mentioned in the SDK though...

But i know that if you ask for help with your package you will get it asap from [unknown] or SMF (staff-)members


rudoka

  • Guest
Re: Package SDK, anyone?
« Reply #44 on: June 02, 2005, 04:45:54 PM »
oops  :-X
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

Phew, thanks a lot for opening my eyes.  :)

Rudolf

Offline [Unknown]

  • SMF Friend
  • SMF Master
  • *
  • Posts: 36,102
  • Gender: Male
Re: Package SDK, anyone?
« Reply #45 on: June 03, 2005, 03:30:14 AM »
Packages should also not be used to install themes...

-[Unknown]

rudoka

  • Guest
Re: Package SDK, anyone?
« Reply #46 on: June 03, 2005, 11:22:53 AM »
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.

Rudolf

Offline Owdy

  • SMF Fossil
  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 15,550
  • Gender: Male
  • W00t!
    • janoloferiksson on LinkedIn
    • @@jaoler on Twitter
Former Lead Support Specialist

Tarvitsetko apua SMF foorumisi kanssa? Otan työtehtäviä vastaan, lue:http://www.simplemachines.org/community/index.php?topic=375918.0

Offline John Slater

  • Jr. Member
  • **
  • Posts: 150
    • Proper Doh Members
Re: Package SDK, anyone?
« Reply #48 on: June 04, 2005, 06:34:24 PM »
Quote
This tells it what file to edit. Among others, you can use $sourcedir, $themedir, and $languagedir.
<file name="$sourcedir/Subs.php">

   <operation>

      The position attribute should tell the position relative to the code you want to add.
      <search position="before"><![CDATA[
Search for some code to add stuff after.
]]></search>

      The code to add in the described location.
      <add><![CDATA[
This is what to add.
]]></add>

   </operation>

</file>


I have a question about this bit here
Quote
      <search position="before"><![CDATA[
Search for some code to add stuff after.
]]></search>

Is that a mistake where you have said the search position before, and then said this will search for stuff after?

Just checking because i didnt understand it.

Offline [Unknown]

  • SMF Friend
  • SMF Master
  • *
  • Posts: 36,102
  • Gender: Male
Re: Package SDK, anyone?
« Reply #49 on: June 04, 2005, 10:06:20 PM »
Search for this code before what I'm about to add:

code

Add:

other code

The search position is *relative to the code being added.*

-[Unknown]

Offline John Slater

  • Jr. Member
  • **
  • Posts: 150
    • Proper Doh Members
Re: Package SDK, anyone?
« Reply #50 on: June 05, 2005, 02:39:01 PM »
Ok thanks, maybe you can help with this problem too please



http://www.simplemachines.org/community/index.php?topic=37885.0

Offline Dannii

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 10,211
  • Mind the volcano!
    • My homepage
Re: Package SDK, anyone?
« Reply #51 on: June 24, 2005, 12:19:43 AM »
If the boardmod style is depreciated now, why are the official forum updates in that format?
"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."

Offline codenaught

  • Customizer
  • SMF Super Hero
  • *
  • Posts: 14,655
  • Gender: Male
  • Formerly Known As akabugeyes
Re: Package SDK, anyone?
« Reply #52 on: June 24, 2005, 12:37:18 AM »
Well it is a lot easier to read. So I would imagine at least one reason is for someone who may need to install some parts manually that they can read what to do much clearer than the xml format.
Dev Consultant
Former SMF Doc Coordinator

rudoka

  • Guest
Re: Package SDK, anyone?
« Reply #53 on: June 24, 2005, 12:48:24 AM »
Actually, I find the xml format a lot easier to read.  ;)

Offline fragalot

  • Semi-Newbie
  • *
  • Posts: 11
Re: Package SDK, anyone?
« Reply #54 on: July 22, 2005, 10:39:06 AM »
linux works great for gzip files aswell ;)

Offline Elmacik

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 8,247
  • Gender: Male
  • = Human Draft =
    • IT Store
Re: Package SDK, anyone?
« Reply #55 on: October 22, 2005, 11:12:01 PM »
test_modification.php in this package always returns empty..
i put it to forum directory, any other folders.. doesnt work. returns like this:


results:
1.
Home of Elmacik

Offline JayBachatero

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 19,561
  • Gender: Male
    • @jaycreations on Twitter
    • JayBachatero.com
Re: Package SDK, anyone?
« Reply #56 on: October 22, 2005, 11:37:42 PM »
are you sure you are linking to the .xml file that you want to test?  thats what i use when i make mods.  you can try the upload file option.
Follow me on Twitter

"HELP!!! I've fallen and I can't get up"
This moment has been brought to you by LifeAlert

Offline Elmacik

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 8,247
  • Gender: Male
  • = Human Draft =
    • IT Store
Re: Package SDK, anyone?
« Reply #57 on: October 22, 2005, 11:47:37 PM »
aha! got it !
i was trying to test packages :P
thanks
Home of Elmacik

Offline nope

  • Newbie
  • *
  • Posts: 2
Re: Package SDK, anyone?
« Reply #58 on: October 28, 2005, 06:22:57 PM »
At first I was wondering all around: where is this da*n Package SDK?
I ended figuring out that I was browsing the topic as a guest and couldn't see the attachement.
Very confusing...  :o

Offline GC

  • Full Member
  • ***
  • Posts: 440
  • GamingEvo.com
    • GamingEvo.com
Re: Package SDK, anyone?
« Reply #59 on: January 06, 2006, 11:12:12 PM »
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.