Skip to content

Instantly share code, notes, and snippets.

View enkelmedia's full-sized avatar

Markus Johansson enkelmedia

View GitHub Profile
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net.Http.Formatting;
using System.Web;
using NewsletterStudio.Infrastucture;
using NewsletterStudio.Infrastucture.Services;
using Umbraco.Web.Models.ContentEditing;
using Umbraco.Web.Models.Trees;
using Umbraco.Web.Mvc;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text.RegularExpressions;
using System.Web;
using System.Web.Compilation;
//using NewsletterStudio.Model;
using NewsletterStudio.Bll;
using NewsletterStudio.Core.Model;
@enkelmedia
enkelmedia / NewsletterTreeController.cs
Created December 4, 2017 08:08
Tree Controller for Newsletter Studio (Newsletter)
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net.Http.Formatting;
using System.Web;
using NewsletterStudio.Core.Extensions;
using NewsletterStudio.Core.Interfaces.Data;
using NewsletterStudio.Core.Model;
using NewsletterStudio.Infrastucture;
using NewsletterStudio.Infrastucture.Services;
public class AttachmentRendertask : Services.RenderTasks.RenderTask
{
string _attachmentPath = String.Empty;
public override void ProcessPreRender(RenderResult renderResult, RenderTaskParameters parameters)
{
// This method is executed when the scheduled jobs web request is still running. This means that the UmbracoContext, ApplicationContext etc can still be used.
// Let's save the path to the attachment media file here.
Sub NumericFormatting()
'
' NumericFormatting Macro
'
' Keyboard Shortcut: Ctrl+Shift+N
'
Dim cel As Range
Dim selectedRange As Range
Set selectedRange = Application.Selection
public class RpSurfaceController : SurfaceController
{
protected override void Initialize(System.Web.Routing.RequestContext requestContext)
{
var domains = ApplicationContext.Current.ApplicationCache.RuntimeCache.GetCacheItem<List<DomainInfoDto>>(
"GenericTempStore-Domains",
() =>
{
<?xml version="1.0" encoding="utf-8"?>
<newsletterStudio senderDefaultName="" senderDefaultEmail=""
senderDefaultSettingsForced="false" unsubscribeConfirmUrl=""
tinyMCEDataTypeId="1091" sendFailuresBeforeUnsubscribingSubscriber="4"
settingsOnlyForAdmins="false" allowUseOfSendOutPropertyEditorWithoutApplicationAccess="true"
forceUnsubscribeFooter="false" activateCustomDataCollection="true"
activateCssInliner="true" enableGoogleAnalyticsTracking="false"
googleAnalyticsMedium="email" allowedTemplatesForRenderUrl=""
googleAnalyticsSource="NewsletterStudio" googleAnalyticsName=""
googleAnalyticsContent="" lastInstalledVersion="2.1.7">
@enkelmedia
enkelmedia / List newsletter on the front end
Last active November 23, 2016 15:39
How to list Newsletter Studio newsletters on the front end
@using NewsletterStudio.Core.Model
@using NewsletterStudio.Infrastucture
@using NewsletterStudio.Infrastucture.Services
@using NewsletterStudio.Services.RenderTasks
@inherits Umbraco.Web.Mvc.UmbracoTemplatePage
@{
Layout = null;
}
@{
// This will give you all the newsletters thats listed in the "Sent"-folder in the backoffice. This means that they are not older than 90 days.
@enkelmedia
enkelmedia / Newsletter Studio - Members Subscription provider
Last active November 15, 2016 11:12
Source for the new members subscription provider for Newsletter Studio
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Security;
using NewsletterStudio.Bll.Providers.Model;
using NewsletterStudio.Model;
using Umbraco.Core.Models;
using Umbraco.Core.Services;
using Umbraco.Web;