Abandon system

Forum
Last Post
Threads / Messages
All the code is followed like it's posted here and I even went through it twice. All the code works fine until I add the gender field to the database.
 
Thanks, i was scripting it myself and ran into a couple bugs that yours help me fix.
 
I added this as per your instructions as well and I have the same problem, the abandon page does not show any adoptables.
 
There is a code that when the Abandon system is empty of pet say:
There are no pets here! Try to come back tomorow!
 
Well, I tried to install it, and I couldn't get it to work.

Although, I got half of it to work, the other half just gives errors.

Here are the steps I followed:

- SQL Query > Added new database information as required by original post in this thread.
- opened myadopts.php, replaced $aid information with longer information after the kill area in the script
- overwriten remove query with 2 lines as per post.
- added abandon information at the end of the functions.php script
- added ashowingtitle and ashowing to language file.
- uploaded by abandon.php file and doadobtab.php to the folder

Tested it and only half of it worked.

See, when you this is all installed, you go to kill your pet, and then you choose yes.

Your pet is then sent to the abandon.php area. Which the abandoned pet does show up, but it only shows the picture of the pet and not any details about the pet.

When you click on the pet in the abandon pet to adopt, it asks if you want to rename the pet, and to put in a name in the box field under the image... However, there is NO box field for name input. That is missing.

When you go to click adopt me, it gives a congratulations screen, but all the links are wrong and it gives errors whenever you click on any link on the congratulations page for adopting and abandoned pet.

For example:

On the congratulations screen for adopting a pet, you might see :

Original pets name Adopted successfully

click here to manage this pet

But, when you click to manage your new pet, it just leads to a link :

http://www.yourwebsite.com/pets/myadopts.php?act=manage&id=

Then if you do click on that, it will come up with a page error:

Invalid Adoptable ID Specified

The ID specified does not match any adoptable in our system. Sorry. If you wish, you can adopt a pet.

Lastly, the abandoned pet does not show up in the "myadopts" page, so now, the pet is gone forever.

So... what did I do wrong? Is there someone that actually got this script to work and if they did, could you please PM me or respond back this post with the steps that you took to get it to work.

Thanks
 
ditto! :D :D


This could likely be modified to be used as a way to send pets to a "for sale" section!

I'd love to hear from someone who has it working too, so we know how to use it as well?
 
Figured it out myself, and this is one really great mod!!

It's basically a problem of the rows, the way they are aligned, and making sure $gender comes before date:

here's what I have now in my adopts for "kill"

Code:
$aid=@mysql_result($result,$i,"aid"); //The adoptable's ID
$currentlevel=@mysql_result($result,$i,"currentlevel");
$type=@mysql_result($result,$i,"type");
$owner=@mysql_result($result,$i,"owner");
$name=@mysql_result($result,$i,"name");
$totalclicks=@mysql_result($result,$i,"totalclicks");
$isfrozen=@mysql_result($result,$i,"isfrozen");
$code=@mysql_result($result,$i,"code");
$usealternates=@mysql_result($result,$i,"usealternates");
$tradestatus=@mysql_result($result,$i,"tradestatus");
$gender=@mysql_result($result,$i,"gender");
$date=@mysql_result($result,$i,"date");
$lastbedtime=@mysql_result($result,$i,"lastbredtime");
$mother=@mysql_result($result,$i,"mother");
$father=@mysql_result($result,$i,"father");


and then:

Code:
// Actually run the execution



mysql_query("INSERT INTO ".$prefix."sales VALUES ('$aid', '$type', '$name','$owner', '$currentlevel', '$totalclicks', '$code', '', '$usealternates', '$tradestatus', '$isfrozen', '$gender', '$date','$lastbredtime', '$mother', '$father')");
mysql_query("DELETE FROM ".$prefix."owned_adoptables WHERE aid='$id' and owner='$loggedinname'");
 
mysql_query($query);



I am using Arianna's breeding system and so I have a few extras at the end. The main thing is be sure that gender is indicated on everything BEFORE the date! Otherwise it's all out of whack!

Just do this for everything, and be sure to add the gender field in the actual new table too ( I think I had to add it in ) - make sure it's in the right order too!

This works for me now, and just go through anything pertaining to this output and insertion, make sure all your ducks are in the right row, lol.

****Oh, and please note I am using the word SALES as opposed to ABANDONED for my Table --- just use whatever you like I guess, but for you at first that will be Adopts_Abandoned!
 
To have it show more stuff before you finalize the adoption or sale, find this in abandon.php:

Code:
$article_content = $article_content."<br><img src='".$eggimage."' border='0'><br>
<b>Gender: </b>".$gender."<br>


replace with ( your own additional listings )


Code:
$article_content = $article_content."<br><img src='".$eggimage."' border='0'><br>
<b>Gender: </b>".$gender."<br>
<b>Name: </b>".$name."<br>
<b>Status: </b>".$totalclicks."<br>
<b>Price: </b>".$price."<br>
 
bokkun said:
then find
INSERT INTO ".$prefix."abandoned VALUES ('$aid', '$type', '$name','$owner', '$currentlevel', '$totalclicks', '$code', '', '$usealternates', '$tradestatus', '$isfrozen', '$date')");
replace with
mysql_query("INSERT INTO ".$prefix."abandoned VALUES ('$aid', '$type', '$name','$owner', '$currentlevel', '$totalclicks', '$code', '', '$usealternates', '$tradestatus', '$isfrozen', '$date','$gender')");

you forgot to put the apostrophe symbol on $gender which is why some user having trouble finding their adoptables in the abandon.php page
(nothing was inserted to the abandoned table)
 
yes indeed, thanks, I fixed it

Sorry for being off all the time, I don't manage an adoptable site, so only when I remember about it I come to visit this site...

@redheadturkey: It's true, if you had the gender mod earlier than this mod, $gender and $date are at the wrong place
I added the gender mod later...

@gensuperman: I'm sorry but I think it's something you saw over, I can't see the problem in my code...
However you are right with the fact that only the image shows up, I removed the extra info on my adopt.php page
and the abandon.php is a modified version of that.
try to find out how to add it back again or I'll explain later... Sorry

Also gensuperman, it's the text defined in lang.php, I saw over it
add in your lang.php under wherever you put $ashowingtitle and $ashowing this
$alanga1 = "You are adopting ";
$alanga2 = ". <br>When you're ready to adopt this Adoptable, click on the <i>Adopt Me</i> button below.";

go to abandon.php and look for $langa1 and $langa2 and change them into $alanga1 and $alanga2

for the rest, recheck the code and correct me if I made another mistake, I will try fix it...
 
Well yeah, it is not really hard to integrate this with gender system, the only issue is with the structure of own_adoptable table, which can be easily modified.
 

Similar threads

Users who are viewing this thread

  • Forum Contains New Posts
  • Forum Contains No New Posts

Forum statistics

Threads
4,277
Messages
33,122
Members
1,602
Latest member
BerrieMilk
BETA

Latest Threads

Latest Posts

Top