Friday 21 October 2016

Sharepoint 2013 - Remove "Recent" from left menu

Problem : 
My client has requested that she be able to remove (or hide) the "Recent" menu header from the left menu in Sharepoint 2013. This is for specified site collections/sites/pages, not farm-wide.

So far, I've tried to do this via JQuery by adding the following code

script type="text/javascript">
jQuery(document).ready(function() {
 jQuery(".ms-core-listMenu-item:contains('Recent')").parent().hide();
});
/script>

via both a script web-part and via a content editor web-part (using embed code), but to no avail. I've also tried adding the code above to a .js file (without the script tags) and calling it as



instead, but it still doesn't work.

I've checked the page source and I can see the script is included. The "Recent" menu item however, is still there. My prefered solution would be to hide the menu item rather than remove it - I suspect removing it will probably cause issues as Sharepoint likely expects it to be there.

There's no requirement to use JQuery - it just seemed to me to be the best way. I would also rather not edit master pages unless there's no other choice.

Any ideas?

Solution: 
If its specific site collection why don't go to site settings >> navigation settings and remove the "Recent" heading and its links.
Am I missing something?



script src="http://code.jquery.com/jquery-latest.min.js" type="text/javascript">/script>

script type="text/javascript"
jQuery(document).ready(function() {
  jQuery(".ms-core-listMenu-item:contains('Recent')").parent().hide();
});
/script>

Tuesday 4 October 2016

SharePoint Object Model Hierarchy



SPFarm: The SPFarm object is the highest object within the Windows SharePoint Services object model hierarchy. The servers property gets a collection representing all the servers in the deployment and the services property gets a collection representing all the services.

SP SERVER: The Server object represents a physical server computer. The service instances property provides access to the set of individual service instances that run on the individual computer.

SPWebApplication: Each SPWebApplication object represents a load-balanced web application based in Internet Information Services (IIS). The SPWebApplication object provides access to credentials and other server Farm-wide application settings. The Sites property gets the collection of site collections within the web application and theContentDatabases property collection of content databases is used in the web application. The SPWebApplication class replaces the obsolete SPVirtualServer class but it can still be helpful to think of a SPWebApplication object as a virtual server; that is, a set of one or more physical servers that appear as a single server to users.

SP Content Database:
 the SPContentDatabase object inherits from the Database class and represents a database that contains user data for a SharePoint web application. The Sites property gets the collection of site collections for which the content database stores data and the WebApplication property gets the parent web application.

SPSiteCollection: An SPSiteCollection object represents the collection of site collections within the web application. The Item property or indexer gets a specified site collection from the collection and the Add method creates a site collection within the collection.

SPWEB: Each site collection includes any number of SPWeb objects and each object has members that can be used to manage a site, including its template and theme, as well as to access files and folders on the site.

SPLIST: Each SPList object has members that are used to manage the list or access items in the list.

ITEMS: Each SPListItem object represents a single row in the list.

Sample code: 

using (SPSite site = new SPSite("http://************")) // Site Collection
    using (SPWeb web = site.OpenWeb()) // Site    {
        SPList list = web.Lists["MyList"]; // List        int i = 1;
        foreach (SPListItem item in list.Items)
        {
            Console.WriteLine("Item: " + (i++).ToString());
            Console.WriteLine(item.Name);
            Console.WriteLine(item.Title);
            Console.WriteLine(item.GetFormattedValue("First Name"));
            Console.WriteLine(item.GetFormattedValue("Last Name"));
            Console.WriteLine(string.Empty);
        }
    }
}


Reference:
MSDN

Monday 3 October 2016

SharePoint 2016 Feature Comparison for Social Feature

In this Article, I will List a Feature comparison between SharePoint 2013 VS SharePoint 2016 Including the Standard and Enterprise Features. Please see below table for comparison across SharePoint version. Below table will compare the Social Features Only.


