Mysidia Adoptables Support Forum  

Home Community Mys-Script Creative Off-Topic
Go Back   Mysidia Adoptables Support Forum > Mysidia Adoptables > Addons and Modifications > Addons/Mods Graveyard

Notices

Closed Thread
 
Thread Tools Display Modes
  #31  
Old 03-31-2009, 09:33 AM
gjac1 gjac1 is offline
Member
 
Join Date: Feb 2009
Posts: 101
Credits: 11,723
gjac1
Default 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 :(
  #32  
Old 03-31-2009, 10:09 AM
Genkigami Genkigami is offline
Member
 
Join Date: Mar 2009
Posts: 15
Credits: 2,334
Genkigami
Default RE: Currency for leveling up and adoptable shop [Beta]

What pages do you add the script to? "etc" is a little vague.
__________________

Click Sora-kun to level her up and join Living Fossil Adoptions! Only possible through the EasyAdoptables script :D
  #33  
Old 03-31-2009, 10:39 AM
gjac1 gjac1 is offline
Member
 
Join Date: Feb 2009
Posts: 101
Credits: 11,723
gjac1
Default 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
  #34  
Old 03-31-2009, 11:34 AM
Tequila's Avatar
Tequila Tequila is offline
The Grim One
 
Join Date: Jan 2009
Location: Souther Tier, New York State
Posts: 1,356
Gender: Female
Credits: 109,276
Tequila is on a distinguished road
Default 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
So just in case here is the file in question:
PHP Code:
<?php

// Easy Adoptables Script by Brandon Rusnak
// Get our includes out of the way

include("inc/functions.php");
include(
"inc/config.php");
include(
"inc/settings.php");
include(
"inc/nbbc.php");  // BBCODE Parser
$bbcode = new BBCode;

// Connect to our database

$conn mysql_connect($dbhost$dbuser$dbpass) or die ('Error connecting to mysql database!');
mysql_select_db($dbname);


//Set up our login info...
$username "";
$password "";

//Check for cookie

if (isset($_COOKIE['adoptu']) and isset($_COOKIE['adoptp'])){

$username $_COOKIE['adoptu'];
$password $_COOKIE['adoptp'];

$username preg_replace("/[^a-zA-Z0-9\\040.]/"""$username);
$password preg_replace("/[^a-zA-Z0-9s]/"""$password);

//Run login operation
$query "SELECT * FROM users WHERE username = '$username'";
$result mysql_query($query);
$num mysql_numrows($result);

//Loop out code
$i=0;
while (
$i 1) {

$luser=@mysql_result($result,$i,"username");
$lpass=@mysql_result($result,$i,"password");

$i++;
}

    if(
$username == $luser and $password == $lpass){
        
$isloggedin "yes";
    }
    else{
    if (isset(
$_COOKIE['adoptu'])){
    
$past time() - 10
    
setcookie("adoptu",$username,$past);
    }

    if (isset(
$_COOKIE['adoptp'])){
    
$past time() - 10
    
setcookie("adoptp",$password,$past);
    }
    
$isloggedin "no";
    }

}
else
{
//User is not logged in
$isloggedin "no";




// Define our Template File

$file $current_theme;



// Get our content for the index page

$query "SELECT * FROM article_content WHERE page = 'tos'";
$result mysql_query($query);
$num mysql_numrows($result);

//Loop out code
$i=0;
while (
$i 1) {

$article_title=mysql_result($result,$i,"title");
$article_date=mysql_result($result,$i,"date");
$article_content=mysql_result($result,$i,"content");

$i++;
}

$article_title stripslashes($article_title);
$article_content stripslashes($article_content);

$article_content $bbcode->Parse($article_content);

// Run the BBCODE parser on the content

// Should we show the extra pages in the nav bar?

$link1 "";
if(
$show_extra_page1 == "yes"){
$link1 "<li><a href='$extra_page1_link'>$extra_page1_name<span class='tab-l'></span><span class='tab-r'></span></a></li>"
}

$link2 "";
if(
$show_extra_page2 == "yes"){
$link2 "<li><a href='$extra_page2_link'>$extra_page2_name<span class='tab-l'></span><span class='tab-r'></span></a></li>"
}

// Do the template changes and echo the ready template

$template file_get_contents($file);
$template replace(':SITETITLE:',$site_title,$template);
$template replace(':SITENAME:',$site_name,$template);
$template replace(':ARTICLETITLE:',$article_title,$template);
$template replace(':ARTICLEDATE:',$article_date,$template);
$template replace(':ARTICLECONTENT:',$article_content,$template);
$template replace(':LINK1:',$link1,$template);
$template replace(':LINK2:',$link2,$template);
$template replace(':LINK3:',$link3,$template);

//Get the featured adoptable...
$featured getfeatured();
$template replace(':FEATURED:',$featured,$template);

//Ad Management
$header = @file_get_contents("ads/header.txt");
$footer = @file_get_contents("ads/footer.txt");
$tower = @file_get_contents("ads/tower.txt");

$header stripslashes($header);
$footer stripslashes($footer);
$tower stripslashes($tower);

$template replace(':HEADERAD:',$header,$template);
$template replace(':FOOTERAD:',$footer,$template);
$template replace(':TOWERAD:',$tower,$template);


//Is the user logged in?
//$isloggedin = "no";
$query "SELECT * FROM `users` WHERE `username` = '".$luser."'";
$result mysql_query($query);
$num mysql_numrows($result);
$i=0;
    while (
$i 1) {
    
    
$money =@mysql_result($result,$i,"money");
    
$i++;
            }
$template replace(':WELCOMEORREGISTER:','',$template);
$template replace(':LOGINORACCT:''<p>Welcome, '.$username.'
<p><img src="http://i634.photobucket.com/albums/uu61/familiarelementspets/gold.png"/> '
.$money.'
<p><a href="logout.php">Log out</a>' 
,$template);
}
else{

//User is not logged in
$template replace(':WELCOMEORREGISTER:','<u>Member Login:</u>',$template);
$loginform "<form name='form1' method='post' action='login.php'>
  <p>Username: 
    <input name='username' type='text' id='username'>
</p>
  <p>Password: 
    <input name='password' type='password' id='password'>
</p>
  <p>
    <input type='submit' name='Submit' value='Submit'>
  </p>
  <p>Don't have an account?<br>
  <a href='register.php'>Register Free</a>  </p>
</form>
"
;
$template replace(':LOGINORACCT:'$loginform ,$template);
}

echo 
$template;
?>
  #35  
Old 03-31-2009, 12:16 PM
gjac1 gjac1 is offline
Member
 
Join Date: Feb 2009
Posts: 101
Credits: 11,723
gjac1
Default 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 ??
  #36  
Old 03-31-2009, 12:51 PM
Tequila's Avatar
Tequila Tequila is offline
The Grim One
 
Join Date: Jan 2009
Location: Souther Tier, New York State
Posts: 1,356
Gender: Female
Credits: 109,276
Tequila is on a distinguished road
Default RE: Currency for leveling up and adoptable shop [Beta]

Quote:
Originally Posted by gjac1
enddayne, have you managed to get the currency adoptables to appear in the shop and available only to those with enough credits ??
Not yet. I'm getting errors on site. My tos page is one of them.
  #37  
Old 03-31-2009, 01:23 PM
gjac1 gjac1 is offline
Member
 
Join Date: Feb 2009
Posts: 101
Credits: 11,723
gjac1
Default RE: Currency for leveling up and adoptable shop [Beta]

Ok thanks :)

