Mysidia Adoptables Support Forum  

Home Community Mys-Script Creative Off-Topic
Go Back   Mysidia Adoptables Support Forum > Mysidia Adoptables > Addons and Modifications > Mys v1.1.x Mods

Notices

Reply
 
Thread Tools Display Modes
  #11  
Old 03-22-2011, 05:22 PM
fadillzzz fadillzzz is offline
Dev Staff
 
Join Date: Jan 2010
Posts: 501
Gender: Male
Credits: 37,727
fadillzzz is an unknown quantity at this point
Default

I don't know much about this mod but this should work

PHP Code:
<?php

include("inc/functions.php");

//***************//
//  START SCRIPT //
//***************//

$article_title "Your Inventory";

if (
$isloggedin == "yes") {
$article_content "Here you can see a list of items that you have collected.<table width='500' border='2'>
<tr>
    <td width='200'><strong>Picture:</strong></td>
    <td width='230'><strong>Item Type: </strong></td>
    <td width='70'><strong>ID Number:</strong></td>
</tr>"
;
 
$query "SELECT * FROM ".$prefix."useritems WHERE Owner = '$loggedinname'";
$result mysql_query($query);
$num mysql_numrows($result);

$i=0;
while (
$i $num) {

$iid=@mysql_result($result,$i,"ID");
$object=@mysql_result($result,$i,"Item");
$url=@mysql_result($result,$i,"imageurl");


$article_content $article_content."<tr>
    <td><center><img src='"
.$url."'></center></td>
    <td><center>"
.$object."</center></td>
    <td><center>"
.$iid."</center></td>
  </tr>"
;

unset(
$iid);
unset(
$object);

$i++;
}
$article_content $article_content."</table>";

}
else {

$article_content "You must be logged in to view items.";

}
//***************//
//  OUTPUT PAGE  //
//***************//

echo showpage($article_title$article_content$date);

?>
Also, make sure the table prefix_useritems exists in the database.
Reply With Quote
  #12  
Old 03-22-2011, 06:05 PM
AlexC's Avatar
AlexC AlexC is offline
Moderator
 
Join Date: Dec 2009
Location: Canada
Posts: 753
Gender: Unknown/Other
Credits: 77,972
AlexC is an unknown quantity at this point
Default

thank you, it worked! :D I did redo the database too, just to be on the safe side, and that may have been it... now, I shall go test an item, thank you so much!

EDIT: Darn, now I'm just having trouble with the item giver thingy. D: Every time I try to test it, it gives me an error.

I'm testing on a random page;

Code:
<?php

include("inc/functions.php");

//***************//
//  START SCRIPT //
//***************//


is ($isloggedin == "yes")
$itemurl = "http://img37.imageshack.us/img37/1815/74598913.png";
mysql_query("INSERT INTO ".$prefix."useritems VALUES ('','$loggedinname','Testing X','$itemurl')");
}
else{
$article_content = $article_content."You must be logged in to receive this item.";
}  


//***************//
//  OUTPUT PAGE  //
//***************//

echo showpage($article_title, $article_content, $date);


?>
http://ratties.x10.mx/item.php

It says;

Parse error: syntax error, unexpected T_VARIABLE in /home/gloometh/public_html/item.php on line 12

Last edited by AlexC; 03-22-2011 at 06:15 PM.
Reply With Quote
  #13  
Old 03-23-2011, 03:21 AM
fadillzzz fadillzzz is offline
Dev Staff
 
Join Date: Jan 2010
Posts: 501
Gender: Male
Credits: 37,727
fadillzzz is an unknown quantity at this point
Default

This should work
PHP Code:
<?php

include("inc/functions.php");

//***************//
//  START SCRIPT //
//***************//


if ($isloggedin == "yes") {
$itemurl "http://img37.imageshack.us/img37/1815/74598913.png";
mysql_query("INSERT INTO ".$prefix."useritems VALUES ('','$loggedinname','Testing X','$itemurl')");
}
else{
$article_content $article_content."You must be logged in to receive this item.";
}  


