Skip to content

Instantly share code, notes, and snippets.

View iamrobert's full-sized avatar

Robert Stark iamrobert

View GitHub Profile
@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.
*/
@iamrobert
iamrobert / upload.php
Last active August 26, 2021 13:01
FLEXIContent Upload FIle - handle Chinese/remove spaces
<?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)
{
@iamrobert
iamrobert / item-video-image.php
Last active August 30, 2021 09:05
Flexicontent Serve unique image or video content
<?php
// No direct access
defined( '_JEXEC' )or die( 'Restricted access' );
$detailsField_id = 999;
$detailsFieldName = 'field_image';
$detailsImgVid = '';
FlexicontentFields::getFieldDisplay( $item, "$detailsFieldName" );
@iamrobert
iamrobert / item-gallery.php
Last active August 23, 2021 16:34
FLEXIContent glightbox item-gallery.php
@iamrobert
iamrobert / joomla-messages.php
Last active July 15, 2021 20:29
Test Your Joomla System Messages - Put in your template /index.php
JFactory::getApplication()->enqueueMessage('Blue Message', 'notice');
JFactory::getApplication()->enqueueMessage('Error Message', 'error');
JFactory::getApplication()->enqueueMessage('Warning Message', 'warning');
JFactory::getApplication()->enqueueMessage('Message Message', 'message');
JFactory::getApplication()->enqueueMessage('Success Message', 'success');
JFactory::getApplication()->enqueueMessage('Blank Message', '');