Profile Tab Manager

Unmaintained Profile Tab Manager 1.0.1

No permission to download



This add-on will let you create how much tabs you want and show them in the user's profile page.

To create a new tab:

Go to Applications->Profile Tab Manager->Create New Tab.

When creating a new tab, you dont need to worry about the template. If you dont get anything in mind, just leave blank. The default template is loaded.

sem-t%C3%ADtulo2-png.20422


So, after created a new tab, go to any profile page (which has the permissions that you've set):

sem-t%C3%ADtulo3-png.20423


After this, you can customize the template of your tab:

sem-t%C3%ADtulo4-png.20424


And the result:

sem-t%C3%ADtulo5-png.20425


Ok, but what if we want to send some custom params to our template?

Ok, this is how i do it:

Create a new file inside the folder library/ProfileTabManager/Callbacks/ called Test.php. We will make a method to use as callback for our custom field.

Put this inside:

PHP:
<?php
class ProfileTabManager_Callbacks_Test extends XenForo_Application
{
    public static function MyCustomField()
    {
        //Lets get some information about the user who is visiting
        $visitor = XenForo_Visitor::getInstance()->toArray();
        //Return the content to our custom field template
        return array('visitor' => $visitor);
    }
}
?>


In the menu Applications->Profile Tab Manager->Display All Tabs, click in our tab "My Custom Tab" to edit.

Fill the information with the class and method callbacks.

sem-t%C3%ADtulo6-png.20426


Edit the template to and change to this:


Code:
<li id='__tab__' class='profileContent'>
  Hello {$visitor.username}! You are following {$visitor.following} users!
  <noscript><a href='{xen:link members/__tab__, $user}'>{xen:phrase view}</a></noscript>
</li>

Save it. Go to the profile page and see the result.

sem-t%C3%ADtulo7-png.20427


For sure, this is just a example. You can make more than this.
  • Sem título3.png
    Sem título3.png
    87.8 KB · Views: 652
  • Sem título2 (1).png
    Sem título2 (1).png
    34.6 KB · Views: 570
Author
Fuhrmann
Downloads
124
Views
1,555
First release
Last update
Rating
0.00 star(s) 0 ratings

More resources from Fuhrmann

Top