Feature and Content Type to create a web part page library


Online project management, task software, and free collaboration workspace: AJAXWorkspace
AJAXWorkspace is a free online workspace that offers task tracking software, team collaboration, online calendar, document sharing, and file management for project management and teamwork.

Here are one good scenario and solution on Feature and Content Type to create a web part page library from my colleague.

The problem

The goal of this exercise is to have a document library act as a store for web part pages and for the “New document” button to create a web part page with my custom content type’s attributes.

Here’s the content type:

<Elements xmlns=”http://schemas.microsoft.com/sharepoint/”>
<ContentType
ID=”0x010109010097431DDCD27A4eedA052535AA74AD98A”
Name=”Content Zone Page Template”
Group=”CMS Content Types”
Description=”Content type for Content Zone Page Templates”
>
<FieldRefs>
<FieldRef ID=”{29B7EF45-7669-4572-A42A-823559212C15}”
Name=”cmsDisplayName”
Required =”TRUE”
/>

</FieldRefs>
</ContentType>

<ContentTypeBinding
ContentTypeId=”0x010109010097431DDCD27A4eedA052535AA74AD98A”
ListUrl=”ContentZoneTemplates”
/>
</Elements>

And the List Instance:

<ListInstance
FeatureId=”00BFEA71-E717-4E80-AA17-D0C71B360101″
Id=”3001″
TemplateType=”101″
Title=”Content Zone Templates”
Url=”ContentZoneTemplates”
Description =”CMS Base: Content Zone Templates”
DocumentTemplate=”106″
/>

Now, I’ve tried the list instance without a document template, but that makes the default “new” item a template.doc.  Using the document template as “106″ brings up a file called “_webpartpage.htm” but asks if you want to open it rather than just opening it.

The default behavior if you create a document library and set it’s content type to web part page (all through the UI) is that it first opens that _webpartpage.htm file which then redirects to the spcf.aspx page, but with knowledge of which document library you came from.

The Solution

In the content type definition, add a document template element pointing to the new web part page form.  So, it looks like this now (the addition for the solution is highlighted in yellow):

<Elements xmlns=”http://schemas.microsoft.com/sharepoint/”>
<ContentType
ID=”0x010109010097431DDCD27A4eedA052535AA74AD98A”
Name=”Content Zone Page Template”
Group=” CMS Content Types”
Description=”Content type for Content Zone Page Templates”
>
<FieldRefs>
<FieldRef ID=”{29B7EF45-7669-4572-A42A-823559212C15}”
Name=”cmsDisplayName”
Required =”TRUE”
/>

</FieldRefs>
<DocumentTemplate TargetName=”/_layouts/spcf.aspx” />

</ContentType>

<ContentTypeBinding
ContentTypeId=”0x010109010097431DDCD27A4eedA052535AA74AD98A”
ListUrl=”ContentZoneTemplates”
/>
</Elements>

* Thanks to Jesicca who share out this KB.

Change OsCommerce category to Tree View


First, I am new to OsCommerce and php programming (yes, a MS guy here). Recently, I am helping my friend to setup a web store using OsCommerce.  Frankly, OsCommerce is a well-known open source web store. I don’t think I need to talk much here. When come to customization, I come across one requirement; change left category to a TreeView. I try to search on google but found nothing. But some post did mentioned OsCommerce itself already support treeview structure. We just need to change categories.php in “os\catalog\includes\boxes” to make it look like a treeview. Here is the outcome after some customization.

How to change it?

1.    Download this source (zip) file and upload “treeview” folder into “os\catalog\images” folder.
2.    Upload “categories.php” to replace the file in “os\catalog\includes\boxes”.

Hope this can benefit to anyone who need this features. Do let me know it got any bugs!

Central Administration is not working- Error File Not Found


Central Administration is not working. When I access central administration, I received the “File Not Found. Troubleshoot issues with Windows SharePoint Services.”  message after I entered my credentials.
Checked the IIS, and the Application Pools for Central Administration as well Central Administration were started. Everything looks fine.  The content web site is working fine. Only the central administration is down.

