Jim Mathew's Sharepoint Blog (MOSS Techie from Abu Dhabi)

March 30, 2009

Debugging tips for SharePoint

Filed under: Debugging, Error — Jim Mathew @ 1:22 PM

Here is a nice article about debugging in SharePoint. Worth read….

http://blog.thekid.me.uk/archive/2007/07/25/debugging-tips-for-sharepoint-and-wss-exceptions.aspx

Here is another tip for hiding “An unexpected error has occurred” message

Replace  web.config, by modifying the line…

<SafeMode MaxControls=“200“ CallStack=“false“…

to…

<SafeMode MaxControls=“200“ CallStack=“true“…

You will also need to set custom errors to ‘Off’ .

You will no longer see the “An unexpected error has occurred” error page and instead you get a lovely ’standard ASP.Net error page’ with the stack trace and everything…development has got that little bit easier!!

Internet presence scenario (Office SharePoint Server 2007)

Filed under: Development, Internet — Tags: — Jim Mathew @ 1:03 PM

If you are planning to implement an internet edition of MOSS 2007 ….here is an exclusive article i found on Microsoft site about Office SharePoint Server 2007 Internet presence scenario. here is the link

http://technet.microsoft.com/en-us/library/cc950780.aspx

March 22, 2009

Understanding Field Controls and Web Parts in SharePoint Server 2007 Publishing Sites

Filed under: Development, Webpart — Jim Mathew @ 7:01 PM

Sharepoint 2007 CSS reference chart

Filed under: Sharepoint Designer, User interface — Tags: , — Jim Mathew @ 5:14 PM

Whenever i think about designing i always step into Heather Solomon’s Blog. I am a big fan of Heather Solomon for sharepoint designing stuffs. recently i have found an interesting stuff which is very useful for a sharepoint UI designer….The CSS reference chart…

Pleas have look here…  http://www.heathersolomon.com/content/sp07cssreference.htm

Enjoy!

How to show Outlook INBOX & TASK in sharepoint sites?

Filed under: Code Snippets, Tips & Tricks, Webpart — Tags: , , , — Jim Mathew @ 4:55 PM

Add a Content Editor Webpart  (CEWP) to page and paste the below code.

Inbox

<OBJECT classid=”CLSID:0006F063-0000-0000-C000-000000000046″

 width=”100%”>

  <param name=”Folder” value=”Inbox”>

</OBJECT>

 

Tasks

<OBJECT classid=”CLSID:0006F063-0000-0000-C000-000000000046″

 width=”100%”>

  <param name=”Folder” value=”Tasks”>

</OBJECT>

This is not a perfect solution for showing inbox in portal but a quick and simple tip….Enjoy!

Voila!

Flash Webpart Source Code

Filed under: Development, Webpart — Tags: , — Jim Mathew @ 2:58 PM

Note: Use this code @ your own risk.

using System;
using System.Web;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.ComponentModel;
namespace FlashWebPart {
   public class FlashWebPart : WebPart {

         private int flashWidth;
         private int flashHeight;
         private string flashUrl;

         [Personalizable(PersonalizationScope.Shared),
         WebBrowsable(true),
         WebDisplayName("Width"),
         WebDescription("Width of the flash"),
         Category("Configuration")]
         public int FlashWidth
         {
               get { return flashWidth; }
               set { flashWidth = value; }
         }

        
         [Personalizable(PersonalizationScope.Shared),
         WebBrowsable(true),
         WebDisplayName("Height"),
         WebDescription("Height of the flash"),
         Category("Configuration")]
         public int FlashHeight
         {
               get { return flashHeight; }
               set { flashHeight = value; }
         }

        
         [Personalizable(PersonalizationScope.Shared),
         WebBrowsable(true),
         WebDisplayName("URL"),
         WebDescription("Url of the flash file"),
         Category("Configuration")]
         public string FlashUrl
         {
               get { return flashUrl; }
               set { flashUrl = value; }
         }

         protected override void Render(HtmlTextWriter writer)
            {
                  if (!String.IsNullOrEmpty(FlashUrl))
                  {
                        string outHTML = “<OBJECT classid=\”clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\” ” + “codebase=\”http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=10,0,12,36\” ” + “WIDTH=” + flashWidth + ” HEIGHT=” + flashHeight + “> ” + “<PARAM NAME=movie VALUE=\”" + flashUrl + “\”> ” + “<PARAM NAME=WMODE VALUE=\”Transparent\”>” + “<PARAM NAME=quality VALUE=high> ” + “<EMBED src=\”" + flashUrl + “\” quality=high wmode=\”transparent\” WIDTH=\”" + flashWidth + “\” HEIGHT=\”" + flashHeight + “\” TYPE=\”application/x-shockwave-flash\” PLUGINSPAGE=\”http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash\”></EMBED> ” + “</OBJECT>”;
                        writer.Write(outHTML);
                  }
                  else
                  {
                        writer.Write(“Modify Webpart to add content URL”);
                  }
            }
   }
}

How to change sharepoint button text on runtime?

Filed under: Sharepoint Controls, Sharepoint Designer, User interface — Tags: — Jim Mathew @ 8:35 AM

Did you ever tried to change the text of sharepoint button using sharepoint designer. for eg: i had a requirement to change the “FINISH” to “SUBMIT” of Survey dataview webpart….i have tried to update directly from sharepoint designer but was a failure…..finally i got the below code …

try this….
Open your page in sharepoint designer. checkout the requiredd page and paste below code… and update your text…

<script>
var x=document.getElementsByTagName(“input”);
for (var i=0;i<x.length;i++)
  {
  if (x.item(i).type==”button”&&x.item(i).value==”Finish”)
     {x.item(i).value = “Submit”};
  }
</script>

Welcome to my Blog!

Filed under: Uncategorized — Jim Mathew @ 8:24 AM

Hi Everyone!….This blog is all about my experience in Sharepoint, .NET and my Creative experiences. I will be mostly focusing on sharing  tips and tricks about sharepoint technologies.if you feel any  complaints about my blog.please feel free to buzz me on jimmathew999@gmail.com

Blog at WordPress.com.