Skip to content

Instantly share code, notes, and snippets.

Avatar

Robert Curlette rcurlette

View GitHub Profile
@rcurlette
rcurlette / UpdateMMCompMetadataXml.cs
Created May 24, 2018
Tridion Update Multimedia Component Metadata XML using Core Service
View UpdateMMCompMetadataXml.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Xml.Linq;
using Tridion.ContentManager.CoreService.Client;
namespace FixMMCompMetadataField
{
@rcurlette
rcurlette / json_net_sample.cs
Last active Jan 24, 2018
Json.Net Code Sample
View json_net_sample.cs
// get our JSON objects
dynamic jsonObject = JObject.Parse(jsonContent);
dynamic metaPage = jsonObject.MetadataFields;
// check if property exists in the JSON
if (metaPage.Property("contact") == null)
{
dynamic contact = GetContact(sgMetadataFields);
if(contact != null)
{
View List-iis-sites
Import-Module WebAdministration
if(!$web8Files)
{
$logfile = "$PSScriptRoot\Sites_$(get-date -format `"yyyyMMdd_hhmmsstt`").log"
}
#this is our logging function, it must appear above the code where you are trying to use it.
#note there is a technique to get around needing this at the top, read the blog post to find out more...
function log($message, $color)
View Migrate-Sites-ToWeb8-IIS
param
(
[Parameter(Mandatory=$true)][string]$discoveryServiceUrl,
[Parameter(Mandatory=$true)][string]$csvSiteFile
)
#
# .\UpgradeSitesToWeb8.ps1 -discoveryServiceUrl "http://someserver:8882/discovery.svc" -csvSiteFile D:\SiteTest.csv -verbose
#Upgrade each site
@rcurlette
rcurlette / tridion-gui-extension-installer.ps1
Created Dec 11, 2013
Tridion GUI Extension Installer in PowerShell
View tridion-gui-extension-installer.ps1
write-output "/***
* _____ _ _ _____ ______ _ _ _____ _ _ _
* / ____| | | |_ _| | ____| | | (_) |_ _| | | | | |
* | | __| | | | | | | |__ __ _| |_ ___ _ __ ___ _ ___ _ __ | | _ __ ___| |_ __ _| | | ___ _ __
* | | |_ | | | | | | | __| \ \/ / __/ _ \ '_ \/ __| |/ _ \| '_ \ | | | '_ \/ __| __/ _` | | |/ _ \ '__|
* | |__| | |__| |_| |_ | |____ > <| || __/ | | \__ \ | (_) | | | | _| |_| | | \__ \ || (_| | | | __/ |
* \_____|\____/|_____| |______/_/\_\\__\___|_| |_|___/_|\___/|_| |_| |_____|_| |_|___/\__\__,_|_|_|\___|_|
*
*
"
@rcurlette
rcurlette / TridionWorkflowHelpers
Created Nov 20, 2013
Tridion Workflow Helpers using Core Service
View TridionWorkflowHelpers
using System;
using System.Collections.Generic;
using System.Web;
using FlowPub.Model;
using Tridion.ContentManager.CoreService.Client;
using System.Configuration;
namespace FlowPub.Tridion
{
public class WorkflowHelper
@rcurlette
rcurlette / MessageCenterChannel.cs
Created Jul 10, 2013
Signalr4Tridion PersistentConnection for the SignalR server
View MessageCenterChannel.cs
using System;
using Microsoft.AspNet.SignalR;
using System.Threading.Tasks;
namespace Signalr4Tridion.SignalrServer
{
public class MessageCenterChannel : PersistentConnection
{
protected override Task OnReceived(IRequest request, string connectionId, string data)
{
@rcurlette
rcurlette / Default.aspx
Last active Dec 19, 2015
Signalr4Tridion test page for confirming the Signalr Server, and especially the URL of the server, are working correct.
View Default.aspx
<html>
<head>
<script src="Scripts/jquery-1.6.4.js" type="text/javascript"></script>
<script src="Scripts/jquery.signalR-1.1.2.js" type="text/javascript"></script>
<script type="text/javascript">
$(function () {
var connection = $.connection('/channel');
connection.received(function (data) {
$('#messages').prepend('<li>' + data + '</li>');
@rcurlette
rcurlette / Signalr4TridionEnableExtension.config
Created Jul 10, 2013
Code to add to the Tridion System.config to enable the Signalr4Tridion GUI Extension
View Signalr4TridionEnableExtension.config
<editor name="Signalr4TridionMC">
<installpath>C:\Program Files (x86)\Tridion\web\WebUI\Editors\Signalr4TridionMC</installpath>
<configuration>Signalr4TridionMC.config</configuration>
<vdir>Signalr4TridionMC</vdir>
</editor>
@rcurlette
rcurlette / PublishNotificationHandler.cs
Last active Dec 19, 2015
C# Tridion Event System code for sending messages to the MessageCenter using the Signalr4Tridion GUI Extension
View PublishNotificationHandler.cs
using System;
using Microsoft.AspNet.SignalR.Client;
using Tridion.ContentManager;
using Tridion.ContentManager.ContentManagement;
using Tridion.ContentManager.Extensibility;
using Tridion.ContentManager.Extensibility.Events;
using Tridion.ContentManager.Publishing;
namespace EventSystemSignalr
{