This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--replace <newOwner> with DB user | |
exec sp_changedbowner '<newOwner>' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- | |
Session expiration for the Sitecore Client. | |
When managing Client sessions, Sitecore keeps track of every user logged in to the system and assigns a Sitecore user ticket to every user accessing a Sitecore Client application. Sitecore Client user session is not limited in time and is kept alive until the browser is opened. | |
However, if after 8 hours of the current user inactivity another user logs in and the current Sitecore license used has a concurrent number of users limitation – a newly logged in user may take the currently logged in user’s license slot. Current user will be redirected to the login page when trying to use any Sitecore Client application if there are no more available license slots left for him to automatically re-login to the system. | |
If 8 hours inactivity period is too long and needs to be changed, the following workaround can be applied: | |
Copy the Sitecore.Support.323551.dll assembly to the \bin folder. | |
http://sdn.sitecore.net/upload/faq/session%20expiration/sitecore.support.323551. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Plonk as many of these as you need for each device/context and they will be | |
applied when the media query defined is met.*/ | |
@media screen and (max-width: 320px) | |
{ | |
/* all styles for this query size go here. */ | |
/* | |
for mobile, get of as many floats as possible sot hey sit on top | |
of eachother down the page nicely. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public Item item; | |
public String PublishDate() | |
{ | |
DateTime postDate = Context.Item.Statistics.Updated; | |
return postDate != null ? postDate.ToString("MMMM dd yyyy H:mm:ss tt") : String.Empty; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//IncidentCategoryList is the list control | |
//In this example we are only showing child items of the datasourced item which are using a specific Sitecore template named 'IncidentCategory' | |
foreach ( | |
var categoryDropDownItem in | |
DataSourceItem(IncidentCategoryItemId).Children.Where(z => z.TemplateName == "IncidentCategory")) | |
{ | |
IncidentCategoryList.Add(categoryDropDownItem.DisplayName); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// The SecurityDisabler overrides the current security model, allowing you | |
// to access the item without any security. It's like the user being an administrator | |
using (new Sitecore.SecurityModel.SecurityDisabler()) | |
{ | |
// Get the master database | |
Sitecore.Data.Database master = Sitecore.Data.Database.GetDatabase("master"); | |
// Get the template to base the new item on | |
Items.TemplateItem template = master.GetItem("/sitecore/templates/Sample/Sample Item"); | |
// Get the place in the site tree where the new item must be inserted |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*! | |
* ProjectName SomeModule | |
* @requires jQuery v1.7.2+ | |
* @requires Underscore v1.3.3+ | |
* | |
* This comment block is here to encourage you to properly document your modules | |
* USE IT! | |
* Particularly if it has odd dependencies they should be listed. | |
*/ | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="MediaLibraryExporter.aspx.cs" Inherits="RBSM.MediaLibraryExporter" %> | |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
<html xmlns="http://www.w3.org/1999/xhtml"> | |
<head runat="server"> | |
<title></title> | |
</head> | |
<body> | |
<form id="form1" runat="server"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*! | |
* GeoLocation | |
* @requires jQuery v1.7.2+ | |
* | |
* Description | |
* auto-populates a field with geo-location data | |
*/ | |
; (function ($) { | |
window.Motorama.geoLocation = window.Motorama.geoLocation || window.Motorama.BaseModule(function () { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* We need to run the code sample more than once to get a better idea of running time during analysis. | |
* set this value to be however many times you want to run the code to get a good analysis | |
* of running time | |
*/ | |
var maxCount = 20; | |
var start = new Date().getTime(); | |
for (var n = 0; n < maxCount; n++) { | |
/* perform operation you want to measure */ | |
} |