Advertisement:
2by2host

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

Offline bubo1991

  • Newbie
  • *
  • Posts: 1
Re: Package SDK, anyone?
« Reply #180 on: September 17, 2008, 04:45:31 PM »
thx

Offline fahadsadah

  • Newbie
  • *
  • Posts: 1
Re: Package SDK, anyone?
« Reply #181 on: October 26, 2008, 01:41:31 PM »
Perfect, thanks.
Looked everywhere for one of these!

Offline Enqack

  • Newbie
  • *
  • Posts: 1
Re: Package SDK, anyone?
« Reply #182 on: December 18, 2008, 09:36:33 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)"

Offline Akyhne

  • SMF Hero
  • ******
  • Posts: 7,373
  • Gender: Male
Re: Package SDK, anyone?
« Reply #183 on: December 22, 2008, 05:28:22 PM »
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
« Last Edit: December 22, 2008, 05:30:03 PM by akyhne »
Don't PM me about translations. I'm not a team member any more!

Offline H

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 21,795
  • Gender: Male
Re: Package SDK, anyone?
« Reply #184 on: December 23, 2008, 01:40:31 PM »
The package SDK is unfortunately not maintained too well at the moment :)
Huw
Former Support Team Lead
                              I recommend:
Namecheap (domains)
Fastmail (e-mail)
Linode (VPS)
                             

Offline Dominic22

  • Newbie
  • *
  • Posts: 1
Re: Package SDK, anyone?
« Reply #185 on: December 23, 2008, 09:28:09 PM »
Thank you so much. I hope I can learn to create modifications that would be so cool.

:) you are a SUPER HERO:)

Offline satrun77

  • Newbie
  • *
  • Posts: 1
Re: Package SDK, anyone?
« Reply #186 on: March 26, 2009, 06:28:56 PM »
thanks :)

Offline nvcnvn

  • Full Member
  • ***
  • Posts: 546
  • Gender: Male
  • Super Somethings
    • Hocvui.net - Cùng học những điều cơ bản mà vui
Re: Package SDK, anyone?
« Reply #187 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

Offline H

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 21,795
  • Gender: Male
Re: Package SDK, anyone?
« Reply #188 on: April 08, 2009, 03:23:17 PM »
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
Huw
Former Support Team Lead
                              I recommend:
Namecheap (domains)
Fastmail (e-mail)
Linode (VPS)
                             

Offline [»|« №ōЯ »|«]

  • Semi-Newbie
  • *
  • Posts: 36
  • Gender: Male
  • ßL@çK SçøRpîøÑ
    • Fun Fully
Re: Package SDK, anyone?
« Reply #189 on: April 10, 2009, 03:04:51 AM »
Thanks.... :)

Offline SoLoGHoST

  • SMF Hero
  • ******
  • Posts: 1,584
  • Gender: Male
  • I had a dream & it was Dream Portal! :)
    • Dream Portal
Re: Package SDK, anyone?
« Reply #190 on: May 10, 2009, 01:26:28 AM »
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 :)

Offline JBlaze

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 10,871
  • Gender: Male
    • realjblaze on Facebook
    • realjblaze on LinkedIn
    • @jasonclemons on Twitter
    • My Blog
Re: Package SDK, anyone?
« Reply #191 on: May 10, 2009, 01:28:37 AM »
$themedir ALWAYS leads to the default theme :)
The nefarious Jason "JBlaze" Clemons

Twitter GitHub Forrst

Xbox LIVE API - A simple and powerful REST API for reading Xbox LIVE data.

Offline SoLoGHoST

  • SMF Hero
  • ******
  • Posts: 1,584
  • Gender: Male
  • I had a dream & it was Dream Portal! :)
    • Dream Portal
Re: Package SDK, anyone?
« Reply #192 on: May 10, 2009, 01:30:21 AM »
Thanks a bunch, also, on the uninstalling of MODS, should i drop the columns that were installed when installing the MOD?

Offline JBlaze

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 10,871
  • Gender: Male
    • realjblaze on Facebook
    • realjblaze on LinkedIn
    • @jasonclemons on Twitter
    • My Blog
Re: Package SDK, anyone?
« Reply #193 on: May 10, 2009, 01:34:28 AM »
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.

The nefarious Jason "JBlaze" Clemons

Twitter GitHub Forrst

Xbox LIVE API - A simple and powerful REST API for reading Xbox LIVE data.

Offline SoLoGHoST

  • SMF Hero
  • ******
  • Posts: 1,584
  • Gender: Male
  • I had a dream & it was Dream Portal! :)
    • Dream Portal
Re: Package SDK, anyone?
« Reply #194 on: May 10, 2009, 01:35:08 AM »
Ok, Thanks again :)  Exactly what I thought!

Offline Dannii

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 10,218
  • Mind the volcano!
    • My homepage
Re: Package SDK, anyone?
« Reply #195 on: May 10, 2009, 01:52:33 AM »
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."

Offline JBlaze

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 10,871
  • Gender: Male
    • realjblaze on Facebook
    • realjblaze on LinkedIn
    • @jasonclemons on Twitter
    • My Blog
Re: Package SDK, anyone?
« Reply #196 on: May 10, 2009, 01:56:39 AM »
Thanks for pointing that out Dannii. I totally forgot about that.
The nefarious Jason "JBlaze" Clemons

Twitter GitHub Forrst

Xbox LIVE API - A simple and powerful REST API for reading Xbox LIVE data.

Offline Garou

  • Sr. Member
  • ****
  • Posts: 759
  • Gender: Male
  • On Hiatus.
    • Balance Games
Re: Package SDK, anyone?
« Reply #197 on: May 11, 2009, 10:22:31 AM »
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.

Offline [SiNaN]

  • SMF Super Hero
  • *******
  • Posts: 11,503
  • Young and Foolish
    • SimplePortal
Re: Package SDK, anyone?
« Reply #198 on: May 11, 2009, 10:30:04 AM »
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 | My Anime List | SimplePortal | Samanyolu Fanları

Offline Dannii

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 10,218
  • Mind the volcano!
    • My homepage
Re: Package SDK, anyone?
« Reply #199 on: May 11, 2009, 10:49:57 AM »
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."