Mysidia Adoptables Support Forum

Mysidia Adoptables Support Forum (http://www.mysidiaadoptables.com/forum/index.php)
-   Addons/Mods Graveyard (http://www.mysidiaadoptables.com/forum/forumdisplay.php?f=41)
-   -   Currency for leveling up / Adoptable shop (Fixed again) (http://www.mysidiaadoptables.com/forum/showthread.php?t=561)

mattalien 04-03-2009 10:20 AM

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?

kisazeky 04-03-2009 01:35 PM

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 Code:

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 Code:

$article_content stripslashes($article_content); 

Right below it, put this in:

PHP Code:

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



densaugeo 04-03-2009 01:51 PM

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!

kisazeky 04-03-2009 02:05 PM

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. :)

mattalien 04-03-2009 03:14 PM

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

Originally Posted by kisazeky
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 Code:

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 Code:

$article_content stripslashes($article_content); 

Right below it, put this in:

PHP Code:

$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!

:)

Ashje 04-03-2009 04:12 PM

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

Originally Posted by Ashje
Quote:

Originally Posted by densaugeo
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.

Quote:

Originally Posted by kisazeky
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.

Killgore 04-03-2009 04:23 PM

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

kisazeky 04-03-2009 07:31 PM

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

Originally Posted by Ashje
Quote:

Originally Posted by Ashje
Quote:

Originally Posted by densaugeo
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.

Quote:

Originally Posted by kisazeky
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.

Blue Icebox 04-03-2009 10:41 PM

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

Ashje 04-04-2009 04:59 PM

RE: Currency for leveling up / Adoptable shop (Updated levelup.php with generic message)
 
Got it. You forgot to add this:
PHP Code:

$memberlevel=@mysql_result($result,$i,"memberlevel"); 

to the mysql results.


All times are GMT -5. The time now is 08:37 PM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.