Mysidia Adoptables Support Forum  

Home Community Mys-Script Creative Off-Topic
Go Back   Mysidia Adoptables Support Forum > Community Board > Feedback and Suggestions

Notices

Reply
 
Thread Tools Display Modes
  #1  
Old 12-31-2014, 11:15 AM
IntoRain's Avatar
IntoRain IntoRain is offline
Moderator
 
Join Date: Jul 2013
Location: Portugal
Posts: 461
Gender: Female
Credits: 22,450
IntoRain is on a distinguished road
Default

Your index() function in shopview is broken, repeated code and two while's with no matching ending curly brackets, maybe it doesn't work because of that?
The original seems to work well:

shopview

PHP Code:
        public function index(){ 
        
$document $this->document
        
$document->setTitle($this->lang->access); 
         
        
$typeForm = new Form("shoptypes""shop""post"); 
        
$typeSelection = new DropdownList("shoptype"); 
        
$typeSelection->add(new Option("Itemshop""itemshop")); 
        
$typeSelection->add(new Option("Adoptshop""adoptshop")); 
        
$typeForm->add($typeSelection); 
        
$typeForm->add(new Button("Go""submit""submit")); 
        
$document->add($typeForm); 
         
        
$shopList $this->getField("shopList");  
        
$document->addLangvar($this->lang->select); 
        
$shopTable = new TableBuilder("shoplist"); 
        
$shopTable->setAlign(new Align("center""middle")); 
        
$shopTable->buildHeaders("Image""Category""Type""Name""Description""Sales Tax""Enter");     
        
$shopTable->setHelper(new ShopTableHelper);                 
         
        
$iterator $shopList->iterator(); 
        while(
$iterator->hasNext()){ 
            
$entry $iterator->next(); 
            
$shop $shopList->createshop($entry->getKey()); 
            
$cells = new LinkedList
             
            
$cells->add(new TCell($shopList->getshopimage($shop->imageurl))); 
            
$cells->add(new TCell($shop->category)); 
            
$cells->add(new TCell($shop->shoptype)); 
            
$cells->add(new TCell($shop->shopname)); 
            
$cells->add(new TCell($shop->description)); 
            
$cells->add(new TCell($shopTable->getHelper()->getSalestax($shop->salestax))); 
            
$cells->add(new TCell($shopTable->getHelper()->getShopStatus($shop))); 
            
$shopTable->buildRow($cells); 
        } 
        
$document->add($shopTable);   
    } 
If the original still throws errors:

shop

PHP Code:
public function index(){ 
        
$mysidia Registry::get("mysidia");
        
$hasShop = ($mysidia->input->post("shoptype") != "")? 0;
        
        
$this->setField("hasShop", new Integer($hasShop));
        
        if(
$mysidia->input->post("shoptype") != ""){
            
$shopList = new Shoplist($mysidia->input->post("shoptype"));
            if(
$shopList->gettotal() == 0) throw new InvalidIDException("none");
            
$this->setField("shopList"$shopList);
       } 
shopview

PHP Code:
public function index(){
        
$document $this->document;
        
$document->setTitle($this->lang->access);
        
        
$typeForm = new Form("shoptypes""shop""post");
        
$typeSelection = new DropdownList("shoptype");
        
$typeSelection->add(new Option("Itemshop""itemshop"));
        
$typeSelection->add(new Option("Adoptshop""adoptshop"));
        
$typeForm->add($typeSelection);
        
$typeForm->add(new Button("Go""submit""submit"));
        
$document->add($typeForm);
        
$hasShop $this->getField("hasShop")->getValue(); 
        
        if(
$hasShop){
        
$shopList $this->getField("shopList"); 
        
$document->addLangvar($this->lang->select);
        
$shopTable = new TableBuilder("shoplist");
        
$shopTable->setAlign(new Align("center""middle"));
        
$shopTable->buildHeaders("Image""Category""Type""Name""Description""Sales Tax""Enter");    
        
$shopTable->setHelper(new ShopTableHelper);         
        
        
$iterator $shopList->iterator();
        while(
$iterator->hasNext()){
            
$entry $iterator->next();
            
$shop $shopList->createshop($entry->getKey());
            
$cells = new LinkedList;
            
            
$cells->add(new TCell($shopList->getshopimage($shop->imageurl)));
            
$cells->add(new TCell($shop->category));
            
$cells->add(new TCell($shop->shoptype));
            
$cells->add(new TCell($shop->shopname));
            
$cells->add(new TCell($shop->description));
            
$cells->add(new TCell($shopTable->getHelper()->getSalestax($shop->salestax)));
            
$cells->add(new TCell($shopTable->getHelper()->getShopStatus($shop)));
            
$shopTable->buildRow($cells);
        }
        
$document->add($shopTable);  
        }

__________________


asp.net stole my soul.
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
Site appearing blank? Pear Questions and Supports 18 11-09-2014 04:50 PM
Signature Images not appearing? Pear Questions and Supports 2 02-08-2014 07:42 PM
Shop Appearing As Fatal Error Hwona Questions and Supports 6 09-09-2013 06:03 PM
Bbcode image not appearing superdude44 Questions and Supports 3 05-09-2012 07:15 PM
Again Shops RoconzaArt Questions and Supports 10 01-17-2011 04:32 PM


All times are GMT -5. The time now is 07:24 PM.

Currently Active Users: 2078 (0 members and 2078 guests)
Threads: 4,081, Posts: 32,032, 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 - 2025, vBulletin Solutions Inc.
vBCommerce I v2.0.0 Gold ©2010, PixelFX Studios
vBCredits I v2.0.0 Gold ©2010, PixelFX Studios
Emoticons by darkmoon3636