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 | |
/** | |
* Implementation of hook_menu_alter(). | |
*/ | |
function node2front_menu_alter(&$items) { | |
$items['node']['page callback'] = '_node2front_redirect'; | |
} | |
/** | |
* Redirect back to the frontpage. |
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 | |
$date_field = $node->field_date_event; | |
// array for configurtion | |
$display_settings = array ( | |
'type' => 'date_default', // type of the date field | |
'settings' => array ( | |
'format_type' => 'event' // custom date format | |
) | |
); | |
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 MYMODULE_js_alter(&$javascript) { | |
// check if we are on front_page | |
if(drupal_is_front_page()) { | |
$path = drupal_get_path('module', 'MYMODULE') . '/js/jquery-1.7.1.min.js'; | |
// Copy the current jQuery file settings and change | |
$javascript[$path] = $javascript['misc/jquery.js']; | |
// Update necessary settings | |
$javascript[$path]['version'] = '1.7.1'; | |
$javascript[$path]['data'] = $path; |
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
$view = new view; | |
$view->name = 'nivo_slider_images'; | |
$view->description = ''; | |
$view->tag = 'default'; | |
$view->base_table = 'node'; | |
$view->human_name = 'NivoSlider'; | |
$view->core = 7; | |
$view->api_version = '3.0'; | |
$view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */ |
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_preprocess_page(&$vars) { | |
$m_obj = menu_get_object(); | |
if ($m_obj->type == 'product_group') { | |
// set jQuery 1.5.1 for slider | |
$path_to_slider = drupal_get_path('module', "slider"); | |
drupal_set_html_head('<script type="text/javascript" src="'. base_path() . path_to_theme() .'/js/libs/jquery-1.5.1.min.js"></script>'); | |
drupal_set_html_head('<script type="text/javascript" src="'. base_path() . $path_to_slider .'/ContentFlow/contentflow.js" load="ML"></script>'); | |
drupal_add_js($path_to_slider ."/contentflow_trigger.js"); |
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
{ "rules_create_node_for_webform_data" : { | |
"LABEL" : "create node for webform data", | |
"PLUGIN" : "reaction rule", | |
"REQUIRES" : [ "rules", "webform_rules" ], | |
"ON" : [ "webform_rules_submit" ], | |
"IF" : [ | |
{ "node_is_of_type" : { "node" : [ "node" ], "type" : { "value" : { "webform" : "webform" } } } } | |
], | |
"DO" : [ | |
{ "entity_create" : { |
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
name = Business Subtheme | |
description = business subtheme | |
version = VERSION | |
core = 7.x | |
base theme = business | |
regions[sidebar_first] = First Sidebar | |
regions[header] = Header |
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
{ "rules_set_forum_content_unpublished" : { | |
"LABEL" : "set forum content unpublished", | |
"PLUGIN" : "reaction rule", | |
"REQUIRES" : [ "rules" ], | |
"ON" : [ "node_presave" ], | |
"IF" : [ | |
{ "node_is_of_type" : { "node" : [ "node" ], "type" : { "value" : { "forum" : "forum" } } } }, | |
{ "data_is" : { "data" : [ "node:taxonomy-forums" ], "value" : "3" } } | |
], | |
"DO" : [ |
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
# KILL THEM ETAGS | |
# http://www.askapache.com/htaccess/apache-speed-etags.html | |
FileETag none | |
# set expires header | |
<FilesMatch "\.(ico|jpg|jpeg|png|gif|js|css|swf|woff|eot|svg|ttf)$"> | |
Header set Expires "Tue, 16 Jun 2020 20:00:00 GMT" | |
</FilesMatch> | |
# turn on gzip compression |
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
wget -m -k -K -e html_extension=On http://www.port11.de |