# Monday, March 30, 2009

Heather Solomoposts a new trick about altering Sharepoint menu's second level navigation arrow. Here are the steps :

    Open your master page. Switch to Code View. Search for "TopNavigationMenu".  Using Intellisense in the code view, or using the Properties pane, add the following property to the AspMenu tag:

    DynamicPopOutImageUrl="insert image URL/path here"

    So your code should look like:
    <SharePoint:AspMenu
          ID="TopNavigationMenu"
          Runat="server"
          DataSourceID="topSiteMap"
          blah blah.....
          DynamicPopOutImageUrl="/images/myimage.gif">
You can read full post by Heather here.
posted on Monday, March 30, 2009 9:58:07 AM (GMT Daylight Time, UTC+01:00)  #    Comments [0] Trackback
# Saturday, March 28, 2009

    class DirectoryActions
    {
        string userName, password, domain = "";
 
        
        
public DirectoryActions(string username, string password, string domain)
        {
            this.userName = username;
            this.password = password;
            this.domain = domain;
        }
          private DirectoryEntry GetDirectoryObject()
        {
            DirectoryEntry oDE;
            oDE = new DirectoryEntry("LDAP://" + domain, userName, password, AuthenticationTypes.Secure);
            return oDE;
        }
 
          

        public  DirectoryEntry GetUser(string mail)
        {
            ArrayList mylist = new ArrayList();
            DirectoryEntry de = GetDirectoryObject();
            DirectorySearcher srch = new DirectorySearcher(de);
            srch.Filter = "(&(objectClass=user)(mail=" + mail + "))";
            srch.SearchScope = SearchScope.Subtree;
            SearchResult results = srch.FindOne();
            DirectoryEntry d = results.GetDirectoryEntry();
            return d;
        }
    }

posted on Saturday, March 28, 2009 9:56:58 AM (GMT Standard Time, UTC+00:00)  #    Comments [1] Trackback
# Wednesday, March 25, 2009

After you install Windows SharePoint Services 3.0 SP1, declarative workflows will not start automatically if the following conditions are true:

1. The Windows SharePoint Services Web application runs under a user's domain account.
2. The user logs in by using this domain account.
3. The site displays the user name as System Account.

Here is the link to the solution : 
http://kbalertz.com/947284/declarative-workflow-start-automatically-after-install-Windows-SharePoint-Services-Service.aspx
 

posted on Wednesday, March 25, 2009 9:56:32 AM (GMT Standard Time, UTC+00:00)  #    Comments [2] Trackback
# Saturday, March 21, 2009

To re-use a workflow in another list:

Create a new workflow on the new list.Create at least one step, one condition and one action in this workflow. This ensures that the files shown above are created and they will be replaced by the next operations.From the original workflow open the .xoml file as XML and copy the entire contents to the clipboard.Open the .xoml file for the new workflow and replace the entire contents with the copy from (3).Repeat this operation for the xoml.rules file.Double click the .xoml file for the new workflow to open the workflow in the Workflow Designer and clickCheck Workflow to verify no errors and then click Finish to ensure the workflow is saved.

Original post on  Nick Grattan 's blog
posted on Saturday, March 21, 2009 9:55:42 AM (GMT Standard Time, UTC+00:00)  #    Comments [0] Trackback
# Friday, March 20, 2009

posted on Friday, March 20, 2009 9:54:34 AM (GMT Standard Time, UTC+00:00)  #    Comments [0] Trackback
# Monday, March 16, 2009

The WSRP Toolkit for SharePoint provides sample code for producing WSRP conformant data from SharePoint lists and libraries.  External portal platforms (e.g. BEA AquaLogic Portal, IBM WebSphere Portal, SAP NetWeaver Enterprise Portal etc.) can then render SharePoint data natively through their WSRP consumer portlets.

The WSRP Toolkit for SharePoint consists of the following assets:

    Visual Studio sample projects that demonstrate two different approaches to producing WSRP conformant output from SharePoint lists and libraries A whitepaper that provides details on the different architectural approaches of the two WSRP producer samples Screen casts showing the two WSRP producer samples in action
You can find the Sharepoint Product Team's full post here   You can download the toolkit via this link
posted on Monday, March 16, 2009 9:52:51 AM (GMT Standard Time, UTC+00:00)  #    Comments [0] Trackback
# Sunday, March 15, 2009

Microsoft describes techniques to create Microsoft Office SharePoint Server 2007 Web content management (WCM) sites that are optimized for search engines, and what to avoid to help improve search ratings.

