MOSS 2007 : Howto override page redirection Url
28 January 08 04:31 PM | cakriwut | with no comments

English (versi bahasa Indonesia)

I had a question from one of my friend “How can I override page redirection Url?”. He was using inline C# code which is not my preference – because it adds additional page-parser process and introduce new security consideration. His code also diminish upload attachment function in the original form.
My first suggestion was to create a new links that construct custom “Source=” url to the original form – but this is not what he looks for. He doesn’t want to replace the “New Item” menu with a link.

So in this case, he wants to click “New Item” menu in a list and redirected to custom page after sucessfull submission or cancelation.

ItemRedirect1

Technically, after we click “New Item” we’ll be redirected to “..\NewForm.aspx?RootFolder=….&Source=….”. And guess what – the “Source” is the location after we submit “OK” or press “Cancel”.

So – how can we change the “Source” url? Use Javascript !

Open “NewForm.aspx” using SharePoint Designer and find “PlaceHolderMain” content Id. Place following custom javascript just after tag definition.

function PreSaveAction()
{
     // TODO : create some actions here
     return true;
}

ItemRedirect2

Remember that the name of the function MUST BE PreSaveAction and it must return true.

Next, in the function I add operation to replace original action url with the new construction – I just need to change the text after “Source”. What you need to do, is change newSrcUrl variable to match with the custom page in your location. 

––o0o––

 

Indonesia (see English version)

Baru-baru ini saya mendapat pertanyaan dari seorang kawan tentang “Bagaimana cara mengganti halaman redirect? “. Menurutnya, dia sudah menggunakan inline C# namun akibatnya dia tidak dapat memanfaatkan upload attachment yang ada di form asli. Saya sendiri kurang sependapat dengan penggunaan inline C# itu, sebab inline C# akan menambah beban kerja server untuk memparsing dan juga membuka resiko keamanan yang baru.

Anjuran saya adalah dengan menggunakan link yang sudah diubah sedemikian rupa sehingga “Source” url disesuaikan dengan apa yang diinginkan. Tapi saran tersebut tidak sesuai dengan keinginannya, karena hal ini berarti mengganti menu “New Item” dengan menggunakan link.

Jadi, yang dia inginkan adalah tetap menggunakan menu “New Item” tetapi dapat mengganti halaman yang dibuka setelah submit atau cancel.

ItemRedirect1

Pada dasarnya, setelah kita mengklik “New Item” , maka kita akan diarahkan pada alamat “..\NewForm.aspx?RootFolder=….&Source=….”. Dan “Source” adalah lokasi yang akan dibuka ketika kita mensubmit form dengan mengklik “OK” atau menekan “Cancel”.

Jadi bagaimana kita dapat mengganti “Source” url? Gunakan Javascript !

Buka “NewForm.aspx” dengan menggunakan SharePoint Designer, dan cari tag id yang bertuliskan “PlaceHolderMain”. Kemudian tambahkan javascript berikut setelah tag tersebut,.

function PreSaveAction()
{
     // TODO : create some actions here
     return true;
}

ItemRedirect2

HATI-HATI, bahwa nama fungsi javascript tersebut HARUS  PreSaveAction dan nilai kembaliannya HARUS true.

Didalam fungsi javascript yang baru, kita hanya perlu menambahkan operasi untuk mengganti action url yang lama dengan action url baru. Di action url baru inilah kita definisikan “Source” url agar merujuk pada halaman web custom yang kita inginkan. Dari gambar diatas, Anda hanya perlu mengganti variable newSrcUrl agar sesuai dengan yang diinginkan – atau kalau perlu merubah operasi untuk mengganti “Source” url agar lebih robust.

––o0o––

Share this post: | | | |
MOSS 2007: How to create sub menu for context item
03 January 08 11:14 AM | cakriwut | 1 comment(s)

English (versi bahasa Indonesia)

Features have been introduced as one of building block in SharePoint 2007. Using feature ones could extend the capabilities of SharePoint, from just a simple ActionMenu to the site definition – all of them can be done using feature. 
I have created many ActionMenu that extend “EditItem” block in SharePoint but sometimes its not enough. How about creating sub menu for context item – just like “Send to” context menu?

SendToItem

Picture 1. Sub menu in context item

I can not find any information to create sub menu using feature – please correct me. So what can we do? Well…we’ll do the old way – extending the ows.js with our javascript.

Then if we want to create a new context “Comments” menu with “View Comments” and “Add Comments” for list item like this picture, what can we do?

CommentsSubmenu

Picture 2. Custom sub menu in context item

If you look at ows.js and start finding “Add[???]MenuItems” function then you’ll realize that it always calls “Custom_Add[???]MenuItems”. The last function is our place to make customization. For example, if I want to customize the context menu of ListItem then I need to define “Custom_AddListMenuItems” as follows,

