Skip to content

Instantly share code, notes, and snippets.

View kieran23101's full-sized avatar
๐Ÿ‘‹
Focusing

Kieran Corkin kieran23101

๐Ÿ‘‹
Focusing
View GitHub Profile
@kieran23101
kieran23101 / IE Parallax Fix for scroll.js
Created July 4, 2018 08:44
Fixes the scroll lag on IE
if (navigator.userAgent.match(/Trident\/7\./)) {
// if IE
$("body").on("mousewheel", function() {
// remove default behavior
event.preventDefault();
//scroll without smoothing
var wheelDelta = event.wheelDelta;
var currentScrollPosition = window.pageYOffset;
window.scrollTo(0, currentScrollPosition - wheelDelta);
dbo.PersonaBarMenu
Change Parent Menu ID of a page that you created in the admin menu.
DNN allows you to have parent page as admin, having it in admin section allows it to be show in this DB table
@kieran23101
kieran23101 / Dots animations.css
Created September 6, 2018 14:22
A quick snippet that add 3 dots simulating a loading element
// <p>Loading</p>
p::after {
content: '';
position: absolute;
animation: dots 1s linear infinite;
}
@keyframes dots {
25% {
@kieran23101
kieran23101 / Animatecss-animation.js
Created May 14, 2019 09:26
This function preforms an animation on an element through js
window.animateCSS = function(element, animationName, callback) {
element.classList.add('animated', animationName)
function handleAnimationEnd() {
element.classList.remove('animated', animationName)
element.removeEventListener('animationend', handleAnimationEnd)
if (typeof callback === 'function') callback()
}
element.addEventListener('animationend', handleAnimationEnd)
}
@kieran23101
kieran23101 / OutputTopLevelCats.cshtml
Created June 25, 2019 13:35
A razor script used for CartViper to output the top level categories - this doesnt display categories with subcategories
@using System.Dynamic;
@using System.Web.UI.HtmlControls;
@using DotNetNuke.Common;
@using DotNetNuke.Entities.Users;
@using CartViper.Modules.Store.Admin;
@using CartViper.Modules.Store.Catalog;
@using CartViper.Modules.Store.Extensions;
@using CartViper.Modules.Store.WebControls;
@using CartViper.Modules.Store.Data;
@inherits DotNetNuke.Web.Razor.DotNetNukeWebPage<dynamic>
EXEC sp_MSforeachdb
'IF EXISTS (SELECT * FROM [?].INFORMATION_SCHEMA.TABLES
WHERE TABLE_NAME = ''PaleDNN_Templates'')
BEGIN
PRINT DB_NAME(DB_ID(''?''))
END'
@kieran23101
kieran23101 / RemoveUserSQL.sql
Last active August 22, 2019 15:29
A sql script that can be run and will remove a user from every dnn installation
-- Better Version
EXEC sp_MSforeachdb
--Declaring Variables
DECLARE @var2 VARCHAR(50)
SET @var2 = ''[email protected]''
DECLARE @var1 int
--Checking to see if Andrew exists
IF EXISTS (SELECT * FROM Users WHERE Email = @var2)
--If Andrew Exists, Run this
EXEC sp_MSforeachdb
'
UPDATE [?].dbo.Users
SET IsDeleted = true
WHERE Email = ''[EMAILADDRESS]'''