Mysidia Adoptables Support Forum  

Home Community Mys-Script Creative Off-Topic
Go Back   Mysidia Adoptables Support Forum > Community Board > Mysidia Adoptables Official Announcement

Notices

Closed Thread
 
Thread Tools Display Modes
  #61  
Old 12-12-2012, 02:19 PM
Hall of Famer's Avatar
Hall of Famer Hall of Famer is offline
Administrator, Lead Coder
 
Join Date: Dec 2008
Location: South Brunswick
Posts: 4,448
Gender: Male
Credits: 333,656
Hall of Famer is on a distinguished road
Default

Well I just dont understand what you are trying to do actually. Do you just wish to incorporate the adoptables shop into your site? If so, you just need the following script files: class_adoptshop.php, class_itemshop.php, shop.php and maybe some files from ACP. You do not even need to play with the class_input.php at all, unless you want a full upgrade.
__________________


Mysidia Adoptables, a free and ever-improving script for aspiring adoptables/pets site.
  #62  
Old 12-12-2012, 02:27 PM
SilverDragonTears's Avatar
SilverDragonTears SilverDragonTears is offline
I am your Nemesis.
 
Join Date: Jun 2011
Posts: 1,113
Gender: Female
Credits: 82,366
SilverDragonTears is on a distinguished road
Default

oh hmmmm, well I have all those files and I'm still getting errors.

I removed require init.php and get this:

EDIT: Wrong warning...
Fatal error: Call to a member function getstatus() on a non-object in /home/taleofdr/public_html/shoptest.php on line 7
__________________

Check out SilvaTales
  #63  
Old 12-12-2012, 02:40 PM
Hall of Famer's Avatar
Hall of Famer Hall of Famer is offline
Administrator, Lead Coder
 
Join Date: Dec 2008
Location: South Brunswick
Posts: 4,448
Gender: Male
Credits: 333,656
Hall of Famer is on a distinguished road
Default

umm what does your shoptest.php file look like?
__________________


Mysidia Adoptables, a free and ever-improving script for aspiring adoptables/pets site.
  #64  
Old 12-12-2012, 02:41 PM
SilverDragonTears's Avatar
SilverDragonTears SilverDragonTears is offline
I am your Nemesis.
 
Join Date: Jun 2011
Posts: 1,113
Gender: Female
Credits: 82,366
SilverDragonTears is on a distinguished road
Default

I edited my post with the correct warning, in case you didn't see that.

Code:
<?php


//***************//
//  START SCRIPT //
//***************//
$mysidia->user->getstatus();
if(!$mysidia->user->isloggedin){
   // The user is not logged in, show generic login error message
   $mysidia->displayerror("guest");
}
else
if($mysidia->user->status->canshop == "no"){
   // The user's permission to browse shops is banned, show error message
   $mysidia->page->settitle($lang->global_guest_title);
   $mysidia->page->addcontent($lang->denied);
}  
elseif(!$mysidia->input->get("shopname")){
   // The user has yet to enter a shop, so we may as well list the shop
   $mysidia->page->settitle($lang->access);
   $mysidia->page->addcontent($lang->type);
   $shoplist = new Shoplist($mysidia->input->post("shoptype"));
   $shoplist->display();
}
elseif(!$mysidia->input->get("itemname") and !$mysidia->input->get("adopttype")){
   // The user has entered a shop but not yet specified the item or adoptables to purchase
   $shoptype = $mysidia->db->select("shops", array("shoptype"), "shopname = '{$mysidia->input->get(shopname)}'")->fetchColumn();
   $shoplist = new Shoplist($shoptype);
   $shop = $shoplist->createshop($mysidia->input->get("shopname"));
   $mysidia->page->settitle($lang->welcome);
   $shop->display();
}
elseif($mysidia->input->get("itemname") and !$mysidia->input->get("adopttype")){
   // The user has specified an item to purchase, let's process this request
   $shop = new Itemshop($mysidia->input->get("shopname"));
   $item = $shop->getitem($mysidia->input->get("itemname"));
   $item->assign($mysidia->user->username);
   $oldquantity = $item->getoldquantity();
   $newquantity = $oldquantity + $mysidia->input->post("quantity");
   
   if(!is_numeric($mysidia->input->post("quantity"))){
      $mysidia->page->settitle($lang->global_action_title);
	  $mysidia->page->addcontent($lang->invalid_quantity);
   }
   elseif($newquantity > $item->cap){
      $mysidia->page->settitle($lang->global_error);
	  $mysidia->page->addcontent($lang->full_quantity);   
   }
   elseif($shop->purchase($item)){
      // The item is purchased successfully, now let's process the request
	  $mysidia->page->addcontent("{$lang->purchase_item}{$item->getcost($shop->salestax)} {$mysidia->settings->cost}");
   }
   else{
      $mysidia->page->settitle($lang->global_error);
	  $mysidia->page->addcontent($lang->money);  
   }   
}
elseif(!$mysidia->input->get("itemname") and $mysidia->input->get("adopttype")){
   // The user has specified an adoptable to purchase, let's process this request
   $shop = new Adoptshop($mysidia->input->get("shopname"));
   $adopt = $shop->getadopt($mysidia->input->get("adopttype"));
   $adopt->assign($mysidia->user->username);
   
   if($shop->purchase($adopt)){
      // The adoptable is purchased successfully, now let'ss process the request
	  $mysidia->page->addcontent("{$lang->purchase_adopt}{$adopt->getcost($shop->salestax)} {$mysidia->settings->cost}");
   }
   else{
      $mysidia->page->settitle($lang->global_error);
	  $mysidia->page->addcontent($lang->money);
   }
}
else{
   // Invalid action specified, show generic error message
   $mysidia->displayerror("action");
}

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