function Custom_AddListMenuItems(m, ctx)

  AddCommentSubMenu(m,ctx);
  AddAttachmentSubMenu(m,ctx);
  CAMSep(m);
  return false;
}

We call “CAMSep(m)” to create separator and returning false to enable rendering default context menu item.  I create “Comments” and its submenu using “AddCommentSubMenu(m,ctx)” function like this,

function AddCommentSubMenu(m,ctx)
{
    strDisplayText="Comments"; 
    strImagePath=ctx.imagesPath+"reply.gif";
    var sm=CASubM(m,strDisplayText,strImagePath,"",400);
 
    sm.id="ID_Comment";
    var menuOption;
    
    // define your own action
    strAction=””;
    menuOption=CAMOpt(sm, "View comments", strAction,"");

    menuOption=CAMOpt(sm,"Add comment", strAction,"");
}

The “CASubM()” is the main function to create sub menu. If you look for the function in ows.js, you’ll find the definition for the function,

function CASubM(p,wzText,wzISrc,wzIAlt,wzISeq,wzDesc)

I guess I’ll make my guess for the parameters,

– p , the menu to attach
– wzText , text to display in the sub menu
– wzISrc  , icon location for the sub menu
– wzIAlt   , alt text for the image icon
– wzISeq  , I am not sure but I thing this related sequence number
– wzDesc ,  I am not sure either , it should be a description but I saw ows.js never put any text on it.

Anyway, you only need to modify parameter p, wzText, wzISrc, wzIAlt and leave default value for the last 2 parameter.

After we done with customization, put the script to the page as reference or as inline javascript, and now you can have your own sub menu for context item.

––o00––

 

Indonesia (see English version)

Features merupakan salah satu terminologi baru yang diperkenalkan di SharePoint 2007. Kita dapat menggunakan feature untuk menambah fungsi-fungsi baru didalam SharePoint – mulai dari sekedar menambahkan ActionMenu sampai membuat site definition baru – semua dapat dilakukan dengan menggunakan feature
Didalam banyak kesempatan saya sering membuat ActionMenu untuk menambah fungsi di bagian “EditItem” didalam list-item SharePoint – namun kadangkala hal itu masih belum cukup. Salah satu yang mungkin kita inginkan adalah, bagaimana cara membuat sub menu untuk menu context – seperti “Send to” dibawah ini?

SendToItem

Gambar 1. Sub menu didalam menu context

Sampai saat ini saya belum punya cara termudah untuk membuat sub menu dengan menggunakan feature (mungkin kita bisa menggunakan feature receiver – tapi berarti kita harus membuka visual studio) CMIIW. Jadi apa yang bisa kita lakukan? Yah terpaksa kita lakukan dengan cara lama, dengan memanfaatkan ows.js dan menambah fungsi javascript tambahan. 

Sebagai contoh, disini kita akan menambahkan menu context baru “Comments” dengan sub menu “View Comments” dan “Add Comments” seperti gambar dibawah.

CommentsSubmenu

Picture 2. Custom sub menu in context item

Jika kita perhatikan didalam ows.js , setiap fungsi “Add[???]MenuItems” akan memanggil “Custom_Add[???]MenuItems”. Contohnya, fungsi “AddListMenuItems” akan memanggil fungsi “Custom_AddListMenuItems”. Didalam fungsi “Custom_AddListMenuItems” inilah kita dapat menambahkan fungsi-fungsi baru seperti yang kita inginkan.

Disini kita akan menambah menu di list item, jadi disini kita definisikan fungsi Custom_AddListMenuItems sebagai berikut,

function Custom_AddListMenuItems(m, ctx)

  AddCommentSubMenu(m,ctx);
  AddAttachmentSubMenu(m,ctx);
  CAMSep(m);
  return false;
}

Fungsi “CAMSep(m)” berguna untuk membat pembatas dan kembalian false (return false) dihasilkan agar konteks menu default tetap dirender. Untuk membuat menu “Comment” dan submenu dibawahnya, kita buat fungsi baru “AddCommentSubMenu(m,ctx)” seperti dibawah,

function AddCommentSubMenu(m,ctx)
{
    strDisplayText="Comments"; 
    strImagePath=ctx.imagesPath+"reply.gif";
    var sm=CASubM(m,strDisplayText,strImagePath,"",400);
 
    sm.id="ID_Comment";
    var menuOption;
    
    // define your own action
    strAction=””;
    menuOption=CAMOpt(sm, "View comments", strAction,"");

    menuOption=CAMOpt(sm,"Add comment", strAction,"");
}