"Search engine optimization is the process of optimizing sites and pages for search engines to result in better relevance and ranking for the site. The standard best practices or rules for search engine optimization that you might apply for Web pages are equally relevant and important for Web content management (WCM) sites you develop in Microsoft Office SharePoint Server 2007. A page or site that is not optimized properly for search engines can appear much lower is the search results or have lower rank, which can result in loss of traffic to the site. A site or page that is better optimized for search engines appears higher in the search results and will help increase traffic to your site."

If you want to read full article, use this link 

posted on Sunday, March 15, 2009 9:52:14 AM (GMT Standard Time, UTC+00:00)  #    Comments [0] Trackback
# Wednesday, March 11, 2009

Workflow Engine knows how to send e-mail to a column with “Allow multiple selections” but it’s the SharePoint Designer UI that doesn’t. If you want to send an email message to "People or Group" type field that includes "Allow Multiple Selection" you can do this via following instructions.

    Turn off “Allow multiple selections” for your column. Create your workflow. (Create a send an email action and select your people and group field) Finish your workflow and then publish it. Turn back on “Allow multiple selections”

Thats all :), It is an "hacky" solution but it works

posted on Wednesday, March 11, 2009 9:51:13 AM (GMT Standard Time, UTC+00:00)  #    Comments [0] Trackback
# Tuesday, March 10, 2009

Most of people wants to know differences between WSS 3.0 and MOSS 2007. You can find the comparison sheet via this link. 

posted on Tuesday, March 10, 2009 9:50:46 AM (GMT Standard Time, UTC+00:00)  #    Comments [0] Trackback
# Thursday, March 05, 2009

Microsoft publish new posters about Microsoft Office Sharepoint Server 2007, Windows Sharepoint Services 3.0 and Microsoft Office Infopath 2007. You can view the big picture about these technologies.

You can find the pictures via this link 

posted on Thursday, March 05, 2009 9:50:21 AM (GMT Standard Time, UTC+00:00)  #    Comments [0] Trackback
# Wednesday, March 04, 2009

I saw the link  on Bahadır Arslan's blog and i think it's very funny.

"Get the red pill, get the blue screen" :)

http://www.collegehumor.com/video:1886349 

posted on Wednesday, March 04, 2009 9:49:59 AM (GMT Standard Time, UTC+00:00)  #    Comments [0] Trackback

void GetSites(string URLOfWebApplication) 
{
   SPSite SiteCollection = new SPSite(URLOfWebApplication); 
   SPWebCollection Site = SiteCollection.AllWebs;

   foreach (SPWeb in Site)
   {
      SiteListComboBox.Items.Add(x.ToString()); 
   }

   SiteListComboBox.Text = "Please Select a Site";
}

posted on Wednesday, March 04, 2009 9:49:40 AM (GMT Standard Time, UTC+00:00)  #    Comments [0] Trackback
# Tuesday, March 03, 2009

void GetItemsFromDocumentLibrary(string URLOfWebApplicationAndSite, stringDocumentLibrary)
{
   SPSite mysite = new SPSite(URLOfWebApplicationAndSite);

   SPWeb myweb = mysite.OpenWeb();
   SPFolder mylibrary = myweb.Folders[DocumentLibrary];
   SPFileCollection files = mylibrary.Files;

   foreach (SPFile in files) 

   { 
      ItemListBox.Items.Add(x.Name.ToString()); 
   }
}

posted on Tuesday, March 03, 2009 9:49:20 AM (GMT Standard Time, UTC+00:00)  #    Comments [0] Trackback
# Sunday, March 01, 2009
void PostFile(string URLOfWebApplication, string SiteName, string DocLibraryName, stringFilePath, string FileName, string FileExtension) 

   Stream uplFileStream = new FileStream(FilePath, FileMode.Open); 
   byte[] contents = new byte[Convert.ToInt32(uplFileStream.Length)]; 
   uplFileStream.Read(contents, 0, System.Convert.ToInt32(uplFileStream.Length)); 
   uplFileStream.Close(); 
   string docLibPath = URL + "/" + SiteName + "/" + DocLibraryName + "/"; 
  
   SPSite site = new SPSite(docLibPath); 
   SPWeb web = site.OpenWeb(); 
   SPFolder docFolder = web.GetFolder(docLibPath); 
    SPFile docFile;
   docFile = docFolder.Files.Add(FileName + FileExtension, contents);
}
posted on Sunday, March 01, 2009 9:49:01 AM (GMT Standard Time, UTC+00:00)  #    Comments [0] Trackback

SPSite site = new SPSite(" http://litwareportal:28779" ); 
SPWeb web = site.AllWebs[0]; 
SPUser user = web.AllUsers["CONTOSO\\semih"]; 
SPGroup gr = web.Groups["Home Visitors"]; 
gr.AddUser(user);

posted on Sunday, March 01, 2009 9:48:37 AM (GMT Standard Time, UTC+00:00)  #    Comments [0] Trackback