Thread: Abandon system
View Single Post
  #9  
Old 12-27-2009, 08:25 PM
anjwalker anjwalker is offline
Member
 
Join Date: Dec 2009
Posts: 1
Credits: 227
anjwalker
Default RE: Abandon system

it is but you have to add the extra stuff at the end
Quote:
This script is not compatible with a gender mod
if you use one a few additions will have to be made:
find in abandon.php

PHP Code:

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");
$date=date('Y-m-d');
$eggimage = getabandonedimage($aid);
add at the end
$gender=@mysql_result($result,$i,"gender");

to show the gender:
go a little down till you see $article_content = $article_content."<br><img src='".$eggimage."' border='0'><br>
add between that and <form name='form1' method='get' action='doadoptab.php'> this:
<b>Gender: </b>".$gender."<br>
That shows the gender to people who will get there abandoned pet
next (more importantly) go to adoptab.php
find
mysql_query("INSERT INTO ".$prefix."owned_adoptables VALUES ('', '$type', '$name','$loggedinname','$currentlevel','$totalcli cks', '$code', '','$usealternates','$tradestatus','$isfrozen')");
replace with
mysql_query("INSERT INTO ".$prefix."owned_adoptables VALUES ('', '$type', '$name','$loggedinname','$currentlevel','$totalcli cks', '$code', '','$usealternates','$tradestatus','$isfrozen','$g ender')");

find a bit above $eggimage=getabandonedimage($aid);
and add again
$gender=@mysql_result($result,$i,"gender");
that should do it for that file.
but we aren't done

in the code above(in file myadopts.php) you'll see
$date=time('U');
add $gender=@mysql_result($result,$i,"gender");
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)");

well that looks good, but it won't work if you don't add in the table adopts_abandoned a new field gender (with the same options as the gender field from the owned_adoptables)
Reply With Quote