Technology enthusiast: SharePoint, PowerShell, SEO, HTML, CSS, JavaScript, iOS, Web and Mobile Developer ... and above all an entrepreneur.

 

PowerShell count number of characters in a string

I was just trying to count the number of characters in a string using PowerShell. It seems there is a very simple way to do it. It is a bit different if you are (me include) coming from a C language background like javascript, php or some other similar ones …

So the syntax is as follows:

I have written the code above on the examples from Scripting Guy! Blog.

Get SharePoint list items and export them to XML using PowerShell

Last time I was explaining how to get SharePoint list items using PowerShell script. In the this article I am making a step forward.

So, I want to get list items from SharePoint and export them into an XML file.

If you want to copy/paste the code please visit the source page.

What is The New York Times saying about Peruvian gastronomy?

lincolnisland:

moralesbrothers

Jose Antonio Morales, Lincoln Island’s founder, is an entrepreneur with experience on SMBs and information technologies.

CC Rights to PEGA Sociedad Peruana de Gastronomía Flickr

In his article published in January 2012, Flavors of Peru Recast, Mr. Dave Cook published an interesting article about peruvian food in New York:

“LET’S go out for Peruvian!” doesn’t quite have the ring of a dinner invitation for Chinese or Italian. But as is increasingly clear, Peruvian cuisine — whose indigenous potatoes, chili peppers and seafood have been supplemented by ingredients and transformed by culinary techniques from many countries, China and Italy included — has much to offer beyond rotisserie chicken.

Read More

Get items from SharePoint List using PowerShell script

For long time I wanted to dive a bit deeper into PowerShell. Hopefully I will be able to post few of the sharepoint powershell tricks here.

First one is about getting list items from a sharepoint list: visit my homepage.

jQuery animated swap div content on hover effect

 

This is a simple sample how to swap div content on mouse hover. Actually I first stumbled upon this web article: http://spoonfedproject.com/jquery/jquery-image-slide-on-hover-effect/. After making few changes I was able to swap actual content of a div instead of background.

You can find the whole article here: http://www.robertkuzma.com/2011/01/jquery-animated-swap-div-content-on-hover-effect/.

XSLT display random row in SharePoint

Today I was updating a web site for a customer. They needed new web part in SharePoint do display random content. As i eventually figured out this was quite easy to do:

<xsl:variable name=”highlight” select=”ddwrt:Random(1,count($Rows))” />
<xsl:for-each select=”$Rows[position()=$highlight]”>

(I googled the code in: http://blog.allyis.com/blog/bid/29519/Randomly-Displayed-Content-in-SharePoint)

How to Create a Custom XML Output using SharePoint Services 3.0

There are just few simple steps:

  1. Create a List
  2. Open SharePoint Designer 2007 and open a blank .aspx page.
  3. Delete all the code generated in .aspx page
  4. In the Task pane open the Data Source Library and click Show Data
  5. Select the Title field and than click Insert Selected Fields as … Multiple Item View
  6. In Change Layout select Plain List of Titles.
  7. Add XML declaration: <?xml version=”1.0″ encoding=”utf-8″ ?>
  8. Remove all HTML tags
  9. After <WebPartPages:DataFormWebPart runat=”server” add additional property SuppressWebPartChrome=”True” wich will prevent the chrome being displayed. In short: now <table> tags around the web part.
  10. Go to the <xsl:template section and replace the <p> tags with: <xsl:text disable-output-escaping=”yes”>&lt;Root&gt;</xsl:text> … – this will be the first node of the XML file. You will also need to end this tag.
  11. do the same for all other child nodes you want to display.

List in SharePoint:

XML Output:

For the source code go to www.robertkuzma.com.

‘Stsadm’ is not Recognized as an Internal or External Command, Operable Program or Batch File.

Add stsadm.exe to paths, in other words, make Windows able to execute stsadm no matter what folder you are in.

Click Start > Control panel > System > Advanced system settings

Under “System Variables” click Path (You will need to scroll down a bit - see the image attached). Click edit.

At the end of the line add:

;C:\Program Files\Common Files\microsoft shared\Web Server Extensions\12\BIN

Can not Sign-in to a Site Collection: Login Prompt Asks for Authentication

I created a new SharePoint Site Colletction www.domain.com but I could not sign-in. The most weird was I could sing in from my other machine. Than I figured out there might be an issue on local machine where the Site Collection was residing.

I googled a bit and found the solution quite soon: http://www.sharepointdev.net/sharepoint–setup-upgrade-administration-operation/login-prompt-for-site-collection-1135.shtml

I had to disable the loopbackcheck. Here is how Chris Caravajal is describing it:

  1. Click Start, click Run, type regedit, and then click OK.
  2. In Registry Editor, locate and then click the following registry key:
    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa
  3. Right-click Lsa, point to New, and then click DWORD Value.
  4. Type DisableLoopbackCheck, and then press ENTER.
  5. Right-click DisableLoopbackCheck, and then click Modify.
  6. In the Value data box, type 1, and then click OK.