The following covers how to add a new button to the Sitecore ribbon.
The following Sitecore changes must be done in the core database.
/sitecore/content/Applications/Content Editor/Ribbons/Chunks/*group name*
| # Inspired by Mark Embling | |
| # http://www.markembling.info/view/my-ideal-powershell-prompt-with-git-integration | |
| $global:GitPromptSettings = New-Object PSObject -Property @{ | |
| DefaultForegroundColor = $Host.UI.RawUI.ForegroundColor | |
| BeforeText = ' [' | |
| BeforeForegroundColor = [ConsoleColor]::Yellow | |
| BeforeBackgroundColor = $Host.UI.RawUI.BackgroundColor | |
| DelimText = ' |' |
| # Test whether a profile exists. If it does, you can skip the following. | |
| Test-path $profile | |
| # Creates a profile. | |
| New-item –type file –force $profile | |
| # Bonus 1: Edit the profile in Notepad. | |
| notepad $profile | |
| # Bonus 2: What you probably want if you have any startup scripts defined in PowerShell. |
| # J.Skemp: run Get-ExcutionPolicy and then Set-ExcutionPolicy Unrestricted before running the following. | |
| # Make sure you set it back once done. | |
| # Copyright 2014, Alexander Hass | |
| # http://www.hass.de/content/setup-your-iis-ssl-perfect-forward-secrecy-and-tls-12 | |
| # | |
| # Version 1.4 | |
| # - RC4 has been disabled. | |
| # Version 1.3 | |
| # - MD5 has been disabled. |
/sitecore/admin/cache.aspx
Out of the box cache view. Recommend replacing with https://marketplace.sitecore.net/en/Modules/Sitecore_Cache_Admin.aspx if possible.
/sitecore/admin/stats.aspx
Displays renderings with usage and caching information.
/sitecore/admin/showconfig.aspx
| Microsoft Visual Studio Solution File, Format Version 11.00 | |
| # Visual Studio 2010 | |
| Microsoft Visual Studio Solution File, Format Version 12.00 | |
| # Visual Studio 2012 | |
| var imagePath = @"C:\Users\James\Desktop\HL0hEkH.gif"; | |
| var exportDirectory = @"C:\Users\James\SkyDrive\Projects\graphic samples\export\"; | |
| var exportPathFormat = exportDirectory + "{0}.png"; | |
| Image img = Image.FromFile(imagePath); | |
| var totalFrames = img.GetFrameCount(FrameDimension.Time); | |
| string.Format("Total frames: {0}", totalFrames).Dump(); |
| <Query Kind="Program" /> | |
| void Main() | |
| { | |
| // If false, will disable all debugging messages. | |
| var debug = true; | |
| // If true, files will not really be deleted. | |
| var testingDeletions = false; | |
| // If true, dump the file name of Elmah logs that are deleted. | |
| var debugDumpDeletedFileName = true; |
| fast://*[@__lock='%domain%'] |