Fungsi “CASubM()” adalah kunci untuk membuat sub menu. Jika kita lihat definisi CASubM() didalam ows.js, kita dapat temukan definisi fungsi itu sebagai berikut,

function CASubM(p,wzText,wzISrc,wzIAlt,wzISeq,wzDesc)

Disini kita gunakan intuisi untuk menterjemahkan parameter itu (so just guessing – OK),

– p , parent menu yang akan ditempel sub menu
– wzText , teks yang akan ditampilkan di sub menu
– wzISrc  , lokasi ikon untuk sub menu
– wzIAlt   , teks alternatif untuk ikon 
– wzISeq  , (gak yakin) tapi mungkin urutan sub menu
– wzDesc ,  (gak yakin) kemungkinan besar adalah deskripsi, tapi didalam tidak pernah digunakan didalam ows.js

Yah, singkat kata, kita hanya perlu melakukan modifikasi parameter  p, wzText, wzISrc, wzIAlt dan menggunakan nilai default untuk parameter-parameter yang lain.

Setelah selesai, letakkan script tersebut secara inline maupun sebagai reference , dan dijamin Anda akan mendapatkan sub menu untuk item konteks.

 

Share this post: | | | |
MOSS 2007 : Displaying User Picture Profile
25 November 07 04:36 PM | cakriwut | with no comments

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

<SPSWCrofilePropertyImage PropertyName="PictureUrl" ResizeToFit="100" RenderWrapTable="True" ShowPlaceholder="true" id="PictureUrlImage" runat="server"/>

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, 

<SPSWCrofilePropertyImage PropertyName="PictureUrl" ResizeToFit="100" RenderWrapTable="True" ShowPlaceholder="true" id="PictureUrlImage" runat="server"/>

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

 

 

Share this post: | | | |
How to enable "Edit Page" in SharePoint's standard form.aspx
03 November 07 02:28 PM | cakriwut | with no comments

English (versi bahasa Indonesia)

Just like the old version, if we want to add additional web part in standard form (newform.aspx, editform.aspx, dispform.aspx) then we have establish a strategy to view the page in edit mode. However, the new page model in SharePoint 2007 makes our job more easier.

NewItemAction

Picture 1a. No “Edit Page” in SharePoint form.

 

NewItemInEditMode
Picture 1b. NewForm.aspx in Edit Mode

Actually we can change site template definition, but since I don’t want to modify all forms, then I choose to edit directly using SharePoint Designer (SPD) . I open the site using SPD, go through target list and open “NewForm.aspx” in the designer.

NewItemEdit

Picture 2. Open NewForm.aspx using SharePoint Designer

Having the form in the designer, then I go to “Site Action” content template (by default it is master page content place holder). So I click on it to “Create Custom Content”.

NewItemMaster

Picture 3. Create Custom Content in Site Action section

Switched into code designer for the new content block then look for <SharePoint:MenuItemTemplate tag. There are few tags, but the point of interest for our project is the one with “MenuItem_EditPage” id. Change the id to anything you’d like – mine, I change it to “MenuItem_EditPage1”.

NewItemMaster2

Picture 4. Change the id for MenuItemTemplate

Save the changes and now goto NewForm.aspx. See a new “Edit Page” command in Site Action.

NewItemWithEdit

Picture 5. Edit Page menu command in “Site Action”

o0o—

Indonesia (see English version)

Sama seperti di versi sebelumnya, jika kita ingin menambahkan web part di form-form standar SharePoint (newform.aspx, editform.aspx, dispform.aspx) maka kita harus bisa menampilkan form tersebut dalam mode edit. Namun kali ini pekerjaan kita akan jauh lebih sederhana dengan diperkenalkannya master page dan page layouts di SharePoint 2007.

NewItemAction

Picture 1a. “Edit Page” tidak bisa ditemukan di form standar.

 

NewItemInEditMode
Gambar 1b. NewForm.aspx dibuka dalam mode edit

Ada dua pilihan yang dapat dilakukan yaitu melakukan perubahan secara global di definisi site template atau melakukan perubahan secara terbatas di masing-masing list. Karena tidak semua list perlu perubahan ini, maka saya akan melakukannya secara terbatas dengan mengedit “NewForm.aspx” secara langsung dengan menggunakan SharePoint Designer (SPD).

NewItemEdit

Gambar 2. Buka NewForm.aspx dengan menggunakan SharePoint Designer

Setelah form tersebut terbuka, arahkan mouse ke area “Site Action” (secara default area ini mengambil definisi dari master page). Context menu di area ini memungkinkan kita untuk mendefinisikan konten secara khusus dan tidak mengambil definisi dari master page. Klik di “Create Custom Content”.

NewItemMaster

Gambar 3. Create Custom Content pada area Site Action

