Mysidia Adoptables Support Forum  

Home Community Mys-Script Creative Off-Topic
Go Back   Mysidia Adoptables Support Forum > Mysidia Adoptables > Questions and Supports

Notices

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #2  
Old 12-14-2016, 06:49 PM
Dinocanid's Avatar
Dinocanid Dinocanid is offline
Member
 
Join Date: Aug 2016
Location: Maryland, USA
Posts: 516
Gender: Unknown/Other
Credits: 97,802
Dinocanid is on a distinguished road
Default

I'm afraid I don't exactly know how to work with the setup you have for the profile page since it seems to have a different way of showing the tabs. I can, however, say that this is how I add a new tab with the default code. Maybe it will point you in the right direction?

PHP Code:
<?php

use Resource\Native\String;
use 
Resource\Collection\LinkedHashMap;

class 
ProfileView extends View{
    
    public function 
index(){
        
$pagination $this->getField("pagination");
        
$users $this->getField("users");        
        
$document $this->document;    
        
$document->setTitle($this->lang->title);        
        
$document->addLangvar($this->lang->memberlist);
        
        
$iterator $users->iterator();
        while(
$iterator->hasNext()){
            
$entry $iterator->next();
            
$username = (string)$entry->getKey();
            
$usergroup = (string)$entry->getValue();
            if(
cancp($usergroup) == "yes"$document->add(new Image("templates/icons/star.gif"));
            
$document->add(new Link("profile/view/{$username}"$usernameTRUE));
        }
        
$document->addLangvar($pagination->showPage());
    }
    
    public function 
view(){
        
$mysidia Registry::get("mysidia");
        
$user $this->getField("user");
        
$profile $this->getField("profile");
        
$document $this->document;
        
$document->setTitle($this->lang->profile);
                
$profile->display("aboutme");  
        
$tabsList = new LinkedHashMap;
        
$tabsList->put(new String("Visitor Message"), new String("visitormessage"));
        
$tabsList->put(new String("Adoptables"), new String("adopts"));
        
$tabsList->put(new String("Friends"), new String("friends"));
        
$tabsList->put(new String("Contact Info"), new String("contactinfo"));
        
$tabsList->put(new String("New tab"), new String("newinfo")); //This was added!
        
$tabs = new Tab(5$tabsList1); //And this!
        
$document->add(new Comment("<center>"));
        
$tabs->createtab();
     
        
// Here we go with the first tab content: Visitor Message
        
$tabs->starttab(0);
        
$vmTitle = new Comment($mysidia->input->get("user").$this->lang->VM_member);
        
$vmTitle->setBold();
        
$vmTitle->setUnderlined();
        
$document->add($vmTitle);
        
$profile->display("vmessages");
     
        if(!
$mysidia->user->isloggedin$document->addLangvar($this->lang->VM_guest);
        elseif(!
$mysidia->user->status->canvm$document->addLangvar($this->lang->VM_banned);
        else{
            
$document->addLangvar($this->lang->VM_post);
            
$vmForm = new Form("vmform""{$mysidia->input->get("user")}""post");
            
$vmForm->add(new PasswordField("hidden""user"$user->username));
            
$vmForm->add(new TextArea("vmtext"""450));
            
$vmForm->add(new Button("Post Comment""submit""submit"));
            if(
$mysidia->input->post("vmtext")){
                
$reminder = new Paragraph;
                
$reminder->add(new Comment("You may now view your conversation with {$user->username} from "FALSE));
                
$reminder->add(new Link("vmessage/view/{$mysidia->input->post("touser")}/{$mysidia->input->post("fromuser")}""Here"));
                
$document->addLangvar($this->lang->VM_complete);
                
$document->add($reminder);
            }    
            else 
$document->add($vmForm);
        }
        
$tabs->endtab(0);
     
        
// The third tab: Adopts...    
        
$tabs->starttab(1);
        if(
$user->getadopts()) $document->addLangvar($this->lang->noadopts);
        else 
$profile->display("adopts");

        
$tabs->endtab(1);
     
        
// The fourth tab: Friends...
        
$tabs->starttab(2);
        
$profile->display("friends"$user);
        
$tabs->endtab(2);

        
// The last tab: Contact Info!    
        
$tabs->starttab(3); 
        
$user->getcontacts();
        
$user->formatcontacts();
        
$profile->display("contactinfo"$user->contacts);
        
$tabs->endtab(3);
        
        
        
$tabs->starttab(4);  //This is the new tab!
        
$document->add(new Comment("Wow! Things!"));
        
$tabs->endtab(4);
    }
}
?>
To add a tooltip, you can use this code (I'm assuming you use the one from the shop and tooltip mod):
PHP Code:
$document->add(new Comment("<img rel='tooltip' title='Description!' src='DIRECT IMAGE LINK'/>")); 
__________________
Reply With Quote
 


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


All times are GMT -5. The time now is 02:23 PM.

Currently Active Users: 4813 (0 members and 4813 guests)
Threads: 4,082, Posts: 32,047, 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