Tag Archives: HTML

Anchor tags not working in firefox

Here is the simple issue fixed when working with HTML. This is kind of a browser compatibility issue.

In my SharePoint page we have created a CEWP and placed some HTML code along with anchor tag bookmarks features.

But Book marks is working fine in I-Explorer and not working in Firefox.

This got fixed by removing the “#” from the name of the Div tag name of the Bookmark.

Configuring MOSS 2007 server to search pdf documents – install and configure pdf ifilters

In this article we will see how to configure MOSS 2007 to search PDF documents.
 
Application Server:
  1. Download Adobe PDF IFilters 6.0
  2. Start –>Run–>> Services.msc and stop the IIS Admin service. The reason we need to do this is, the IFilters configuration needs an update to DOCICON.XML.
  3. Download the pdf icon image   of size 17X17 from the following location and save it as “icpdf.gif” somewhere to the local hard disk
    http://www.adobe.com/misc/linking.html
  4. Copy the icpdf.gif to the following location
    “C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\Template\Images”
  5. Go the C:\Program Files\Common Files\Microsoft Shared\Web server extensions\12\Template\Xml\
  6. Edit the DOCICON.XML by adding the following entry  pdf” Value=”icpdf.gif”/> 5
  7. Perform an IIS RESET
  8.  2
  9. Go to Search Settings under Central Administration and add the pdf as the new file type 7
Indexing Server:
  1. Run the IFilters installer on the Indexing Server
    1. Locate and then click the following registry subkey:
      HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Shared Tools\Web Server Extensions\12.0\Search\Applications\GUID\Gather\Search\Extensions\ExtensionList
    2. On the Edit menu, point to New, and then click String Value.
    3. Type 38, and then press ENTER.
    4. Right-click the registry entry that you created, and then click Modify.
    5. In the Value data box, type pdf, and then click OK. 4
  2. Go the C:\Program Files\Common Files\Microsoft Shared\Web server extensions\12\Template\Xml\
  3. Edit the DOCICON.XML by adding the following entry <Mapping Key=”pdf” Value=”icpdf.gif”/> 1
  4. Perform an IIS RESET
  5. 6
  6. Go to Search Settings under Central Administration and add the pdf as the new file type
  7. 3
  8. Go to SharePoint Service Provider
  9. Click on Search Setting
  10. 8
  11. Click on Content Source
  12. 9
  13. Perform the crawl again
  14. 10
Data: application/pdf 
  1. Upload the PDF documents to the Windows SharePoint Services 3.0 Web site.
    1. Stop and then start the Windows SharePoint Services Search service. To do this, follow these steps:a. Click Start, click Run, type cmd, and then click OK.
    2. Stop the Windows SharePoint Services Search service. To do this, type net stop spsearch at the command prompt, and then press ENTER.
    3. Start the Windows SharePoint Services Search service. To do this, type net start spsearch at the command prompt, and then press ENTER.
    4. Type exit to exit the command prompt.
 Now MOSS is ready to search pdf documents.

How W3C link checker Works

W3C link checker is a highly recommended link checker. It checks the website and its component such as hypertext links for both HTML and XHTML format; if it is working properly. It is important that a website contains high technical quality. W3C link checker will generate the following reports:

CSS style sheet and extracts a list of anchors and links
It checks that no anchor is defined twice.
All the links are dereferenceable
Warns about HTTP redirects

You can check your URL at W3C Link Checker and you will have to check through this form.

Image

When it is in summary mode, it may take time for loading process. When the checking is done, it will show you “List of broken links and redirects” if broken links were found. You have to go through the pages, fix the broken link or if unresolvable it would be better to delete it. However, the link checker considers robots exclusion rules. When the robots.txt files of the website disallow link checks, there will be no single information from the website that will be seen.

Also view “Markup Validation Service” This validator checks the markup validity of Web documents in HTML, XHTML, SMIL, MathML, etc.

Ref : W3C link checker in SEO

Sharepoint 2010 Fixed width Master Page Styling, no scrollbar issues

Recently I have created a custom master page for our new SharePoint server, First I have noticed that when the page loads, SharePoint  runs a java script function and sets the width of the page.