Ubah tampilah SPD ke bagian source code dan disana kita akan dapat menemukan blok yang berisi tag <SharePoint:MenuItemTemplate . Kita bisa menemukan beberapa tag semacam itu, tapi target kita adalah tag yang memiliki id “MenuItem_EditPage”. Ubah nama id menjadi nama lain – disini saya mengubahnya menjadi “MenuItem_EditPage1”.

NewItemMaster2

Gambar 4. Ubah id dari MenuItem Template

Simpan seluruh perubahan diatas dan buka kembali NewForm.aspx. Arahkan kursor ke Site Actions dan disana kita bisa melihat command menu “Edit Page” seperti yang diharapkan. Dan mulai sekarang dengan mudah kita bisa menambah / menghapus web part di halaman itu.

NewItemWithEdit

Gambar 5. Menu Edit Page di “Site Action”

o0o—

Share this post: | | | |
MOSS 2007: How to delete default Shared Service?
26 August 07 12:10 AM | cakriwut | 1 comment(s)

English (versi bahasa Indonesia)

You might already know that one of essential component in MOSS 2007 is the Farm’s Shared Services. Farm’s Shared Services serves all server in the farm for profiles, bussiness data catalog and many more. Default Shared Services is the first farm’s shared services that we create in our MOSS 2007 servers. If we ever create farm shared services, then any web applications listed in SharePoints configuration databases will be associated with any of farm shared services. And so this is a not turning back operation; once you make an association then “forever” MOSS won’t let you disassociate with it.

Sharedsvcerr3
You can see the “Delete” action is disabled by default – so , how to delete this kind of default Shared Services?
Of course we will use the unprotected tools from MOSS.

Let’s understand what happened if we issue “Delete” shared service command?

MOSS will present you to */_admin/deletessp.aspx page with ssp GUID as sspId parameter. The page would be seen as  */_admin/deletessp.aspx?sspID={GUID}

Hence if we want to delete any of shared service, we only need to call that page with correct sspId – and if we put the GUID of default shared service then it will be deleted too.

Find out the GUID by clicking “Edit Properties” link for the Default Shared Service.

Ssp2

You’ll come to */_admin/sspdetails.aspx?task=Edit&sspId={GUID}. And intuitively you know the rest is to use that GUID. When you run deletion procedure for default shared service, there would be error like this,

Sharedsvcerr2

You can ignore it, because it will delete the ssp anyway.

-o0o-

Indonesia (see English version)

Anda mungkin sudah tahu salah satu komponen penting di MOSS 2007 adalah Farm Shared Services. Farm Shared Service merupakan layanan bersama yang digunakan oleh semua server yang ada didalam konfigurasi farm di MOSS 2007; misalnya untuk melakukan sinkronisasi profile dengan Active Directory, business data catalog, search dsb.
Default Shared Services adalah shared service yang dibuat pertama kali didalam farm. Jadi pada saat pertama kali kita membuat farm shared services di MOSS, semua aplikasi web yang ada didalam database konfigurasi akan diasosiasikan secara otomatis ke farm shared service tersebut. Proses assosiasi tersebut hanya berlangsung satu arah, artinya jika suatu saat kita ingin menghapus shared service maka secara desain hal tersebut tidak dimungkinkan oleh MOSS.

Sharedsvcerr3
Kita bisa melihat bahwa perintah “Delete” secara default tidak dapat diakses – jadi bagaimana cara kita menghapus default shared service? 
Anda mungkin berfikir untuk mengapus database shared service, tapi tidak, kita akan menggunakan tools yang sudah disediakan oleh MOSS.  

Apa yang sebenarnya dilakukan jika kita meng-klik perintah “Delete” ?

MOSS membawa kita ke halaman  */_admin/deletessp.aspx dengan GUID ssp sebagai parameter sspId. Jadi halaman tersebut akan terlihat sebagai   */_admin/deletessp.aspx?sspID={GUID}

Jadi singkat kata, jika kita ingin mengapus shared service apapun, maka yang kita lakukan adalah memanggil halaman tersebut dengan dilengkapi parameter sspId yang dikehendaki. Jika kita masukkan GUID yang dimiliki oleh default shared service, maka dapat dipastikan default shared service juga akan terhapus. 

GUID dari shared service dapat dicari dengan meng-klik perintah “Edit Properties” seperti gambar dibawah.

Ssp2

Kita akan dibawa ke halaman */_admin/sspdetails.aspx?task=Edit&sspId={GUID}. Dan secara intuitif yang dilakukan selanjutnya adalah menggunakan GUID tersebut untuk memanggil halaman deletessp.aspx. 

Jika Anda melakukan prosedur menghapus default shared service seperti diatas, Anda akan menemukan error seperti ini, 