$mysidia->output();

?>
__________________

Check out SilvaTales
  #65  
Old 12-12-2012, 03:43 PM
Hall of Famer's Avatar
Hall of Famer Hall of Famer is offline
Administrator, Lead Coder
 
Join Date: Dec 2008
Location: South Brunswick
Posts: 4,448
Gender: Male
Credits: 333,656
Hall of Famer is on a distinguished road
Default

Well now I am confused, are you using Mys v1.3.2's code now? If your site is still a Mys v1.3.1 site, you need to replace variables beginning with $mysidia by their equivalent Mys v1.3.1 variables. Some examples are given below:

PHP Code:
$mysidia->user->username => $GLOBALS['loggedinname'];
$mysidia->input->get($param) => $_POST[$param];
$mysidia->input->post($param) => $_POST[$param];
$mysidia->page->settitle("") => $article_title "";
$mysidia->page->addcontent("") => $article_content .= "";
$mysidia->user->isloggedin() => $GLOBALS['isloggedin'];
$mysidia->output() => echo showpage($article_title$article_content$template); 
There is no counterpart of $mysidia->user->getstatus() in Mys v1.3.1 though, so you have to get rid of all code associated with them.
__________________


Mysidia Adoptables, a free and ever-improving script for aspiring adoptables/pets site.
  #66  
Old 12-12-2012, 03:51 PM
SilverDragonTears's Avatar
SilverDragonTears SilverDragonTears is offline
I am your Nemesis.
 
Join Date: Jun 2011
Posts: 1,113
Gender: Female
Credits: 82,366
SilverDragonTears is on a distinguished road
Default

I'm not sure I would know what to change everything to :( Sadly I guess I can't use this right now.
__________________

Check out SilvaTales
  #67  
Old 12-12-2012, 04:07 PM
Hall of Famer's Avatar
Hall of Famer Hall of Famer is offline
Administrator, Lead Coder
 
Join Date: Dec 2008
Location: South Brunswick
Posts: 4,448
Gender: Male
Credits: 333,656
Hall of Famer is on a distinguished road
Default

Well... Would you mind starting a new thread in the questions & Support subforum? Id like to see what I can do to help you there, this thread will be reserved for newbies and old members who can upgrade their sites.
__________________


Mysidia Adoptables, a free and ever-improving script for aspiring adoptables/pets site.
  #68  
Old 12-12-2012, 04:16 PM
SilverDragonTears's Avatar
SilverDragonTears SilverDragonTears is offline
I am your Nemesis.
 
Join Date: Jun 2011
Posts: 1,113
Gender: Female
Credits: 82,366
SilverDragonTears is on a distinguished road
Default

Sure thing :)
__________________

Check out SilvaTales
  #69  
Old 12-13-2012, 03:17 PM
AlexC's Avatar
AlexC AlexC is offline
Moderator
 
Join Date: Dec 2009
Location: Canada
Posts: 753
Gender: Unknown/Other
Credits: 67,273
AlexC is an unknown quantity at this point
Default

Er... I've upgraded to the newest version, but I can't seem to access the admin control panel? I logged in, got an error at the top of the page, something about the header being sent twice? I ignored it because it wasn't affecting anything else, but when I went elsewhere in the ACP, it started giving me "you can not access the acp" messages.
__________________
  #70  
Old 12-13-2012, 03:26 PM
Hall of Famer's Avatar
Hall of Famer Hall of Famer is offline
Administrator, Lead Coder
 
Join Date: Dec 2008
Location: South Brunswick
Posts: 4,448
Gender: Male
Credits: 333,656
Hall of Famer is on a distinguished road
Default

umm are you running the site on a PHP 5.3 server? Its strange though, some people do get header being sent twice error, it is one of the problems even I get frequently. In most cases it is because the ACP theme aint loaded successfully.
__________________


Mysidia Adoptables, a free and ever-improving script for aspiring adoptables/pets site.
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
Mysidia Adoptables v1.3.3[Security Release] Hall of Famer Mysidia Adoptables Official Announcement 122 05-18-2013 04:02 PM
Mysidia Adoptables v1.3.0[Security Release] Hall of Famer Mysidia Adoptables Official Announcement 180 04-01-2012 10:16 PM
Mysidia Adoptables v1.2.0[Security Release] Hall of Famer Mysidia Adoptables Official Announcement 21 03-22-2011 04:13 PM
Mysidia Adoptables v1.1.4[Security Release] Hall of Famer Mysidia Adoptables Official Announcement 15 01-28-2011 11:48 AM
Mysidia Adoptables v1.1.3[Security Release] Hall of Famer Mysidia Adoptables Official Announcement 27 01-26-2011 02:59 PM


All times are GMT -5. The time now is 07:55 AM.

Currently Active Users: 9713 (0 members and 9713 guests)
Threads: 4,080, Posts: 32,024, 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