Mysidia Adoptables Support Forum  

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

Notices

Reply
 
Thread Tools Display Modes
  #1  
Old 12-17-2017, 03:51 PM
Dinocanid's Avatar
Dinocanid Dinocanid is offline
Member
 
Join Date: Aug 2016
Location: Maryland, USA
Posts: 516
Gender: Unknown/Other
Credits: 93,348
Dinocanid is on a distinguished road
Default

Yeah, the sort mod didn't work out so well ^^; hopefully a fix is found soon. This one works better imo though. I didn't include a function to actually add pets to those groups yet, but I'm planning to. It's also possible to do it yourself in the meantime with a form that updates the pet's group to whatever the user selected.
__________________
Reply With Quote
  #2  
Old 08-31-2018, 09:38 AM
draugluin's Avatar
draugluin draugluin is offline
Member
 
Join Date: Oct 2011
Location: germany
Posts: 120
Gender: Unknown/Other
Credits: 14,474
draugluin is on a distinguished road
Default

and here come's the part, which allows you, to assign a group (from the existing groups) to your adopt.

I hope, it works indeed for all

in myadopts.php ... after the closing tag ( } ) for the freeze-function


PHP Code:
public function changegroup(){        
    
$mysidia Registry::get("mysidia");
    
$this->setField("adopt"$this->adopt);  
    } 
and in myadoptsview.php after the closing tag ( } ) for the freeze-function

PHP Code:
public function changegroup(){
    
$mysidia Registry::get("mysidia");
    
$document $this->document;
    
$document->setTitle(" Change group ");
    
$adopt $this->getField("adopt");  
    
$username $mysidia->user->username;
    
$uid $mysidia->user->uid;
     
    
    
$stmt20 $mysidia->db->select("pet_groups", array(), "uid='{$uid}'");
            
            
$document->add(new Comment("
                <b>Choose a group:</b><br>
                 
                 <form method='post' action=''>
                        <select name='groups' id='groups'>
                        ^<option value='0'>choose</option>"
));
            
            while(
$row $stmt20->fetchObject()) {
                  
$id $row->id;
                  
$name $row->name;
                  
$document->add(new Comment("
                    <option value='
{$id}'>{$name}</option>"));
            }
            
$document->add(new Comment("
                        </select>  
                        <input type='submit' value='go'>
                    </form>
                      
                    "
FALSE));
                    
            if(
$mysidia->input->post("groups")){
            
$wahl $mysidia->input->post("groups");
            
$new $mysidia->db->select("pet_groups", array("name"), "id='{$wahl}'")->fetchcolumn();   
            
$mysidia->db->update("owned_adoptables", array("pet_groups" => $new), "aid ='{$adopt->getAdoptID()} ' and owner='{$mysidia->user->username}'");  
             
$document->add(new Comment("  Your adopt is now grouped to :{$new} <br>
                        <a href='/myadopts/manage/
{$adopt->getAdoptID()}'>back to the adopt</a>   ")); 
          }        
                    
        
          
    } 
and somewhere by the list of name, type etc.

PHP Code:
 <a href='/myadopts/changegroup/{$aid}'>(changegroup)</a

have fun
__________________
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
What age group do you belong to? Hall of Famer Other Chat 19 09-28-2017 08:37 AM
1.3.4 - group sort draugluin Questions and Supports 6 01-16-2017 12:02 PM
sort adoptables Blackmagic Questions and Supports 3 12-01-2009 03:05 PM
group zhiichiro Questions and Supports 7 05-30-2009 07:21 PM
Adding new user group mugwumpr Questions and Supports 2 04-19-2009 07:02 PM


All times are GMT -5. The time now is 04:17 PM.

Currently Active Users: 3653 (0 members and 3653 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