Sharedsvcerr2

Abaikan pesan kesalahan tersebut, sebab MOSS akan tetap menghapus default shared service seperti yang kita inginkan.

Share this post: | | | |
WingsAir / LionAir Delay? Ah itu sudah biasa
25 August 07 05:05 PM | cakriwut | with no comments

Hari ini sepulang dari Surabaya, saya mencoba lagi terbang dengan menggunakan airlines group LionAir, yaitu WingsAir. Terakhir kali kira-kira 4 bulan yang lalu saya menggunakan LionAir dan terjadi delay. Dan kejadian ini berulang hari ini ketika saya memilih WingsAir. Jadi, begitu melihat pengumuman delay penerbangan WingsAir (WN8985 , no 2 dari atas) – komentar saya “Ah itu sudah biasa”.

DSC01210

Terus terang saya bete, tapi mudah-mudahanan delaynya bisa “cukup lama”. Kalau delaynya cukup lama, otomatis saya punya hak untuk melakukan claim asuransi keterlambatan penerbangan – soalnya tiketnya dibeli dengan kartu kredit hehehe. Yah, kita tunggu saja.

 

Share this post: | | | |
MOSS 2007: Fixing SSOSrv error 0x80040e14
20 August 07 12:22 AM | cakriwut | 1 comment(s)

English (versi Indonesia)

Yesterday I tried to enable single-sign-on (SSO) webpart on one of our client's server. It was very strange since the webpart was tested well few month ago on other client - but not at this time.
The "GetCredentials" of "ISsoProvider" always throws an error:

ssofailed4

I have double checked SSO configuration in the server farm, and looks everything has been setup correctly - so what was wrong?

KB932917 is not available!
Further investigation in the events viewer, I've found error number 0x80040e14. The error description is non-sense, credentials configuration has been double checked and this is not the first sso implementation.

ssofailed6

Searching the problem in Internet direct me to an explaination from Chris Calderon and he referred KB932917 which is private link from Microsoft. It will be included in roll-up SP package, but when? We need it right at the moment.

Do it your self!
From that article, Chris already mention that the problem is; MOSS always validate IX_SSO_Credentials index.
So, I open SSO database in SQL Management Studio, and found that there only IX_SSO_TempCredentials index in dbo.SSO_Credentials table.

ssoqry

Using the same index creation statement, I create second index called IX_SSO_Credentials. Then I left database with two index in that table - and starting to validate our sso webpart again.

ssofailed7

And, thanks God - although we expect for the upcoming update but now everything is running well again.

--o0o--

Indonesia (English version)

Kemarin, untuk kesekian kalinya saya mengimplementasikan webpart single-sign-on (SSO) di salah satu mesin di client kami. Tapi kali ini saya mendapatkan keanehan, webpart tersebut gagal berfungsi - padahal ini bukan implementasi pertama kali. Terpaksa, visual studio debuging dihidupkan dan error muncul pada saat pemanggilan method "GetCredentials" dari interface "ISsoProvider".

ssofailed4

Terpaksa, dilakukan check-list konfigurasi SSO di webfarm dan semua sudah dikonfigurasi dengan benar - jadi apa yang salah?

KB932917 tidak tersedia!
Saya coba melakukan investigasi lanjutan dengan membuka event viewer. Disana ada error yang disebabkan oleh SSO dengan nomor 0x80040e14. Penjelasan bahwa credentials tidak dapat diambil sangat tidak masuk akal, sebab konfigurasi SSO ini sudah bukan yang pertama kalinya, dan credentials yang digunakan juga memiliki otoritas yang sesuai.

ssofailed6

Saya coba membuka internet dan menemukan penjelasan dari Chris Calderon dan disebutkan *** bahwa kita harus menggunakan hotfix KB932917 dari Microsoft. Saya coba membuka link tersebut dan gagal. Menurut informasi yang ada, hotfix tersebut akan dimasukkan didalam service pack MOSS 2007, tapi kapan? Padahal kita butuh hotfix itu saat ini!

Patching Manual!
Dari blog yang ditulis Chris, kita bisa lihat bahwa masalah utamanya adalah MOSS selalu menggunakan index IX_SSO_Credentials yang ada di database SSO.
Hmm, saya buka database SSO dengan menggunakan SQL Management Studio. Ternyata disana hanya ada index dengan nama IX_SSO_TempCredentials.

ssoqry

Tanpa pikir panjang, saya gunakan perintah yang sama untuk membuat IX_SSO_TempCredentials - dan saya buat index kedua dengan nama IX_SSO_Credentials. Jadi sekarang dbo.SSO_Credentials memiliki dua index yang sama dengan nama berbeda.

ssofailed7

