开发者

Way to asynchronously load SharePoint profile images

开发者 https://www.devze.com 2023-03-24 12:18 出处:网络
I\'m working on a sharepoint farm that has User Profiles enabled. We\'re creating a community feature which has a profile wall of all members of that community. I need to retrieve and display profile

I'm working on a sharepoint farm that has User Profiles enabled. We're creating a community feature which has a profile wall of all members of that community. I need to retrieve and display profile pictures from a search based source and display the results as they are returned in an appealing efficient way.

We have two avenues:

1: FAST search indexes the profiles of every user every 6 hours. We can run a membership query and return all members of [x] community.

2: We can use the profile API to do a search. This is slower but does not rely on the 6 hour index and therefore gives us up to date information.

We n开发者_C百科eed to make this call via JavaScript, as sever side code is locked down and not an option. I'd like to write a function that calls these profiles and loads the images into a wall one at a time as they are retrieved. Possibly in a timed loop, so an image loads every 100 milliseconds.

I believe profile photos are stored as a text property containing the photo URL, so the URL can be set as an images source.

How would I go about quickly loading a set of images asynchronously to provide a good user experience?


Since you do not have server side code option, I would suggest you to go for a Jquery Script which would render these images. This javascript code can be loaded asynchronously as suggested in this article:

https://wiki.base22.com/display/btg/How+to+load+JavaScript+dynamically+with+jQuery

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号