Social features
SharePoint Foundation 2013
SharePoint Server 2013 Standard CAL
SharePoint Server 2013 Enterprise CAL
SharePoint Server 2016 Standard CAL
SharePoint Server 2016 Enterprise CAL
Ask Me About
No
Yes
Yes
Yes
Yes
Blogs
Yes
Yes
Yes
Yes
Yes
Communities Reputation, Badging, and Moderation
No
Yes
Yes
Yes
Yes
Community
No
Yes
Yes
Yes
Yes
Company Feed
No
Yes
Yes
Yes
Yes
Document Conversations with Yammer
No
No
No
No
No
Follow
No
Yes
Yes
Yes
Yes
Microblogging
No
Yes
Yes
Yes
Yes
Newsfeed
No
Yes
Yes
Yes
Yes
One Click Sharing
No
Yes
Yes
Yes
Yes
People, Sites, Document Recommendations
No
Yes
Yes
Yes
Yes
Personal Site
No
Yes
Yes
Yes
Yes
Photos and Presence
Yes
Yes
Yes
Yes
Yes
Profile
No
Yes
Yes
Yes
Yes
Ratings
No
Yes
Yes
Yes
Yes
Shared with Me
No
No
No
No
No
Site Feed
No
Yes
Yes
Yes
Yes
OneDrive for Business
Yes6
Yes
Yes
Yes
Yes
Tag profiles
No
Yes
Yes
Yes
Yes
Tasks integrated with Outlook
No
Yes
Yes
Yes
Yes
Trending Tags
No
Yes
Yes
Yes
Yes
Wikis
Yes
Yes
Yes
Yes
Yes

Social

Office 365
 
Applies to: Office 365
Topic Last Modified: 2016-05-17
Microsoft SharePoint Online is a collection of Web-based tools and technologies that help your organization store, share, and manage digital information. Built on Microsoft SharePoint Server 2013, this hosted service is ideal for working on projects, storing data and documents in a central location, and sharing information with others. The following Social features let people work together in ways that are most effective for them. How? By providing great collaboration tools that anyone can use to share ideas, find people and expertise, and location business information.

Ask Me About

The Ask Me About section of your profile lets you list your areas of expertise, presenting yourself as a go-to person for those areas to anyone who visits your profile page. Learn more about SharePoint profiles.

Blogs

Blogs can enable an organization to quickly share information among employees, partners, or customers. People can add insight to a difficult subject area, provide inspiration and guidance, or explain a new guideline or procedure.

Communities Reputation, Badging, and Moderation

When you participate in community discussions, you build your reputation as an expert and earn points and badges that reward your contributions. If you’re really into it, you can become a moderator and work behind the scenes to makes sure the community thrives. Learn more about moderating a community.

Community

An online community is a virtual place where ideas are discussed and shared. It promotes open communication by fostering discussions among users who both share their expertise and learn from others. Learn more about creating a community.

Company Feed

The company feed is an organization’s public newsfeed. All posts appear to the company, including those created by people that users might not be following. Learn more about Company Feed.

Document Conversations with Yammer

If your organization uses Yammer as its default social network, you can start a conversation about a document, image, or video that is stored in a SharePoint Online document library or in OneDrive for Business. The Yammer conversation appears within the document in your browser, allowing for real-time collaboration with people in your organization. Anyone with access to the file can take part in the Yammer conversation. Learn how to edit documents from Yammer.

Follow

Users can follow people, documents, sites, and tags to see newsfeed postings associated with people, documents, sites, and tags that interest them. Learn more about following a SharePoint site.

Microblogging

Microblogging lets users post items of interest in a newsfeed and participate in conversations. To learn more about microblogging, see Post something to everyone.

Newsfeed

A newsfeed is a place to post information and reply to other posts, and to get updates about people and content you’re following. You can post to the public newsfeed or to newsfeeds on team sites on which you’re a member. To learn more about the SharePoint newsfeed, see Post something to everyone.

One Click Sharing

You can easily share documents and sites with others in your organization, from your OneDrive for Business and Sites pages, helping promote team collaboration. Learn more about sharing ideas, sites, and content.

People, Sites, Document Recommendations

Your OneDrive for Business and Sites pages give you suggestions for documents and sites to follow, based on your profile information and newsfeed activity. Learn more about suggested documents to follow.

Personal Site

Each SharePoint Online users has a personal site where data is personalized for them. Personal site includes a Newsfeed, OneDrive document library, and Sites pages. To learn more about sharing ideas, sites, and content.

Photos and Presence

Exchange Online and Skype for Business Online integration with some Office 365 plans allows users to sync their profile pictures and presence indicator with SharePoint Online. Photos appearing in a person’s About Me page are managed by Exchange Online and are no longer managed by using the SharePoint admin center.

Profile

Part of a user’s profile is fed in from the Office 365 directory service. If an organization sets up Office 365 Directory Synchronization (DirSync), then user profiles will sync with that organization’s Active Directory accounts. Learn more about SharePoint profiles.

Ratings

Users can add ratings to their OneDrive for Business libraries that allow sites visitors to ‘Like’ a library document or to use a ‘star’ tool to rate it. Learn more about adding a ratings feature to a library.

Shared with Me

Find documents that others have shared with you. Shared with Me eliminates the worry of finding those important items, because now they're all visible in a single view from within your OneDrive for Business. For more information, see View documents and folders shared with you.

Site Feed

