Tuesday, April 19, 2016
Fancybox on Sharepoint Home
In this article I will elaborate How to show a fancybox popup in SharePoint.
In my Scenario:
I need to show a fancybox popup window only once per session when I open a SharePoint site for the first time.
I checked the type of modal popup and found the FancyBox is fantastic popup that meet my requirement.
In my Scenario:
I need to show a fancybox popup window only once per session when I open a SharePoint site for the first time.
I checked the type of modal popup and found the FancyBox is fantastic popup that meet my requirement.
The Output should be as shown below:
Steps:
To achieve this Please follow the simple steps mentioned below:
To achieve this Please follow the simple steps mentioned below:
- First check what’s your Custom Master Page that used in your site.
- Open your SharePoint site –> Site Action –> Site Setting –> Master Page.
- Click Master Page, now you know what’s the default master page for your SharePoint site in this case is V4.master.
- Open Style Library to upload FancyBox and JQuery files (You can download this files by click FancyBox & JQuery).
- Open library via windows explorer to copy the downloaded files.
- Don’t forget to check-in and publish all the uploaded files as Major version.
- Open SharePoint Designer –> Master Page –> Copy current master page in this page V4.master. (We recommend to take a copy of your current Master Page).
- Rename the copied master page with an appropriate name in this case V4_Ad.master, edit Master Page in advanced mode.
- Add the reference to FancyBox, JQueryand CSS files in the Head Tag.
http://../../../Style%20Library/JS/JQuery/jquery-1.4.3.min.js
http://../../../Style%20Library/JS/fancybox/jquery.fancybox-1.3.4.pack.js
http://../../../Style%20Library/JS/fancybox/jquery.mousewheel-3.0.4.pack.js
http://../../../Style%20Library/JS/JQuery/jquery.cookie.js
- Pick your URL based on your location that you upload FancyBox and JQuery files.
- Add the following code in Head Tag too.
function openFancybox() {
setTimeout(function () {
$('#yt').trigger('click');
}, 500);
};
$(document).ready(function () {
var visited = $.cookie('visited');
if (visited == 'yes') {
return false; // second page load, cookie active
} else {
openFancybox(); // first page load, launch fancybox
}
$.cookie('visited', 'yes', {
expires: 7 // the number of days cookie will be effective
});
$("#yt").click(function () {
$.fancybox({
href: this.href,
type: "image",
transitionIn: "elastic",
transitionOut: "elastic"
});
return false;
});
});
- Add the following code in Body Tag.
- Check-in your Master Page as Major Version.
- The following dialog will be shown to publish your Master Page as Major Version.
- Open your site –> Site Action –> Site Settings –> Master Page
- Click Master Page and change your master page with the new Master Page.
- Apply this master page to all subsites.
- Try to browse your site you will note the popup window will be showed onload only once per session.
Note: If you need to show it when you load only a home page you can type the previous code in your home page layout.
Enjoy
PS: This article is part of this post.
Document Set Limitations and Considerations in SharePoint 2010
So time again for some more limitations that you should be aware of in SharePoint 2010. This time I am going to be tacking Document Sets.
1) Cannot declare document sets as In-Place Records
Since document sets are based on folders you cannot declare an entire Document Set as a record. You can however send it to the Records Centre to then have it declared. This is a little annoying for end users since they have two ways of declaring records.
2) Cannot nest Document Sets within Document Sets
No nesting of Document Sets is possible through the SharePoint UI. Therefore you can only have a single level of Document Sets available. It’s not necessarily a bad thing (otherwise most people would simply use Document Sets as folders and nest the things) but it’s well worth considering.
3) You cannot send a Document Set larger than 50MB using the Send To Command
If you use the send to feature with a Document Set, the sum for all documents in a Document Set cannot be larger than 50MB. This can be a major pain if you have a large Document Set and want to route it to a Records Center, it won’t work.
Note: Can anyone confirm that this has been fixed in SP1 or a CU? Rumor is that the June CU lifted this to 250MB.
4) Cannot create folders within Document Sets
You cannot create a Folder within a Document Set from the Web UI. However you can open up the Document Set in Explorer view and dump a folder in that way. Don’t do that, it is not supposed and likely will not work as you think it should.
5) Document Set routing requires time jobs to run
When using Document Set routing, Document Sets that are sent to a content organizer will remain in the drop-off library and be moved to the appropriate location by the content organizer processing timer job, which by default runs daily.
6) Routing Content into Document Sets can be tricky
A common practice is to set up a series of Document Sets and then use the Content Organizer to route content into them. This is possible, however there is a bit of configuration that is required.
7) Document Sets are available in SharePoint Server only
Document Sets are only available in SharePoint 2010 Server and are not part of the SharePoint Foundation 2010. This also means that the programing object model (SPFolder) is part of the SharePoint 2010 Server API and not available in the SharePoint Foundation Object Model. Sorry all those users of SharePoint Foundation.
8 ) Cannot create Document Sets in Lists
They are called Document Sets after all but you cant create Document Sets on lists, only libraries. It also seems that you can’t create Document Sets in the default pages library as well with pure configuration.
9) Be Careful of performance with lots of Document Sets
There is no limit on the number of documents that can exist in a Document Set. However, display load times may be limited by the list view threshold which by default is set at 5,000 items and the aforementioned lack of metadata navigation
In general, beware when you create and use very large Document Sets (thousands of items), as the limitation and performance factor of viewing and displaying the list will be a factor.
10) Downloading the entire Document Set
If you remember this feature was available in the SP2010 Beta but it didn’t make it into the actual release. It’s not a major issue though as Microsoft is happy enough to provide you with the source code on how to do this here.
11) Shared Columns may not update instantaneously
When using shared columns, if there are more than 10 items in a Document Set, metadata updates will be run by a timer job every 15 minutes. So never fear if it isn’t updated straight away. Incidentally the Timer Job is called ‘Document Set fields synchronization job’
12) Be careful with Content Type Syndication
Content Type syndication of document sets is supported, but if the destination site collection does not have the Document Sets feature enabled, then you risk a dependency issue. Fortunately content type publishing provides a warning for this situation.
Also be aware that not only will the Document Set be published out to the Site Collection but so will all of the Content Types that are attached to the Document Sets
That is all that I have been able to come up with. Would love some input again like the last two limitations articles so fire away
Some great work by others!
Since document sets are based on folders you cannot declare an entire Document Set as a record. You can however send it to the Records Centre to then have it declared. This is a little annoying for end users since they have two ways of declaring records.
2) Cannot nest Document Sets within Document Sets
No nesting of Document Sets is possible through the SharePoint UI. Therefore you can only have a single level of Document Sets available. It’s not necessarily a bad thing (otherwise most people would simply use Document Sets as folders and nest the things) but it’s well worth considering.
3) You cannot send a Document Set larger than 50MB using the Send To Command
If you use the send to feature with a Document Set, the sum for all documents in a Document Set cannot be larger than 50MB. This can be a major pain if you have a large Document Set and want to route it to a Records Center, it won’t work.
Note: Can anyone confirm that this has been fixed in SP1 or a CU? Rumor is that the June CU lifted this to 250MB.
4) Cannot create folders within Document Sets
You cannot create a Folder within a Document Set from the Web UI. However you can open up the Document Set in Explorer view and dump a folder in that way. Don’t do that, it is not supposed and likely will not work as you think it should.
5) Document Set routing requires time jobs to run
When using Document Set routing, Document Sets that are sent to a content organizer will remain in the drop-off library and be moved to the appropriate location by the content organizer processing timer job, which by default runs daily.
6) Routing Content into Document Sets can be tricky
A common practice is to set up a series of Document Sets and then use the Content Organizer to route content into them. This is possible, however there is a bit of configuration that is required.
7) Document Sets are available in SharePoint Server only
Document Sets are only available in SharePoint 2010 Server and are not part of the SharePoint Foundation 2010. This also means that the programing object model (SPFolder) is part of the SharePoint 2010 Server API and not available in the SharePoint Foundation Object Model. Sorry all those users of SharePoint Foundation.
8 ) Cannot create Document Sets in Lists
They are called Document Sets after all but you cant create Document Sets on lists, only libraries. It also seems that you can’t create Document Sets in the default pages library as well with pure configuration.
9) Be Careful of performance with lots of Document Sets
There is no limit on the number of documents that can exist in a Document Set. However, display load times may be limited by the list view threshold which by default is set at 5,000 items and the aforementioned lack of metadata navigation
In general, beware when you create and use very large Document Sets (thousands of items), as the limitation and performance factor of viewing and displaying the list will be a factor.
10) Downloading the entire Document Set
If you remember this feature was available in the SP2010 Beta but it didn’t make it into the actual release. It’s not a major issue though as Microsoft is happy enough to provide you with the source code on how to do this here.
11) Shared Columns may not update instantaneously
When using shared columns, if there are more than 10 items in a Document Set, metadata updates will be run by a timer job every 15 minutes. So never fear if it isn’t updated straight away. Incidentally the Timer Job is called ‘Document Set fields synchronization job’
12) Be careful with Content Type Syndication
Content Type syndication of document sets is supported, but if the destination site collection does not have the Document Sets feature enabled, then you risk a dependency issue. Fortunately content type publishing provides a warning for this situation.
Also be aware that not only will the Document Set be published out to the Site Collection but so will all of the Content Types that are attached to the Document Sets
That is all that I have been able to come up with. Would love some input again like the last two limitations articles so fire away
Some great work by others!
PS: This text is part of a post from this page.
Subscribe to:
Posts (Atom)