Nick

Nick

(8 comments, 29 posts)

My name is Nick. If you want to know a bit more about me, click the About page item in the above menu!

Home page: http://www.ngpixel.com/

Posts by Nick

Sharepoint – The missing configuration screen

1

This Sharepoint Configuration Wizard screen was removed from the final Sharepoint build, at the very last minute:

Sharepoint Level of Difficulty

Sharepoint 2010 – Display compilation errors

3

By default, Sharepoint displays a friendly error box that tell pretty much nothing about the error that just occurred. It is possible to display the default yellow screen of death with all the details, found in usual ASP applications.

1) Navigate to C:\inetpub\wwwroot\wss\VirtualDirectories\

2) Open the Sharepoint web application folder you wish to edit.

3) Edit the web.config file.

4) Find the property customErrors and set it’s mode value to Off.

5) Find the property compilation and set it’s debug value to true.

6) Find the property SafeMode and set it’s CallStack value to true.

7) Do a iisreset.

Done!

Sharepoint 2010 – Custom Error Pages

3

Unless you love the default Sharepoint error pages for 404 (not found) and 401 (access denied), it is usually a good idea to change them. The steps are a bit different than a standard ASP.net application.

1) Browse to C:\inetpub\custerr\

2) You should now see a list of localization folders like en-US or fr-FR. Open the folder you want to edit and modify the error pages for 401,403,404 and 500.

3) Now browse to C:\inetpub\wwwroot\wss\VirtualDirectories\ and open the folder associated to the Sharepoint site you would like to affect.

4) Edit the file web.config and find the keyword customErrors. Replace the complete customErrors code block with:

<customErrors defaultRedirect="404.htm" mode="On">
	   <error redirect="401.htm" statusCode="401" />
	   <error redirect="403.htm" statusCode="403" />
	   <error redirect="404.htm" statusCode="404" />
	   <error redirect="500.htm" statusCode="500" />
</customErrors>

5) Now find the keyword <system.webServer>. Inside this block, place the following block code. (If the httpErrors block already exists, replace it completely!)

<httpErrors errorMode="Custom" existingResponse="Auto">
</httpErrors>

6) Save web.config and do the usual iisreset command if needed.

ASP.net – Using multiple forms on the same page

2

One if the big issue with ASP.net programming is having multiple forms on the same page. You can only have 1 form with runat=”server” on your page or it will throw an exception. When you have a form on your page and search box in your header, it can cause some big issues when you press Enter. The wrong postback will be triggered in the second form.

The solution is to use an <asp:panel> with a defaultbutton around each of your “HTML forms”. There’s only 1 form containing the whole page with 1 panel for every “HTML form”. By “HTML form”, I mean a series of inputs that are part of the same logical group and not an actual <form> tag.

Pressing Enter in any textbox will now trigger the correct default button. Problem solved!

Sharepoint – Access QueryString from custom webpart

2

I was trying to access the QueryString parameters inside a custom webpart coded in C#. I would usually use Request.QueryString but the Request object was simply not available in this case. Turns out it is found under the Page object:

string kquery = Page.Request.QueryString["kqry"];

Sharepoint Designer – “The server could not complete your request” error message

1

I started getting this error message yesterday while working in Sharepoint Designer. I would get the message whenever I would open a Sharepoint website. The solution to this problem is quite simple:

1) Open Internet Information Services (IIS) Manager.

2) Expand your computer list on the left then click on Application Pools.

3) Locate the application pool used by your Sharepoint website.

4) Right-click on the application pool and select Recycle.

You should now be able to connect to your Sharepoint website using Sharepoint Designer as usual.

CSS: How to remove the dotted outline on links

0

When you click on a link element, it becomes focused and displays a dotted border around it. In some case, you might want to remove that outline for aesthetics, especially on menu links that are displayed as block elements. To remove that outline, simply place this CSS line of code:

a:focus {
	outline:none;
}

In the above example, all links that become focused won’t display the outline.

Keep in mind that hiding that outline will prevent people use keyboard navigation to see which element is selected.

PHP: Converting titles to permalinks

0

Having the item title in the URL is a good way to improve SEO for your website. For example, /shop/adobe_photoshop_cs5/ is much more meaningful to users and search engines than /shop.php?i=83s9f8haj8dj. Unfortunately, not all characters are valid in URLs, which is where a permalink function comes handy to convert titles into a nice URL format. Permalinks usually remove all non-alphanumerical characters and replace spaces with underscores. “Adobe Photoshop CS5” is then converted to “adobe_photoshop_cs5”.

function permalize($input) {
	return str_replace(' ','_',strtolower(trim(preg_replace("/[^a-zA-Z0-9 ]/", '', $input))));
}

Note that you can use some special characters in URLs (like + and -), I usually like to remove them completely, but it is totally fine to leave them should you choose to.

If you don’t want to rely on a permalink to retrieve database data about your item, you can still insert the ID in the URL (e.g. /shop/34655/adobe_photoshop_cs5/ ). The permalink could then be discarded in the code while still providing better readability and SEO.

Adobe CS5 is out… and so is Fireworks

0

fwcs5_banner

Today, Adobe launched the new Creative Suite 5. There’s is tons of great new features especially in Photoshop and After Effects. Speaking of Photoshop, the new Content Aware fill is simply incredible. You can mark an area to fill and the software will analyse the surrounding patterns and colors to fill in and remove the area you selected.

But of course, my main tool is Fireworks and while the CS4 version was full of bugs and crashing frequently, I’ve seen it mature in the development stages and I can now say it’s really stable and these problems are things of the past. I’ve not had a single crash or the classic “An unknown error occurred" message using the last milestone build. Fireworks also boot in just a few seconds (as fast as 3-4 seconds) compared to the slow 15 seconds of CS4.

There is also the new Compound feature which is similar to the vector path tools but let you preserve the shapes you used to build that vector and edit them in real-time. Another great new feature is the “Snap to pixel” function which relocate the shape borders to the nearest pixel in the canvas. Blurry borders when resizing vectors are thing of the past.

Another new feature is the possibility to save projects as templates so you can easily use them as base projects later.

While there is some great new features in Fireworks CS5, the main goal in this release was to fix bugs and achieve better performance and stability, which the development team did. It’s really a good thing they decided to stop working on new features as the base platform was getting more and more buggy. The application is now back on track as a powerful and stable design and prototyping tool.

I hope you will enjoy this new release of Fireworks because I certainly do!

http://www.adobe.com/products/fireworks/

The iPad, just a big iPod Touch…

1

ipad_isityousteve
Big deception. I was expecting some kind of new UI and more hardware features.
I guess we’ll have to wait for V2 and see…

Nick's RSS Feed
Go to Top