Skip to content

Instantly share code, notes, and snippets.

Ryan Simmons ryan-ethode

Block or report user

Report or block ryan-ethode

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
ryan-ethode / default.php
Created Feb 9, 2018
Article Category Joomla Module hack to display list in clickable dropdown field rather than in an unordered list.
View default.php
* @package Joomla.Site
* @subpackage mod_articles_category
* @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
defined('_JEXEC') or die;

Restart Apache (after making Apache config changes or PHP changes)

apachectl restart 
/sbin/service httpd restart

Restart MariaDB (after making any sort of config change)

systemctl restart mariadb
ryan-ethode / external-sites-new-tab.js
Created Jan 12, 2017
Automatically open all external website links in a new tab.
View external-sites-new-tab.js
$( document ).ready(function() {
$(".container a").each(function() {
var pageUrl = $(this).attr("href");
if(pageUrl == null) {
var pageUrl = "nothing";
if(pageUrl.indexOf("://") > 0 && pageUrl.indexOf("") < 0) {
ryan-ethode / url-replace.js
Last active Nov 10, 2016
URL Replacer: Used on a multi-site host to direct relative URLs from one host to another host.
View url-replace.js
$("a").each(function() {
if($(this).parents('.info').length) {
var href = $(this).prop('href');
var href = href.replace("", "");
$(this).prop('href', href);
ryan-ethode /
Created Sep 29, 2016
A great little snippet to view all of the variables available to a velocity template
#foreach($key in $context.keys) <pre> $key</pre> #end
ryan-ethode / print-div.html
Created Mar 3, 2016
A print button that only prints the contents of a specific div, rather than a whole page.
View print-div.html
<div id="print-contents">
<!-- Your content goes here. -->
printDivCSS = new String ('<link href="../css/main.css" rel="stylesheet" type="text/css">')
//The line referencing your CSS will keep your printed div formatting looking correct.
function printDiv(divId) {
window.frames["print_frame"].document.body.innerHTML=printDivCSS + document.getElementById(divId).innerHTML;
ryan-ethode /
Last active Mar 3, 2016
This creates a DotCMS RSS feed based on a content structure.
#set ($query="+structureName:Blog +(conhost:48190c8c-42c4-46af-8d1a-0cd5db894797 conhost:SYSTEM_HOST), 10, modDate desc")
<xml version="1.0" encoding="UTF-8">
<rss version="2.0">
<pubDate>1 Jan 2006 23:23:04 GMT</pubDate>
<title>Company Blog</title>
<description>Tips and Tricks</description>
<copyright>2006-2015 Company Name</copyright>
You can’t perform that action at this time.