MOSS 2007 : Displaying User Picture Profile

English (versi bahasa Indonesia)

Recently I’ve got a question how to display user picture profile. 

Up5

Again, there are many approach – however I’ll show you with no code approach. First, I want to emphasize that this approach can be used to answer other customization which uses SharePoint’s ootb controls.  

So, here we go. Open the default.aspx using SharePoint designer and look at the toolbox control on the right pane. You’ll see several categories ie. ASP.NET Controls, SharePoint Controls etc. In this case we need Server Controls (SharePoint) – it will available if you work with MOSS 2007 not WSS v3.0.

Up1

Expand Server Controls (SharePoint) and there are many specific controls from SharePoint Server WebControls. To show user picture profile, we need ProfilePropertyImage from SharePoint Server WebControls. I guess you understand how to pick-it-up, just drag-drop from the toolbox into designer pane.

Up2

In this case I drag-drop from toolbox pane to the empty space just above default WebPartZone in default.aspx.

Up3

Giving a center tag arround the ProfilePropertiImage, will give you just like mine.

Up4

Then, save the page to see the result; an avatar will be shown for any users who already customize their profile image.

At last, if you can not see the image, please check if the tags looks similar with

Please pay attention that “PropertyName” of the tag should be “PictureUrl”.

Indonesia (see English version)

Baru-baru ini saya mendapat pertanyaan bagaimana cara menampilkan gambar yang ada di profile user.  

Up5

Sama seperti artikel-artikel saya sebelumnya, ada banyak cara yang dapat kita lakukan – dan lagi-lagi saya tetap menganjurkan untuk menggunakan teknik dengan sedikit coding. (no code approach). Sebelum melanjutkan, saya juga ingin menggaris-bawahi bahwa teknik ini dapat pula digunakan untuk melakukan kustomisasi lain yang membutuhkan kontrol bawaan dari SharePoint.   

Pertama-tama buka “default.aspx” dengan menggunakan SharePoint designer. Lihat pane “toolbox control” yang ada disebelah kanan – kalau belum muncul masuk ke dalam menu “Task Pane” dan pilih Toolbox control.  Disana kita bisa dapatkan beberapa kategori misalnya, ASP.NET Controls, SharePoint Controls dsb. Dalam kasus ini yang kita butuhkan adalah Server Controls (SharePoint) – kategori ini akan muncul jika kita bekerja dengan MOSS 2007.

Up1

Buka Server Controls (SharePoint) dan didalamnya akan kita dapatkan beberapa kontrol yang diambil dari SharePoint Server WebControls.  Untuk menampilkan gambar profile user yang kita butuhkan adalah ProfilePropertiImage. Klik di ProfilePropertyImage dan drag-drop kedalam default.aspx yang sedang dibuka di panel designer.

Up2

Untuk mendapatkan hasil seperti yang diinginkan diatas, saya memasukkan control tersebut keatas WebPartZone yang ada dibagian kanan (lihat gambar dibawah).

Up3

Kemudian dengan menambahkan tag “center” maka ProfilePropertiImage akan tampil rata kanan-kiri, sama seperti dibawah ini.

Up4

Akhirnya, simpan halaman tersebut dan buka dengan browser; sampai disini kita akan dapat melihat gambar profile user. Dan jika user melakukan kustomisasi gambar profilenya, maka secara otomatis gambar diatas juga akan menampilkan avatar yang sesuai.

Pada tahap ini, jika Anda gambar profile tidak muncul – coba cek tag yang baru disisipkan apa sudah terlihat seperti ini, 

Perhatikan bahwa “PropertyName” harus diisi dengan “PictureUrl”.

Tags: SharePoint+Designer+2007, Moss+2007, User+Profile

Avatar
Riwut Libinuko
Sr. Cloud Solution Architect

My research interests include distributed robotics, mobile computing and programmable matter.

comments powered by Disqus

Related