This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function cleanArray ($a) { | |
$names = array(); | |
$b = array(); | |
foreach ($a as $v) { | |
$name = $v->name; | |
if (!array_key_exists ($name, $names)) { | |
$names [$name] = 1; | |
array_push ($b, $v); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jQuery('#vt_nivo_slider<?php echo $module_id; ?>').bind('swipeleft', function(e){ | |
jQuery('a.nivo-nextNav').trigger('click'); | |
e.stopImmediatePropagation(); | |
return false; | |
}); | |
jQuery('#vt_nivo_slider<?php echo $module_id; ?>').bind('swiperight', function(e){ | |
jQuery('a.nivo-prevNav').trigger('click'); | |
e.stopImmediatePropagation(); | |
return false; | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (empty($_POST["catid"])){ | |
$return["error"] = true; | |
$return["msg"] = "Unidentified category ID."; | |
} else { | |
$return["error"] = false; | |
$db->setQuery('SELECT title FROM #__categories WHERE id='.$_POST["catid"]); | |
$category = $db->loadRow(); | |
if (is_array($category)){ | |
if ($category[0] == "Portfolio"){ | |
$category[0] = "Project Study"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$.ajax({ | |
type: 'POST', | |
url: '/path/to/PHP/file', | |
dataType: 'json', | |
data: { catid: $("#catid").val() }, | |
success: function(data){ | |
$('.item-page').prepend( | |
$('<h2>').append( | |
$('<span>') | |
.addClass('subheading-category') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var objectname = { | |
'key_one': { | |
'parameter_one': 'value_one', | |
'parameter_two': 'value_two', | |
'parameter_three': 'value_three' | |
}, | |
'key_two': { | |
'parameter_one': 'value_one', | |
'parameter_two': 'value_two', | |
'parameter_three': 'value_three' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
define( '_JEXEC', 1 ); | |
define( ' _VALID_MOS', 1 ); | |
define( 'JPATH_BASE', '/path/to/Joomla/installation'); | |
define( 'DS', DIRECTORY_SEPARATOR ); | |
require_once ( JPATH_BASE .DS.'includes'.DS.'defines.php' ); | |
require_once ( JPATH_BASE .DS.'includes'.DS.'framework.php' ); | |
$mainframe =& JFactory::getApplication('site'); | |
$mainframe->initialise(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class PlgContentContentSpan extends JPlugin | |
{ | |
/** | |
* Plugin that converts: | |
* <p> | |
* <img src="/images/EDPS-ABOVE-CONTENT-optimized.jpg" alt="" width="689" height="327"> | |
* <img src="/images/JW-ABOVE-CONTENT-optimized.jpg" alt="" width="315" height="327"> | |
* </p> | |
* | |
* To: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<table> | |
<thead> | |
<tr> | |
<th>Name</th> | |
<th data-hide="phone,tablet">Division</th> | |
<th>Phone</th> | |
<th data-hide="phone">Email</th> | |
<th data-hide="phone,tablet">Location</th> | |
</tr> | |
</thead> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
document.addEventListener('DOMContentLoaded', function() { | |
var copybtn = document.getElementById('copybtn'); | |
var authcode = document.getElementById('authcode'); | |
copybtn.addEventListener('click', function() { | |
// select the authorization code value | |
authcode.setSelectionRange(0, authcode.value.length); | |
try{ | |
// with text selected, execute the copy command | |
var successful = document.execCommand('copy'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
document.addEventListener('DOMContentLoaded', function() { | |
var copybtn = document.getElementById('copybtn'); | |
var authcode = document.getElementById('authcode'); | |
copybtn.addEventListener('click', function() { | |
// select the authorization code text | |
var range = document.createRange(); | |
range.selectNode(authcode); | |
window.getSelection().addRange(range); | |
try{ |
OlderNewer