Forums

Home » Liferay Portal » English » 3. Development

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Ketan Patel
Register users to be able to search for users
August 10, 2012 9:17 PM
Answer

Ketan Patel

Rank: Junior Member

Posts: 69

Join Date: May 4, 2012

Recent Posts

Hi,

I want register users to be able to search for users and then click friends request. How can I achieve this?

Please reply me ASAP.

Thanks in advance.
Brian Kim
RE: Register users to be able to search for users
August 11, 2012 12:00 AM
Answer

Brian Kim

LIFERAY STAFF

Rank: Expert

Posts: 319

Join Date: August 16, 2004

Recent Posts

Hi Ketan,

This question is _really_ broad. There are a million different ways that this could be accomplished, but 99% of them might not meet your needs. For instance, one answer could be:

Create a portlet that queries the database using our service methods, output a list using a JSP, and then stick a button on the page that makes a friend request to the other person, who then needs to accept.

But then, that's probably not THE answer you were looking for. emoticon
Hitoshi Ozawa
RE: Register users to be able to search for users
August 11, 2012 12:59 AM
Answer

Hitoshi Ozawa

Rank: Liferay Legend

Posts: 7990

Join Date: March 23, 2010

Recent Posts

I want register users to be able to search for users and then click friends request. How can I achieve this?


The easiest way is to post your request to the Marketplace to have someone develop it for you and then you can just purchase the portlet to deploy it on your server.
Ketan Patel
RE: Register users to be able to search for users
August 11, 2012 3:26 AM
Answer

Ketan Patel

Rank: Junior Member

Posts: 69

Join Date: May 4, 2012

Recent Posts

Hi Brian,

Yes, you are true. I thought the same for full-fill my current requirements.

Thanks,
Ketan Patel
Hitoshi Ozawa
RE: Register users to be able to search for users
August 11, 2012 3:39 AM
Answer

Hitoshi Ozawa

Rank: Liferay Legend

Posts: 7990

Join Date: March 23, 2010

Recent Posts

So that was it? You're not having any problem getting a list of users in the same group or on using the search container? :-)
Ketan Patel
RE: Register users to be able to search for users
August 11, 2012 5:05 AM
Answer

Ketan Patel

Rank: Junior Member

Posts: 69

Join Date: May 4, 2012

Recent Posts

Hi Hitoshi,

I wants in my search criteria only registered user, than users are from whatever groups it's fine.
Hitoshi Ozawa
RE: Register users to be able to search for users
August 11, 2012 5:37 AM
Answer

Hitoshi Ozawa

Rank: Liferay Legend

Posts: 7990

Join Date: March 23, 2010

Recent Posts

Then it's just a matter of calling dynamic query in UserLocalServiceUtil. Shouldn't take too much time to develop.
Sreeraj AV
RE: Register users to be able to search for users
August 12, 2012 11:59 PM
Answer

Sreeraj AV

Rank: Regular Member

Posts: 222

Join Date: April 26, 2010

Recent Posts

Ketan Patel:
Hi,

I want register users to be able to search for users and then click friends request. How can I achieve this?

Please reply me ASAP.

Thanks in advance.



You can customize Directory portlet for this..

Add a new JSP page under the same hook and implement Add Friend functionality inside JSP.

Now modify directory portlets user\search_columns.jspf by adding a new column for sending friendship request which has a javascript method call.

In the javascript method implementation, you have to use AUI.io.request class, which has a method that can call our new JSP file without reloading the page or calling the ProcessAction method .. see the example..

use var url=''/html/portlet/directory/user/newJSPFile.jsp instead of var url = '<%= ajaxCallResourceURL.toString() %>';