It is searching for the div tag  with Id  #s4-workspace  and if it finds one with this id, sets its width to fit the content. So I have added a class  s4-nosetwidth. If we add this class to s4-workspace,SharePoint wont set its width.

But very first time when I tried to create fixed width master page, I have faced so many issues with scroll bars and SharePoint modal dialog windows are not opening correctly. They are opening either with in  small height  and added scroll bars or  opening in fixed width and height with out scroll bars.

Mainly IE7 adding its own scroll bar to body  , as the page is fixed width so the scroll bar that is showing in the middle of the page is looking pretty ugly. I have fixed all these issues and below is the styling.

html{
background-color:#55A0A7;
overflow/**/:auto;
}

body.v4master {
width:1024px;
margin:0px auto;
overflow:visible;
background-color: transparent !important;
}

.ms-dialog body.v4master {
height: 100%;
overflow: hidden;
width: 100%;
}
body #s4-workspace {
left: 0;
overflow: auto !important;
overflow/**/: visible !important;
position: relative;
width: 100% !important;
display:table;
border-spacing:0px;
}

.ms-dialog body #s4-workspace{
display:block !important;
overflow/**/: auto !important;
}

Opening HTML Files in SharePoint 2010

I recently faced an issue where the user was attempting to open HTML documents from a document library. He only had an option to download the document. He wanted the ability to open the HTML document directly within the browser.

By default, SharePoint 2010 is blocking the ability to open HTML documents directly from a document library.

However this can be changed by adjusting the browser file handling option. The option is located here:

1. Central Admin\Application Management\Manage Web Applications.

2. Select General Settings for the specified web application

3. For Browser file handling, select permissive. The default is strict.

Had a meeting with Microsoft regarding new product Office 365

Office 365, yes finally its being launched in the gulf, Microsoft is planning to launch it on 25-26th of June 2012 within Bahrain.

Me, My Senior Pankaj Nallur and one of our Partner went yesterday to attend this meeting. It was a good experience, the complete overview was given by Nigel Horncastle, really nice guy and quite informative.

Nigel covered lot of features within the limited time of 1:15 hours, and it was quite helpful for us in moving forward in our business and IT solutions.

The Hot Coffee was quite Good, but most important the outcome of the meeting, or i must say the Office 365 presentation was worth listening.

We are also given some testing accounts which i will practice this week and upload some snaps with my first experience of this new Office product.

Currently the services include :

  • Exchange Online
  • SharePoint Online
  • Lync Online
  • Microsoft Office (Office Professional Plus)
It was a nice gathering with Nigel, and till now the product is worth spending money into, Lets see how it outcomes its profits in the Gulf.
References :

Facebook Link for Office 365

Twitter for Office 365

Get a trial version

Learn More about Office 365

Creating flat site collection breadcrumb for SharePoint sites

SharePoint has several ways to navigate through site hierarchy and many users are used to breadcrumb to see where they are etc. Some consider collapse breadcrumb “folder” control not too intuitive and you may be asked to define your breadcrumb more explicitly or as a “flat” set of links.

To save yourself some time from custom development of the breadcrumb you can take the breadcrumb “folder” content and render it in a flat format. To do that we will take the SharePoint:ListSiteMapPath control which lives on each masterpage and place it right inside s4-titletext in your main masterpage:

Here is the code:

<sharepoint:ListSiteMapPath ID="ListSiteMapPath11" runat="server" 
SiteMapProviders="SPSiteMapProvider" 
RenderCurrentNodeAsLink="false" 
PathSeparator="" CssClass="s4-breadcrumb" 
NodeStyle-CssClass="s4-breadcrumbNode" 
CurrentNodeStyle-CssClass="s4-breadcrumbCurrentNode" 
RootNodeStyle-CssClass="s4-breadcrumbRootNode" 
NodeImageOffsetX=0 
NodeImageOffsetY=582 
NodeImageWidth=16 
NodeImageHeight=16 
NodeImageUrl="/_layouts/images/fgimg.png" 
RTLNodeImageOffsetX=0 
RTLNodeImageOffsetY=582 
RTLNodeImageWidth=16 
RTLNodeImageHeight=16 
RTLNodeImageUrl="/_layouts/images/fgimg.png" 
HideInteriorRootNodes="true" 
SkipLinkText=""/>

