Simple Machines Community Forum

Customizing SMF => SMF Coding Discussion => Aiheen aloitti: Kindred - tammikuu 31, 2006, 11:41:54 IP

Otsikko: problems creating a mod...
Kirjoitti: Kindred - tammikuu 31, 2006, 11:41:54 IP
Ok...   I have worked on a few mods with SMF, and I know the coding standards...

I am trying to update one of the mods for 1.1RC2, and I keep getting an error every time I try to upload the mod!
I get:
The package you tried to upload either is not a valid package or has become corrupted.

Now.... like I said, I had this mod working with previous versions of SMF!  I have no idea why it is not working now...  and I don't know which file is causing the error.

I have switched back to using the boardmod version of the install file, since I tried with XML and that didn't work either... 
The file that I *THINK* might be causing the error is package-info.xml
but I can't seem to find an error.   Can someone help me with this?   It is getting extremely frustrating and I'm sure it's something really simple that I keep missing...



<?xml version="1.0"?>
<package-info xmlns="http://www.simplemachines.org/xml/package-info" xmlns:smf="http://www.simplemachines.org/">
<name>Phat Calendar Pack</name>
<id>Kindred:PhatCalPack</id>
<type>modification</type>
<version>1.2.0</version>
<install>
<modification type="file" format="boardmod">phatcalpack_v12.mod</modification>
<code>phatcalpack_v12_i_db.php</code>
<require-file name="calindex.gif" destination="$themedir/images" />
<require-file name="members.gif" destination="$themedir/images" />
<readme type="inline">This will add much functionality to the SMF Calendar
The original authors of the components of this mod are:
Jack R. Abbit (iCal-Vcal)
Chris Curran (Recurring events)</readme>
</install>
<uninstall>
<modification type="file" format="boardmod" reverse="true">phatcalpack_v12.mod</modification>
<code>phatcalpack_v12_u_db.php</code>
</uninstall>
</package-info>
Otsikko: Re: problems creating a mod...
Kirjoitti: Thantos - tammikuu 31, 2006, 11:48:31 IP
you are missing the doctype.

Add
<!DOCTYPE package-info SYSTEM "http://www.simplemachines.org/xml/package-info">
after the <?xml line
Otsikko: Re: problems creating a mod...
Kirjoitti: Kindred - helmikuu 01, 2006, 07:24:23 AP
nope... that's not it...

about half the mods I checked don't have that line...  and I get the same error with or without that line...
Otsikko: Re: problems creating a mod...
Kirjoitti: Kindred - helmikuu 05, 2006, 04:52:42 IP
ARGH!   this is driving me crazy....   I can not, for the life of me figure out why this exact layout worked on 1.0.5 and does not work on 1.1 RC2...
Otsikko: Re: problems creating a mod...
Kirjoitti: ivogomes - helmikuu 15, 2006, 03:40:22 IP
I have the same problem when I create a .zip with Mac OS X. If I create the .zip in Windows XP I can upload the package normally.
Otsikko: Re: problems creating a mod...
Kirjoitti: Kindred - helmikuu 15, 2006, 05:15:43 IP
ugh...   that's what you get for using a Mac!

lol...   seriously, though... I got it working finally by taking the install xml and .mod files from a mod that I KNOW worked, and then pasting my stuff in there...   somehow, that fixed the problems. 

Now I just have to fix the bugs in some of the database routines. :)
Otsikko: Re: problems creating a mod...
Kirjoitti: ivogomes - helmikuu 17, 2006, 04:18:29 AP
Got it to work now. Just uploaded the folder with all the files instead of zipping it and uploading the zip :)
Otsikko: Re: problems creating a mod...
Kirjoitti: Dannii - helmikuu 17, 2006, 08:15:15 AP
Only 2 ideas. 1. It's named package-info.xml exactly (case sensitive)? 2. You haven't zipped it up inside another folder?