Question

I am writing a plugin for Jive (SBS) 7 and want to add more data to the template for the user profile Overview page (i.e. /people/admin ). In Jive 6 I did overwrite the profile path in struts and added my own ViewProfile action. But this action seems to be called no more.

I also cannot even figure out where the templates I changed get their data from (soy/people/profile/{userProfile, header, head}.soy) or what action is responsible for.

So how can I add another property to the soy file that gets a custom property for the targetUser? (custom property = property saved in the database table jiveuserprop)

Était-ce utile?

La solution 2

I got an answer in the Jive Developer community:

profile is an action in Struts2.  /people/username is a URL Mapper permutation

https://community.jivesoftware.com/thread/263660

Autres conseils

You need to create a plugin and then use the option. Then, you simply use jquery to add the extra stuff.

you can create an action that takes in information using getters or post and throw it into the user's extended properties. You can create another action that'll retrieve that info in json.

then, simply use jquery's getJson to grab the info and use selectors to show the data in the user profile.

Don't forget to use the $j(document).ready(function(){ // your code here }); to show the info

simple example:

<scipt>

    $j(document).ready(function(){
        $j("div#j-profile-header-details").append("<p>hello World</p>");
    });

</script> 

will append "hello world" under the user's email address / job title.

hope this helps. feel free to ask more questions if it doesn't make sense. here's a good link on writing the javascript part of the plugin: http://docs.jivesoftware.com/jive/7.0/community_admin/index.jsp?topic=/com.jivesoftware.help.sbs.online/developer/PluginXMLReference.html

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top