Simple Machines Community Forum

Customizing SMF => SMF Coding Discussion => Aiheen aloitti: sonyedorly - joulukuu 15, 2005, 01:19:24 IP

Otsikko: New Mod Maker
Kirjoitti: sonyedorly - joulukuu 15, 2005, 01:19:24 IP
Hey All...

I am just learning how to make mods but I cannot find where the Edit Features and Options area saves all of the variables!!!it is driving me nuts because I have my settings in there, you can change them and it will pull and display them properly but I cannot find out how to read them from my code!!!please tell me how to find it.

Thank you very much
sonyedorly
Otsikko: Re: New Mod Maker
Kirjoitti: dtm.exe - joulukuu 15, 2005, 01:36:05 IP
Try ModSettings.php or ModSettings.template.php.
Otsikko: Re: New Mod Maker
Kirjoitti: sonyedorly - joulukuu 15, 2005, 01:38:05 IP
I have gotten that far, I have added my settings config there and can change stuff, but how do I pull something from that page?

or am I missing something
Otsikko: Re: New Mod Maker
Kirjoitti: Thantos - joulukuu 15, 2005, 01:40:21 IP
They are stored in the settings table.
Otsikko: Re: New Mod Maker
Kirjoitti: sonyedorly - joulukuu 15, 2005, 03:48:30 IP
ok, ill go check there!thanks

and I should be able to pull them but if not ill post again!

thanks again
sonyedorly

UPDATE::

I found the right spot and got it working but when I make it into a mod package (im using smf mod creator beta) it will not install, it doesnt throw any errors, it just doesnt change anything, btw, thanks for all the help on the previous issue
Otsikko: Re: New Mod Maker
Kirjoitti: Sheepy - joulukuu 15, 2005, 06:49:43 IP
The mod creator only edit .mod or .xml files.  To make it a package (which may contains many many files) you need to compile it so it is packed into tar.gz with package-info.xml.

Although I did wrote the mod editor to ease development, I strongly advise you doing with notepad or other text edit for at least your first mod or two.  You may wish to take a look at Unknown's Package SDK first.
Otsikko: Re: New Mod Maker
Kirjoitti: sonyedorly - joulukuu 15, 2005, 08:24:20 IP
ok, thankyou, I have compiled it many times, but when it installs it, nothing changes, even tho it says everything would work on the install page, I will check out [Unknowns] sdk tho, are there any good package tutorials that you recommend tho?
Otsikko: Re: New Mod Maker
Kirjoitti: JayBachatero - joulukuu 15, 2005, 08:30:09 IP
Take a look at this.  This is a tutorial [Unknown]'s package SDK.
http://www.simplemachines.org/community/index.php?topic=20319.0
Otsikko: Re: New Mod Maker
Kirjoitti: sonyedorly - joulukuu 15, 2005, 09:36:54 IP
thank you all, I got my mod package to work, EXCEPT, it will not uninstall for some reason :'(, it has to remove three things but it only gets to the first one and says "Modification parse error", and if I procede it will throw and error that says

2: file(D:\Program Files\xampp\htdocs\smf/Packages/temp/install.xml) [<a href='function.file'>function.file</a>]: failed to open stream: No such file or directory
File: D:\Program Files\xampp\htdocs\smf\Sources\Packages.php
Line: 406


I dont know why it is looking in a temp directory for that file but it does

please help me with this, then I will be ready to release my first mod (it is very simple tho)

UPDATED::
I found out what was wrong with uninstalling, I had one line of code wrong, problem now is that sometimes (not often tho) when you install, it will add extra content (like your member group) multiple times, I am trying to fix this tho but otherwise it works very well!!!

Thank you all for your help
Otsikko: Re: New Mod Maker
Kirjoitti: Sheepy - joulukuu 17, 2005, 07:32:39 IP
Package manager has to uncompress the package first to test / (un)install it.

Just make sure you're searching for unique lines.  And make sure whitespace is not set to ignore.

Also, if your changes would render some lines to be no longer unique, the uninstall will attempt to uninstall all those lines and result in successful uninstall but not original code.  Sometimes this is hard to detect.

Good luck on your first mod.