Skip to content

Instantly share code, notes, and snippets.

@hogollo
hogollo / gist:1992635
Last active October 1, 2015 12:37
Contao: for FE user only
<?php if (FE_USER_LOGGED_IN): ?>
//secret content
<?php endif; ?>
@hogollo
hogollo / gist:1989861
Created March 6, 2012 23:48 — forked from padolsey/gist:527683
JavaScript: Detecting IE
// ----------------------------------------------------------
// A short snippet for detecting versions of IE in JavaScript
// without resorting to user-agent sniffing
// ----------------------------------------------------------
// If you're not in IE (or IE version is less than 5) then:
// ie === undefined
// If you're in IE (>=5) then you can determine which version:
// ie === 7; // IE7
// Thus, to detect IE:
// if (ie) {}
@hogollo
hogollo / gist:1989835
Created March 6, 2012 23:45
Contao: DCA input text
'field' => array
(
'label' => &$GLOBALS['TL_LANG']['tl_path']['name'],
'exclude' => true,
'search' => true,
'inputType' => 'text',
'eval' => array('mandatory'=>true, 'maxlength'=>255, 'tl_class'=>'w50')
),
@hogollo
hogollo / gist:1989799
Created March 6, 2012 23:37
JavaScript: If exist
if ($('#yourSelector').length) {
// your content
}