From what I get from my colleague, in a lot of cases, the easiest way to resolve this issue is to reprovision CA. In other words, unprovision the CA using the config wizard or psconfig.exe and the reprovision it again using the same tools. (This is not the same as disconnect from the farm and if done correctly, will not affect the production of the regular sites).

* This issue happened on one of my colleague and thanks to Jukka who provide this solution.

Error while writing managed code for infopath 2007 forms – InfoPath cannot add the event handler.


I receive some problem from my colleague when designing an infopath-2007 form that uses managed code for custom event handling. Here is the error:

InfoPath cannot add the event handler.

To work with Visual Basic or C# code, Microsoft visual studio tools for Applications (VSTA) is reguired. The Microsoft .Net Framework 2.0 and Microsoft Core XML Services 6.0 must be installed prior to installing VSTA…..

He has installed everything that is required. (MSXML Parser 6.0 / VS-2005 / VSTA) but still facing this error. Here is the solution from “Faithful”:
Read the rest of this entry »

Alarm Clock – Wake and Bacon


It is an alarm clock that wakes you up with the smell and sizzle of cooking bacon. I believe no one likes to wake up by an alarm clock. This clock gently wakes you up with the mouthwatering aroma of bacon, just like waking up on a Sunday morning to the smell of Mom cooking breakfast. Here some snapshots from Matty Sallin. Check out more details here: http://www.mathlete.com/portfolio/wakeNbacon.php

P1 WiMAX Launched in Malaysia!


Finally, P1WiMAX was launched in my home country. Checkout on their website here: http://www.p1wimax.com. First thing come to my mind is their packages and pricing. The packages price sound reasonable which offers start from RM 59 per month with 400kps (exclude modem). Compare to other ISP provider, the price is not too expensive. The promotional package offer 1.2MBps with RM 99 per month (Free modem). I think this is good deal while the speed and technology here is still fall behind compare to other countries.

The next thing is the coverage. I spent 20 mins to check out the coverage area at their website but can’t find anything. There are broken link on the coverage page. Then, I browse through their company website p1.com.my and found the link here: http://www.p1.com.my/Wimax/aspx/wimaxmap.aspx Frankly, I think this page is not user-friendly at all. Try to search on location and road name; you always get record not found. You need to enter properly keyword into their respective field. Try to browse and zoom into their map; it zoom in into very detail map. It is difficult for us to pan and view other location. I just do a quick look on the coverage area, not all places are covered. Even in KLCC area, you will see a lot of blank spot not covered. Eg. Wisma Hong Leong, Shangri-la hotel and etc.

Personally, I don’t it is a good time to get it now since it is still new and not many places are covered. Anyway, this is a good start. Hopefully, it will bring more pressures to other ISP providers to improve their services and offer lower cost to consumer!

My new tech blog, bronios.com


Welcome to bronios.com! This is the new blog for me to share out my tips. Some of the archives articles are move from yyTech blog (http://yyonline.wordpress.com). I will continue to share out my experience in SharePoint, .Net, SQL, MS BI, Gadgets and Collaboration. Happy reading!

Bronios main logo

MSN Messenger (Key port – 80048820 error)


Recently, I got problem sign in to msn messenger (Key port -80048820 error), hotmail.com website and the internet speed is not stable on certain website. I am not sure what was going on to my ISP provider (StreamyX). It works fine previously. I got no problem accessing it in my working place. I got some friends staying nearby also having this problem.  After debugging with some try & error methods, I manage to solve this problem. This case may not apply to everyone depends on the network setting. For my case, I got an ADSL modem (with router) and D-Link Dir300 Wireless Access Point. Here are the steps:

  • First I try to change the MTU setting from 1500 to 1362. Log in to D-Link administration system, click on Internet Setup, manual Internet connection setup, and change MTU setting under “Dynamic IP (DHCP) Internet Connection Type”. Then, restart your router, modem and PC. (It works for me for one night. After that, I try to use it on the next day, it give me the same error again).
  • Second method, log in to D-Link administration system, click on Internet Setup, manual Internet connection setup and checked Access Point Mode. Restart your router, modem and PC. (Note, this will change your device to Access Point Mode and disable NAT mode – Get DHCP IP from your modem router.)

I hope these tips can give some hints to those who are having the same problem. It works for me! Good luck.