I too am getting errors, i listed them just above your post..... :(
  #38  
Old 03-31-2009, 06:22 PM
densaugeo densaugeo is offline
Member
 
Join Date: Mar 2009
Posts: 39
Credits: 5,332
densaugeo
Default 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
  #39  
Old 04-01-2009, 05:20 AM
zhiichiro zhiichiro is offline
Member
 
Join Date: Mar 2009
Posts: 106
Credits: 13,394
zhiichiro
Default RE: Currency for leveling up and adoptable shop [Beta]

Quote:
Originally Posted by densaugeo
sheegarden is cute, but too girly :P

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..
__________________
  #40  
Old 04-01-2009, 09:37 AM
gjac1 gjac1 is offline
Member
 
Join Date: Feb 2009
Posts: 101
Credits: 11,723
gjac1
Default 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");
Closed Thread


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
leveling idea Nemesis Suggestions and Feature Requests 2 01-08-2012 12:23 PM
Shop to buy an adoptable? SilverDragonTears Questions and Supports 8 08-16-2011 02:17 PM
Adoptable shop new version! [UPDATED!] mapleblade Mys v1.1.x Mods 57 08-15-2011 07:50 AM
How to create a a battle system ,shop and currency?? SieghartZeke Questions and Supports 9 11-02-2009 12:15 AM
Pets Not leveling up Seapyramid Questions and Supports 4 02-02-2009 05:03 PM


All times are GMT -5. The time now is 12:09 AM.

Currently Active Users: 835 (0 members and 835 guests)
Threads: 4,081, Posts: 32,029, Members: 2,016
Welcome to our newest members, jolob.
BETA





What's New?

What's Hot?

What's Popular?


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
vBCommerce I v2.0.0 Gold ©2010, PixelFX Studios
vBCredits I v2.0.0 Gold ©2010, PixelFX Studios
Emoticons by darkmoon3636