Skip to content

Instantly share code, notes, and snippets.

View iamrobert's full-sized avatar

Robert Stark iamrobert

View GitHub Profile
@iamrobert
iamrobert / item-gallery.php
Last active September 27, 2022 07:59
FLEXIContent item.php
<?php
defined( '_JEXEC' )or die( 'Restricted access' );
use Joomla\ String\ StringHelper;
/* + ACCORDION ITEM > XML FIELDS
======================================================================*/
$pillar = FlexicontentFields::getFieldDisplay( $item, 'investor' );
@iamrobert
iamrobert / app.navbar.js
Created April 13, 2022 08:11
NAVBAR WITH SCROLL
app.navbar = {
init: function () {
/* + 1. Navigation Bar Height & Header-Shiv (Plus )
======================================================================*/
var root = document.documentElement;
function navBarHeight() {
@iamrobert
iamrobert / anime=js-external.html
Last active April 1, 2022 17:00
anime.js external SVG file
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Inline Anime SVG</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<style>
/* + SVG ANIMATION (anime.js)
======================================================================*/
@iamrobert
iamrobert / plyr.js
Last active February 14, 2022 17:50
FIX PLYR.JS | Play on IOS + Fast Loading
//FIX PLYR AUTOPLAY ON IOS & FAST LOADING:
var app = {};
/* + GET JS
--------------------------------------------------------------------------
https://gist.github.com/iamrobert/a8907c30a66961340d2dd4cd53493ba9
==========================================================================*/
@iamrobert
iamrobert / sponsorship.php
Created December 21, 2021 16:27
Sponsoship.php
//EXTERNAL SITE URL - LIVE URL FROM FLEXIContent
$sponsor_url = 'https://packsanctuary.neticrm.tw/en/civicrm/contribute/transact?reset=1&id=31';
$dogCachePath = JPATH_CACHE;
$mode = 0755;
// Create the subfolder called dogs in cache folder
if (!JFolder::create($dogCachePath . "/dogs", $mode))
{
// Throw error message and stop script.
@iamrobert
iamrobert / FAQ.html
Last active December 21, 2021 06:51
animate details/summary (Maybe this: https://codepen.io/giana/pen/OrpdLK)
<details class="no-cb">
<summary class="no-cb" data-noedit>
<h3>I found a stray dog what do I do?</h3>
</summary>
<div class="p-all" data-noedit>
<div class="aa">
<p>Answer Question</p>
</div>
</div>
</details>
@iamrobert
iamrobert / flexi-tut.html
Last active September 28, 2021 18:23
Flexi-tut.html
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Untitled Document</title>
</head>
<body>
<p> I wanted a way when admins click "other", then the hidden field would show<br>
(<strong>'Other Job Title'</strong>):<br>
@iamrobert
iamrobert / ucm-image.php
Created September 13, 2021 14:11
UCM FLEXIcontent IMAGE
<?php ob_start(); ?>
<?php
// captured from image field
if ( $mod_use_image && $item->image ):
if ( $item->image != "" ) {
$isotopePic = str_replace( "/s_", "/b_", $item->image );
@iamrobert
iamrobert / Path.php
Created August 29, 2021 15:25
Windwalker Path FIX
<?php
/**
* replace: libraries/windwalker/vendor/windwalker/filesystem/Path.php
* Part of Windwalker project.
*
* @copyright Copyright (C) 2014 - 2015 LYRASOFT. All rights reserved.
* @license GNU Lesser General Public License version 3 or later.
*/