Tanpa menunggu terlalu lama, saya sekali lagi mencoba webpart sso dan syukurlah bahwa patching manual tersebut berhasil; dan webpart sso dapat bekerja dengan baik seperti sedia kala.

Share this post: | | | |
MOSS 2007: Branding a Publishing Page , answer for a friend
06 May 07 12:40 AM | cakriwut | with no comments

English:

Hi,
I came across your blog and the tutorial seems quite impressive. I am also in the process of rebranding sharepoing and really am lost on how to do it. I have referenced to numerous resources but none provides a step-by-step procedure to achieve this. Including ways to add images modify certain areas etc. Is it possible for you to provide me detailed instructions as to how you went about rebranding sharepoint.
I will appreciate ur help.

 

I received that email, a while ago after posting a tips about "Branding the publishing page"; and I promised to elaborate the step-by-step in my blog. And this post is for you who wants to start branding MOSS / WSS site.

I'll start with the same design, and lead you to create master page for this design.

Branding1

So, what is master page?

Master page is a contract for all pages in your site. Since its only contract - then you cannot see the master page in a web browser without a help of an aspx page which 'inherits' from it. This also limits control's type to put in master page. For example, we can insert web part but not web part zone and so on.

 

WhatIsMasterPage

Master page consist of static HTML tag and Asp:ContentPlaceHolder as a contract. You can design anything for static page HTML tag - but not for the contract. The Asp:ContentPlaceHolder must be kept exactly in same identity and hierarchy. If you change the identity, make it less or more from its original, then you'll break the relation with other pages in web site.

MasterPage1

Steps to design master page

1. Decide common and dynamic part
In this step you have to decide which part will be common to any pages in web site and which part to be dynamic and contect specific. Look at the example, I black coloured the content specific part. We will let the pages to define what should be displayed in that part by specifying Asp:ContentPlaceHolder "PlaceHolderPageDescription" and "PlaceHolderMain".

MasterPage2

 

2. Create static page (xHTML)
Next you can start to create page slice (table or div) whatever implementation you prefer to. You also need to define CSS, and may be javascript for DHTML effects. Define a room for content specific part in your design using table cell or div.
Remember, that there isn't right or wrong to create such static page. You can use your own idea, but in this example I choose table slice. I believe that creating following table-tr-td is simple for all of you ,

MasterPage3

I'll let you be creative with the CSS and javascript, but the idea is just simply create wire-frame for your page. After you satisfy with static page xHTML design then you can continue to insert it into new master page.

Open original master page (default.master) and save it using a new name - creating a new copy to work with. Copy and paste, HTML from static page into the new master page just after SPWebPartManager tag control.

MasterPage6

Now, you have static xHTML design on top of original master page. All you need to do now is to put existing standard control into the new wire-frame, ie DesignModeConsole and PublishingConsole.

3. Add contract
You also need to enclose any part in master page, which is customizable using other Asp:ContentPlaceHolder. But always keep in mind NEVER ADD or REMOVE "un-used" Asp:ContentPlaceHolder from master page or CHANGE their HIERARCHY.

Next since we want the "Content" to be page specific, then we need to put Asp:ContentPlaceHolder "PlaceHolderPageDescription" and "PlaceHolderMain" inside "Content" cell (click on the picture to enlarge).

MasterPage4

If you don't want any other part to be customizable, then you can let the other static HTML un-touched. Otherwise, you must insert Asp:ContentPlaceHolder so the pages can customize it.

The rest Asp:ContentPlaceholder can be made invisible by enclosing them in invisible Asp:Panel, just like this,

MasterPage5

There also "special" asp:ContentPlaceHolder that you shouldn't hide, such as:

  • PlaceHolderPageTitle => the pages will define its title by overriding this part
  • PlaceHolderAdditionalPageHead => some additional css/javascript will be defined here
  • WSSDesignConsole => we need this to enable page-edit mode
  • SPNavigation => this define how page-edit mode will be displayed
  • PlaceHolderLeftActions => to hold special script action ie. picture library thumbnail - filestrip function will need this.
  • PlaceHolderFormDigest => we need to keep form digest information

At last you can remove original table-tr-td construction and now, you've your own master.page. Save it and set as default master page to see a new branding.

Last but not least
You can always have web part inserted into master.page, but not web part zone. The reason is obvious, since master page is a contract, then any controls must be statically defined and dynamic controls such as web part zone can't be statically defined.

Now, are you ready to brand your WSS/MOSS?

Share this post: | | | |
Semalam bersama om Tahir & other mvps
11 April 07 03:30 PM | cakriwut | with no comments

