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
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" | |
"http://www.w3.org/TR/html4/strict.dtd"> | |
<html lang="en"> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> | |
<title>Share DrupalCon Copenhagen/title> | |
<meta name="title" content="Drupalcon Copenhagen" /> | |
<meta name="description" content="Join us.." /> | |
<link rel="image_src" href="http://port11.de/files/cph_logo_0.png" /> | |
</head> |
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
<meta name="title" content="The Title Of The Link" /> | |
<meta name="description" content="A description of the link would go here." /> | |
<link rel="image_src" type="image/jpeg" href="http://www.domain.com/path/my_picture.jpg" /> |
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
<?php | |
require_once 'File/CSV/DataSource.php'; | |
$path = "my_csv.txt"; | |
$csv = new File_CSV_DataSource; | |
$csv->settings = array( | |
delimiter' => '|', | |
'eol' => ";", | |
'length' => 999999, | |
'escape' => '"' | |
); |
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
<?php | |
if (isset($_GET["file"])) { | |
$file_name = $_GET["file"]; | |
if (file_exists($file_name)) { | |
header(”Content-type: application/x-download”); | |
header(”Content-Disposition: attachment; filename=$file_name”); | |
header(”Content-Transfer-Encoding: binary”); | |
header(’Content-Length: ‘ . filesize($file_name)); | |
ob_clean(); | |
flush(); |
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
<?php | |
$this->Hour->Job->bindModel(array('hasOne' => array('UsersJob'))); | |
$jobs = $this->Hour->Job->find('all', array( | |
'fields' => array('Job.id', 'Job.title', 'Job.description'), | |
'conditions' => array('UsersJob.user_id' => $this->user_id, 'Job.deleted' => 0), | |
'recursive' => 0 | |
)); | |
?> |
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
<?php | |
function mymodule_views_query_alter(&$view, &$query) | |
{ | |
if($view->name=='mitarbeiter') { | |
$itemsPerPage = intval( $view->exposed_input['items_per_page']); // Wert aus dem DropDown auslesen | |
if ($itemsPerPage == 0) { | |
$view->set_items_per_page(10); // Default Limit | |
} | |
else $view->set_items_per_page($itemsPerPage); | |
} |
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
<?php | |
function mymodule_form_alter(&$form, &$form_state, $form_id) | |
{ | |
if($form_id == 'views_exposed_form' && $form['#id']=='views-exposed-form-mitarbeiter-page-1' ) { | |
//Items per page | |
$form['#info']['filter-items_per_page']['operator']= 'items_per_page_op'; | |
$form['#info']['filter-items_per_page']['value']= 'items_per_page'; | |
$form['#info']['filter-items_per_page']['label']= t('Items per Page'); | |
$items_per_page_ar = array ('10'=>'10','20'=>'20','30'=>'30','50'=>'50','100'=>'100',''=>'alle'); | |
$form['items_per_page'] = array(); |
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
<?php | |
function mytheme_preprocess_page(&$variables) { | |
// wurde die seite über AJAX request aufgerufen? | |
if (isset($_SERVER['HTTP_X_REQUESTED_WITH']) && strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) == 'xmlhttprequest' ) { | |
$variables['template_files'] = is_array($variables['template_files']) ? $variables['template_files'] : array(); | |
// füge ein neues template hinzu | |
$variables['template_files'][] = 'page-xhttp'; | |
} | |
} | |
?> |
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
<?php print $content ?> |
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
<?php | |
function mytheme_preprocess_html(&$variables) { | |
// wurde die seite über AJAX request aufgerufen? | |
if (isset($_SERVER['HTTP_X_REQUESTED_WITH']) && strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) == 'xmlhttprequest' ) { | |
$variables['theme_hook_suggestions'][] = 'html__sites__xhttp'; | |
} | |
} | |
function mytheme_preprocess_page(&$variables, $hook) { |