A site feed, similar to a newsfeed, is a place on a team site to post information, and reply to other posts. Learn more about posting something to a small group of people.

OneDrive for Business

OneDrive for Business is a service available with SharePoint Online that lets users sync documents to the cloud, and also to their computers. Learn more about OneDrive for Business.

Tag profiles

Tag profiles display information about tags that appear in a newsfeed. Information includes conversations that reference the tag and a list of related tags. Learn more about tags.

Tasks integrated with Outlook

You can synchronize your SharePoint task lists with Exchange so that you can manage and add tasks by using Outlook.

Trending Tags

Currently popular #tags references appear in public newsfeed posts.

Wikis

A wiki is a site designed for groups of people to quickly capture and share ideas by creating simple pages and linking them together. Every team site is a wiki, but you can also add a separate wiki page library to a site, or create a large-scale Enterprise wiki as a separate site or site collection. Learn more about creating a wiki.

Feature Availability

To view feature availability across Office 365 plans, standalone options, and on-premise solutions, see SharePoint Online Service Description

Wednesday 28 September 2016

10 Things you can do to make SharePoint Secure



  1. No Anonymous access
  2. Use SSL
  3. Use Claim based or Form Based authentication
  4. Use Unqiue permissions
  5. Use groups to manage the permissions
  6. make sure all authenticated user group not added any where
  7. enable the auditing on the Site
  8. make sure your sharePoint farm is upto date for security vulnerabilities(MSFT release every month).
  9. reduce the number of site collections admins.

10. the best way to test for everything is to do unit testing, and test every possible combination of possible vulnerabilities you can think of. You can either script this, or do it manually.

Picture library slideshow using Client object model

Sharepoint Picture library slideshow using Client object model:

Note :

     Please add your CSS class and I unable to use  HTML tag. that why i have removed "<" simple

HTML Code : 
 div class="container">
            div class="row">
                div class="col-md-8 col-sm-8">
                    div id="carousel-main" class="carousel slide" data-ride="carousel">
                       
                        div class="carousel-wrapper">
div id="carousel-main" class="carousel slide" data-ride="carousel">
       
        ol class="carousel-indicators" id="carousel-indicators">
        /ol>
div id="SlideShowImg" class="carousel-image">
       
        div id="SlideShowText" class="carousel-inner" role="listbox">
       
        /div>      
        /div>
      /div>
                       
                        Previous Next
               
                /div>
                div class="col-md-4 col-sm-4">
                    div >
                        div class="widgets">
                            div class="widget-row"> span class="widget-title">My Team Sites
                           

                            div class="widget-row"> span class="widget-title">Safety First
                       
                        div class="safety"> img src="https://nabholz.sharepoint.com/SiteAssets/images/SafetyTracker.png">
                 
                   
               
           
       
       

Javascript Code : 

SharePoint:scriptlink runat="server" Name="SP.js" Localizable="false" OnDemand="False" LoadAfterUI="True">
script type="text/javascript">
ExecuteOrDelayUntilScriptLoaded(ViewImgSlideShow, "sp.js");

var text = "";
var indicator = "";
var Active = 0;


function ViewImgSlideShow() {

  var siteUrl = _spPageContextInfo.siteServerRelativeUrl;


  var context = new SP.ClientContext(siteUrl);
  var web = context.get_web();
  var list = context.get_web().get_lists().getByTitle('Banners');

  //It will fetch all the items from the list
  var myquery = new SP.CamlQuery();

// If you need any filter option use Caml Query otherwise Remove this code :

  myquery.set_viewXml('View>Query>Where>Geq>FieldRef Name=\'ID\'/>' +
    'Value Type=\'Number\'>1
RowLimit>100');
  myItems = list.getItems(myquery);
  context.load(myItems);

  //If the items load correctly then success function will be called
  context.executeQueryAsync(Function.createDelegate(this, this.success_ViewImgSlideShow), Function.createDelegate(this, this.failed_ViewImgSlideShow));

}

function success_ViewImgSlideShow() {
  var ListEnumerator = this.myItems.getEnumerator();
  var aTxt;
  Active = 0;
  while (ListEnumerator.moveNext()) {
    var currentItem = ListEnumerator.get_current();
    if (Active == 0) {
      aTxt = "active";
    } else {
      aTxt = "";
    }
    text += "div class='item " + aTxt + "'>span id='imageItem_" + Active + "'>
img class='no' src='" + currentItem.get_item('FileRef') + "' />  ";
    Active += 1;
  }
}


function failed_ViewImgSlideShow(sender, args) {
  alert("failed. Message:" + args.get_message());
}
/script>

OutPut: