This file contains hidden or 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
<?php #<-- omit | |
# All other configs goes here | |
# ------------------------------------------ # | |
# THIS GOES AT THE END OF SETTINGS.PHP FILE! | |
# | |
# Replace strings with appropriate info: | |
# - USER-XXXX | |
# - server-ip | |
# ------------------------------------------ # |
This file contains hidden or 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>JWPlayer test</title> | |
<!-- JW Player Library --> | |
<script src="http://jwpsrv.com/library/RANDOM_ACCOUNT_KEY.js"></script> | |
<script>jwplayer.key="RANDOM_KEY==";</script> | |
</head> | |
<body> | |
<div id="playeryEQEzJOybgkU"></div> |
This file contains hidden or 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
<?php | |
/** | |
* Class Resp Used to simulate WS response | |
*/ | |
class Resp { | |
private $r = array(1 => 'A', 2 => 'B'); | |
public function re() { | |
return $this->r[rand(1,2)]; | |
} |
This file contains hidden or 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
<?php | |
class MyException extends Exception {} | |
class Helper { | |
/** | |
* @param string $date The date in format: "Y-m-d" | |
* @param string $operator Operator used to compare two dates | |
* @return bool | |
* @throws string | |
*/ |
This file contains hidden or 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
<?php | |
/** | |
* First we need to configure Commerce Currency and enable new target currency | |
* at (admin/commerce/config/currency) to convert to. | |
* Next we setup conversion rates in admin/commerce/config/currency/conversion | |
* And finally execute this snippet in Devel PHP block or create simple module | |
*/ | |
/** | |
* Find all commerce products |
This file contains hidden or 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(document).ready(function($){ | |
var $content_area = $('#content-area'); | |
var $body = $('body'); | |
var $footer = $('#footer'); | |
$content_area.find('.content p:last').addClass('last'); | |
$(window).scroll(function() { | |
if ($(this).scrollTop() > 21) { | |
$('#top, #sidebar-first').addClass("sticky"); |
This file contains hidden or 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
<?php | |
/** | |
* Override or insert variables into the page template. | |
*/ | |
function theme_name_preprocess_page(&$vars) { | |
if (isset($vars['node']) && $vars['node']->type == 'preke') { | |
if (count($vars['node']->field_tax_vandens_filtrai) > 0) { | |
$vars['theme_hook_suggestions'][] = 'page__vandens_filtrai'; | |
} |
This file contains hidden or 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
<?php | |
/** | |
* Override or insert variables into the node template. | |
*/ | |
function theme_name_preprocess_node(&$vars) { | |
$vars['submitted'] = $vars['date'] . ' — ' . $vars['name']; | |
// Add decent classes for node titles. | |
$vars['title_attributes_array']['class'][] = 'title'; | |
$vars['title_attributes_array']['class'][] = 'node-title'; |
This file contains hidden or 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
<?php | |
function theme_name_preprocess_page(&$vars) { | |
if (!empty($vars['node']) && $vars['node']->nid == '17') { | |
menu_set_active_item('node/10'); | |
} | |
} |
This file contains hidden or 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
<?php | |
/** | |
* Override or insert variables into the html template. | |
*/ | |
function theme_name_preprocess_html(&$vars) { | |
if (arg(0) == 'node') { | |
$_nid = arg(1); | |
if (is_numeric($_nid)) { | |
$nod = node_load($_nid); |
OlderNewer