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 | |
$sql = 'SELECT name, email, mobile, place FROM {test}'; | |
$header = array( | |
array('data' => 'name', 'field' => 'name'), | |
array('data' => 'email', 'field' => 'email'), | |
array('data' => 'mobile', 'field' => 'mobile'), | |
array('data' => 'place', 'field' => 'place'), | |
); | |
$sql .= tablesort_sql($header); | |
$result = pager_query($sql, 50); |
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 cod | |
(function($){ | |
$(document).ready(function($){ | |
$('.news img').each(function(){ | |
var $this = $(this); | |
$this.css({ | |
'background':'url(' + this.src + ') center center no-repeat' | |
}) | |
.attr('src','/your/site/url/images/mask.png'); | |
}); |
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
<script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?key=YOUR_KEY&sensor=true"></script> | |
//Function | |
//Function to initialize the google map api | |
function initialize() { | |
var reqlat = '25.199971'; //Lattitude | |
var reqlong = '55.275371'; //Longittude | |
var mapOptions = { | |
center: new google.maps.LatLng(reqlat,reqlong), |
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 | |
/** | |
* hook_install() | |
* This will automatically called when a module is installed | |
*/ | |
function newslettereasy_install() { | |
_install_node_type(); | |
} | |
function _install_node_type() { |
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
<html xmlns="http://www.w3.org/1999/xhtml" | |
xmlns:fb="https://www.facebook.com/2008/fbml"> | |
<head> | |
<title>My Feed Dialog Page</title> | |
</head> | |
<body> | |
<div id='fb-root'></div> | |
<script src='http://connect.facebook.net/en_US/all.js'></script> | |
<p><a onclick='postToFeed(); return false;'>Post to Feed</a></p> | |
<p id='msg'></p> |
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 | |
global $user; | |
if ( $user->uid ) { | |
// Logged in user | |
} | |
else { | |
// Not logged in | |
} | |
?> |
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
.your_image { | |
-webkit-filter: grayscale(100%); | |
-moz-filter: grayscale(100%); | |
-ms-filter: grayscale(100%); | |
-o-filter: grayscale(100%); | |
filter: grayscale(100%); | |
filter: url(filters.svg#grayscale); /* Firefox 4+ */ | |
filter: gray; /* IE 6-9 */ | |
} |
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
<svg xmlns="http://www.w3.org/2000/svg"> | |
<filter id="grayscale"> | |
<feColorMatrix type="matrix" values="0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0 1 0"/> | |
</filter> | |
</svg> |
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> | |
<meta name="viewport" content="initial-scale=1.0, user-scalable=no" /> | |
<style type="text/css"> | |
html { | |
height: 100% | |
} | |
body { | |
height: 100%; |
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
<block type="page/switch" name="store_switcher" as="store_switcher" template="page/switch/stores.phtml"/> |