Now you just need to adjust the CSS to flatten the structure; in here I’ll add the following CSS into the masterpage

.s4-title-inner .s4-titletext

{ margin-bottom: 3px; }

.s4-title-inner .s4-titletext ul, .s4-title-inner .s4-titletext ul li

{ display: inline; }

.s4-title-inner .s4-titletext ul.s4-breadcrumbRootNode, .s4-title-inner .s4-titletext ul.s4-breadcrumbNode

{ margin-left: 5px; }

This CSS is specific to the breadcrumb in s4-titletext and will not affect other elements on the masterpage.

Reference : Creating flat site collection breadcrumb for SharePoint sites

Opening HTML Files in Sharepoint 2010

I recently faced an issue where the customer was attempting to open HTML documents from a document library. He only had an option to download the document. He wanted the ability to open the HTML document directly within the browser.

By default, Sharepoint 2010 is blocking the ability to open HTML documents directly from a document library.

However this can be changed by adjusting the browser file handling option. The option is located here:

1. Central Admin\Application Management\Manage Web Applications.
2. Select General Settings for the specified web application
3. For Browser file handling, select permissive. The default is strict

Starting a SharePoint 2010 Branding Project: Using v4.master as base

There are several ways that you can pursue a branding project with SharePoint 2010. You can use one of the new themes, override existing styles with a new css file, alter an existing masterpage, or go completely custom. For this series of posts I will share how I go about altering an existing masterpage and styles.

Make a copy of the v4.master
Open the v4.master in Designer and do a save as. Save the new file as something different, such as custom.master, and then open it in Designer. Make sure the file is checked out before you start editing it.

Create a custom css file
Create a new css file and save it to a location that makes sense to you. You can save it to the Styles library, or on the server in the 14 hive, or anywhere that is accessible.

Create a changes.txt file
Use this file to record changes made to the masterpage as well as to paste in any controls that have been removed from the masterpage.

Link to the new css file in your copy of the masterpage:
Paste the following code into the HEAD of the masterpage and change the link to refer to your custom css file:


<sharepoint:CssRegistration 
name="http://spimages.stei.com/sp2010/styles_senet03.css" 
After="corev4.css" runat="server"/>

This code assures that your custom styles will always be able to override the corev4 styles.

Apply your custom masterpage to a site

Right-click on the new masterpage and select Set as Default Masterpage. You will only be able to preview fully your masterpage changes if the custom masterpage is applied to a site. Make sure that after each change you save the masterpage, check it in and then approve it. Make sure to check the file out before editing it again.

Now you can start altering the masterpage and overriding the css.

The Best Way to Add Custom CSS to SharePoint

To thoroughly customize your SharePoint site, you’ll need to use a custom CSS. SharePoint offers a way to specify a single CSS file to use via the “Master page” settings for the site. However, using this approach still limits you to customizing only those IDs and classes that are included on the pages by SharePoint. Moreover, using this setting applies to both site and system pages, which may not be desirable.

With these downsides in mind, the best approach is to create a custom master page and include references to one or more custom CSS files. Follow the steps below to include a custom CSS file in your master page.

    1. Open SharePoint Designer (SPD) and connect to the root level of your site’s site collection.
    2. In SPD, open the “Style Library” folder.
    3. Create a new CSS file and name it (e.g. “customstyles.css”).
    4. Open your master page file in SPD.
    5. In the tag add a link to your custom CSS just above the content place holder named “PlaceHolderAdditonalPageHead” as follows:
<link href=”/Style%20Library/customstyles.css” rel=”stylesheet” type=”text/css” />
Your custom master page is now using your new CSS file in addition to all of the CSS files SharePoint uses out-of-the-box. The idea is that you are taking advantage of the “cascading” property of cascading style sheets by layering your custom styles on top of what SharePoint creates in order to alter the SharePoint look-and-feel as desired—like a skin.