News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

Package SDK, anyone?

Started by [Unknown], November 22, 2004, 03:26:37 AM

Previous topic - Next topic

fahadsadah

Perfect, thanks.
Looked everywhere for one of these!

Enqack

Quote from: afv on June 21, 2008, 09:06:54 AM

edit:
I went into my virtual XP and zipped it using the default zipper and it works :-X
Time to replace my gzip ::)
I was using Info-zip (on linux) and had the same issue with .zip files.   Running `zip -F  <filename>` to fix the zipfile allowed my package to be uploaded.
"  -F   fix zipfile (-FF try harder)"

Akyhne

#183
The code in Package SDK is bogus.. at least for SMF 1.1.7

ad_settings:
VALUES" . substr($string, 0, -1));

...should be
VALUES" . substr($string, 0, -1) , __FILE__, __LINE__);

... at least for SMF 1.1.7 packages.

I had the same error in two mods saying something like "invalid third parameter in db_query".

It should also be pointed out that this package example doesn't work with SMF 2.0

H

The package SDK is unfortunately not maintained too well at the moment :)
-H
Former Support Team Lead
                              I recommend:
Namecheap (domains)
Fastmail (e-mail)
Linode (VPS)
                             

Dominic22

Thank you so much. I hope I can learn to create modifications that would be so cool.

:) you are a SUPER HERO:)


nvcnvn

How can we design a mod just use one .xml file like in Vbb! It's will more convenient to user

H

Quote from: nvcnvn on April 08, 2009, 01:47:16 AM
How can we design a mod just use one .xml file like in Vbb! It's will more convenient to user

The user should never need to see how many files are in the package as it is normally installed by the Package Manager
-H
Former Support Team Lead
                              I recommend:
Namecheap (domains)
Fastmail (e-mail)
Linode (VPS)
                             

[»|« №ōЯ »|«]


SoLoGHoST

Hello, sorry if this has already been asked and answered, but wondering on the $themedir.  Using this, does it point to the DEFAULT Theme Directory?  The reason for this is I need to modify the script.js file found only in the ./Themes/default/scripts directory.  So what is the best way to get to this directory all of the time?

Also, in my uninstall.php file, should I drop the columns that were installed with my MOD??  I can't remember where, but I read somewhere that dropping columns in a table is not recommended.

Thanks :)

JBlaze

$themedir ALWAYS leads to the default theme :)
Jason Clemons
Former Team Member 2009 - 2012

SoLoGHoST

Thanks a bunch, also, on the uninstalling of MODS, should i drop the columns that were installed when installing the MOD?

JBlaze

It is important that when uninstalling a mod, that everything that came with it is uninstalled.

whether it be files, directories, code, or database tables, columns and rows.

Jason Clemons
Former Team Member 2009 - 2012

SoLoGHoST

Ok, Thanks again :)  Exactly what I thought!

Dannii

No, I disagree. People will very likely want to install your mod again, whether it's a new version, after they've upgraded SMF, after they've fixed a bug in something else, or whatever.

Do NOT undo database changes when uninstalling a mod. Instead provide a page with instructions for how to do it manually, or even better, provide a separate fulluninstall.php file that they can run themselves to remove everything if they choose to. Mention these options in the uninstall readme.

For example, my pretty URLs mod will not remove the database changes. I actually recommend that if people choose to stop using my mod they install the reverter package so that their links will not break. This wouldn't be possible if I undid the database changes.
"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."

JBlaze

Thanks for pointing that out Dannii. I totally forgot about that.
Jason Clemons
Former Team Member 2009 - 2012

Garou

The only problem with that Dannii is the bug currently in 2.0 where mods fail on install if the DB's are already there. In which case if you want to use the db info you have stored you have to backup the db manually and delete it, install the mod again, then manually drop the original DB back over it.

[SiNaN]

There are several workarounds for that bug.

One is, passing 'ignore' for the 'if_exists' parameter. This will however, will not update the table if the table definitions for the install script has changed and this causes other issues for your modification updates.

The other way is checking if the table exists or not manually and depending on the result you get, you either check each column for an update or create the table. This is how SimplePortal handles database changes in 2.2.x versions.
Former SMF Core Developer | My Mods | SimplePortal

Dannii

If the installing the mod when the tables are there already fails, then the mod is broken.
"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."

Advertisement: