Skip to content

Instantly share code, notes, and snippets.

Kamruz Jaman jammykam

Block or report user

Report or block jammykam

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@jammykam
jammykam / EditHtml.cs
Last active Mar 10, 2018
Extension to post by @rpeplau to resolve RTE tokens in Experience Editor mode for site specific purposes http://blog.peplau.com.br/en_US/site-specific-richtext-editor-profiles-custom-source-in-native-richtext-fields/
View EditHtml.cs
using Sitecore;
using Sitecore.Data.Fields;
using Sitecore.Diagnostics;
using Sitecore.ExperienceEditor.Utils;
using Sitecore.Globalization;
using Sitecore.Shell.Applications.ContentEditor.RichTextEditor;
using Sitecore.Web.UI.Sheer;
namespace Konabos.RteSources.Commands
{
@jammykam
jammykam / Attach.ImageCheckSize.cs
Last active Dec 21, 2017
Restrict Media Upload in Experience Editor and Content Editor in Sitecore 8.2 update-5. See following for further reference: https://stackoverflow.com/a/27956033/661447 | https://sitecore.stackexchange.com/q/9009/135 | https://sitecore.stackexchange.com/q/9060/135
View Attach.ImageCheckSize.cs
using Sitecore;
using Sitecore.Exceptions;
using Sitecore.Pipelines.Attach;
namespace MyProject.MediaUpload.Pipelines.Attach
{
public class ImageCheckSize
{
public void Process(AttachArgs args)
{
View Contained_Database_Authentication.sql
Use master
GO
sp_configure 'show advanced options', 1
GO
RECONFIGURE WITH OVERRIDE
GO
sp_configure 'contained database authentication', 1
GO
RECONFIGURE WITH OVERRIDE
GO
@jammykam
jammykam / HiddenToken.cs
Last active Oct 8, 2017
Sitecore WFFM Hidden Token Field
View HiddenToken.cs
using System.ComponentModel;
using System.Web.UI;
using Sitecore.Form.Core.Attributes;
using Sitecore.Form.Core.Visual;
using Sitecore.Form.Web.UI.Controls;
namespace MyProject.CMS.Custom.WFFM.Fields.HiddenTokenField
{
public class HiddenToken : InputControl
{
View Create Field.md

Create WFFM field in Sitecore under /sitecore/system/Modules/Web Forms for Marketers/Settings/Field Types. For example:

  • Item Path: /sitecore/system/Modules/Web Forms for Marketers/Settings/Field Types/Custom/Label
  • Template: /sitecore/templates/Web Forms for Marketers/Field Type
  • Assembly: MyProject.CMS.Custom
  • Class: MyProject.CMS.Custom.WFFM.Fields.Label
  • MVC Type: MyProject.CMS.Custom.WFFM.Fields.LabelField, MyProject.CMS.Custom
@jammykam
jammykam / CheckboxWithHtml.cs
Last active Oct 4, 2017
Sitecore WFFM Checkbox With HTML field
View CheckboxWithHtml.cs
using Sitecore.Form.Core.Attributes;
using Sitecore.Form.Core.Visual;
namespace MyProject.CMS.Custom.WFFM.Fields
{
public class CheckboxWithHtml : Sitecore.Form.Web.UI.Controls.Checkbox
{
private string _htmlText;
[VisualCategory("Appearance")]
@jammykam
jammykam / PlaceholderInput.cs
Created Oct 4, 2017
Sitecore WFFM Input field with Placeholder
View PlaceholderInput.cs
using System.ComponentModel;
using Sitecore.Form.Core.Attributes;
namespace MyProject.CMS.Custom.WFFM.Fields
{
public class PlaceholderInput : Sitecore.Form.Web.UI.Controls.SingleLineText
{
[DefaultValue("")]
[VisualCategory("Appearance")]
[VisualProperty("Placeholder Text:", 200)]
@jammykam
jammykam / EmailPlaceholder.cs
Last active Oct 4, 2017
Sitecore WFFM Email Field with Placeholder Text
View EmailPlaceholder.cs
using System.ComponentModel;
using Sitecore.Form.Core.Attributes;
namespace MyProject.CMS.Custom.WFFM.Fields
{
public class EmailPlaceholder : Sitecore.Form.Web.UI.Controls.Email
{
public new string Text
{
get { return this.textbox.Text; }
@jammykam
jammykam / ServicesConfigurationRegistration.config
Last active Nov 12, 2017
A SwitchingLinkManager for Sitecore 8.2 allowing you to use a different LinkProvider per site
View ServicesConfigurationRegistration.config
<?xml version="1.0"?>
<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/" xmlns:set="http://www.sitecore.net/xmlconfig/set/">
<sitecore>
<services>
<configurator type="Sitecore.Custom.Providers.ServicesConfigurator, Sitecore.Custom" />
</services>
</sitecore>
</configuration>
@jammykam
jammykam / ExtractPostProcessDllFromPackage.cs
Created Sep 20, 2017
Extract DLLs from TDS Update Packages
View ExtractPostProcessDllFromPackage.cs
using Ionic.Zip;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Comcast.ExtractPostProcessDllFromPackage
{
You can’t perform that action at this time.