Skip to content

Instantly share code, notes, and snippets.

View iamrobert's full-sized avatar

Robert Stark iamrobert

View GitHub Profile
@iamrobert
iamrobert / tiny-slider-app.js
Created October 3, 2018 06:04
Tiny Slider - with plyr.io video stop
app.pageSliders = {
slider: null,
container: ".tiny-slider",
init: function() {
// no reason to continue init if no slider on page
if (!document.querySelector("#mainslider")) {
return;
}
app.pageSliders.slider = tns({
@iamrobert
iamrobert / birthday.php
Last active October 25, 2018 06:41
RSFORM version 2.0.15 - ZURB Foundation 6.4 Fixes
///administrator/components/com_rsform/helpers/fields/foundation/birthday.php
<?php
/**
* @package RSForm! Pro
* @copyright (C) 2007-2015 www.rsjoomla.com
* @license GPL, http://www.gnu.org/copyleft/gpl.html
*/
@iamrobert
iamrobert / open-meta.php
Last active September 28, 2021 05:07
FLEXIcontent add open meta tags for sharing
<?php
//TO AVOID DOUBLE META OG:DESCRIPTION - set your flexi description social suggest to none;
defined( '_JEXEC' )or die( 'Restricted access' );
/* + OPEN GRAPH META TAGSSOCIAL SHARES
https://blog.kissmetrics.com/open-graph-meta-tags/
https://moz.com/blog/meta-data-templates-123
-----------------------------------------------------------------------
REMEMBER TO SET IMAGE FIELD NUMBER line 81
======================================================================
@iamrobert
iamrobert / vimeo.php
Created December 6, 2018 14:13
Content Blocks Zurb Foundation 6.5
<div data-thumb="images/assets/foundation/thumbnails/v-04.png" data-title="Video">
<div class="grid-container video m-space wow iamrobert">
<div class="grid-x grid-margin-x grid-padding-x">
<div class="cell large-6 small-order-2 large-order-1">
<h3>Heading</h3>
<p>Insert Text.</p>
</div>
<div class="cell large-6 small-order-1 large-order-2">
<div class="flex-vid embed-responsive js-player widescreen vimeo">
<iframe allowfullscreen class="embed-player b-lazy force-lazy-load" frameborder="0" height="225" src="https://player.vimeo.com/video/60122989" width="400"></iframe>
@iamrobert
iamrobert / f6-mega-menu.php
Last active January 10, 2019 05:56
Foundation 6.5 Mega Menu Template
<?php
/**
* @package Joomla.Site
* @subpackage mod_menu
*
* @copyright Copyright (C) 2005 - 2012 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined( '_JEXEC' )or die;
// Note. It is important to remove spaces between elements.
@iamrobert
iamrobert / jscsscontrol.php
Last active March 31, 2020 05:29
JCC - JS CSS Control v3.2.2 - FLEXIcontent 3.3.6 and RSFORM Overrides
//plugins/system/jscsscontrol/jscsscontrol.php
<?php
/**
* @Copyright
* @package JCC - JS CSS Control for Joomla! 3.x
* @author Viktor Vogel <[email protected]>
* @version 3.2.2 - 2019-06-16
* @link https://kubik-rubik.de/jcc-js-css-control
*
@iamrobert
iamrobert / social-share.js
Last active July 24, 2019 08:37
social-share.js - changed it up for wechat + zurb - https://github.com/harttle/social-share
/**
* social-share.js
* https://github.com/harttle/social-share
* @author 52cik <fe.52cik@gmail.com>
* @license MIT
*
* @example
* <pre>
* socialShare('.share-components');
*
@iamrobert
iamrobert / code_Flexicontent_universal_module.php
Last active December 30, 2019 06:19
FLEXICONTENT UNIVERSAL MODULE TEMPLATE SNIPPETS
<?php
/*
* =======================================================================
+ ECHO ALL MAIN + SUB CATEGORIES
* =======================================================================
*/
$all_cats = ' ';
foreach ($item -> _row -> categories as $cat) {
@iamrobert
iamrobert / foundation.js
Last active November 13, 2019 05:22
FOUNDATION 6.5.3 PREPOS JS FILE
/* + FOUNDATION 6.5.3 JS PREPOS FILE
======================================================================
1. Copy Files From dist/plugins folder on github
2. Remove prepros-prepend for unneeded files
3. Probably best to start from bottom for uneeded files
----------------------------------------------------------------------
*/
//CORE FILES
//@prepros-prepend zf/foundation.core.min.js
@iamrobert
iamrobert / template.php
Created December 1, 2019 20:32
minimize html in template (not working)
<?php
function sanitize_output($buffer) {
$x = '<!--(?>-?[^-]*+)*?--!?>';
$s1 = DOUBLE_QUOTE_STRING;
$s2 = SINGLE_QUOTE_STRING;
//Regex for escape elements
$pr = "<pre\b[^>]*+>(?><?[^<]*+)*?</pre\s*+>";