Creating a mod from scratch?

Started by asprin, September 15, 2019, 10:24:54 AM

Previous topic - Next topic

Arantor

QuoteI 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)

QuoteWhat 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)

QuoteLet 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.

Diego Andrés

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.

vbgamer45

Quote from: Diego Andrés 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.
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

asprin

Quote from: Diego Andrés 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.

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.

OtterlyAdorable

Is this still in the works? I'm looking for a more comprehensive dice tool for our forum!

vbgamer45

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

Advertisement: