Home Community Mys-Script Creative Off-Topic |
|
|
Thread Tools | Display Modes |
#61
|
||||
|
||||
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
|
||||
|
||||
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 |
#63
|
||||
|
||||
umm what does your shoptest.php file look like?
__________________
Mysidia Adoptables, a free and ever-improving script for aspiring adoptables/pets site. |
#64
|
||||
|
||||
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(); ?> |
#65
|
||||
|
||||
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 Adoptables, a free and ever-improving script for aspiring adoptables/pets site. |
#66
|
||||
|
||||
I'm not sure I would know what to change everything to :( Sadly I guess I can't use this right now.
|
#67
|
||||
|
||||
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
|
||||
|
||||
Sure thing :)
|
#69
|
||||
|
||||
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
|
||||
|
||||
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. |
|
|
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 |
What's New? |
What's Hot? |
What's Popular? |