Advertisement:

Author Topic: Creating a mod from scratch?  (Read 1811 times)

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 71,980
    • StoryBB/StoryBB on GitHub
Re: Creating a mod from scratch?
« Reply #20 on: October 08, 2019, 10:22:24 AM »
Quote
I simply assumed that the modder would take care of removing the columns as well upon uninstallation, but I guess I was wrong.

Not necessarily. It's an old mod and might not support the code for dealing with this.

If you create the column with $smcFunc['db_create_table'] or $smcFunc['db_add_column'] during installation, and specifically you've put the code in question into a file referenced with a <database> tag in the package-info.xml file, SMF will track what was added during installation and offer you the choice to remove it on uninstall. But if any of these steps were skipped, it won't track it and be left behind (on the theory that it might be upgraded so it should keep the data)

Quote
What does this do exactly? From the naming convention, it does look like it will list out the columns of a table, but wouldn't this again return the columns of an un-installed mod too? i.e. the same problem as the above point?

It does exactly that, it lists the columns. The problem is, you can detect which options *might* be available (e.g. you might detect that ST Shop was installed previously) and let the user choose that, but you can't reliably infer that ST Shop is *currently* installed - because that path lies madness if you go into the drama of working out what other mods might be supported based on file detection or function existence, unless there's a stable API you can query in SMF that you can rely on, but there isn't. (Other systems do this in ways you can rely on. SMF, currently, doesn't, mostly because it also uses the package manager to ship its upgrades)

Quote
Let the user decide from the Admin section which column he intends to use.

I wouldn't phrase it as 'which column' in the prompt; I'd phrase it more, "We've detected you might have had ST Shop installed previously, would you like to use the currency from that" or something like that, just because most users are not technical enough to look at the database, but they might remember which shop mod they were using.
Don’t try to tell me that some power can corrupt a person. You haven’t had enough to know what it’s like.

No good deed goes unpunished / No act of charity goes unresented.

Offline Diego Andrés

  • Customizer
  • SMF Hero
  • *
  • Posts: 3,409
  • Gender: Male
    • DiegoAndresCortes on GitHub
    • @bihgetter on Twitter
    • SMF Tricks - Free & Premium Themes
Re: Creating a mod from scratch?
« Reply #21 on: October 08, 2019, 02:35:59 PM »
For instance I don't think SMF Shop supports SMF 2.1 atm so if you are developing for 2.1, that rules out one option, at least for now.

SMF Tricks - Free & Premium Responsive Themes for SMF.

Online vbgamer45

  • Customizer
  • SMF Super Hero
  • *
  • Posts: 21,954
    • smfhacks on Facebook
    • VBGAMER45 on GitHub
    • @createaforum on Twitter
    • SMF For Free
Re: Creating a mod from scratch?
« Reply #22 on: October 08, 2019, 03:41:03 PM »
For instance I don't think SMF Shop supports SMF 2.1 atm so if you are developing for 2.1, that rules out one option, at least for now.
Yes it does not. I don't plan to update it at this time.
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Offline asprin

  • Semi-Newbie
  • *
  • Posts: 21
  • Gender: Male
  • Code never lies, comments sometimes do
Re: Creating a mod from scratch?
« Reply #23 on: October 09, 2019, 04:31:05 AM »
For instance I don't think SMF Shop supports SMF 2.1 atm so if you are developing for 2.1, that rules out one option, at least for now.

Yes, for now it's only for 2.1 onwards. I've so much to learn about this software so I've decided to not worry about backward compatability and focus of the current and future versions only.

Offline OtterlyAdorable

  • Semi-Newbie
  • *
  • Posts: 24
  • Gender: Female
    • The Irate Pirate | RrrrrrP Be Here
Re: Creating a mod from scratch?
« Reply #24 on: February 14, 2020, 02:05:43 PM »
Is this still in the works? I'm looking for a more comprehensive dice tool for our forum!

Online vbgamer45

  • Customizer
  • SMF Super Hero
  • *
  • Posts: 21,954
    • smfhacks on Facebook
    • VBGAMER45 on GitHub
    • @createaforum on Twitter
    • SMF For Free
Re: Creating a mod from scratch?
« Reply #25 on: February 14, 2020, 02:25:22 PM »
I believe the author has left SMF but might be open to paid work.
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro