Currency for leveling up / Adoptable shop (Fixed again)

Forum
Last Post
Threads / Messages
Status
Not open for further replies.
RE: Currency for leveling up and adoptable shop [Beta]

Im getting the same error as well, It has to be because of the 'egg' part.
 
RE: Currency for leveling up and adoptable shop [Beta]

i think a "kind" and "cost" row has to be added to the adoptables table......
 
RE: Currency for leveling up and adoptable shop [Beta]

yeah, i'll try it.

EDIT: YES! I did it! you have to add a 'kind' column to the table 'adoptables'. then when you add the adoptable, you use this query:

Code:
INSERT INTO adoptables VALUES ('', 'name','level 0 image','shop','cost','kind')

then go to the shop.php file, and find this:

Code:
$query = "SELECT * FROM adoptables WHERE kind = 'egg' LIMIT 0,5";

change the 'egg' bit to what ever you put in the 'kind' bit of the query. :)

The adoptable still appears in the adoption page, but i will look and try to fix this.

NEW EDIT: Fixed that too! in the database, go to the 'adoptables' table, and in the adoptables you want in the offcial adoption place, set their kind to something like, 'adoptable'.

then, in adopt.php, find this line:

Code:
$query = "SELECT * FROM adoptables"

and change it to this:

Code:
$query = "SELECT * FROM adoptables WHERE kind = 'adoptable'";

change the 'adoptable' to whatever you set in the 'kind' area for the official adoptables.

:)
 
RE: Currency for leveling up and adoptable shop [Beta]

Thats what i did too, and changed the "egg" to "shop" and the "full" to "shop2"

The creator of this mod must have forgotten to post the bit about adding the new rows to the adoptables table as well....
 
RE: Currency for leveling up and adoptable shop [Beta]

Erm... How exactly do you add the column?
 
RE: Currency for leveling up and adoptable shop [Beta]

@ rosepose:

Click here:
kind1.jpg

Then fill it in like this:
kind2.png

And click Save.

Thanks mattalien, everything works perfectly now. =)
 
RE: Currency for leveling up and adoptable shop [Updated] [Beta]

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.
 
RE: Currency for leveling up and adoptable shop [Updated] [Beta]

I still don't get how to add a pet to the shop :p Heh, i've looked over the files..but I'm not sure what to change or add...
 
RE: Currency for leveling up and adoptable shop [Updated] [Beta]

we now have the shop.. thanks

visit : fresbopet.netau.net to see
 
RE: Currency for leveling up and adoptable shop [Updated] [Beta]

densaugeo said:
I still don't get how to add a pet to the shop :p 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...
 
RE: Currency for leveling up and adoptable shop [Updated] [Beta]

Can i just ask, how can I add a new section to the shop?

e.g. I have the one heading that says "Gold Coin Frames", and I would like another one saying "Platinum Coin Frames" underneath.

How do I do this?
 
RE: Currency for leveling up and adoptable shop [Updated] [Beta]

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++;
}
 
RE: Currency for leveling up and adoptable shop [Updated] [Beta]

I ended up having to add a kind row anyway :p With the memberlevel one, no matter what i put the adoptable's level at, anyone could still get it. and that was the problem i was having XD but i fixed it with adding a 'kind' to it. so it's all good now :D Thank you!
 
RE: Currency for leveling up / Adoptable shop (NEW: Prevent stealing!)

Densaugeo, I've added an anti-theft code to the adopt page, so no one can adopt these shop creatures through the adopt page. :)
 
RE: Currency for leveling up / Adoptable shop (NEW: Prevent stealing!)

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++;
}

Thanks! You are the best, apart from BMR77!

:)
 
RE: Currency for leveling up / Adoptable shop (NEW: Prevent stealing!)

Ashje said:
densaugeo said:
I still don't get how to add a pet to the shop :p 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.
 
RE: Currency for leveling up / Adoptable shop (NEW: Prevent stealing!)

Is there any way i could set the adoptables in a table that would look like this:
Code:
<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>
Unfortunately, it repeats, and makes 5 tables all in the order i want, but all 5 cells have the same adoptable and each table displays a different adoptable. In case I'm talking gibberish, here's what i mean: http://sylonia.comyr.com/adoptables/shop.php
 
RE: Currency for leveling up / Adoptable shop (NEW: Prevent stealing!)

Ashje said:
Ashje said:
densaugeo said:
I still don't get how to add a pet to the shop :p 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.

Your shop adoptables need to have something other than free in their memberlevel column. Put shop in memberlevel.
 
RE: Currency for leveling up / Adoptable shop (NEW: Prevent stealing!)

OMG this is going to be so helpful on my site! *squeals!*

Thank you sooooooooo much for making this!!! :D
 
RE: Currency for leveling up / Adoptable shop (Updated levelup.php with generic message)

Got it. You forgot to add this:
PHP:
$memberlevel=@mysql_result($result,$i,"memberlevel");
to the mysql results.
 
Status
Not open for further replies.

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

Top