News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

I want to create a package, could someone please enlighten me a bit?

Started by richardwbb, January 28, 2018, 12:59:12 PM

Previous topic - Next topic

richardwbb

I am asking this because I would like to learn if need to absorb some more information first or that I am ready to write my first modification Please note that my questions are underlined.

I didn't find some information on the minimal contents of a package, is there any on simplemachines.org that I am overlooking?

I think I am able to create a modification package and this will be a simple modification, my goals are to have a working package, come into agreement about license usage, and come in to agreement with http://wiki.simplemachines.org/smf/Customization_approval_guidelines  and the smf team.

a. The source I am wanting to take is "GNU General Public License, version 2". Bear with me, I have not only never created a modification package before, I also never programmed something that can be useful to a open source community, hence my licensing question: Can I use this source without mentioning the original creators name and also do not point to the source that I have found?

b. I've opened a modification and it seems to me the minimal contents are: "install-2.0.xml",  "package-info.xml", and "readme.txt" and "readmeuninstall.txt", where to contents of "package-info.xml" are along the way of:<?xml version="1.0"?>
<!DOCTYPE package-info SYSTEM "http://www.simplemachines.org/xml/package-info">
<package-info xmlns="http://www.simplemachines.org/xml/package-info" xmlns:smf="http://www.simplemachines.org/">
<name>Modification Name</name>
<id>richardwbb:modificationname</id>
<version>1.0</version>
<type>modification</type>
<install for="2.0 - 2.99.99">
<readme type="file" parsebbc="true">readme.txt</readme>
<modification>install-2.0.xml</modification>
</install>
<uninstall for="2.0 - 2.99.99">
<readme type="file" parsebbc="true">readmeuninstall.txt</readme>
<modification reverse="true">install-2.0.xml</modification>
</uninstall>
</package-info>


And the contents of "install.xml" are something along the way:<?xml version="1.0"?>
<!DOCTYPE modification SYSTEM "http://www.simplemachines.org/xml/modification">
<modification xmlns="http://www.simplemachines.org/xml/modification" xmlns:smf="http://www.simplemachines.org/">
<id>richardwbb:modificationname</id>
<file name="$sourcedir/Themes/default/index.template.php">
<operation>
<search position="replace"> echo '
</head>
<body>'; ?></search>
<add> <div id='partylights'></div>
<script type="text/javascript">
some javascript (not) here
</script>
</add>
</operation>
</file>
</modification>


continued > now I noticed those two .txt files are bb code. If you have taken a look to my example code, you will notice there is need for a <div> element just after the <body> element. I understand the javascript could be a .js file and the source I have, has that hard coded. Also I have some "div style="  code that I understand must go in a .css file. Now my question on this, does the css code also need to be a seperate file just like the javascript? On the other hand, is there anything specific on the javascript that it may be added to "and here come the javascript bits"?

c. Am I understanding correct, that with coding a modification, I need to have Notepad++, 7-Zip, a clean test forum, write those two xml files, package it with 7-zip, and run the Package Manager and make a succesful install and uninstallation? Is that all there is to it or are there tips that are smarter/ more handy then this that the skilled people are willing to share?
If my post in this topic looks ambiguous to you, then I'm with Murphy's law and General Stupidity. In other words, trial and error.

Aleksi "Lex" Kilpinen

a. I'm not a licensing expert, but what I understand of the license mentioned it does not specifically demand attributing sources. It does however force you to use the same license on your derivative work.

GPL 2.0 Summary:
QuoteYou may copy, distribute and modify the software as long as you track changes/dates in source files. Any modifications to or software including (via compiler) GPL-licensed code must also be made available under the GPL along with build & install instructions.

b. The contents will depend on what you want the mod to do really, but at i's bare minimum I think it would be an install.xml and a package-info.xml. The readme files are what the package manager shows the admin when installing/uninstalling ( and those are defined in the xmls if I remember correctly. ) About the .js and .css - I'm not sure if there is something in the "rules" about these, I'll let someone else answer that perhaps.

c. That's it really. The editor doesn't have to be notepad++, but that's a good editor. :)

To see how some stuff is done in the packages, perhaps take a look at https://wiki.simplemachines.org/smf/Category:Package_SDK
and see the contents of some mods from https://custom.simplemachines.org/mods/ to see what has been done and accepted before :)
Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

richardwbb

a. I was thinking the same, I feel assured now. Thank you.

b. I have been wondering, is their someone on your team responsible for licensing and to evaluate the modification? I wouldn't even know how to send the modification package I am planning on, to Simple Machines? I ask this because have found quite a few directions on how package internals should look like but never come around reading about what I just asked in "b."

c. Ahh, thank you for that Software Development Kit link. [offtopic]I am using Geany on Linux, but I find nothing on Linux, even Sublime, does get near Notepad++[/offtopic]
If my post in this topic looks ambiguous to you, then I'm with Murphy's law and General Stupidity. In other words, trial and error.

Aleksi "Lex" Kilpinen

Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

Advertisement: