Skip to content

Instantly share code, notes, and snippets.

View JonasEriksson's full-sized avatar

Jonas JonasEriksson

View GitHub Profile
@JonasEriksson
JonasEriksson / example.css
Created May 21, 2021 16:29 — forked from dillonchanis/example.css
Tailwind Utility for using gradients with text
@layer utilities {
.text-gradient {
background-clip: text;
-webkit-text-fill-color: transparent;
}
}
@JonasEriksson
JonasEriksson / dspCountiesList
Created October 13, 2018 13:45
Mura CMS - dspCountiesList from external DB (add to contentRenderer.cfc)
<!--- dspCountiesList - JE added 20181013 --->
<cffunction name="dspCountiesList" output="false">
<cfargument name="returnInfo" required="no" default="codes">
<cfquery name="getCounties" datasource="myresourcesimport" cachedwithin="#CreateTimeSpan(1, 0, 0, 0)#">
Select * From temp_data_county
Order By Countyname
</cfquery>
<cfset Counties = "">
<cfoutput>
<cfloop query="getCounties">
#X-Generator: crowdin.com
#Created by JInto - www.guh-software.de
#Thu Jun 11 10:01:34 PDT 2009
advertising=Anzeigen
advertising.active=Activado
advertising.add=Agregar
advertising.addnewadzone=Agregar nueva zona publicitaria
advertising.addnewcampaign=Agregar nueva campa\u00f1a
advertising.addnewcreative=Agregar nuevo elemento creativo
advertising.addplacement=Agregar emplazamiento
@JonasEriksson
JonasEriksson / muraUserEventHandler.cfm
Created August 11, 2018 16:16 — forked from stevewithington/muraUserEventHandler.cfm
Mura CMS : Examples of how to intercept User creation, update and save events to do some processing of the User Bean and then create custom error messages as well.
<cfscript>
public any function onBeforeUserCreate($, event) {
var user = arguments.event.getValue('userbean');
// do some processing of the user 'bean'
// to create an error message, just add any key to the end of the User's getErrors() struct:
user.getErrors().createFailMessage1 = 'UserCreate fail message goes here. Sorry #user.getFName()#.';
}
public any function onBeforeUserUpdate($, event) {
var user = arguments.event.getValue('userbean');
@JonasEriksson
JonasEriksson / get_XE.cfm
Last active July 17, 2018 00:17
Get ExchangeRates from ECB via api.openrates.io and write them into Mura CMS Extended Attributes
<!--- Requirements
Set up (or import - see below) Extended Attributes in Mura CMS.
--->
<cfscript>
remote any function getExchangeRates(){
cfhttp(url="http://api.openrates.io/latest?symbols=NOK,SEK,GBP,USD", result="rs", method="get"){
}
return deserializeJSON(rs.filecontent);
};
@JonasEriksson
JonasEriksson / .cfm
Created July 8, 2018 15:59
Mura CMS Video Display Code based on Extended Attributes
<!--- this code allows for the dynamic listing of any Videos from YouTube or Vimeo added
under a Content Item (here,for a company to showcase videos of products or similar) --->
<!--- Pre-requisites: Add a Class Extension of Type Page / Subtype Video with two fields named YoutubeID and VimeoID --->
<!--- Reload App and cfinclude this file or turn below code into a Front-End Item for drag-and-drop use --->
<!--- Note: requires a value for the contentBeanID, below we use the companyName we take from content('Title') --->
<!---
<cfset CompanyName = #$.content('title')#>
<!--- load the parent content item - pageTitle: #BetriebName# --->
@JonasEriksson
JonasEriksson / bg-colours + text-colours
Last active May 23, 2018 20:39
bg-colours for Mura dropdowns
bg-white^bg-light^bg-dark^bg-dark-light^bg-dark-lighter^bg-space-gray^bg-black^bg-zkf-blau^bg-zkf-grau^bg-primary^bg-secondary^bg-success^bg-danger^bg-warning^bg-info^bg-blue^bg-red^bg-orange^bg-meidlein-blau^bg-hensel-blau^bg-hensel-rot^bg-lampferhoff-gruen^bg-lampferhoff-lila^bg-lampferhoff-hg^bg-ostermann-blau^bg-innomega-blue^bg-siljanfoto-blue^bg-dalaklimat^bg-makker-grey^bg-gradient-blue-1^bg-gradient-1^bg-gradient-2^bg-gradient-electric-red^no-bg
text-primary^text-secondary^text-success^text-danger^text-warning^text-info^text-light^text-dark^text-muted^text-body^text-black-50^text-white-50^text-zkf-blau^text-zkf-grau^text-lampferhoff-gruen^text-lampferhoff-lila^text-lampferhoff-hg^text-ostermann-blau^text-innomega-blue^text-siljanfoto-blue^text-dalaklimat^bg-dalaklimat^text-makker-grey^bg-makker-grey^^c-gray^c-gray-dark^c-gray-darker^c-gray-dark-light^c-gray-dark-lighter^c-gray-dark-lightest
@JonasEriksson
JonasEriksson / GDPR_DSGVO_Datenschutz_Formular_Zustimmungs_Text.txt
Last active May 11, 2018 16:49
GDPR_DSGVO_Datenschutz_Formular_Zustimmungs_Text
Ich stimme zu, dass meine Angaben aus dem Kontaktformular zur Beantwortung meiner Anfrage erhoben und verarbeitet werden. Die Daten werden nach abgeschlossener Bearbeitung Ihrer Anfrage gelöscht. Hinweis: Sie können Ihre Einwilligung jederzeit für die Zukunft per E-Mail widerrufen. Detaillierte Informationen zum Umgang mit Nutzerdaten finden Sie in unserer Datenschutzerklärung (Links zu Impressum mit E-Mail Kontaktaufnahme und Datenschutzerklärung finden Sie im Fußbereich der Seite).
@JonasEriksson
JonasEriksson / gist:a44ef05e189fe4c30c78967080034f95
Created April 17, 2018 10:50
Mura Extension XML for Arbeitsbeispielfoto
<?xml version="1.0" encoding="UTF-8"?>
<mura>
<extensions>
<extension adminonly="0" availablesubtypes="" basekeyfield="contentHistID" basetable="tcontent" datatable="tclassextenddata" description="" hasassocfile="1" hasbody="1" hasconfigurator="0" hassummary="1" iconclass="mi-image" subtype="Arbeitsprobe Foto" type="File">
<attributeset categoryid="" container="Basic" name="ArbeitsprobeFoto Detailinformationen" orderno="1">
<attribute adminonly="0" defaultvalue="" hint="Hier können Sie eine URL eingeben, der beim Anklicken der Arbeitsprobe geladen wird." label="ArbeitsprobeFotoURL" message="" name="ArbeitsprobeFotoURL" optionlabellist="" optionlist="" orderno="1" regex="" required="false" type="TextBox" validation="URL"/>
<attribute adminonly="0" defaultvalue="1" hint="Wählen, ob dieses Foto einen Link zu einer größeren Ansicht erhalten soll. Standard ist Ja." label="In Lightbox (FancyBox) anzeigen)" message="" name="showAsFancybox" optionlabellist="Ja^Nein" optionlist="1^0" orderno="2" r
@JonasEriksson
JonasEriksson / data-animate-delay for Mura CMS SelectBox
Created December 10, 2017 18:40
data-animate-delay for Mura CMS SelectBox
.4^0.9^1.4^1.8^2.6^3.6