This document includes fast examples to use @mbabker's method to use the media folder to allow stylesheets and javascript overrides:
I have also added the method to use overridable images in the media folder.
<?xml version="1.0" encoding="utf-8"?> | |
<model | |
name="Messages" | |
catalog_type_id="0" | |
table="#__dummy" | |
primary_key="" | |
primary_prefix="" | |
get_customfields="0" | |
get_item_children="0" | |
use_special_joins="0" |
This document includes fast examples to use @mbabker's method to use the media folder to allow stylesheets and javascript overrides:
I have also added the method to use overridable images in the media folder.
<?php | |
/** | |
* Mimetype for your file - requires PHP 5.3, not enabled on default by Windows | |
*/ | |
$php_mime = finfo_open(FILEINFO_MIME); | |
$this->mime_type = strtolower(finfo_file($php_mime, $this->your_file_path_and_name)); | |
finfo_close($php_mime); | |
// Thanks for great discussion from Ben Ramsey, Anthony Ferrara, Dave Reid, Jarvis Badgley |
I'm trying to use the Joomla core as much as possible. Now to say that I'm using ONLY core would be untrue, since technically I'm creating and installing some plugins to accomplish this, but they certainly aren't 'heavy duty' components like K2, seblod, or some of the other Joomla CCKs out there. | |
Site I just built using this concept | |
https://github.com/drmmr763/sofi | |
## write some plugins | |
https://github.com/drmmr763/sofi/tree/master/plugins/content/sofimap | |
This sofimap plugin loads an XML file into the backend of ```com content``` that lets me store extra field data in my own table. So the process here is to use all the plugin events for ```com content``` to load the form, load form data, save form data, delete form data, and even display saved data in the front end. |
<?php | |
public function onBeforeCompileHead() | |
{ | |
$head = JFactory::getDocument()->getHeadData(); | |
$styleSheets = $head['styleSheets']; | |
$newStyleSheets = array(); | |
foreach ($styleSheets as $key => $value) | |
{ |
<?php | |
$image = new JImage('/path/to/original.jpg'); | |
$height = $image->getHeight(); | |
$width = $image->getWidth(); | |
if ($height > $width) { | |
$crop_square = $width; | |
$crop_top = ($height - $width) / 2; |
#!/bin/bash | |
git_host='git@github.com:' | |
git_url='https://github.com/' | |
remote=`git config --get remote.origin.url` | |
host=${remote:0:15} | |
if [ $host = $git_host ] | |
then | |
url=${remote/$git_host/$git_url} |
# The following will allow you to use URLs such as the following: | |
# | |
# example.com/anything | |
# example.com/anything/ | |
# | |
# Which will actually serve files such as the following: | |
# | |
# example.com/anything.html | |
# example.com/anything.php | |
# |
/* | |
* Takes provided URL passed as argument and make full height screenshots of this page | |
* with several viewport widths using Nightwatch.js with Selenium. | |
* | |
* These viewport widths are taken from common android and iOS devices. Modify as needed. | |
* | |
* Takes an optional second argument for the path where screenshots are saved. | |
* | |
* Usage: | |
* $ nightwatch -t viewport-shots.js http://example.com |
var Vue = require('vue'); | |
Vue.directive('delay-execute', { | |
acceptStatement: true, | |
bind: function () { | |
this._delayRunTimeout = parseInt(this.arg, 10) || 1000; | |
}, | |
update: function (handle) { | |
this.reset(); | |
this._delayRunTimer = setTimeout(handle, this._delayRunTimeout); |