Semalam bersama om Tahir, ternyata beliau ini pekerja keras. Bayangkan, jam 01 lebih masih online dan pagi-pagi sudah online lagi. Saya sampai sempet mikir, si Om ini apa gak bobo ya. hehehe. Tapi waktu ditanya, dia bilang sudah bobo. Emang bener sih, kalau mau sukses musti bekerja keras.

Belum lagi si Zed ama Narent, hidup para pejuang robot! Robot-robot lutchu, kapan ya gue bisa punya robot model gitu. Kayaknya enak juga kalau bisa diprogram buat bikinin teh atau kopi, jadi gak perlu repot-repot ke dapur lagi. Tapi dasar robot, gak makan nasi dan bernapas - kalau kehabisan baterai ya mati. Jadinya, robot yang semula mau disuruh ngundi jadi ngambek dan brenti. Coba kalau robot makan nasi atau bisa bernapas.

Yah, tapi gak apa-apa masih ada Kiki (hayo loh, cewe apa cowo?? -no offence- ) yang ngundi. Padahal gue sudah ngebayangin kiki itu cewe, tapi ternyata kembarannya suhu gue bos Dondy. Bos Dondy jadi tambah subur jadinya cuma muat baju XL hehehehe.. eh no offence lhoh semuanya.. ntar jangan-jangan ada yang musuh ke gw. Gue kan kecil, kalau di piting sama om Norman ya langsung klepek-klepek.

Share this post: | | | |
Filed under:
MOSS 2007 : Publishing page from email, workflow
11 April 07 03:21 PM | cakriwut | with no comments

MOSS 2007 provides out-of-the box (OOTB) document conversion process. It runs as job tools in MOSS job timer, and must be executed by the user. Now, the idea is to publish page into our ResepOke.Com from email attachment - so we don't need to go to web site anymore to create a new page.

The solution

Since the OOTB document conversion only work from limited number of filetype (for example docx into aspx) - then we can not use email format to publish to page directly. Therefore, we will create the page in docx and attach to email to publish to site. In the server, we need an event receiver to detect new incoming document and trigger document conversion process. However, instead of creating an event receiver we can use a visual studio workflow solution.

Step-by-Step

1. Configure document library to receive from email

EmailWF1

EmailWF2

 

2. Create a component/class to extract embedded image and store into site images library.

3. Create a componen/class to launch document conversion process. You need correct transformer ID,

public class Tranformer
{
public const string Docx = "{6dfdc5b4-2a28-4a06-b0c6-ad3901e3a807}";
public const string Docm = "{888d770d-d3e9-4d60-8267-3c05ab059ef5}";
public const string Infopath = "{853d58f5-13c3-46f8-8b81-3ca4abcad7b3}";
public const string Xsl = "{2798ee32-2961-4232-97dd-1a76b9aa6c6f}";
}

4. Incorporate all component into visual studio workflow solution and deploy to the site. The workflow will check for docx document and execute image parsing and document conversion process.

EmailWF

5. Add workflow to site and attach to the document. Don't forget to set-up start-up option of the workflow too.

EmailWF4

 

EmailWF5

 

And voila, if you send email to resepoke@plasmedia.com, then your page will be automatically published.

Share this post: | | | |
Filed under: ,
MOSS 2007: Branding the publishing page
11 April 07 02:54 PM | cakriwut | with no comments

Today, I've bring a session in Vista Launch in JHCC senayan. It talks about Building Enterprise Content Management solution.

You probrably already know that in WSS 3.0 we can use master pages to create branding to our site. Moreover, in MOSS 2007, we have content query web part which is very powerfull tool to play with.

For example, we are going to brand our site to looks like the picture below. ResepOke.Com a fictitious receipts and foods review site want to publish their content using MOSS 2007 publishing template.

Branding1

We change the navigation into button, and use content query web part to display page content into frontpage. We also list last 15 entries in the frontpage.

Step-by-step

1. Create new publishing site using publishing template and apply blackband.master, because it close to our design.

Branding3

2. Create static HTML page, with style and slicing design. Copy paste the HTML code into blackband.master. We need to extract which part should be in master page. (See blue box).

Branding4

3. From the new master page, create new page layout for welcome page and page layout for content page. In this case you only need to right click blackband.master in Sharepoint Designer and select "Create new page from master".

4. In the new page layout page, we must define the content part for the page. For welcome page, I create two column table with single row. In each column, I put webpart zone (See red and white box). For content page, I create single column table and a webpart zone in that column.

Branding2

5. Change page layout for ~/pages/default.aspx to the new welcome page layout. And also change page layout for document to the new content page layout.

6. Drop Content Query Web part into ~/pages/default.aspx and export into a .webpart file. Open the file using text editor and find "CommonViewFields" property change into

<property name="CommonViewFields" type="string">ExternalUrl,URL;PublishingPageImage,Image;PublishingPageContent,Note;</property>


