Return to Jive Software

2,494 Views 2 Replies Last post: Aug 8, 2007 5:04 PM by Alex Wenckus RSS
abakwaboy Novice 24 posts since
Feb 16, 2007
Currently Being Moderated

Aug 8, 2007 12:47 PM

User Profile Bar Plugin

 

I want to add a new pluglin which adds a tab the profile information bar. I see that the existing tabs utilize the ViewProfile.java action class, view-profile.ftl file along with inline and imported macros.

 

 

I do not want to duplicate code and do not want to modify existing clearspace code. What is the best approach to take here. My plugin's aim is to take the user's profile information and categorize it, having up to three new tabs on the profile bar. Each tab will only show certain profile information that is relavant to the tab.

 

 

Any help or guidelines would be much appreciated.

 

 

Alex Wenckus Jive Employee 99 posts since
Jun 26, 2007
Currently Being Moderated
Aug 8, 2007 5:00 PM in response to: abakwaboy
Re: User Profile Bar Plugin

Regrettably, there is a little boiler plate involved - first requirement is that in your ftl you reference this ftl at the top of your body:

 


<#include "/template/global/include/view-profile-header.ftl"/>

 

This is what gives you your tabs.

 

As a result, you will need several things available in your action:


    public User getTargetUser() {
        return targetUser;
    }

    public boolean isViewingSelf() {
        return getUser() != null && getUser().getID() == targetUser.getID();
    }

    public String getView() {
        return view;
    }

 

Where view is simply the name of the tab.

 

Hope that helps,

Alex

Alex Wenckus Jive Employee 99 posts since
Jun 26, 2007
Currently Being Moderated
Aug 8, 2007 5:04 PM in response to: Alex Wenckus
Re: User Profile Bar Plugin

Also you will need the following divs in your ftl:


<!-- BEGIN main body -->
<div id="jive-body-main">


    <!-- BEGIN main body column -->
    <div id="jive-body-maincol-container">
        <div id="jive-body-maincol">
        </div>
     </div>
</div>

 

I would look at one of the other profile ftls if you need some pointers on how to make things look like the other profile pages.

 

Thanks,

Alex

More Like This

  • Retrieving data ...

Bookmarked By (0)

To better serve our customers we have included functionality to automatically follow up on a case after it has been idle for more than 5 days, and then auto close after an additional 3 days of inactivity. Choose No to acknowledge that this case will remain idle for longer than 5 days.
Making cases public allows other customers to learn from the solution of the case. It can also be used to gain feedback from others in the community. Ask our Support Engineers for more info, but we encourage you to make your cases public.