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
{ | |
"folder": { | |
"id": "tcm:1-2-3", | |
"title": "root", | |
"topnav": "false", | |
"level": "0", | |
"pages": [{ | |
"id": "tcm:1-2-4", | |
"title": "homepage", | |
"topnav": "false", |
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 TranslationManagerPlugin | |
{ | |
public TranslationManagerPlugin() | |
{ | |
//Subscribe to Translation Manager events | |
TranslationJobManager.TranslationJobCreated += TranslationJobManager_TranslationJobCreated; | |
//TranslationJobManager.TranslationJobLoaded += TranslationJobManager_TranslationJobLoaded; | |
//TranslationJobManager.Error += TranslationJobManager_Error; | |
//TranslationJobManager.ItemSelected += TranslationJobManager_ItemSelected; |
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 void Translate(string identifiableObjectId, string owningRepositoryId) | |
{ | |
if (!string.IsNullOrWhiteSpace(identifiableObjectId) && !string.IsNullOrWhiteSpace(owningRepositoryId)) | |
{ | |
//Create instance of TranslationJobManager | |
TranslationJobManager jobManager = new TranslationJobManager("DOMAIN\\USER"); | |
//Create a PUSH job (job created at the source publication) | |
TranslationJob translationJob = jobManager.CreateJob("JobName", owningRepositoryId, TranslationJobType.PushJob); | |
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++) |