//***************//
//  OUTPUT PAGE  //
//***************//

echo showpage($article_title$article_content$date);


?>
I don't think there's such a thing as 'is' function in PHP. It should be 'if'
And you forgot an opening curly bracket after the ($isloggedin == "yes")
Reply With Quote
  #14  
Old 03-23-2011, 08:27 AM
AlexC's Avatar
AlexC AlexC is offline
Moderator
 
Join Date: Dec 2009
Location: Canada
Posts: 753
Gender: Unknown/Other
Credits: 77,972
AlexC is an unknown quantity at this point
Default

well, that did work, except that the image or the name aren't showing up. The page I tested it on was blank, but blank items are showing up in my inventory. It doesn't show an image or a name, but it shows the id.

I'm sorry for all of the trouble with this... D:
Reply With Quote
  #15  
Old 03-23-2011, 10:31 AM
fadillzzz fadillzzz is offline
Dev Staff
 
Join Date: Jan 2010
Posts: 501
Gender: Male
Credits: 37,727
fadillzzz is an unknown quantity at this point
Default

Quote:
Originally Posted by Gloometh View Post
well, that did work, except that the image or the name aren't showing up. The page I tested it on was blank, but blank items are showing up in my inventory. It doesn't show an image or a name, but it shows the id.

I'm sorry for all of the trouble with this... D:
You mean the page where users can get items is blank? Obviously, it's because the $article_content isn't defined anywhere on that page.
For the images & names that aren't showing up, it's probably because a mismatch between the column name in the table and the selected column while fetching data from the database.
Reply With Quote
  #16  
Old 03-23-2011, 10:48 AM
AlexC's Avatar
AlexC AlexC is offline
Moderator
 
Join Date: Dec 2009
Location: Canada
Posts: 753
Gender: Unknown/Other
Credits: 77,972
AlexC is an unknown quantity at this point
Default

Alright, I shall look into it later.

Sorry for the stupidity, my rat had a stroke this morning and ive been freaking out.

EDIT: I got it all worked out, thank you very, very much for your help!

Last edited by AlexC; 03-23-2011 at 11:37 AM.
Reply With Quote
  #17  
Old 03-25-2011, 04:18 PM
The Codfin Keeper's Avatar
The Codfin Keeper The Codfin Keeper is offline
A Codfin draws near!
 
Join Date: Jan 2011
Location: Either CT or the Slug's house
Posts: 91
Gender: Male
Credits: 13,500
The Codfin Keeper is on a distinguished road
Default

If there is a problem with Mys 1.2.0 compatibility, please tell me. I want to make this available to all users. :D

Sorry about your rat, Gloometh. D:
__________________

Yacker
Quote:
Originally Posted by Mankey Pokemon Card when another one is on top of it
([33) Ka\______
Does 40 damage\___
counter on Mankey. \______
Reply With Quote
  #18  
Old 03-25-2011, 04:21 PM
AlexC's Avatar
AlexC AlexC is offline
Moderator
 
Join Date: Dec 2009
Location: Canada
Posts: 753
Gender: Unknown/Other
Credits: 77,972
AlexC is an unknown quantity at this point
Default

The only problem I'm having now is that the name isn't showing up for some reason. The rest seems to be working fine.

Thanks - she's not getting much better, I think it's her last few days...
Reply With Quote
Reply


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
Blank Inventory Page ilrak Questions and Supports 5 09-23-2014 10:03 PM
Simple adopts superdude44 Adoptables Buzz 2 06-03-2013 06:09 PM
limited inventory idea schepers12 Suggestions and Feature Requests 3 05-19-2013 06:28 PM
Simple Feature Abronsyth Suggestions and Feature Requests 3 03-31-2013 09:48 AM
Simple adopts superdude44 Adoptables Sites Showcase 7 05-01-2012 10:49 PM


All times are GMT -5. The time now is 08:34 AM.

Currently Active Users: 749 (0 members and 749 guests)
Threads: 4,081, Posts: 32,031, 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