Skip to content

Instantly share code, notes, and snippets.

View ideesimple's full-sized avatar

Laurent Toulemonde ideesimple

View GitHub Profile
<?php
// Variables used in this script:
// $summary - text title of the event
// $datestart - the starting date (in seconds since unix epoch)
// $dateend - the ending date (in seconds since unix epoch)
// $address - the event's address
// $uri - the URL of the event (add http://)
// $description - text description of the event
// $filename - the name of this file for saving (e.g. my-event-name.ics)
//
@import "compass/css3/animation";
@import "compass/css3/transform";
$waveWidth:998px;
@include keyframes(waves){
0%{
left:0;
}
100%{
@ideesimple
ideesimple / gist:1080530
Created July 13, 2011 15:29
utilisation de migx avec la possibilité de choisir le type de bloc à rajouter
[
{"formname":"Bloc1", "formtabs":
[
{"caption":"Marque de bateau", "fields": [
{"field":"MarqueBateau","caption":"Marque"}
]}
]
},{"formname":"Bloc2", "formtabs":
[
{"caption":"Détail", "fields": [
@ideesimple
ideesimple / gist:1077569
Created July 12, 2011 07:43
where avec json
{"id:NOT IN":[12,13,14,15]}
{"id:IN":[12,13,14,15]}
var firstCombo = new Ext.form.ComboBox({
store: store_combo_1,
typeAhead: true,
forceSelection: true,
triggerAction: 'all',
emptyText:'Select a state...',
selectOnFocus:true,
id:'combo1'
});
[[~[[*id]]? &scheme=`full`]]
@ideesimple
ideesimple / gist:838740
Created February 22, 2011 14:27
modulo idx
[[+idx:mod=`5`:default=`class="test5"`]]
<?php
// First fetch all the children of the current resource
$children = $modx->resource->getMany('Children');
// Check if there are any. If not, return false
if (!$children) { return false; }
// Check if there is a tpl set, if not return an error
$tpl = $modx->getOption('tpl',$scriptProperties,'');
if (!$tpl) { return 'No template given.'; }
// Start the output
<?php
/* UserGroups snippet*/
$user =& $modx->user;
if ($user->isMember('membres') {
$output = $modx->getChunk('membres');
} elseif ($user->isMember('administrateurs') {
$output = $modx->getChunk('administrateurs');
} elseif ($user->isMember('employés') {
$output = $modx->getChunk('employés');