Currency for leveling up / Adoptable shop (Fixed again)
[size=medium]Note with this update! Please, re-run the queries to add the shop adoptables, if you have already installed it. Thanks.[/size]
[size=large]Important!! A way to prevent people stealing shop adoptables![/size] Open adopt.php and find something like this in the code (it won't be exactly like mine): PHP Code:
PHP Code:
[size=large]Earning money on level up [/size] Step 1: Run this here MySQL query to add the money field in your users table: PHP Code:
Download levelup.php and edit it to suit your site. Replace the number 10 with your desired amount of currency per level up. Step 3: This is important if you still want people to be able to register. :P Edit register2.php and find this line: PHP Code:
PHP Code:
Add this.... PHP Code:
PHP Code:
PHP Code:
[size=large] Shop to buy adoptables[/size] Step 1: Download shop.php, buy.php, and buyconfirm.php and upload them to your main folder. Step 2: Add adoptables for sale by running a query like this. Do not change the shop part unless you know what you're doing. PHP Code:
PHP Code:
|
RE: [In Development] Currency for leveling up
Well, using your system of altering the users table will break the user registration system. :P
You would want to also find in register2.php: PHP Code:
PHP Code:
Also, I would change: Code:
ALTER TABLE users Code:
ALTER TABLE users Brandon |
RE: [In Development] Currency for leveling up
So Brandon, would i be able to fuse this with my idea i was working on? If so, how?
|
RE: [In Development] Currency for leveling up
Quote:
|
RE: [In Development] Currency for leveling up
Okay. But there's still the dilemma that there's a chance of getting one out of five colors for each pearl or emerald. I'm guessing I'd need to create a field for each color pearl and emerald?
|
RE: [In Development] Currency for leveling up
PHP Code:
|
RE: [In Development] Currency for leveling up
Does it work right now?
|
RE: [In Development] Currency for leveling up
Yes rosepose, getting currency for leveling up works. Just make sure to include Brandon's amendment or else people can't register anymore. :P
What's in progress still is the shop for buying adoptables with the money. |
RE: [In Development] Currency for leveling up
Could you edit the first post and add Brandon's extra part because I fail at this stuff...Thanks.
|
RE: [In Development] Currency for leveling up
Thanks :) I'll try to add this to SE if the host decides to work ><
|
RE: [In Development] Currency for leveling up
Quote:
|
RE: [In Development] Currency for leveling up
This looks great :3 I've sent you a PM on the SE forums, kisazeky...
|
RE: [In Development] Currency for leveling up
Just a quick question: Where do I put the login message? Because there's text in between the two fields you tell us to paste the code into.
|
RE: [In Development] Currency for leveling up
Quote:
Quote:
|
RE: [In Development] Currency for leveling up
MR, CAN I ASK YOU SOMETHING!!!??
HOW CAN I CHANGE THE "DIGIMON" THING THAT SHOWS WHEN I VISIT A PET?? AND HOW CAN I CHANGE THE CURRENCY?? I THINK IT SAYS "BITS".. I DONT EVEN KNOW WHAT "BITS" MEANS.. |
RE: [In Development] Currency for leveling up
Quote:
|
RE: [In Development] Currency for leveling up
I like it ^^ Thanks ^^ I am going to add it to my site right away!
|
RE: [In Development] Currency for leveling up
This doesn't work. It shows this error: "Parse error: syntax error, unexpected T_ELSE in /home/--------/public_html/index.php on line 160"
It won't show it when you go there now because I reversed Step 3 but if I were to put it in then that error would appear. I followed everything exactly. This is my index.php file: Code:
<?php |
RE: [In Development] Currency for leveling up
Quote:
This is the correct code :) Code:
<?php |
RE: [In Development] Currency for leveling up
I like it but.....I can't put it on....I can't find the right place for it :(
|
RE: [In Development] Currency for leveling up
Quote:
But if I were to put an image code here: Before: Code:
<p>Currency name: '.$money.' Code:
<p><img src='http://i172.photobucket.com/albums/w11/ashje_photo/crystal.png' alt='Twilight Crystal'></a> '.$money.' I want it to say something like: "http://i172.photobucket.com/albums/w...to/crystal.png 2" or "You have 2 http://i172.photobucket.com/albums/w...to/crystal.png Twilight Crystal(s)." |
RE: [In Development] Currency for leveling up
well, this may fix it, but on your code, it says:
[code]<p><img src='http://i172.photobucket.com/albums/w11/ashje_photo/crystal.png' alt='Twilight Crystal'></a> '.$money.' the bolded bit should be </img> ~Mattalien |
RE: [In Development] Currency for leveling up
It still comes up with the same error. Thanks though. =)
|
RE: [In Development] Currency for leveling up
hmmmmm.......strange. I'll keep looking though
|
RE: [In Development] Currency for leveling up
Try this!
Code:
<p><img src=\"http://i172.photobucket.com/albums/w11/ashje_photo/crystal.png\" alt=\"Twilight Crystal\" /> '.$money.' Also, do you want me to untag this as In Development? |
RE: [In Development] Currency for leveling up
^
That appears as "\"Twilight 18" (18 being the number of crystals). Thanks though =) EDIT: Figured it out, it's: Code:
<p><img src="http://i172.photobucket.com/albums/w11/ashje_photo/crystal.png"/> '.$money.' |
RE: [In Development] Currency for leveling up
I put the code in, and am getting errors. Could I be missing anything?
Edit to add code PHP Code:
|
RE: Currency for leveling up and adoptable shop [Beta]
You forgot the ">" at the end of the image code. You also forgot the Quote Marks at the start of the address. It should be:
Code:
<p><img src="http://i634.photobucket.com/albums/uu61/familiarelementspets/gold.png"/>: '.$money.' BTW: Shop looks awesome *first to download - does dance* XD Thanks. EDIT: The shop works fine but I ran the query and the adoptable won't appear. Also, in the first query, what is that first field? It's blank... And at the top of the screen I get " PHP Error Message Warning: mysql_numrows(): supplied argument is not a valid MySQL result resource in /home/---------/public_html/shop.php on line 89 Free Web Hosting " Help please... XD |
RE: Currency for leveling up and adoptable shop [Beta]
Looks great, I'll install this tonight ><
|
RE: Currency for leveling up and adoptable shop [Beta]
Hm, I need to build an items table instead of an adoptables table.
What would I need to change to run the SQL? |
RE: Currency for leveling up and adoptable shop [Beta]
I have followed the instructions, i added a shop adoptable but it doesnt appear in the shop...it appears on the main adopt page and is free to adopt by anyone, but on the shop.php page i get these errors :
Warning: mysql_numrows(): supplied argument is not a valid MySQL result resource in /home/pfusions/public_html/shop.php on line 89 Warning: mysql_numrows(): supplied argument is not a valid MySQL result resource in /home/pfusions/public_html/shop.php on line 111 Warning: mysql_numrows(): supplied argument is not a valid MySQL result resource in /home/pfusions/public_html/shop.php on line 133 please help :( |
RE: Currency for leveling up and adoptable shop [Beta]
What pages do you add the script to? "etc" is a little vague.
|
RE: Currency for leveling up and adoptable shop [Beta]
Is the problem not that there is no extra row added to the created adoptables table ??
I mean, there is a new one added to the users, to say how much they have earned, but there is no extra row to set how much an adoptables costs.... It still only has these tables, but no "cost" row uid name imageurl memberlevel description |
RE: Currency for leveling up and adoptable shop [Beta]
I have run into a new error:
Code:
Parse error: syntax error, unexpected '}' in /home/enddayne/public_html/tos.php on line 159 PHP Code:
|
RE: Currency for leveling up and adoptable shop [Beta]
enddayne, have you managed to get the currency adoptables to appear in the shop and available only to those with enough credits ??
|
RE: Currency for leveling up and adoptable shop [Beta]
Quote:
|
RE: Currency for leveling up and adoptable shop [Beta]
Ok thanks :)
I too am getting errors, i listed them just above your post..... :( |
RE: Currency for leveling up and adoptable shop [Beta]
how do you insert the adoptables into the shop? I mean like..where do I put the lines of code for it? XD I don't wanna screw anything up. I know how to make a custom adoptable, i just don't know how to add it to the shop.[hr]
And I'm also one of those getting the SQL queries at the top of the page, and i haven't edited anything other than the text in your shop code :P http://sheegarden.com/test/shop.php |
RE: Currency for leveling up and adoptable shop [Beta]
Quote:
i have an account there, my username is ZhiichirO.. you can give me rare fairies XD i hope you can create an account on fresbopet.netau.net.. |
RE: Currency for leveling up and adoptable shop [Beta]
This is the part of the shop.php file that seems to be creating the errors :
$query = "SELECT * FROM adoptables WHERE kind = 'egg' LIMIT 0,5"; $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"); |
All times are GMT -5. The time now is 02:19 PM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.