Skip to content

Instantly share code, notes, and snippets.

Avatar

Robert Stark iamrobert

View GitHub Profile
View item-accordion.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 Apr 13, 2022
NAVBAR WITH SCROLL
View app.navbar.js
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 Apr 1, 2022
anime.js external SVG file
View anime=js-external.html
<!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 Feb 14, 2022
FIX PLYR.JS | Play on IOS + Fast Loading
View plyr.js
//FIX PLYR AUTOPLAY ON IOS & FAST LOADING:
var app = {};
/* + GET JS
--------------------------------------------------------------------------
https://gist.github.com/iamrobert/a8907c30a66961340d2dd4cd53493ba9
==========================================================================*/
View sponsorship.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 Dec 21, 2021
animate details/summary (Maybe this: https://codepen.io/giana/pen/OrpdLK)
View FAQ.html
<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 Sep 28, 2021
Flexi-tut.html
View 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 Sep 13, 2021
UCM FLEXIcontent IMAGE
View ucm-image.php
<?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 Aug 29, 2021
Windwalker Path FIX
View Path.php
<?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.
*/
@iamrobert
iamrobert / upload.php
Last active Aug 26, 2021
FLEXIContent Upload FIle - handle Chinese/remove spaces
View upload.php
<?php
//components/com_flexicontent/classes/helpers/upload.php
//Handles Chinese
defined( '_JEXEC' ) or die( 'Restricted access' );
class flexicontent_upload
{
static function makeSafe($file, $language = null)
{