Author Topic: SMF PETS -> Delete a Pet item  (Read 4006 times)

Offline ElaineG

SMF PETS -> Delete a Pet item
« on: August 04, 2008, 03:21:30 am »
Hello, this is the first time I post on this forum and I'd like to thank for their work the people who worked on making the pets mod and upgrading it :)

I hope I am not wrong, but I saw there isn't an option for members to get rid of a pet, so I made an item that does the work.
It basically makes a member select one of their pets (like the food item) and then it deletes it from the database. Also it looks for the numpets value in the members table and lowers it by 1, so that it still counts your pets number correctly.

I am not good at coding since I only started recently, but I like to look into these mods so I thought of posting this here. I hope it can be useful for someone and that I didn't make errors.

(about the file, just rename it as .php and install it as a normal shop item)

P.S: it says "bots" instead of "pets" because on my community we're using robots instead of pets but you can rename it as you wish :)

Offline Chinaren

Re: SMF PETS -> Delete a Pet item
« Reply #1 on: September 05, 2009, 09:45:32 pm »
Sorry for resurrecting this but I tried to do this, but it comes up with:

ERROR: Could not create instance of 'delete' item!

In the admin panel. :(

Help?  I could really use this item!

Offline Katzujari

Re: SMF PETS -> Delete a Pet item
« Reply #2 on: March 01, 2011, 04:07:54 am »
These is because the name of PHP file must be the same of the name Class, id this example, must be "Demolition.php"