7. Import back the modified webpart into default page and delete the first one.

8. Using Sharepoint Designer, find StyleSheets library and open ContentQueryMain.xsl. Goto line 152, and find

<xsl:otherwise>
<xsl:apply-templates select="." mode="itemstyle" />
</xsl:otherwise>

change into

<xsl:otherwise>
<xsl:apply-templates select="." mode="itemstyle">
<xsl:with-param name="CurPos" select="$CurPosition" />
</xsl:apply-templates>
</xsl:otherwise>


9. In the same library, open ItemStyle.xsl and add new stye template for item formatting.

10. Modify Content Query Webpart property and apply the new style item.

Yeah, all has been done without single line of compiling / coding, only need a bunch of XSLT. Thanks to Mark for the slicing and static page.

Share this post: | | | |
MOSS 2007 : Incoming Mail
21 March 07 04:01 PM | cakriwut | with no comments

When we set up "Incoming Email" in MOSS 2007 from operation like this,

basically MOSS 2007 will run job-timer on specified time basis.

It will run every 1 minute, reading, parsing and uploading email body and attachment to the document library - then finally delete the original file. This is very handy OOB services from MOSS, however you should take some precautions before using this service.

1. Un-matched email message will be discarded

Windows Sharepoint Services Incoming E-mail job will continue to run all task without being notified if the email has been successfully uploaded (ie. match defined destination address) or not. So if somehow SMTP configuration put all email to that folder, then you'll lost any unmatched email message.

2. Web Administrator Application Pool should have delete rights

Since the job runs under app pool control, and it must delete the file afterwards. Then Web Administrator app pool should have delete rights. Otherwise, you'll get duplicates entry in document library.

 

 

Share this post: | | | |
Filed under: ,
Windows Home Server beta
21 March 07 02:38 PM | cakriwut | with no comments

After several weeks in hospital AKA service center, my thinkpad is ready to play again. It takes about 4 weeks to suffer. I back home - bringing back the laptop from service center, then surprisingly I've found package from Microsoft, a Windows Home Server (WHS) beta. Oh - last month I subscribed as beta tester in for the product.

What is WHS? Its a combination of new and not-new technology, based on Windows Server 2003 R2. Take a look at the insider article here. It offers simplification and advance backup procedure, disk management and user management. Hmm..

Share this post: | | | |
Filed under:
Kembali ke DESKTOP
15 February 07 03:39 PM | cakriwut | with no comments

Ceritanya siang kemarin setelah client visit, laptop IBM (Lenovo) ThinkPad Z61t yang baru beberapa bulan jadi temen akrab saya tiba-tiba ngadat. Booting gagal, kalau toh bisa masuk ke sistem operasi - gak perlu nunggu 10 menit tiba-tiba semua nge-hang; gatot alias gagal total. Keyboard, mouse , lampu-lampu indikator gak ada yang berkedip. Seperti di film-film "FREEZE!!!".

Untunglah laporan ke IBM Center bisa mendapat "papan ibu" (motherboard) baru. Tapi lama bo, masih harus menunggu sampai Selasa (20/2) minggu depan. Jadi sekarang untuk sementara harus kembali ke LAPTOP DESKTOP.

Mustinya IBM harus berani ngasih pinjem laptop, kan itu ThinkPad baru dibeli di akhir bulan September 2006. Masa baru 5 setengah bulan udah dodol. Duh! Atau kalau gak, ganti unit aja saya juga rela.. hehehe.

Share this post: | | | |
Filed under: ,
Sharepoint 2003: Auto Open List Attachment
24 January 07 03:15 PM | cakriwut | 1 comment(s)

English:

Actually this is a query from one of our client. They ask me how to make some list items automatically open its attachment. Although this can be done programatically, but I prefer Javascript approach.

Many task in web application can be accomplished using Javascript. Sharepoint using Javascript to create dynamic view for the users. For example you open DispForm.aspx of a list, it will dynamically hide/show Attachments information. Here you can see two item list, the first list has an attachment while the other hasn't any.

ListItemView0

List item with attachment will show, Attachments row just like this picture,

ListItemView1

while list item without attachment will hide the Attachments row.

ListItemView4

It all provided by Sharepoint using simple Javascript that checks whether "idAttachmentsTable" object has rows defined. If that object has zero length rows, then it has no attachment. Hence, by checking "idAttachmentsTable" object and digging to url child nodes we can grab location of the attachment. Passing the location of the attachment to document location will then open list item attachment automatically.

So, start to open DispForm.aspx of the list, and insert custom javascript just above closing </BODY> tag.

ListItemView3

Save the modification, and if you click on list item with attachment, it will open the attachment automatically.

ListItemView2

Share this post: | | | |
More Posts Next page »