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
Param( | |
[Parameter(Mandatory=$False,Position=1)] | |
[string]$DatabaseName="Tridion_cm", | |
[Parameter(Mandatory=$False,Position=2)] | |
[string]$MachineName = $env:COMPUTERNAME, | |
[Parameter(Mandatory=$False,Position=3)] | |
[string]$InstanceName = "Default", | |
[Parameter(Mandatory=$False,Position=3)] | |
[int]$DataBaseCopies = 5 | |
) |
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
[TcmExtension("Event System")] | |
public class EventSystem : TcmExtension | |
{ | |
public EventSystem() | |
{ | |
Subscribe(); | |
} | |
public void Subscribe() | |
{ |
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
[TranslationManagerPlugIn] | |
class AddComponentsTranslationManagerPlugin | |
{ | |
public AddComponentsTranslationManagerPlugin() | |
{ | |
//Subscribe to Translation Manager events | |
TranslationJobManager.TranslationJobCreated += JobCreated; | |
TranslationJobManager.TranslationJobLoaded += JobCreated; | |
} |
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
@{ | |
var pubTargetIsSiteEditEnabled = false; | |
var engine = TridionHelper.Engine; | |
var publishContext = engine.PublishingContext; | |
var appData= publishContext.PublicationTarget.LoadAllApplicationData(); | |
foreach (var appDataItem in appData) | |
{ | |
if(Encoding.UTF8.GetString(appDataItem.Data).Contains("http://www.sdltridion.com/2011/SiteEdit")) | |
pubTargetIsSiteEditEnabled = true; |
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
<?xml version="1.0" encoding="utf-8"?> | |
<rules> | |
<clear /> | |
<rule name="Redirect to https" stopProcessing="true"> | |
<match url="(.*)" /> | |
<conditions> | |
<add input="{HTTPS}" pattern="off" ignoreCase="true" /> | |
</conditions> | |
<action type="Redirect" url="https://{HTTP_HOST}{REQUEST_URI}" redirectType="Permanent" appendQueryString="false" /> | |
</rule> |
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
javascript: (function (UI, B, e, a, r, d) | |
{ | |
if ( typeof String.prototype.endsWith != 'function' ) { | |
String.prototype.endsWith = function( str ) { | |
return this.substring( this.length - str.length, this.length ) === str; | |
} | |
}; | |
try | |
{ |
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
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
//Get Articles | |
string url = @"http://www.thebolditalic.com/articles.rss?page={0}"; | |
var credentials = TwitterCredentials.CreateCredentials("Access_Token", "Access_Token_Secret", "Consumer_Key", "Consumer_Secret"); | |
int count = 0; | |
int loop = 0; | |
for (int i = 1; i < 200; i++) |
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 static MvcHtmlString RenderPresentation(this HtmlHelper html, ComponentPresentation presentation) | |
{ | |
ComponentMetaFactory componentMetaFactory = new ComponentMetaFactory(presentation.PublicationId); | |
IComponentMeta componentMeta = componentMetaFactory.GetMeta(string.Format("tcm:{0}-{1}", presentation.PublicationId, presentation.ComponentId)); | |
return html.Action(componentMeta.CustomMeta.GetValue("action").ToString(), | |
componentMeta.CustomMeta.GetValue("controller").ToString(), | |
new | |
{ | |
publicationId = presentation.PublicationId, |
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 class TridionPathProvider : VirtualPathProvider | |
{ | |
public TridionPathProvider() | |
: base() | |
{ | |
} | |
protected override void Initialize() | |
{ | |
} |
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
TridionPathProvider tridionPathProvider = new TridionPathProvider(); | |
HostingEnvironment.RegisterVirtualPathProvider(tridionPathProvider); |