Skip to content

Instantly share code, notes, and snippets.

@tsavory
tsavory / first product view
Created July 6, 2012 03:44
product view after site failed
view = new view;
$view->name = 'alfaparf';
$view->description = '';
$view->tag = 'default';
$view->base_table = 'node';
$view->human_name = 'Alfaparf';
$view->core = 7;
$view->api_version = '3.0';
$view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
@tsavory
tsavory / cdata
Created June 11, 2012 08:29
cdata
<!--//--><![CDATA[//><!--
jQuery.extend(Drupal.settings, {"basePath":"\u002F", "pathPrefix":"", "ajaxPageState":{"theme":"hsavory", "theme_token":"ZfL1kJDe81eYUOiRdDpYP_OVKPGSQl4LKcI8ODQBkbU", "js":{"misc\u002Fjquery.js":1, "misc\u002Fjquery.once.js":1, "misc\u002Fdrupal.js":1, "misc\u002Fui\u002Fjquery.ui.core.min.js":1, "misc\u002Fui\u002Fjquery.ui.widget.min.js":1, "misc\u002Fui\u002Fjquery.ui.mouse.min.js":1, "misc\u002Fui\u002Fjquery.ui.draggable.min.js":1, "misc\u002Fui\u002Fjquery.ui.droppable.min.js":1, "misc\u002Fui\u002Fjquery.ui.sortable.min.js":1, "modules\u002Fcontextual\u002Fcontextual.js":1, "misc\u002Fjquery.cookie.js":1, "misc\u002Fform.js":1, "sites\u002Fall\u002Fmodules\u002Fdevel\u002Fdevel_krumo_path.js":1, "\u002Fbook1\u002FAC_OETags.js":1, "\u002Fbook1\u002Fhistory.js":1, "sites\u002Fall\u002Fmodules\u002Fcontext\u002Fplugins\u002Fcontext_reaction_block.js":1, "sites\u002Fall\u002Fmodules\u002Fadmin\u002Fincludes\u002Fjquery.drilldown.js":1, "sites\u002Fall\u002Fmodules\u002Fadmin\u002F
@tsavory
tsavory / maincolumn
Created June 11, 2012 07:21
css from the main column
#maincolumn_full {
margin: 0;
}
#maincolumn .nopad, #maincolumn_full .nopad {
position: relative;
z-index: 100;
}
#maincolumn .border_topleft, #maincolumn_full .border_topleft {
background-image: url("../images/paper_topleft.png");
height: 61px;
@tsavory
tsavory / all fixed I guess
Created June 8, 2012 19:41
first attempt
<?php
/**
* Intergrates Flex Book web pages
*
*/
function flex_book_node_view($node) {
if($node->type == 'flex_book'){
$load_js = $node->field_load_js;//calls the field and makes it load.js
foreach($load_js['und'] as $js_file) { // gets the und from laod.js
@tsavory
tsavory / hacks
Created June 8, 2012 06:25
Browser hacks
http://www.webdevout.net/css-hacks
Comprehensive List of Browser-Specific CSS Hacks
/***** Selector Hacks ******/
/* IE6 and below */
* html #uno { color: red }
@tsavory
tsavory / stickyfooter
Created June 8, 2012 05:32
omega sticky footer
Posted by kkasischke on May 24, 2012 at 1:48pm new
I used to use a different method before, but since I started using Omega, I've been using this code in my theme-alpha-default.css file:
/* sticky footer */
html, body {height: 100%; margin: 0;}
#page {display: table; width: 100%;}
html>/**/body #page {height: 100%;}
*:first-child+html #page {height: auto;}
.section {display: table-row;}
html>/**/body .section-content {height: 100%;}
@tsavory
tsavory / adding to omega
Created June 8, 2012 04:48
helpfull omega links
http://drupal.org/node/1508452 Add ie conditional classes out of the box
@tsavory
tsavory / respondsive_layout
Created June 8, 2012 03:53
bind jquary to responsive layout
Found the answer in http://drupal.org/node/1299286#comment-5412342 (thanks @bc and @himerus)
You can bind to the jQuery global event 'responsivelayout':
jQuery('body').bind('responsivelayout', function() { /* handle event */ } );
The global event is defined in omega-mediaqueries.js with $.event.trigger. Because it's global, you can bind a listener to any object in the DOM.
So my custom code should look like:
@tsavory
tsavory / HammHetFiled_Menu
Created June 6, 2012 21:37
Adding admin menu and sub Tabs
When adding menus and tabs remeber you have to use the MENU_DEFAULT_LOCAL_TASK to get Tab to show up
So this
function djehouti_menu() {
$links = array();
// Dashboard
$links['admin/djehouti'] = array(
'title' => 'Djehouti',
'description' => 'Dashboard page',
'page callback' => 'djehouti_page_dashboard',
@tsavory
tsavory / base.make
Created June 6, 2012 17:56
basic make file from drushmake.me
; ----------------
; Generated makefile from http://drushmake.me
; Permanent URL: http://drushmake.me/file.php?token=91cec1b91cbf
; ----------------
;
; This is a working makefile - try it! Any line starting with a `;` is a comment.
; Core version
; ------------
; Each makefile should begin by declaring the core version of Drupal that all