INSERT INTO adoptables VALUES ('', 'name','level 0 image','shop','cost','kind')
$query = "SELECT * FROM adoptables WHERE kind = 'egg' LIMIT 0,5";
$query = "SELECT * FROM adoptables"
$query = "SELECT * FROM adoptables WHERE kind = 'adoptable'";
densaugeo said:I still don't get how to add a pet to the shop Heh, i've looked over the files..but I'm not sure what to change or add...
kisazeky said:Ok, with the update, there is now no need to add new columns. It adds "shop" to the "memberlevel" column and the cost to the "description" table.
Also this is a more secure buying method so people cannot get them for free.
INSERT INTO adoptables VALUES ('', 'name','level 0 image','shop_platinum','cost')
$article_content = stripslashes($article_content);
$article_content=$article_content."<p>Platinum Coin Frames";
$query = "SELECT * FROM adoptables WHERE memberlevel = 'shop_platinum'";
$result = mysql_query($query);
$num = mysql_numrows($result);
//Loop out code
$i=0;
while ($i < $num) {
$aID=@mysql_result($result,$i,"uid");
$name=@mysql_result($result,$i,"name");
$imageurl=@mysql_result($result,$i,"imageurl");
$cost=@mysql_result($result,$i,"description");
//Begin our content output...
$article_content=$article_content."<p>".$name."<p><img src='".$imageurl."' /><p>".$cost." <p><a href='buy.php?aID=".$aID."'>Buy ".$name."</a>";
$i++;
}
kisazeky said:Easy, mattalien.
First of all, insert the adoptables you want in this section using this query. Replace shop with something different like shop_platinum.
PHP:INSERT INTO adoptables VALUES ('', 'name','level 0 image','shop_platinum','cost')
Don't forget to add the rank images.
Then edit shop.php and find this line:
PHP:$article_content = stripslashes($article_content);
Right below it, put this in:
PHP:$article_content=$article_content."<p>Platinum Coin Frames"; $query = "SELECT * FROM adoptables WHERE memberlevel = 'shop_platinum'"; $result = mysql_query($query); $num = mysql_numrows($result); //Loop out code $i=0; while ($i < $num) { $aID=@mysql_result($result,$i,"uid"); $name=@mysql_result($result,$i,"name"); $imageurl=@mysql_result($result,$i,"imageurl"); $cost=@mysql_result($result,$i,"description"); //Begin our content output... $article_content=$article_content."<p>".$name."<p><img src='".$imageurl."' /><p>".$cost." <p><a href='buy.php?aID=".$aID."'>Buy ".$name."</a>"; $i++; }
Ashje said:densaugeo said:I still don't get how to add a pet to the shop Heh, i've looked over the files..but I'm not sure what to change or add...
Don't add or change anything. Just run the SQL Queries in Post 43.
kisazeky said:Ok, with the update, there is now no need to add new columns. It adds "shop" to the "memberlevel" column and the cost to the "description" table.
Also this is a more secure buying method so people cannot get them for free.
How is it safer? It is much easier to add a kind column with the old one. Anyways, thanks for the buyconfirm. =)
EDIT:
buyconfirm doesn't work, the new shop file doesn't work (it screws up the template and when you buy something, nothing appears on the page...
<center><table border='2' bordercolor='#3d3d3d' cellpadding='5' cellspacing='1'>
<tr>
<td bgcolor='#575757'><p><font face='Verdana' size='1' color='ffffff'><center>".$name."<p><img src='".$imageurl."' /><p>".$cost."<p><a href='buy.php?aID=".aID."'>Buy a ".$name."!</a></td>
<td bgcolor='#575757'><p><font face='Verdana' size='1' color='ffffff'><center>".$name."<p><img src='".$imageurl."' /><p>".$cost."<p><a href='buy.php?aID=".aID."'>Buy a ".$name."!</a></td>
<td bgcolor='#575757'><p><font face='Verdana' size='1' color='ffffff'><center>".$name."<p><img src='".$imageurl."' /><p>".$cost."<p><a href='buy.php?aID=".aID."'>Buy a ".$name."!</a></td>
</tr>
<tr>
<td bgcolor='#575757'><p><font face='Verdana' size='1' color='ffffff'><center>".$name."<p><img src='".$imageurl."' /><p>".$cost."<p><a href='buy.php?aID=".aID."'>Buy a ".$name."!</a></td>
<td></td>
<td bgcolor='#575757'><p><font face='Verdana' size='1' color='ffffff'><center>".$name."<p><img src='".$imageurl."' /><p>".$cost."<p><a href='buy.php?aID=".aID."'>Buy a ".$name."!</a></td>
</tr>
</table></center>
Ashje said:Ashje said:densaugeo said:I still don't get how to add a pet to the shop Heh, i've looked over the files..but I'm not sure what to change or add...
Don't add or change anything. Just run the SQL Queries in Post 43.
kisazeky said:Ok, with the update, there is now no need to add new columns. It adds "shop" to the "memberlevel" column and the cost to the "description" table.
Also this is a more secure buying method so people cannot get them for free.
How is it safer? It is much easier to add a kind column with the old one. Anyways, thanks for the buyconfirm. =)
EDIT:
buyconfirm doesn't work, the new shop file doesn't work (it screws up the template and when you buy something, nothing appears on the page...
EDIT: The stealing thing doesn't work either, it just prevents any user adopting the main adoptables, not in the shop.