Skip to content

Instantly share code, notes, and snippets.

View oelmekki's full-sized avatar

kik oelmekki

View GitHub Profile
<?php
// sans :
// tous les produits
$records = $this->Database->execute( 'select * from tl_products where published = 1' );
$products = array();
while ( $records->next() )
{
$products[] = $records->row();
<?php if (!defined('TL_ROOT')) die('You can not access this file directly!');
/**
* TYPOlight webCMS
* Copyright (C) 2005-2009 Leo Feyer
*
* This program is free software: you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation, either
* version 2.1 of the License, or (at your option) any later version.
<?php if (!defined('TL_ROOT')) die('You can not access this file directly!');
/**
* TYPOlight Open Source CMS
* Copyright (C) 2005-2010 Leo Feyer
*
* This program is free software: you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation, either
* version 3 of the License, or (at your option) any later version.
//
$(document).ready(function(){
function megaHoverOver(){
$(this).find('.sub').stop().animate({ height: 360 });
}
function megaHoverOut(){
$(this).find('.sub').stop().animate({ height: 0 });
}
$.Dagobert.Controllers.AtelierSlider.prototype.clicked = function( event ){
var $target = $( event.target );
if ( $target.parents( 'a' ).length ){
$target = $target.parents( 'a' ).first();
}
if ( $target.is( 'a' ) && $target.parents( '.ce_atelierImg' ).length ){
event.stopPropagation();
event.preventDefault();
<!DOCTYPE html>
<html xml:lang="<?php echo $this->language; ?>" lang="<?php echo $this->language; ?>">
<head>
<meta charset="utf-8" />
<meta name="svg.render.forceflash" content="true">
<title><?php echo $this->pageTitle; ?> - <?php echo $this->mainTitle; ?></title>
<base href="<?php echo $this->base; ?>" />
<!--[if IE lte 8]>
<script src="tl_files/js/html5.js"></script>
<noscript>
<?php if (!defined('TL_ROOT')) die('You can not access this file directly!');
$GLOBALS[ 'TL_DCA' ][ 'tl_content' ][ 'palettes' ][ 'cogedim_content' ] = '{type_legend},type,cogedim_content';
$GLOBALS[ 'TL_DCA' ][ 'tl_content' ][ 'fields' ][ 'cogedim_content' ] = array(
'label' => &$GLOBALS['TL_LANG']['tl_content']['cogedim_content'],
'exclude' => true,
'inputType' => 'select',
'options_callback' => array('BackendCogedimContents', 'allAsOptions'),
'flag' => 11,
);
ActiveRecord::Base.logger = Logger.new(STDERR)
ActiveRecord::Base.colorize_logging = false
ActiveRecord::Base.establish_connection(
:adapter => 'mysql',
:encoding => 'utf8',
:reconnect => false,
:database => 'btp',
:pool => 5,
:username => '',
var getListWidth = function(){
var maxWidth = 0, width, $langList = $( '#langsList' );
$langList.show();
$langList.find( 'li' ).each( function( i, li ){
var $li = $( li );
width = $li.width();
if ( width > maxWidth ){
maxWidth = width;
}
});
<?php if (!defined('TL_ROOT')) die('You can not access this file directly!');
/**
* Contao Open Source CMS
* Copyright (C) 2005-2010 Leo Feyer
*
* Formerly known as TYPOlight Open Source CMS.
*
* This program is free software: you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public